Skip to content

Commit fc7bf2d

Browse files
committed
Init basic structure
1 parent 389dbda commit fc7bf2d

22 files changed

Lines changed: 963 additions & 0 deletions

.cspell.jsonc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"words": [
3+
"decapsulation",
4+
"ecies",
5+
"eciesrb",
6+
"HKDF",
7+
"libsecp256k1",
8+
"privkey",
9+
"rubygems",
10+
"secp256k1"
11+
],
12+
"ignorePaths": [
13+
".gitignore",
14+
"LICENSE",
15+
"Gemfile.lock"
16+
]
17+
}

.github/workflows/cd.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CD
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Push gem to RubyGems.org
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v5
14+
15+
- name: Set up Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: '3.4'
19+
20+
- name: Install dependencies
21+
run: bundle install
22+
23+
- name: Build gem
24+
run: gem build --output=release.gem
25+
26+
- name: Publish gem
27+
run: gem push release.gem
28+
env:
29+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest]
15+
ruby-version: ['3.2', '3.3', '3.4']
16+
17+
steps:
18+
- uses: actions/checkout@v5
19+
with:
20+
submodules: true
21+
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: ${{ matrix.ruby-version }}
26+
bundler-cache: true
27+
28+
- name: Install dependencies on macOS
29+
if: runner.os == 'macOS'
30+
run: brew install automake libtool secp256k1 openssl
31+
32+
- name: Install dependencies on Ubuntu
33+
if: runner.os == 'Linux'
34+
run: sudo apt install -y libsecp256k1-dev gcc
35+
36+
- run: bundle install
37+
38+
- name: Run tests
39+
run: C_INCLUDE_PATH=$(brew --prefix secp256k1)/include bundle exec rake test
40+
41+
- name: Run examples
42+
run: |
43+
export C_INCLUDE_PATH=$(brew --prefix secp256k1)/include
44+
bundle exec ruby examples/config.rb
45+
bundle exec ruby examples/quickstart.rb
46+
47+
- name: Build gem
48+
run: gem build --output=release.gem

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
*.gem
2+
*.rbc
3+
/.config
4+
/coverage/
5+
/InstalledFiles
6+
/pkg/
7+
/spec/reports/
8+
/spec/examples.txt
9+
/test/tmp/
10+
/test/version_tmp/
11+
/tmp/
12+
13+
# Used by dotenv library to load environment variables.
14+
# .env
15+
16+
# Ignore Byebug command history file.
17+
.byebug_history
18+
19+
## Specific to RubyMotion:
20+
.dat*
21+
.repl_history
22+
build/
23+
*.bridgesupport
24+
build-iPhoneOS/
25+
build-iPhoneSimulator/
26+
27+
## Specific to RubyMotion (use of CocoaPods):
28+
#
29+
# We recommend against adding the Pods directory to your .gitignore. However
30+
# you should judge for yourself, the pros and cons are mentioned at:
31+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32+
#
33+
# vendor/Pods/
34+
35+
## Documentation cache and generated files:
36+
/.yardoc/
37+
/_yardoc/
38+
/doc/
39+
/rdoc/
40+
41+
## Environment normalization:
42+
/.bundle/
43+
/vendor/bundle
44+
/lib/bundler/man/
45+
46+
# for a library or gem, you might want to ignore these files since the code is
47+
# intended to run in multiple environments; otherwise, check them in:
48+
# Gemfile.lock
49+
# .ruby-version
50+
# .ruby-gemset
51+
52+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53+
.rvmrc
54+
55+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
56+
# .rubocop-https?--*
57+
58+
release/

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 0.0.1
4+
5+
- First alpha release

Gemfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec
6+
7+
gem "standard", group: :development
8+
gem "sorbet", group: :development
9+
gem "sorbet-runtime"
10+
gem "tapioca", require: false, group: [:development, :test]
11+
gem "rake", group: :development
12+
gem "minitest", group: :test

