From b042584a2682d189aaec351b6ce50718c0ebee9f Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Sun, 10 Nov 2024 11:39:30 -0700 Subject: [PATCH 1/2] Update build matrix --- .github/workflows/ci.yml | 11 +++++------ gemfiles/activemodel-7.2.gemfile | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 gemfiles/activemodel-7.2.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a111f63..213b707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,19 +10,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.2", "3.3"] gemfile: - - activemodel-6.0 - - activemodel-6.1 - - activemodel-7.0 - activemodel-7.1 + - activemodel-7.2 # - activemodel-main include: - { ruby: "2.3", gemfile: "activemodel-3.2" } - { ruby: "2.4", gemfile: "activemodel-4.2" } - { ruby: "2.5", gemfile: "activemodel-5.2" } - - { ruby: "2.6", gemfile: "activemodel-6.1" } - - { ruby: "3.3", gemfile: "activemodel-7.1" } + - { ruby: "2.7", gemfile: "activemodel-6.0" } + - { ruby: "3.0", gemfile: "activemodel-6.1" } + - { ruby: "3.1", gemfile: "activemodel-7.0" } env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile diff --git a/gemfiles/activemodel-7.2.gemfile b/gemfiles/activemodel-7.2.gemfile new file mode 100644 index 0000000..3ab961a --- /dev/null +++ b/gemfiles/activemodel-7.2.gemfile @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gem "activemodel", "~> 7.2.0" + +gemspec path: "../" From dbd7fe24217878064c8fd28be022b436eafb894c Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Sun, 10 Nov 2024 11:46:37 -0700 Subject: [PATCH 2/2] Add Rails 8 support --- .github/workflows/ci.yml | 1 + gemfiles/activemodel-8.0.gemfile | 7 +++++++ strip_attributes.gemspec | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 gemfiles/activemodel-8.0.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 213b707..e487cd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ jobs: gemfile: - activemodel-7.1 - activemodel-7.2 + - activemodel-8.0 # - activemodel-main include: - { ruby: "2.3", gemfile: "activemodel-3.2" } diff --git a/gemfiles/activemodel-8.0.gemfile b/gemfiles/activemodel-8.0.gemfile new file mode 100644 index 0000000..39272f5 --- /dev/null +++ b/gemfiles/activemodel-8.0.gemfile @@ -0,0 +1,7 @@ +source "https://rubygems.org" + +gem "activemodel", "~> 8.0.0" +# TODO: Remove this after active_attr supports Rails 8 +gem "active_attr", github: "leoarnold/active_attr", branch: "leoarnold/rails-8" + +gemspec path: "../" diff --git a/strip_attributes.gemspec b/strip_attributes.gemspec index bca7d28..433b923 100644 --- a/strip_attributes.gemspec +++ b/strip_attributes.gemspec @@ -23,9 +23,9 @@ Gem::Specification.new do |spec| "source_code_uri" => "https://github.com/rmm5t/strip_attributes", } - spec.add_runtime_dependency "activemodel", ">= 3.0", "< 8.0" + spec.add_runtime_dependency "activemodel", ">= 3.0", "< 9.0" spec.add_development_dependency "active_attr", "~> 0.15" - spec.add_development_dependency "minitest", ">= 5.0", "< 6.0" + spec.add_development_dependency "minitest", "~> 5.0" spec.add_development_dependency "minitest-matchers_vaccine", "~> 1.0" unless ENV["SKIP_VACCINE"] spec.add_development_dependency "minitest-reporters", ">= 0.14.24" spec.add_development_dependency "rake"