Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .cspell.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"words": [
"decapsulation",
"ecies",
"eciesrb",
"HKDF",
"libsecp256k1",
"privkey",
"rubygems",
"secp256k1"
],
"ignorePaths": [
".gitignore",
"LICENSE",
"Gemfile.lock"
]
}
29 changes: 29 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CD

on:
release:
types: [published]

jobs:
publish:
name: Push gem to RubyGems.org
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'

- name: Install dependencies
run: bundle install

- name: Build gem
run: gem build --output=release.gem

- name: Publish gem
run: gem push release.gem
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
ruby-version: ['3.2', '3.3', '3.4']

steps:
- uses: actions/checkout@v5
with:
submodules: true

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Install dependencies on macOS
if: runner.os == 'macOS'
run: brew install automake libtool secp256k1 openssl

- name: Install dependencies on Ubuntu
if: runner.os == 'Linux'
run: sudo apt install -y libsecp256k1-dev gcc

- run: bundle install

- name: Run tests
run: C_INCLUDE_PATH=/opt/homebrew/opt/secp256k1/include bundle exec rake test

- name: Run examples
run: |
export C_INCLUDE_PATH=/opt/homebrew/opt/secp256k1/include
bundle exec ruby examples/config.rb
bundle exec ruby examples/quickstart.rb

- name: Build gem
run: gem build --output=release.gem
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

# Used by dotenv library to load environment variables.
# .env

# Ignore Byebug command history file.
.byebug_history

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*

release/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## 0.0.1

- First alpha release
12 changes: 12 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec

gem "standard", group: :development
gem "sorbet", group: :development
gem "sorbet-runtime"
gem "tapioca", require: false, group: [:development, :test]
gem "rake", group: :development
gem "minitest", group: :test
131 changes: 131 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
PATH
remote: .
specs:
eciesrb (0.0.1)
libsecp256k1 (~> 0.6.1)
openssl (~> 3.3)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.3)
benchmark (0.5.0)
erubi (1.13.1)
ffi (1.17.2-aarch64-linux-gnu)
ffi (1.17.2-aarch64-linux-musl)
ffi (1.17.2-arm64-darwin)
ffi (1.17.2-x86_64-darwin)
ffi (1.17.2-x86_64-linux-gnu)
ffi (1.17.2-x86_64-linux-musl)
json (2.15.1)
language_server-protocol (3.17.0.5)
libsecp256k1 (0.6.1)
ffi (~> 1.17)
lint_roller (1.1.0)
logger (1.7.0)
minitest (5.26.0)
netrc (0.11.0)
openssl (3.3.1)
parallel (1.27.0)
parser (3.3.9.0)
ast (~> 2.4.1)
racc
prism (1.6.0)
racc (1.8.1)
rainbow (3.1.1)
rake (13.3.0)
rbi (0.3.7)
prism (~> 1.0)
rbs (>= 3.4.4)
rbs (3.9.5)
logger
regexp_parser (2.11.3)
rexml (3.4.4)
rubocop (1.80.2)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.46.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.47.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-performance (1.25.0)
lint_roller (~> 1.1)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (1.13.0)
sorbet (0.6.12651)
sorbet-static (= 0.6.12651)
sorbet-runtime (0.6.12651)
sorbet-static (0.6.12651-aarch64-linux)
sorbet-static (0.6.12651-universal-darwin)
sorbet-static (0.6.12651-x86_64-linux)
sorbet-static-and-runtime (0.6.12651)
sorbet (= 0.6.12651)
sorbet-runtime (= 0.6.12651)
spoom (1.6.3)
erubi (>= 1.10.0)
prism (>= 0.28.0)
rbi (>= 0.3.3)
rexml (>= 3.2.6)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
standard (1.51.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.80.2)
standard-custom (~> 1.0.0)
standard-performance (~> 1.8)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.8.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.25.0)
tapioca (0.16.11)
benchmark
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
rbi (~> 0.2)
sorbet-static-and-runtime (>= 0.5.11087)
spoom (>= 1.2.0)
thor (>= 1.2.0)
yard-sorbet
thor (1.4.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)
yard (0.9.37)
yard-sorbet (0.9.0)
sorbet-runtime
yard

PLATFORMS
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm64-darwin
universal-darwin
x86_64-darwin
x86_64-linux
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
eciesrb!
minitest
rake
sorbet
sorbet-runtime
standard
tapioca

BUNDLED WITH
2.7.2
Loading
Loading