Gemfile.lock

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
PATH
2+
remote: .
3+
specs:
4+
eciesrb (0.0.1)
5+
libsecp256k1 (~> 0.6.1)
6+
openssl (~> 3.3)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
ast (2.4.3)
12+
benchmark (0.5.0)
13+
erubi (1.13.1)
14+
ffi (1.17.2-aarch64-linux-gnu)
15+
ffi (1.17.2-aarch64-linux-musl)
16+
ffi (1.17.2-arm64-darwin)
17+
ffi (1.17.2-x86_64-darwin)
18+
ffi (1.17.2-x86_64-linux-gnu)
19+
ffi (1.17.2-x86_64-linux-musl)
20+
json (2.15.1)
21+
language_server-protocol (3.17.0.5)
22+
libsecp256k1 (0.6.1)
23+
ffi (~> 1.17)
24+
lint_roller (1.1.0)
25+
logger (1.7.0)
26+
minitest (5.26.0)
27+
netrc (0.11.0)
28+
openssl (3.3.1)
29+
parallel (1.27.0)
30+
parser (3.3.9.0)
31+
ast (~> 2.4.1)
32+
racc
33+
prism (1.6.0)
34+
racc (1.8.1)
35+
rainbow (3.1.1)
36+
rake (13.3.0)
37+
rbi (0.3.7)
38+
prism (~> 1.0)
39+
rbs (>= 3.4.4)
40+
rbs (3.9.5)
41+
logger
42+
regexp_parser (2.11.3)
43+
rexml (3.4.4)
44+
rubocop (1.80.2)
45+
json (~> 2.3)
46+
language_server-protocol (~> 3.17.0.2)
47+
lint_roller (~> 1.1.0)
48+
parallel (~> 1.10)
49+
parser (>= 3.3.0.2)
50+
rainbow (>= 2.2.2, < 4.0)
51+
regexp_parser (>= 2.9.3, < 3.0)
52+
rubocop-ast (>= 1.46.0, < 2.0)
53+
ruby-progressbar (~> 1.7)
54+
unicode-display_width (>= 2.4.0, < 4.0)
55+
rubocop-ast (1.47.1)
56+
parser (>= 3.3.7.2)
57+
prism (~> 1.4)
58+
rubocop-performance (1.25.0)
59+
lint_roller (~> 1.1)
60+
rubocop (>= 1.75.0, < 2.0)
61+
rubocop-ast (>= 1.38.0, < 2.0)
62+
ruby-progressbar (1.13.0)
63+
sorbet (0.6.12651)
64+
sorbet-static (= 0.6.12651)
65+
sorbet-runtime (0.6.12651)
66+
sorbet-static (0.6.12651-aarch64-linux)
67+
sorbet-static (0.6.12651-universal-darwin)
68+
sorbet-static (0.6.12651-x86_64-linux)
69+
sorbet-static-and-runtime (0.6.12651)
70+
sorbet (= 0.6.12651)
71+
sorbet-runtime (= 0.6.12651)
72+
spoom (1.6.3)
73+
erubi (>= 1.10.0)
74+
prism (>= 0.28.0)
75+
rbi (>= 0.3.3)
76+
rexml (>= 3.2.6)
77+
sorbet-static-and-runtime (>= 0.5.10187)
78+
thor (>= 0.19.2)
79+
standard (1.51.1)
80+
language_server-protocol (~> 3.17.0.2)
81+
lint_roller (~> 1.0)
82+
rubocop (~> 1.80.2)
83+
standard-custom (~> 1.0.0)
84+
standard-performance (~> 1.8)
85+
standard-custom (1.0.2)
86+
lint_roller (~> 1.0)
87+
rubocop (~> 1.50)
88+
standard-performance (1.8.0)
89+
lint_roller (~> 1.1)
90+
rubocop-performance (~> 1.25.0)
91+
tapioca (0.16.11)
92+
benchmark
93+
bundler (>= 2.2.25)
94+
netrc (>= 0.11.0)
95+
parallel (>= 1.21.0)
96+
rbi (~> 0.2)
97+
sorbet-static-and-runtime (>= 0.5.11087)
98+
spoom (>= 1.2.0)
99+
thor (>= 1.2.0)
100+
yard-sorbet
101+
thor (1.4.0)
102+
unicode-display_width (3.2.0)
103+
unicode-emoji (~> 4.1)
104+
unicode-emoji (4.1.0)
105+
yard (0.9.37)
106+
yard-sorbet (0.9.0)
107+
sorbet-runtime
108+
yard
109+
110+
PLATFORMS
111+
aarch64-linux
112+
aarch64-linux-gnu
113+
aarch64-linux-musl
114+
arm64-darwin
115+
universal-darwin
116+
x86_64-darwin
117+
x86_64-linux
118+
x86_64-linux-gnu
119+
x86_64-linux-musl
120+
121+
DEPENDENCIES
122+
eciesrb!
123+
minitest
124+
rake
125+
sorbet
126+
sorbet-runtime
127+
standard
128+
tapioca
129+
130+
BUNDLED WITH
131+
2.7.2

0 commit comments

Comments
 (0)