From 6006891e0be15e7ba918ec79820d79a9039d42f3 Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Thu, 12 Feb 2026 16:09:23 +0100 Subject: [PATCH 1/7] Add Ruby 4.0 to test matrix and remove Ruby < 3 --- .github/workflows/test.yml | 6 ++---- Gemfile.8-0 | 4 ++++ Gemfile.8-0.lock | 7 ++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b908a3..169d92b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,6 @@ jobs: fail-fast: false matrix: include: - - ruby: 2.7.3 - gemfile: Gemfile.6-1 - - ruby: 2.7.3 - gemfile: Gemfile.7-1 - ruby: 3.2.0 gemfile: Gemfile.6-1 - ruby: 3.2.0 @@ -30,6 +26,8 @@ jobs: gemfile: Gemfile.7-2 - ruby: 3.4.1 gemfile: Gemfile.8-0 + - ruby: 4.0.1 + gemfile: Gemfile.8-0 env: BUNDLE_GEMFILE: "${{ matrix.gemfile }}" steps: diff --git a/Gemfile.8-0 b/Gemfile.8-0 index a5c84df..7e43825 100644 --- a/Gemfile.8-0 +++ b/Gemfile.8-0 @@ -12,6 +12,10 @@ gem 'shoulda-matchers' gem 'sqlite3' gem 'database_cleaner' gem 'gemika', '>= 0.8.1' +gem 'actionpack' + +# Previous default gems +gem 'cgi' # Gem under test gem 'consul', :path => '.' diff --git a/Gemfile.8-0.lock b/Gemfile.8-0.lock index d244d35..0c9d8d7 100644 --- a/Gemfile.8-0.lock +++ b/Gemfile.8-0.lock @@ -52,6 +52,7 @@ GEM benchmark (0.4.0) bigdecimal (3.1.8) builder (3.3.0) + cgi (0.3.6) concurrent-ruby (1.3.3) connection_pool (2.4.1) crass (1.0.6) @@ -80,10 +81,12 @@ GEM nokogiri (>= 1.12.0) memoized (1.1.1) mini_portile2 (2.8.8) - minitest (5.24.1) + minitest (6.0.1) + prism (~> 1.5) nokogiri (1.16.6) mini_portile2 (~> 2.8.2) racc (~> 1.4) + prism (1.9.0) psych (5.2.2) date stringio @@ -159,7 +162,9 @@ PLATFORMS ruby DEPENDENCIES + actionpack assignable_values + cgi consul! database_cleaner gemika (>= 0.8.1) From d878bcbd471a947d807134969bc5e1229d4a5978 Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Thu, 12 Feb 2026 17:01:23 +0100 Subject: [PATCH 2/7] Provide dev script dev/matrix and adjust REAMDE --- README.md | 37 +++++++++++++++++++++++++------ dev/matrix | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 7 deletions(-) create mode 100755 dev/matrix diff --git a/README.md b/README.md index 2230d1f..3de9e9e 100644 --- a/README.md +++ b/README.md @@ -834,16 +834,39 @@ Now run `bundle install` to lock the gem into your project. ## Development -We currently develop using Ruby 3.4.1 (see `.ruby-version`) since that version works for current versions of ActiveRecord that we support. GitHub Actions will test additional Ruby versions (2.7.3, 3.2.0). +We currently develop using Ruby 3.4.1 (see `.ruby-version`) since that version works for current versions of ActiveRecord that we support. GitHub Actions will test additional Ruby versions (3.2.0, 4.0.1). There are tests in `spec`. We only accept PRs with tests. To run tests: -- Install Ruby 3.4.1 -- run `bundle install` -- Put your database credentials into `spec/support/database.yml`. There's a `database.sample.yml` you can use as a template. -- There are gem bundles in the project root for each rails version that we support. -- You can bundle all test applications by saying `bundle exec rake matrix:install` -- You can run specs from the project root by saying `bundle exec rake matrix:spec`. This will run all gemfiles compatible with your current Ruby. +- First, put your database credentials into `spec/support/database.yml`. There's a `database.sample.yml` you can use as + a template. + +Then, you have multiple options: + +1. Running tests for a single set of dependencies + - Install and switch to a Ruby version + - run `BUNDLE_GEMFILE=... bundle install` + - run `BUNDLE_GEMFILE=... bundle exec rspec` + - NOTE: + - There are gem bundles in the project root for each rails version that we support. + - Refer to `.github/workflows/test.yml` to see which Gemfiles are supported for which Ruby version. + +2. Run tests against a specific Ruby version and all Gemfiles for that version: + - Install and switch to the Ruby version + - Install development dependencies using `rake matrix:install` + - Run tests using `rake matrix:spec` + +3. Run tests against all Ruby versions: + - Install all Ruby versions mentioned in `.github/workflows/test.yml` + - run `dev/matrix` (only supports `rbenv` for switching Ruby versions currently) + +Hints: + +- Check the [gemika](github.com/makandra/gemika) README for more detailed development instructions. +- We recommend to have sufficiently new versions of bundler (> 2.3.0) and rubygems (> 3.3.0) installed for each Ruby + version. +- The script `dev/matrix` will warn you, if that is not the case. For all other methods you need to ensure that + yourself. If you would like to contribute: diff --git a/dev/matrix b/dev/matrix new file mode 100755 index 0000000..38498a8 --- /dev/null +++ b/dev/matrix @@ -0,0 +1,65 @@ +#!/bin/bash +set -euo pipefail + +# utility for comparing version strings +# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash +function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } + +# store current Ruby version and restore it on exit +original_ruby_version=$(cat .ruby-version) +trap "rbenv local $original_ruby_version" EXIT + +# determine employed Ruby versions (awk command == "strip whitespace", sed command == "delete_prefix") +readarray -t versions < <(grep ruby: .github/workflows/test.yml | awk '{$1=$1};1' | sed 's/- ruby: //' | sort | uniq) +echo "Detected Ruby versions:" +for version in "${versions[@]}" +do + echo "- $version" +done +echo "" + +for version in "${versions[@]}" +do + # switch Ruby version + rbenv local "$version" + + # determine actual versions + ruby_version=$(ruby -v) + rubygems_version=$(gem -v) + bundler_version=$(bundler -v | sed 's/Bundler version //') + + # debug output + echo "=====================" + echo "Target Ruby version: $version" + echo "" + echo "Ruby: $ruby_version" + echo "rubygems: $rubygems_version" + echo "Bundler: $bundler_version" + echo "=====================" + echo "" + + # version checks (minimum versions to make 'BUNDLED WITH' in Gemfile.lock work correctly) + if [ $(version $rubygems_version) -lt $(version "3.3.0") ]; then + echo "Please ensure that your rubygems version is > 3.3.0 for Ruby $ruby_version!" + echo "Install newest version:" + echo "gem update --system" + echo "Install specific version:" + echo "gem update --system " + exit 1 + fi + + if [ $(version $bundler_version) -lt $(version "2.3.0") ]; then + echo "Please ensure that your Bundler version is > 2.3.0 for Ruby $ruby_version!" + echo "Install newest version:" + echo "gem install bundler" + echo "Install specific version:" + echo "gem install bundler:" + exit 1 + fi + + # bundle and run specs + rake matrix:install + rake matrix:spec +done + +exit 0 From 01e7f100eb528c1c9a7a72114ba6cf137a92a8af Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Fri, 13 Feb 2026 10:08:22 +0100 Subject: [PATCH 3/7] Add Rails 8.1 to test matrix --- .github/workflows/test.yml | 2 + Gemfile.8-1 | 21 +++++ Gemfile.8-1.lock | 189 +++++++++++++++++++++++++++++++++++++ 3 files changed, 212 insertions(+) create mode 100644 Gemfile.8-1 create mode 100644 Gemfile.8-1.lock diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 169d92b..749d3de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,8 @@ jobs: gemfile: Gemfile.8-0 - ruby: 4.0.1 gemfile: Gemfile.8-0 + - ruby: 4.0.1 + gemfile: Gemfile.8-1 env: BUNDLE_GEMFILE: "${{ matrix.gemfile }}" steps: diff --git a/Gemfile.8-1 b/Gemfile.8-1 new file mode 100644 index 0000000..91aab60 --- /dev/null +++ b/Gemfile.8-1 @@ -0,0 +1,21 @@ +source 'https://rubygems.org' + +# Runtime dependencies +gem 'railties', '~> 8.1' +gem 'assignable_values' + +# Development dependencies +gem 'rspec' +gem 'rspec-rails' +gem 'rspec_candy' +gem 'shoulda-matchers' +gem 'sqlite3' +gem 'database_cleaner' +gem 'gemika', '>= 0.8.1' +gem 'actionpack' + +# Previous default gems +gem 'cgi' + +# Gem under test +gem 'consul', :path => '.' diff --git a/Gemfile.8-1.lock b/Gemfile.8-1.lock new file mode 100644 index 0000000..42e2581 --- /dev/null +++ b/Gemfile.8-1.lock @@ -0,0 +1,189 @@ +PATH + remote: . + specs: + consul (2.0.0) + activerecord (>= 6.0) + activesupport (>= 6.0) + edge_rider (>= 0.3.0) + memoized (>= 1.0.2) + railties (>= 6.0) + +GEM + remote: https://rubygems.org/ + specs: + actionpack (8.1.2) + actionview (= 8.1.2) + activesupport (= 8.1.2) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actionview (8.1.2) + activesupport (= 8.1.2) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (8.1.2) + activesupport (= 8.1.2) + activerecord (8.1.2) + activemodel (= 8.1.2) + activesupport (= 8.1.2) + timeout (>= 0.4.0) + activesupport (8.1.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + assignable_values (1.0.0) + activerecord (>= 2.3) + base64 (0.2.0) + bigdecimal (3.1.8) + builder (3.3.0) + cgi (0.3.6) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + crass (1.0.6) + database_cleaner (2.0.2) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.0) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0.0) + database_cleaner-core (2.0.1) + date (3.5.1) + diff-lcs (1.5.1) + drb (2.2.1) + edge_rider (2.3.0) + activerecord (>= 3.2) + erb (6.0.1) + erubi (1.13.0) + gemika (0.8.3) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + io-console (0.8.2) + irb (1.17.0) + pp (>= 0.6.0) + prism (>= 1.3.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + json (2.18.1) + logger (1.6.1) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + memoized (1.1.1) + mini_portile2 (2.8.8) + minitest (6.0.1) + prism (~> 1.5) + nokogiri (1.16.6) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.9.0) + psych (5.3.1) + date + stringio + racc (1.8.0) + rack (3.1.7) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.3.1) + rack (>= 3) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + rake (13.3.1) + rdoc (7.2.0) + erb + psych (>= 4.0.0) + tsort + reline (0.6.3) + io-console (~> 0.5) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-rails (6.1.3) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.1) + rspec_candy (0.5.1) + rspec + sneaky-save + securerandom (0.3.2) + shoulda-matchers (6.2.0) + activesupport (>= 5.2.0) + sneaky-save (0.1.3) + activerecord (>= 3.2.0) + sqlite3 (2.4.1) + mini_portile2 (~> 2.8.0) + stringio (3.2.0) + thor (1.5.0) + timeout (0.4.1) + tsort (0.2.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.2) + useragent (0.16.10) + zeitwerk (2.7.4) + +PLATFORMS + ruby + +DEPENDENCIES + actionpack + assignable_values + cgi + consul! + database_cleaner + gemika (>= 0.8.1) + railties (~> 8.1) + rspec + rspec-rails + rspec_candy + shoulda-matchers + sqlite3 + +BUNDLED WITH + 2.5.15 From 3fc53fbe6ce475fb04e58235db3e010041b003c7 Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Fri, 13 Feb 2026 10:09:50 +0100 Subject: [PATCH 4/7] Upgrade development dependencies --- Gemfile.6-1 | 2 +- Gemfile.6-1.lock | 4 ++-- Gemfile.7-1 | 2 +- Gemfile.7-1.lock | 4 ++-- Gemfile.7-2 | 2 +- Gemfile.7-2.lock | 4 ++-- Gemfile.8-0 | 2 +- Gemfile.8-0.lock | 4 ++-- Gemfile.8-1 | 2 +- Gemfile.8-1.lock | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Gemfile.6-1 b/Gemfile.6-1 index 6cb5829..343ff41 100644 --- a/Gemfile.6-1 +++ b/Gemfile.6-1 @@ -11,7 +11,7 @@ gem 'rspec_candy' gem 'shoulda-matchers' gem 'sqlite3' gem 'database_cleaner' -gem 'gemika', '>= 0.8.1' +gem 'gemika', '>= 2.0.0' # Gem under test gem 'consul', :path => '.' diff --git a/Gemfile.6-1.lock b/Gemfile.6-1.lock index eec6c4b..1e48040 100644 --- a/Gemfile.6-1.lock +++ b/Gemfile.6-1.lock @@ -45,7 +45,7 @@ GEM edge_rider (2.1.1) activerecord (>= 3.2) erubi (1.10.0) - gemika (0.8.1) + gemika (2.0.0) i18n (1.12.0) concurrent-ruby (~> 1.0) loofah (2.9.0) @@ -115,7 +115,7 @@ DEPENDENCIES assignable_values consul! database_cleaner - gemika (>= 0.8.1) + gemika (>= 2.0.0) railties (~> 6.1) rspec rspec-rails diff --git a/Gemfile.7-1 b/Gemfile.7-1 index 653db94..50d38ae 100644 --- a/Gemfile.7-1 +++ b/Gemfile.7-1 @@ -11,7 +11,7 @@ gem 'rspec_candy' gem 'shoulda-matchers' gem 'sqlite3', "~> 1.7" gem 'database_cleaner' -gem 'gemika', '>= 0.8.1' +gem 'gemika', '>= 2.0.0' # Gem under test gem 'consul', :path => '.' diff --git a/Gemfile.7-1.lock b/Gemfile.7-1.lock index 824ae35..6d1a1d6 100644 --- a/Gemfile.7-1.lock +++ b/Gemfile.7-1.lock @@ -63,7 +63,7 @@ GEM edge_rider (2.3.0) activerecord (>= 3.2) erubi (1.13.0) - gemika (0.8.3) + gemika (2.0.0) i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.8.0) @@ -159,7 +159,7 @@ DEPENDENCIES assignable_values consul! database_cleaner - gemika (>= 0.8.1) + gemika (>= 2.0.0) railties (~> 7.1) rspec rspec-rails diff --git a/Gemfile.7-2 b/Gemfile.7-2 index aad267c..80bf34e 100644 --- a/Gemfile.7-2 +++ b/Gemfile.7-2 @@ -11,7 +11,7 @@ gem 'rspec_candy' gem 'shoulda-matchers' gem 'sqlite3', "~> 1.7" gem 'database_cleaner' -gem 'gemika', '>= 0.8.1' +gem 'gemika', '>= 2.0.0' # Gem under test gem 'consul', :path => '.' diff --git a/Gemfile.7-2.lock b/Gemfile.7-2.lock index 9c70527..d9cd270 100644 --- a/Gemfile.7-2.lock +++ b/Gemfile.7-2.lock @@ -66,7 +66,7 @@ GEM edge_rider (2.3.0) activerecord (>= 3.2) erubi (1.13.0) - gemika (0.8.3) + gemika (2.0.0) i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.7.2) @@ -159,7 +159,7 @@ DEPENDENCIES assignable_values consul! database_cleaner - gemika (>= 0.8.1) + gemika (>= 2.0.0) railties (~> 7.2) rspec rspec-rails diff --git a/Gemfile.8-0 b/Gemfile.8-0 index 7e43825..e794e3d 100644 --- a/Gemfile.8-0 +++ b/Gemfile.8-0 @@ -11,7 +11,7 @@ gem 'rspec_candy' gem 'shoulda-matchers' gem 'sqlite3' gem 'database_cleaner' -gem 'gemika', '>= 0.8.1' +gem 'gemika', '>= 2.0.0' gem 'actionpack' # Previous default gems diff --git a/Gemfile.8-0.lock b/Gemfile.8-0.lock index 0c9d8d7..abdbfa4 100644 --- a/Gemfile.8-0.lock +++ b/Gemfile.8-0.lock @@ -68,7 +68,7 @@ GEM edge_rider (2.3.0) activerecord (>= 3.2) erubi (1.13.0) - gemika (0.8.3) + gemika (2.0.0) i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.8.0) @@ -167,7 +167,7 @@ DEPENDENCIES cgi consul! database_cleaner - gemika (>= 0.8.1) + gemika (>= 2.0.0) railties (~> 8.0) rspec rspec-rails diff --git a/Gemfile.8-1 b/Gemfile.8-1 index 91aab60..4b1c61b 100644 --- a/Gemfile.8-1 +++ b/Gemfile.8-1 @@ -11,7 +11,7 @@ gem 'rspec_candy' gem 'shoulda-matchers' gem 'sqlite3' gem 'database_cleaner' -gem 'gemika', '>= 0.8.1' +gem 'gemika', '>= 2.0.0' gem 'actionpack' # Previous default gems diff --git a/Gemfile.8-1.lock b/Gemfile.8-1.lock index 42e2581..0124dd2 100644 --- a/Gemfile.8-1.lock +++ b/Gemfile.8-1.lock @@ -68,7 +68,7 @@ GEM activerecord (>= 3.2) erb (6.0.1) erubi (1.13.0) - gemika (0.8.3) + gemika (2.0.0) i18n (1.14.5) concurrent-ruby (~> 1.0) io-console (0.8.2) @@ -177,7 +177,7 @@ DEPENDENCIES cgi consul! database_cleaner - gemika (>= 0.8.1) + gemika (>= 2.0.0) railties (~> 8.1) rspec rspec-rails From ab474278f22003af3c14b92be56ab10228f890ae Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Tue, 10 Mar 2026 15:00:53 +0100 Subject: [PATCH 5/7] Drop tests and support for Ruby < 3 and Rails < 7.2 --- .github/workflows/test.yml | 6 +- Gemfile.6-1 | 17 ---- Gemfile.6-1.lock | 127 --------------------------- Gemfile.7-1 | 17 ---- Gemfile.7-1.lock | 171 ------------------------------------- Gemfile.7-2.lock | 6 +- Gemfile.8-0.lock | 6 +- Gemfile.8-1.lock | 6 +- consul.gemspec | 8 +- 9 files changed, 15 insertions(+), 349 deletions(-) delete mode 100644 Gemfile.6-1 delete mode 100644 Gemfile.6-1.lock delete mode 100644 Gemfile.7-1 delete mode 100644 Gemfile.7-1.lock diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 749d3de..8af5fb9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,13 +15,9 @@ jobs: matrix: include: - ruby: 3.2.0 - gemfile: Gemfile.6-1 - - ruby: 3.2.0 - gemfile: Gemfile.7-1 + gemfile: Gemfile.7-2 - ruby: 3.2.0 gemfile: Gemfile.8-0 - - ruby: 3.4.1 - gemfile: Gemfile.7-1 - ruby: 3.4.1 gemfile: Gemfile.7-2 - ruby: 3.4.1 diff --git a/Gemfile.6-1 b/Gemfile.6-1 deleted file mode 100644 index 343ff41..0000000 --- a/Gemfile.6-1 +++ /dev/null @@ -1,17 +0,0 @@ -source 'https://rubygems.org' - -# Runtime dependencies -gem 'railties', '~> 6.1' -gem 'assignable_values' - -# Development dependencies -gem 'rspec' -gem 'rspec-rails' -gem 'rspec_candy' -gem 'shoulda-matchers' -gem 'sqlite3' -gem 'database_cleaner' -gem 'gemika', '>= 2.0.0' - -# Gem under test -gem 'consul', :path => '.' diff --git a/Gemfile.6-1.lock b/Gemfile.6-1.lock deleted file mode 100644 index 1e48040..0000000 --- a/Gemfile.6-1.lock +++ /dev/null @@ -1,127 +0,0 @@ -PATH - remote: . - specs: - consul (2.0.0) - activerecord (>= 6.0) - activesupport (>= 6.0) - edge_rider (>= 0.3.0) - memoized (>= 1.0.2) - railties (>= 6.0) - -GEM - remote: https://rubygems.org/ - specs: - actionpack (6.1.3) - actionview (= 6.1.3) - activesupport (= 6.1.3) - rack (~> 2.0, >= 2.0.9) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.1.3) - activesupport (= 6.1.3) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.1.3) - activesupport (= 6.1.3) - activerecord (6.1.3) - activemodel (= 6.1.3) - activesupport (= 6.1.3) - activesupport (6.1.3) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - assignable_values (0.18.0) - activerecord (>= 2.3) - builder (3.2.4) - concurrent-ruby (1.2.0) - crass (1.0.6) - database_cleaner (1.7.0) - diff-lcs (1.3) - edge_rider (2.1.1) - activerecord (>= 3.2) - erubi (1.10.0) - gemika (2.0.0) - i18n (1.12.0) - concurrent-ruby (~> 1.0) - loofah (2.9.0) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - memoized (1.1.1) - method_source (1.1.0) - mini_portile2 (2.8.8) - minitest (5.15.0) - nokogiri (1.15.0) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - racc (1.8.1) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - railties (6.1.3) - actionpack (= 6.1.3) - activesupport (= 6.1.3) - method_source - rake (>= 0.8.7) - thor (~> 1.0) - rake (13.2.1) - rspec (3.6.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-mocks (3.6.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-rails (3.6.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - rspec_candy (0.4.1) - rspec - sneaky-save - shoulda-matchers (3.1.1) - activesupport (>= 4.0.0) - sneaky-save (0.1.2) - activerecord (>= 3.2.0) - sqlite3 (1.4.2) - thor (1.3.2) - tzinfo (2.0.5) - concurrent-ruby (~> 1.0) - zeitwerk (2.6.6) - -PLATFORMS - ruby - -DEPENDENCIES - assignable_values - consul! - database_cleaner - gemika (>= 2.0.0) - railties (~> 6.1) - rspec - rspec-rails - rspec_candy - shoulda-matchers - sqlite3 - -BUNDLED WITH - 2.3.1 diff --git a/Gemfile.7-1 b/Gemfile.7-1 deleted file mode 100644 index 50d38ae..0000000 --- a/Gemfile.7-1 +++ /dev/null @@ -1,17 +0,0 @@ -source 'https://rubygems.org' - -# Runtime dependencies -gem 'railties', '~> 7.1' -gem 'assignable_values' - -# Development dependencies -gem 'rspec' -gem 'rspec-rails' -gem 'rspec_candy' -gem 'shoulda-matchers' -gem 'sqlite3', "~> 1.7" -gem 'database_cleaner' -gem 'gemika', '>= 2.0.0' - -# Gem under test -gem 'consul', :path => '.' diff --git a/Gemfile.7-1.lock b/Gemfile.7-1.lock deleted file mode 100644 index 6d1a1d6..0000000 --- a/Gemfile.7-1.lock +++ /dev/null @@ -1,171 +0,0 @@ -PATH - remote: . - specs: - consul (2.0.0) - activerecord (>= 6.0) - activesupport (>= 6.0) - edge_rider (>= 0.3.0) - memoized (>= 1.0.2) - railties (>= 6.0) - -GEM - remote: https://rubygems.org/ - specs: - actionpack (7.1.4.2) - actionview (= 7.1.4.2) - activesupport (= 7.1.4.2) - nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4) - rack-session (>= 1.0.1) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - actionview (7.1.4.2) - activesupport (= 7.1.4.2) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activemodel (7.1.4.2) - activesupport (= 7.1.4.2) - activerecord (7.1.4.2) - activemodel (= 7.1.4.2) - activesupport (= 7.1.4.2) - timeout (>= 0.4.0) - activesupport (7.1.4.2) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - assignable_values (1.1.1) - activerecord (>= 2.3) - base64 (0.2.0) - bigdecimal (3.1.8) - builder (3.3.0) - concurrent-ruby (1.3.3) - connection_pool (2.4.1) - crass (1.0.6) - database_cleaner (2.0.2) - database_cleaner-active_record (>= 2, < 3) - database_cleaner-active_record (2.2.0) - activerecord (>= 5.a) - database_cleaner-core (~> 2.0.0) - database_cleaner-core (2.0.1) - date (3.4.1) - diff-lcs (1.5.1) - drb (2.2.1) - edge_rider (2.3.0) - activerecord (>= 3.2) - erubi (1.13.0) - gemika (2.0.0) - i18n (1.14.5) - concurrent-ruby (~> 1.0) - io-console (0.8.0) - irb (1.15.1) - pp (>= 0.6.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) - loofah (2.22.0) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - memoized (1.1.1) - mini_portile2 (2.8.7) - minitest (5.24.1) - mutex_m (0.3.0) - nokogiri (1.15.6) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - pp (0.6.2) - prettyprint - prettyprint (0.2.0) - psych (5.2.3) - date - stringio - racc (1.8.0) - rack (3.1.7) - rack-session (2.0.0) - rack (>= 3.0.0) - rack-test (2.1.0) - rack (>= 1.3) - rackup (2.2.1) - rack (>= 3) - rails-dom-testing (2.2.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) - loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.4.2) - actionpack (= 7.1.4.2) - activesupport (= 7.1.4.2) - irb - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - zeitwerk (~> 2.6) - rake (13.2.1) - rdoc (6.11.0) - psych (>= 4.0.0) - reline (0.6.0) - io-console (~> 0.5) - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-core (3.13.0) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-rails (7.1.0) - actionpack (>= 7.0) - activesupport (>= 7.0) - railties (>= 7.0) - rspec-core (~> 3.13) - rspec-expectations (~> 3.13) - rspec-mocks (~> 3.13) - rspec-support (~> 3.13) - rspec-support (3.13.1) - rspec_candy (0.5.1) - rspec - sneaky-save - shoulda-matchers (5.3.0) - activesupport (>= 5.2.0) - sneaky-save (0.1.3) - activerecord (>= 3.2.0) - sqlite3 (1.7.3) - mini_portile2 (~> 2.8.0) - stringio (3.1.2) - thor (1.3.2) - timeout (0.4.1) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - zeitwerk (2.6.18) - -PLATFORMS - ruby - -DEPENDENCIES - assignable_values - consul! - database_cleaner - gemika (>= 2.0.0) - railties (~> 7.1) - rspec - rspec-rails - rspec_candy - shoulda-matchers - sqlite3 (~> 1.7) - -BUNDLED WITH - 2.4.22 diff --git a/Gemfile.7-2.lock b/Gemfile.7-2.lock index d9cd270..a53c0ae 100644 --- a/Gemfile.7-2.lock +++ b/Gemfile.7-2.lock @@ -2,11 +2,11 @@ PATH remote: . specs: consul (2.0.0) - activerecord (>= 6.0) - activesupport (>= 6.0) + activerecord (>= 7.2) + activesupport (>= 7.2) edge_rider (>= 0.3.0) memoized (>= 1.0.2) - railties (>= 6.0) + railties (>= 7.2) GEM remote: https://rubygems.org/ diff --git a/Gemfile.8-0.lock b/Gemfile.8-0.lock index abdbfa4..0ca99a9 100644 --- a/Gemfile.8-0.lock +++ b/Gemfile.8-0.lock @@ -2,11 +2,11 @@ PATH remote: . specs: consul (2.0.0) - activerecord (>= 6.0) - activesupport (>= 6.0) + activerecord (>= 7.2) + activesupport (>= 7.2) edge_rider (>= 0.3.0) memoized (>= 1.0.2) - railties (>= 6.0) + railties (>= 7.2) GEM remote: https://rubygems.org/ diff --git a/Gemfile.8-1.lock b/Gemfile.8-1.lock index 0124dd2..6047375 100644 --- a/Gemfile.8-1.lock +++ b/Gemfile.8-1.lock @@ -2,11 +2,11 @@ PATH remote: . specs: consul (2.0.0) - activerecord (>= 6.0) - activesupport (>= 6.0) + activerecord (>= 7.2) + activesupport (>= 7.2) edge_rider (>= 0.3.0) memoized (>= 1.0.2) - railties (>= 6.0) + railties (>= 7.2) GEM remote: https://rubygems.org/ diff --git a/consul.gemspec b/consul.gemspec index 0a8e553..5a2efbc 100644 --- a/consul.gemspec +++ b/consul.gemspec @@ -25,9 +25,11 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] + s.required_ruby_version = '>= 3.0.0' + s.add_dependency('memoized', '>=1.0.2') - s.add_dependency('activerecord', '>= 6.0') - s.add_dependency('activesupport', '>= 6.0') - s.add_dependency('railties', '>= 6.0') + s.add_dependency('activerecord', '>= 7.2') + s.add_dependency('activesupport', '>= 7.2') + s.add_dependency('railties', '>= 7.2') s.add_dependency('edge_rider', '>= 0.3.0') end From b1a69a931c1fed5b1fdb00a891e09aa75c37594a Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Tue, 10 Mar 2026 15:20:02 +0100 Subject: [PATCH 6/7] Cleanup gemspec --- consul.gemspec | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/consul.gemspec b/consul.gemspec index 5a2efbc..c8b2777 100644 --- a/consul.gemspec +++ b/consul.gemspec @@ -10,21 +10,19 @@ Gem::Specification.new do |s| s.summary = 'A scope-based authorization solution for Ruby on Rails.' s.description = s.summary s.license = 'MIT' + s.metadata = { + 'source_code_uri' => s.homepage, + 'bug_tracker_uri' => 'https://github.com/makandra/consul/issues', + 'changelog_uri' => 'https://github.com/makandra/consul/blob/master/CHANGELOG.md', + 'rubygems_mfa_required' => 'true', + } - if RUBY_VERSION.to_f >= 2.0 - s.metadata = { - 'source_code_uri' => s.homepage, - 'bug_tracker_uri' => 'https://github.com/makandra/consul/issues', - 'changelog_uri' => 'https://github.com/makandra/consul/blob/master/CHANGELOG.md', - 'rubygems_mfa_required' => 'true', - } - end - - s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|spec|features)/}) } - s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + s.files = `git ls-files`.split("\n").reject { |f| File.symlink?(f) }.reject { |f| f.match(%r{^(spec|dev|media|.github)/}) } s.require_paths = ["lib"] + s.bindir = 'exe' + s.executables = [] + s.required_ruby_version = '>= 3.0.0' s.add_dependency('memoized', '>=1.0.2') From 83465d3bbb851bb019062881179680a8e07cd256 Mon Sep 17 00:00:00 2001 From: Klaus Weidinger Date: Fri, 13 Feb 2026 10:17:02 +0100 Subject: [PATCH 7/7] Release version 2.0.1 --- CHANGELOG.md | 6 ++++++ Gemfile.7-2.lock | 2 +- Gemfile.8-0.lock | 2 +- Gemfile.8-1.lock | 2 +- lib/consul/version.rb | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a9af5d..2438168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,13 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html - +## 2.0.1 - 2026-03-10 +### Compatible changes + +- Add tests for Ruby 4.0 and Rails 8.1 +- Introduce `required_ruby_version` in gemspec so people on legacy Ruby versions don't receive future upgrades +- Drop tests and support for Ruby < 3 and Rails < 7.2 ## 2.0.0 - 2025-01-22 diff --git a/Gemfile.7-2.lock b/Gemfile.7-2.lock index a53c0ae..1a94789 100644 --- a/Gemfile.7-2.lock +++ b/Gemfile.7-2.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - consul (2.0.0) + consul (2.0.1) activerecord (>= 7.2) activesupport (>= 7.2) edge_rider (>= 0.3.0) diff --git a/Gemfile.8-0.lock b/Gemfile.8-0.lock index 0ca99a9..9bf4626 100644 --- a/Gemfile.8-0.lock +++ b/Gemfile.8-0.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - consul (2.0.0) + consul (2.0.1) activerecord (>= 7.2) activesupport (>= 7.2) edge_rider (>= 0.3.0) diff --git a/Gemfile.8-1.lock b/Gemfile.8-1.lock index 6047375..2452157 100644 --- a/Gemfile.8-1.lock +++ b/Gemfile.8-1.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - consul (2.0.0) + consul (2.0.1) activerecord (>= 7.2) activesupport (>= 7.2) edge_rider (>= 0.3.0) diff --git a/lib/consul/version.rb b/lib/consul/version.rb index 6c92a0e..8c9e984 100644 --- a/lib/consul/version.rb +++ b/lib/consul/version.rb @@ -1,3 +1,3 @@ module Consul - VERSION = '2.0.0' + VERSION = '2.0.1' end