From a8d561ca9c29490cc78cc836de6b9c6ce2e2d618 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 3 Oct 2025 10:23:23 -0300 Subject: [PATCH 1/2] Update copyright, use new email, remove plataformatec --- MIT-LICENSE | 2 +- README.md | 4 +++- has_scope.gemspec | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MIT-LICENSE b/MIT-LICENSE index 245397c..d54bbdc 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020-2024 Rafael França, Carlos Antônio da Silva +Copyright (c) 2020-2025 Rafael França, Carlos Antonio da Silva Copyright (c) 2009-2019 Plataformatec Permission is hereby granted, free of charge, to any person obtaining diff --git a/README.md b/README.md index 2c37b22..dbbfc2b 100644 --- a/README.md +++ b/README.md @@ -299,4 +299,6 @@ If you discover any bugs or want to drop a line, feel free to create an issue on ## License -MIT License. Copyright 2020-2024 Rafael França, Carlos Antônio da Silva. Copyright 2009-2019 Plataformatec. +MIT License. +Copyright 2020-2025 Rafael França, Carlos Antonio da Silva. +Copyright 2009-2019 Plataformatec. diff --git a/has_scope.gemspec b/has_scope.gemspec index 245451a..d222c4b 100644 --- a/has_scope.gemspec +++ b/has_scope.gemspec @@ -7,8 +7,8 @@ Gem::Specification.new do |s| s.version = HasScope::VERSION.dup s.platform = Gem::Platform::RUBY s.summary = 'Maps controller filters to your resource scopes.' - s.email = 'opensource@plataformatec.com.br' - s.homepage = 'http://github.com/plataformatec/has_scope' + s.email = 'heartcombo.oss@gmail.com' + s.homepage = 'http://github.com/heartcombo/has_scope' s.description = 'Maps controller filters to your resource scopes' s.authors = ['José Valim'] s.license = 'MIT' From 6b4641baceee6a7d019a0d8cb19c38b1aa81fbbf Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 3 Oct 2025 10:18:18 -0300 Subject: [PATCH 2/2] Update Ruby/Rails support * Add support for Ruby 3.3/3.4 and Rails 7.2/8.0/8.1. (no changes required) * Drop support for Rails < 7 and Ruby < 2.7. --- .github/workflows/test.yml | 45 ++++++++------------- CHANGELOG.md | 3 +- Gemfile | 6 +-- Gemfile.lock | 80 ++++++++++++++++++++----------------- gemfiles/Gemfile-rails-5-2 | 6 --- gemfiles/Gemfile-rails-6-0 | 6 --- gemfiles/Gemfile-rails-6-1 | 6 --- gemfiles/Gemfile-rails-7-0 | 6 +-- gemfiles/Gemfile-rails-7-1 | 6 +++ gemfiles/Gemfile-rails-7-2 | 6 +++ gemfiles/Gemfile-rails-8-0 | 6 +++ gemfiles/Gemfile-rails-main | 6 +-- has_scope.gemspec | 6 +-- 13 files changed, 93 insertions(+), 95 deletions(-) delete mode 100644 gemfiles/Gemfile-rails-5-2 delete mode 100644 gemfiles/Gemfile-rails-6-0 delete mode 100644 gemfiles/Gemfile-rails-6-1 create mode 100644 gemfiles/Gemfile-rails-7-1 create mode 100644 gemfiles/Gemfile-rails-7-2 create mode 100644 gemfiles/Gemfile-rails-8-0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0c1bc8..afe871d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,50 +8,39 @@ jobs: gemfile: - Gemfile - gemfiles/Gemfile-rails-main + - gemfiles/Gemfile-rails-8-0 + - gemfiles/Gemfile-rails-7-2 + - gemfiles/Gemfile-rails-7-1 - gemfiles/Gemfile-rails-7-0 - - gemfiles/Gemfile-rails-6-1 - - gemfiles/Gemfile-rails-6-0 - - gemfiles/Gemfile-rails-5-2 ruby: + - '3.4' - '3.3' - '3.2' - '3.1' - '3.0' - '2.7' - - '2.6' - - '2.5' exclude: - gemfile: Gemfile - ruby: '2.6' + ruby: '3.1' - gemfile: Gemfile - ruby: '2.5' - - gemfile: gemfiles/Gemfile-rails-main ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-main + - gemfile: Gemfile ruby: '2.7' - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.6' - - gemfile: gemfiles/Gemfile-rails-main - ruby: '2.5' - - gemfile: gemfiles/Gemfile-rails-7-0 - ruby: '2.6' - - gemfile: gemfiles/Gemfile-rails-7-0 - ruby: '2.5' - - gemfile: gemfiles/Gemfile-rails-6-0 - ruby: '3.3' - - gemfile: gemfiles/Gemfile-rails-6-0 - ruby: '3.2' - - gemfile: gemfiles/Gemfile-rails-6-0 ruby: '3.1' - - gemfile: gemfiles/Gemfile-rails-5-2 - ruby: '3.3' - - gemfile: gemfiles/Gemfile-rails-5-2 - ruby: '3.2' - - gemfile: gemfiles/Gemfile-rails-5-2 + - gemfile: gemfiles/Gemfile-rails-main + ruby: '3.0' + - gemfile: gemfiles/Gemfile-rails-main + ruby: '2.7' + - gemfile: gemfiles/Gemfile-rails-8-0 ruby: '3.1' - - gemfile: gemfiles/Gemfile-rails-5-2 + - gemfile: gemfiles/Gemfile-rails-8-0 + ruby: '3.0' + - gemfile: gemfiles/Gemfile-rails-8-0 + ruby: '2.7' + - gemfile: gemfiles/Gemfile-rails-7-2 ruby: '3.0' - - gemfile: gemfiles/Gemfile-rails-5-2 + - gemfile: gemfiles/Gemfile-rails-7-2 ruby: '2.7' runs-on: ubuntu-latest env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps diff --git a/CHANGELOG.md b/CHANGELOG.md index a5fdcbd..5d2e321 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Unreleased -* Add support to Ruby 3.3. (no changes required.) +* Add support for Ruby 3.3/3.4 and Rails 7.2/8.0/8.1. (no changes required) +* Drop support for Rails < 7 and Ruby < 2.7. ## 0.8.2 diff --git a/Gemfile b/Gemfile index 1458fc9..705cb29 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ -source 'https://rubygems.org' +source "https://rubygems.org" gemspec -gem "actionpack", "~> 7.1.0" -gem "activesupport", "~> 7.1.0" +gem "actionpack", "~> 8.1.0.beta1" +gem "activesupport", "~> 8.1.0.beta1" diff --git a/Gemfile.lock b/Gemfile.lock index 495e185..f350b29 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,83 +2,91 @@ PATH remote: . specs: has_scope (0.8.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + actionpack (>= 7.0) + activesupport (>= 7.0) GEM remote: https://rubygems.org/ specs: - actionpack (7.1.3.2) - actionview (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionpack (8.1.0.beta1) + actionview (= 8.1.0.beta1) + activesupport (= 8.1.0.beta1) 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.3.2) - activesupport (= 7.1.3.2) + useragent (~> 0.16) + actionview (8.1.0.beta1) + activesupport (= 8.1.0.beta1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.3.2) + activesupport (8.1.0.beta1) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - base64 (0.2.0) - bigdecimal (3.1.7) - builder (3.2.4) - concurrent-ruby (1.2.3) - connection_pool (2.4.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.3) + builder (3.3.0) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) crass (1.0.6) - drb (2.2.1) - erubi (1.12.0) - i18n (1.14.4) + drb (2.2.3) + erubi (1.13.1) + i18n (1.14.7) concurrent-ruby (~> 1.0) - loofah (2.22.0) + logger (1.7.0) + loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mini_portile2 (2.8.5) - minitest (5.22.3) - mocha (2.1.0) + mini_portile2 (2.8.9) + minitest (5.25.5) + mocha (2.7.1) ruby2_keywords (>= 0.0.5) - mutex_m (0.2.0) - nokogiri (1.15.6) + nokogiri (1.18.10) mini_portile2 (~> 2.8.2) racc (~> 1.4) - racc (1.7.3) - rack (3.0.10) - rack-session (2.0.0) + racc (1.8.1) + rack (3.2.1) + rack-session (2.1.1) + base64 (>= 0.1.0) rack (>= 3.0.0) - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) - rails-dom-testing (2.2.0) + rails-dom-testing (2.3.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) - rake (13.2.1) + 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) + rake (13.3.0) ruby2_keywords (0.0.5) + securerandom (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri (1.0.3) + useragent (0.16.11) PLATFORMS ruby DEPENDENCIES - actionpack (~> 7.1.0) - activesupport (~> 7.1.0) + actionpack (~> 8.1.0.beta1) + activesupport (~> 8.1.0.beta1) has_scope! mocha rake diff --git a/gemfiles/Gemfile-rails-5-2 b/gemfiles/Gemfile-rails-5-2 deleted file mode 100644 index b16623d..0000000 --- a/gemfiles/Gemfile-rails-5-2 +++ /dev/null @@ -1,6 +0,0 @@ -source "https://rubygems.org" - -gem "actionpack", "~> 5.2.0" -gem "activesupport", "~> 5.2.0" - -gemspec path: "../" diff --git a/gemfiles/Gemfile-rails-6-0 b/gemfiles/Gemfile-rails-6-0 deleted file mode 100644 index 09d16db..0000000 --- a/gemfiles/Gemfile-rails-6-0 +++ /dev/null @@ -1,6 +0,0 @@ -source "https://rubygems.org" - -gem "actionpack", "~> 6.0.0" -gem "activesupport", "~> 6.0.0" - -gemspec path: "../" diff --git a/gemfiles/Gemfile-rails-6-1 b/gemfiles/Gemfile-rails-6-1 deleted file mode 100644 index f9a60d1..0000000 --- a/gemfiles/Gemfile-rails-6-1 +++ /dev/null @@ -1,6 +0,0 @@ -source "https://rubygems.org" - -gem "actionpack", "~> 6.1.0" -gem "activesupport", "~> 6.1.0" - -gemspec path: "../" diff --git a/gemfiles/Gemfile-rails-7-0 b/gemfiles/Gemfile-rails-7-0 index 65517e8..4a70837 100644 --- a/gemfiles/Gemfile-rails-7-0 +++ b/gemfiles/Gemfile-rails-7-0 @@ -1,6 +1,6 @@ -source 'https://rubygems.org' +source "https://rubygems.org" gemspec path: ".." -gem "actionpack", "~> 7.0.0" -gem "activesupport", "~> 7.0.0" +gem "actionpack", "~> 7.0.0", github: "rails/rails", branch: "7-0-stable" +gem "activesupport", "~> 7.0.0", github: "rails/rails", branch: "7-0-stable" diff --git a/gemfiles/Gemfile-rails-7-1 b/gemfiles/Gemfile-rails-7-1 new file mode 100644 index 0000000..3a9e9b8 --- /dev/null +++ b/gemfiles/Gemfile-rails-7-1 @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gemspec path: ".." + +gem "actionpack", "~> 7.1.0" +gem "activesupport", "~> 7.1.0" diff --git a/gemfiles/Gemfile-rails-7-2 b/gemfiles/Gemfile-rails-7-2 new file mode 100644 index 0000000..8be571f --- /dev/null +++ b/gemfiles/Gemfile-rails-7-2 @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gemspec path: ".." + +gem "actionpack", "~> 7.2.0" +gem "activesupport", "~> 7.2.0" diff --git a/gemfiles/Gemfile-rails-8-0 b/gemfiles/Gemfile-rails-8-0 new file mode 100644 index 0000000..e79e0c1 --- /dev/null +++ b/gemfiles/Gemfile-rails-8-0 @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gemspec path: ".." + +gem "actionpack", "~> 8.0.0" +gem "activesupport", "~> 8.0.0" diff --git a/gemfiles/Gemfile-rails-main b/gemfiles/Gemfile-rails-main index 934f513..dac9f83 100644 --- a/gemfiles/Gemfile-rails-main +++ b/gemfiles/Gemfile-rails-main @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem 'actionpack', github: 'rails/rails', branch: 'main' -gem 'activesupport', github: 'rails/rails', branch: 'main' +gemspec path: ".." -gemspec path: "../" +gem "actionpack", github: "rails/rails", branch: "main" +gem "activesupport", github: "rails/rails", branch: "main" diff --git a/has_scope.gemspec b/has_scope.gemspec index d222c4b..c7a3607 100644 --- a/has_scope.gemspec +++ b/has_scope.gemspec @@ -27,10 +27,10 @@ Gem::Specification.new do |s| 'README.md' ] - s.required_ruby_version = '>= 2.5.0' + s.required_ruby_version = '>= 2.7.0' - s.add_runtime_dependency 'actionpack', '>= 5.2' - s.add_runtime_dependency 'activesupport', '>= 5.2' + s.add_runtime_dependency 'actionpack', '>= 7.0' + s.add_runtime_dependency 'activesupport', '>= 7.0' s.add_development_dependency 'rake' s.add_development_dependency 'mocha'