From 23ecb05ddc0ecc9f50c5a31e180ea2976a5f1f39 Mon Sep 17 00:00:00 2001 From: Steve Hoeksema Date: Thu, 16 Dec 2021 13:15:07 +1300 Subject: [PATCH 1/3] Support Rails 7 --- .github/workflows/test.yaml | 19 +++++++++++++++++++ CHANGELOG.md | 4 ++++ Gemfile | 6 +++--- active_attr.gemspec | 6 +++--- gemfiles/rails_7_0.gemfile | 10 ++++++++++ 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 gemfiles/rails_7_0.gemfile diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ba9bfc9..71bfff6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -35,6 +35,7 @@ jobs: - gemfiles/rails_5_1.gemfile - gemfiles/rails_5_2.gemfile - gemfiles/rails_6_0.gemfile + - gemfiles/rails_7_0.gemfile - Gemfile - gemfiles/rails_head.gemfile exclude: @@ -52,6 +53,8 @@ jobs: gemfile: gemfiles/rails_5_2.gemfile - ruby: 1.9.2 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 1.9.2 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 1.9.2 gemfile: Gemfile - ruby: 1.9.2 @@ -64,6 +67,8 @@ jobs: gemfile: gemfiles/rails_5_2.gemfile - ruby: 1.9.3 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 1.9.3 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 1.9.3 gemfile: Gemfile - ruby: 1.9.3 @@ -76,6 +81,8 @@ jobs: gemfile: gemfiles/rails_5_2.gemfile - ruby: 2.0.0 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 2.0.0 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.0.0 gemfile: Gemfile - ruby: 2.0.0 @@ -88,34 +95,46 @@ jobs: gemfile: gemfiles/rails_5_2.gemfile - ruby: 2.1.9 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 2.1.9 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.1.9 gemfile: Gemfile - ruby: 2.1.9 gemfile: gemfiles/rails_head.gemfile - ruby: 2.2.10 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 2.2.10 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.2.10 gemfile: Gemfile - ruby: 2.2.10 gemfile: gemfiles/rails_head.gemfile - ruby: 2.3.8 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 2.3.8 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.3.8 gemfile: Gemfile - ruby: 2.3.8 gemfile: gemfiles/rails_head.gemfile - ruby: 2.4.10 gemfile: gemfiles/rails_6_0.gemfile + - ruby: 2.4.10 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.4.10 gemfile: Gemfile - ruby: 2.4.10 gemfile: gemfiles/rails_head.gemfile - ruby: 2.5.9 gemfile: gemfiles/rails_3_0.gemfile + - ruby: 2.5.9 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.5.9 gemfile: gemfiles/rails_head.gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_3_0.gemfile + - ruby: 2.6.8 + gemfile: gemfiles/rails_7_0.gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_head.gemfile - ruby: 2.7.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index a31149a..65d473f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# ActiveAttr (Unreleased) + +* ActiveAttr now supports Rails 7.0 + # ActiveAttr 0.15.3 (April 12, 2021) * #185 Fixed ReDoS vulnerability in BooleanTypecaster#call (ねず) diff --git a/Gemfile b/Gemfile index 25b4f23..c0d03f8 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,9 @@ source "https://rubygems.org" gemspec :development_group => :test -gem "activemodel", "~> 6.1.0" -gem "activesupport", "~> 6.1.0" -gem "actionpack", "~> 6.1.0" +gem "activemodel", "~> 7.0.0" +gem "activesupport", "~> 7.0.0" +gem "actionpack", "~> 7.0.0" gem "activemodel-serializers-xml", :group => :test gem "rexml", :group => :test gem "protected_attributes_continued", :group => :test diff --git a/active_attr.gemspec b/active_attr.gemspec index 726ac82..e805cf6 100644 --- a/active_attr.gemspec +++ b/active_attr.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 2.1.0" - gem.add_runtime_dependency "actionpack", ">= 3.0.2", "< 7.0" - gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 7.0" - gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 7.0" + gem.add_runtime_dependency "actionpack", ">= 3.0.2", "< 8.0" + gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 8.0" + gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 8.0" gem.add_development_dependency "bundler" gem.add_development_dependency "factory_bot", "< 5.0" diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile new file mode 100644 index 0000000..90c6bdb --- /dev/null +++ b/gemfiles/rails_7_0.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gemspec :development_group => :test, :path => ".." + +gem "activemodel", "~> 7.0.0" +gem "activesupport", "~> 7.0.0" +gem "actionpack", "~> 7.0.0" +gem "activemodel-serializers-xml", :group => :test +gem "rexml", :group => :test +gem "protected_attributes_continued", :group => :test From 3807dfaae3d147aa5bc8eaf37baa1cf15472bf4c Mon Sep 17 00:00:00 2001 From: Chris Griego Date: Thu, 16 Dec 2021 16:04:18 -0500 Subject: [PATCH 2/3] Mark the release of 0.15.4 --- .github/workflows/test.yaml | 20 +++++++++---------- CHANGELOG.md | 4 ++-- active_attr.gemspec | 6 +++--- .../{rails_7_0.gemfile => rails_6_1.gemfile} | 6 +++--- lib/active_attr/version.rb | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) rename gemfiles/{rails_7_0.gemfile => rails_6_1.gemfile} (69%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 71bfff6..ed57d3e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -35,7 +35,7 @@ jobs: - gemfiles/rails_5_1.gemfile - gemfiles/rails_5_2.gemfile - gemfiles/rails_6_0.gemfile - - gemfiles/rails_7_0.gemfile + - gemfiles/rails_6_1.gemfile - Gemfile - gemfiles/rails_head.gemfile exclude: @@ -54,7 +54,7 @@ jobs: - ruby: 1.9.2 gemfile: gemfiles/rails_6_0.gemfile - ruby: 1.9.2 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 1.9.2 gemfile: Gemfile - ruby: 1.9.2 @@ -68,7 +68,7 @@ jobs: - ruby: 1.9.3 gemfile: gemfiles/rails_6_0.gemfile - ruby: 1.9.3 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 1.9.3 gemfile: Gemfile - ruby: 1.9.3 @@ -82,7 +82,7 @@ jobs: - ruby: 2.0.0 gemfile: gemfiles/rails_6_0.gemfile - ruby: 2.0.0 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.0.0 gemfile: Gemfile - ruby: 2.0.0 @@ -96,7 +96,7 @@ jobs: - ruby: 2.1.9 gemfile: gemfiles/rails_6_0.gemfile - ruby: 2.1.9 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.1.9 gemfile: Gemfile - ruby: 2.1.9 @@ -104,7 +104,7 @@ jobs: - ruby: 2.2.10 gemfile: gemfiles/rails_6_0.gemfile - ruby: 2.2.10 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.2.10 gemfile: Gemfile - ruby: 2.2.10 @@ -112,7 +112,7 @@ jobs: - ruby: 2.3.8 gemfile: gemfiles/rails_6_0.gemfile - ruby: 2.3.8 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.3.8 gemfile: Gemfile - ruby: 2.3.8 @@ -120,7 +120,7 @@ jobs: - ruby: 2.4.10 gemfile: gemfiles/rails_6_0.gemfile - ruby: 2.4.10 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.4.10 gemfile: Gemfile - ruby: 2.4.10 @@ -128,13 +128,13 @@ jobs: - ruby: 2.5.9 gemfile: gemfiles/rails_3_0.gemfile - ruby: 2.5.9 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.5.9 gemfile: gemfiles/rails_head.gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_3_0.gemfile - ruby: 2.6.8 - gemfile: gemfiles/rails_7_0.gemfile + gemfile: gemfiles/rails_6_1.gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_head.gemfile - ruby: 2.7.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 65d473f..800e397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -# ActiveAttr (Unreleased) +# ActiveAttr 0.15.3 (December 16, 2021) -* ActiveAttr now supports Rails 7.0 +* ActiveAttr now supports Rails 7.0 (Steve Hoeksema) # ActiveAttr 0.15.3 (April 12, 2021) diff --git a/active_attr.gemspec b/active_attr.gemspec index e805cf6..f90bbe1 100644 --- a/active_attr.gemspec +++ b/active_attr.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 2.1.0" - gem.add_runtime_dependency "actionpack", ">= 3.0.2", "< 8.0" - gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 8.0" - gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 8.0" + gem.add_runtime_dependency "actionpack", ">= 3.0.2", "< 7.1" + gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 7.1" + gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 7.1" gem.add_development_dependency "bundler" gem.add_development_dependency "factory_bot", "< 5.0" diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_6_1.gemfile similarity index 69% rename from gemfiles/rails_7_0.gemfile rename to gemfiles/rails_6_1.gemfile index 90c6bdb..e025e78 100644 --- a/gemfiles/rails_7_0.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -2,9 +2,9 @@ source "https://rubygems.org" gemspec :development_group => :test, :path => ".." -gem "activemodel", "~> 7.0.0" -gem "activesupport", "~> 7.0.0" -gem "actionpack", "~> 7.0.0" +gem "activemodel", "~> 6.1.0" +gem "activesupport", "~> 6.1.0" +gem "actionpack", "~> 6.1.0" gem "activemodel-serializers-xml", :group => :test gem "rexml", :group => :test gem "protected_attributes_continued", :group => :test diff --git a/lib/active_attr/version.rb b/lib/active_attr/version.rb index 5d0db8b..1b9772e 100644 --- a/lib/active_attr/version.rb +++ b/lib/active_attr/version.rb @@ -1,5 +1,5 @@ module ActiveAttr # Complete version string # @since 0.1.0 - VERSION = "0.15.3" + VERSION = "0.15.4" end From e9ed53d3a4808982f6ff6569a509920980450fe3 Mon Sep 17 00:00:00 2001 From: Chris Griego Date: Thu, 16 Dec 2021 16:10:23 -0500 Subject: [PATCH 3/3] Rails 7.0 requires Ruby 2.7+ --- .github/workflows/test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ed57d3e..a9324a0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -129,12 +129,16 @@ jobs: gemfile: gemfiles/rails_3_0.gemfile - ruby: 2.5.9 gemfile: gemfiles/rails_6_1.gemfile + - ruby: 2.5.9 + gemfile: Gemfile - ruby: 2.5.9 gemfile: gemfiles/rails_head.gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_3_0.gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_6_1.gemfile + - ruby: 2.6.8 + gemfile: Gemfile - ruby: 2.6.8 gemfile: gemfiles/rails_head.gemfile - ruby: 2.7.4