From e1766cf104fa2dbf41aee824f9f63d22a834c670 Mon Sep 17 00:00:00 2001 From: Afri <58883403+q9f@users.noreply.github.com> Date: Sun, 29 Dec 2024 15:03:07 +0100 Subject: [PATCH] update ruby 3.3 bindings (#28) * ci: test ruby 3.4 bindings * add console * add console --- .github/workflows/build.yml | 4 ++-- .github/workflows/codecl.yml | 2 +- AUTHORS | 2 +- bin/console | 10 ++++++++++ keccak.gemspec | 6 +++--- 5 files changed, 17 insertions(+), 7 deletions(-) create mode 100755 bin/console diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8eda7da..955730a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,12 +11,12 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.3 - name: Install Dependencies run: | gem install test-unit diff --git a/.github/workflows/codecl.yml b/.github/workflows/codecl.yml index 5fb2561..1e3cdd2 100644 --- a/.github/workflows/codecl.yml +++ b/.github/workflows/codecl.yml @@ -36,7 +36,7 @@ jobs: uses: github/codeql-action/analyze@v3 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2' + ruby-version: '3.3' bundler-cache: true - name: "Run rufo code formatting checks" run: | diff --git a/AUTHORS b/AUTHORS index a92eaaa..b8fa254 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,5 +13,5 @@ https://github.com/sydneyitguy/digest-sha3-ruby Copyright (c) 2019-2021 Alex Kotov; licensed under MIT License https://github.com/kotovalexarian/digest-keccak -Copyright (c) 2021-2022 Afri Schoedon; re-licensed under Apache 2.0 +Copyright (c) 2021-2025 Afri Schoedon; re-licensed under Apache 2.0 https://github.com/q9f/keccak.rb diff --git a/bin/console b/bin/console new file mode 100755 index 0000000..3f74f30 --- /dev/null +++ b/bin/console @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby + +# use the local version of the code instead of a globally installed gem +$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) + +require "digest/keccak" +include Digest + +require "pry" +Pry.start diff --git a/keccak.gemspec b/keccak.gemspec index 32095bb..2b0d682 100644 --- a/keccak.gemspec +++ b/keccak.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| spec.email = "%w[ruby@q9f.cc]" spec.extensions << "ext/digest/extconf.rb" spec.platform = Gem::Platform::RUBY - spec.required_ruby_version = ">= 2.7", "< 4.0" + spec.required_ruby_version = ">= 3.0", "< 4.0" spec.license = "Apache-2.0" spec.metadata = { "homepage_uri" => "https://github.com/q9f/keccak.rb", @@ -34,6 +34,6 @@ Gem::Specification.new do |spec| "lib/**/*" ] spec.test_files = spec.files.grep %r{^(test|spec|features)/} - spec.add_development_dependency "bundler", "~> 2.2" - spec.add_development_dependency "test-unit", "~> 3.4" + spec.add_development_dependency "bundler", "~> 2.4" + spec.add_development_dependency "test-unit", "~> 3.6" end