From db1cfac0a231063d1ab5961b3bc9bad696b0504b Mon Sep 17 00:00:00 2001 From: Aaron Ogata Date: Thu, 13 Feb 2025 10:52:04 -0800 Subject: [PATCH] add support for rails 7.2, drop deprecated rubies refs AE-1724 --- .github/workflows/push.yml | 6 +- Gemfile | 10 ++- Gemfile.activerecord-6.1.lock | 96 +++++++++++----------- Gemfile.activerecord-7.0.lock | 96 +++++++++++----------- Gemfile.activerecord-7.1.lock | 122 +++++++++++++++------------- Gemfile.lock | 146 +++++++++++++++++++++------------- guardrail.gemspec | 6 +- lib/guard_rail/version.rb | 2 +- 8 files changed, 273 insertions(+), 211 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e6145cd..d38269d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,8 +13,8 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [2.7, "3.0", 3.1, 3.2] - lockfile: ['Gemfile.activerecord-6.1.lock', 'Gemfile.activerecord-7.0.lock', 'Gemfile.activerecord-7.1.lock'] + ruby-version: [3.1, 3.2] + lockfile: ['Gemfile.activerecord-6.1.lock', 'Gemfile.activerecord-7.0.lock', 'Gemfile.activerecord-7.1.lock', 'Gemfile.lock'] steps: - uses: actions/checkout@v3 @@ -26,4 +26,4 @@ jobs: - name: Run tests run: bundle check env: - BUNDLE_LOCKFILE: ${{ matrix.lockfile }} \ No newline at end of file + BUNDLE_LOCKFILE: ${{ matrix.lockfile }} diff --git a/Gemfile b/Gemfile index 716a6bf..fd7d22b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org/' -plugin "bundler-multilock", "1.0.11" +plugin "bundler-multilock", "1.3.4" return unless Plugin.installed?("bundler-multilock") Plugin.send(:load_plugin, "bundler-multilock") @@ -20,4 +20,10 @@ end lockfile "activerecord-7.1" do gem "activerecord", "~> 7.1.0" gem "railties", "~> 7.1.0" -end \ No newline at end of file +end + +lockfile do + gem "activerecord", "~> 7.2.0" + gem "railties", "~> 7.2.0" +end + diff --git a/Gemfile.activerecord-6.1.lock b/Gemfile.activerecord-6.1.lock index f5ae6ee..343e21f 100644 --- a/Gemfile.activerecord-6.1.lock +++ b/Gemfile.activerecord-6.1.lock @@ -1,88 +1,94 @@ PATH remote: . specs: - guardrail (3.0.3) - activerecord (>= 6.1, < 7.2) - railties (>= 6.1, < 7.2) + guardrail (3.0.4) + activerecord (>= 6.1, < 8.0) + railties (>= 6.1, < 8.0) GEM remote: https://rubygems.org/ specs: - actionpack (6.1.7.6) - actionview (= 6.1.7.6) - activesupport (= 6.1.7.6) + actionpack (6.1.7.10) + actionview (= 6.1.7.10) + activesupport (= 6.1.7.10) 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.7.6) - activesupport (= 6.1.7.6) + actionview (6.1.7.10) + activesupport (= 6.1.7.10) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.1.7.6) - activesupport (= 6.1.7.6) - activerecord (6.1.7.6) - activemodel (= 6.1.7.6) - activesupport (= 6.1.7.6) - activesupport (6.1.7.6) + activemodel (6.1.7.10) + activesupport (= 6.1.7.10) + activerecord (6.1.7.10) + activemodel (= 6.1.7.10) + activesupport (= 6.1.7.10) + activesupport (6.1.7.10) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - builder (3.2.4) - concurrent-ruby (1.2.2) + builder (3.3.0) + concurrent-ruby (1.3.5) crass (1.0.6) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) - erubi (1.12.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.1) - rdoc + date (3.4.1) + debug (1.10.0) + irb (~> 1.10) reline (>= 0.3.8) - loofah (2.21.3) + erubi (1.13.1) + i18n (1.14.7) + 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.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - method_source (1.0.0) - mini_portile2 (2.8.4) - minitest (5.20.0) - nokogiri (1.15.4) + method_source (1.1.0) + mini_portile2 (2.8.8) + minitest (5.25.4) + nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - psych (5.1.0) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date stringio - racc (1.7.1) - rack (2.2.8) - rack-test (2.1.0) + racc (1.8.1) + rack (2.2.11) + rack-test (2.2.0) rack (>= 1.3) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (6.1.7.6) - actionpack (= 6.1.7.6) - activesupport (= 6.1.7.6) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (6.1.7.10) + actionpack (= 6.1.7.10) + activesupport (= 6.1.7.10) method_source rake (>= 12.2) thor (~> 1.0) - rake (13.0.6) - rdoc (6.5.0) + rake (13.2.1) + rdoc (6.12.0) psych (>= 4.0.0) - reline (0.3.9) + reline (0.6.0) io-console (~> 0.5) - stringio (3.0.8) - thor (1.2.2) + stringio (3.1.5) + thor (1.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - zeitwerk (2.6.12) + zeitwerk (2.6.18) PLATFORMS ruby diff --git a/Gemfile.activerecord-7.0.lock b/Gemfile.activerecord-7.0.lock index 21c982f..37961db 100644 --- a/Gemfile.activerecord-7.0.lock +++ b/Gemfile.activerecord-7.0.lock @@ -1,88 +1,94 @@ PATH remote: . specs: - guardrail (3.0.3) - activerecord (>= 6.1, < 7.2) - railties (>= 6.1, < 7.2) + guardrail (3.0.4) + activerecord (>= 6.1, < 8.0) + railties (>= 6.1, < 8.0) GEM remote: https://rubygems.org/ specs: - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.8) - activesupport (= 7.0.8) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.8) - activesupport (= 7.0.8) - activerecord (7.0.8) - activemodel (= 7.0.8) - activesupport (= 7.0.8) - activesupport (7.0.8) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activerecord (7.0.8.7) + activemodel (= 7.0.8.7) + activesupport (= 7.0.8.7) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - builder (3.2.4) - concurrent-ruby (1.2.2) + builder (3.3.0) + concurrent-ruby (1.3.5) crass (1.0.6) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) - erubi (1.12.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.1) - rdoc + date (3.4.1) + debug (1.10.0) + irb (~> 1.10) reline (>= 0.3.8) - loofah (2.21.3) + erubi (1.13.1) + i18n (1.14.7) + 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.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - method_source (1.0.0) - mini_portile2 (2.8.4) - minitest (5.20.0) - nokogiri (1.15.4) + method_source (1.1.0) + mini_portile2 (2.8.8) + minitest (5.25.4) + nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - psych (5.1.0) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date stringio - racc (1.7.1) - rack (2.2.8) - rack-test (2.1.0) + racc (1.8.1) + rack (2.2.11) + rack-test (2.2.0) rack (>= 1.3) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) - rake (13.0.6) - rdoc (6.5.0) + rake (13.2.1) + rdoc (6.12.0) psych (>= 4.0.0) - reline (0.3.9) + reline (0.6.0) io-console (~> 0.5) - stringio (3.0.8) - thor (1.2.2) + stringio (3.1.5) + thor (1.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - zeitwerk (2.6.12) + zeitwerk (2.6.18) PLATFORMS ruby diff --git a/Gemfile.activerecord-7.1.lock b/Gemfile.activerecord-7.1.lock index 5486b8c..4fc3ddc 100644 --- a/Gemfile.activerecord-7.1.lock +++ b/Gemfile.activerecord-7.1.lock @@ -1,110 +1,120 @@ PATH remote: . specs: - guardrail (3.0.3) - activerecord (>= 6.1, < 7.2) - railties (>= 6.1, < 7.2) + guardrail (3.0.4) + activerecord (>= 6.1, < 8.0) + railties (>= 6.1, < 8.0) GEM remote: https://rubygems.org/ specs: - actionpack (7.1.0) - actionview (= 7.1.0) - activesupport (= 7.1.0) + actionpack (7.1.5.1) + actionview (= 7.1.5.1) + activesupport (= 7.1.5.1) 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.0) - activesupport (= 7.1.0) + actionview (7.1.5.1) + activesupport (= 7.1.5.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activemodel (7.1.0) - activesupport (= 7.1.0) - activerecord (7.1.0) - activemodel (= 7.1.0) - activesupport (= 7.1.0) + activemodel (7.1.5.1) + activesupport (= 7.1.5.1) + activerecord (7.1.5.1) + activemodel (= 7.1.5.1) + activesupport (= 7.1.5.1) timeout (>= 0.4.0) - activesupport (7.1.0) + activesupport (7.1.5.1) base64 + benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) - base64 (0.1.1) - bigdecimal (3.1.4) - builder (3.2.4) - concurrent-ruby (1.2.2) - connection_pool (2.4.1) + base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.9) + builder (3.3.0) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) crass (1.0.6) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) - drb (2.1.1) - ruby2_keywords - erubi (1.12.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.1) - rdoc + date (3.4.1) + debug (1.10.0) + irb (~> 1.10) reline (>= 0.3.8) - loofah (2.21.3) + drb (2.2.1) + erubi (1.13.1) + i18n (1.14.7) + 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) + logger (1.6.6) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mini_portile2 (2.8.4) - minitest (5.20.0) - mutex_m (0.1.2) - nokogiri (1.15.4) + mini_portile2 (2.8.8) + minitest (5.25.4) + mutex_m (0.3.0) + nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - psych (5.1.0) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date stringio - racc (1.7.1) - rack (3.0.8) - rack-session (2.0.0) + racc (1.8.1) + rack (3.1.10) + rack-session (2.1.0) + base64 (>= 0.1.0) rack (>= 3.0.0) - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.0) - actionpack (= 7.1.0) - activesupport (= 7.1.0) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.1.5.1) + actionpack (= 7.1.5.1) + activesupport (= 7.1.5.1) irb rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) - rake (13.0.6) - rdoc (6.5.0) + rake (13.2.1) + rdoc (6.12.0) psych (>= 4.0.0) - reline (0.3.9) + reline (0.6.0) io-console (~> 0.5) - ruby2_keywords (0.0.5) - stringio (3.0.8) - thor (1.2.2) - timeout (0.4.0) + securerandom (0.4.1) + stringio (3.1.5) + thor (1.3.2) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - webrick (1.8.1) - zeitwerk (2.6.12) + zeitwerk (2.6.18) PLATFORMS ruby diff --git a/Gemfile.lock b/Gemfile.lock index bc6c43f..bb07067 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,95 +1,129 @@ PATH remote: . specs: - guardrail (3.0.3) - activerecord (>= 6.1, < 7.2) - railties (>= 6.1, < 7.2) + guardrail (3.0.4) + activerecord (>= 6.1, < 8.0) + railties (>= 6.1, < 8.0) GEM remote: https://rubygems.org/ specs: - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) - rack (~> 2.0, >= 2.2.4) + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.2) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.8) - activesupport (= 7.0.8) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.8) - activesupport (= 7.0.8) - activerecord (7.0.8) - activemodel (= 7.0.8) - activesupport (= 7.0.8) - activesupport (7.0.8) - concurrent-ruby (~> 1.0, >= 1.0.2) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activerecord (7.2.2.1) + activemodel (= 7.2.2.1) + activesupport (= 7.2.2.1) + timeout (>= 0.4.0) + activesupport (7.2.2.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - builder (3.2.4) - concurrent-ruby (1.2.2) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.9) + builder (3.3.0) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) crass (1.0.6) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) - erubi (1.12.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.1) - rdoc + date (3.4.1) + debug (1.10.0) + irb (~> 1.10) reline (>= 0.3.8) - loofah (2.21.3) + drb (2.2.1) + erubi (1.13.1) + i18n (1.14.7) + 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) + logger (1.6.6) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - method_source (1.0.0) - mini_portile2 (2.8.4) - minitest (5.20.0) - nokogiri (1.15.4) + mini_portile2 (2.8.8) + minitest (5.25.4) + nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - psych (5.1.0) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date stringio - racc (1.7.1) - rack (2.2.8) - rack-test (2.1.0) + racc (1.8.1) + rack (3.1.10) + rack-session (2.1.0) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.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) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) - method_source + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) + irb (~> 1.13) + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) - rake (13.0.6) - rdoc (6.5.0) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.2.1) + rdoc (6.12.0) psych (>= 4.0.0) - reline (0.3.9) + reline (0.6.0) io-console (~> 0.5) - stringio (3.0.8) - thor (1.2.2) + securerandom (0.4.1) + stringio (3.1.5) + thor (1.3.2) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - zeitwerk (2.6.12) + useragent (0.16.11) + zeitwerk (2.6.18) PLATFORMS ruby DEPENDENCIES + activerecord (~> 7.2.0) debug guardrail! + railties (~> 7.2.0) BUNDLED WITH 2.4.19 diff --git a/guardrail.gemspec b/guardrail.gemspec index 544aa01..b78bb73 100644 --- a/guardrail.gemspec +++ b/guardrail.gemspec @@ -17,10 +17,10 @@ Gem::Specification.new do |s| s.files = Dir["lib/**/*"] + ["LICENSE", "README.md"] s.test_files = Dir["spec/**/*"] - s.required_ruby_version = '>= 2.5' + s.required_ruby_version = '>= 3.1' - s.add_dependency "activerecord", ">= 6.1", "< 7.2" - s.add_dependency "railties", ">= 6.1", "< 7.2" + s.add_dependency "activerecord", ">= 6.1", "< 8.0" + s.add_dependency "railties", ">= 6.1", "< 8.0" s.add_development_dependency "debug" end diff --git a/lib/guard_rail/version.rb b/lib/guard_rail/version.rb index ac729e7..bd51990 100644 --- a/lib/guard_rail/version.rb +++ b/lib/guard_rail/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module GuardRail - VERSION = "3.0.3" + VERSION = "3.0.4" end