Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Rails 8.0 #73

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ jobs:
- { 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: "3.1", gemfile: "activemodel-7.2" }
- { ruby: "3.2", gemfile: "activemodel-7.2" }
- { ruby: "3.3", gemfile: "activemodel-7.2" }
- { ruby: "3.2", gemfile: "activemodel-8.0" }
- { ruby: "3.3", gemfile: "activemodel-8.0" }

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
Expand Down
5 changes: 5 additions & 0 deletions gemfiles/activemodel-7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "activemodel", "~> 7.2.0"

gemspec path: "../"
6 changes: 6 additions & 0 deletions gemfiles/activemodel-8.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "activemodel", "~> 8.0.0"
gem "active_attr", github: "leoarnold/active_attr", branch: "leoarnold/rails-8"
Copy link
Owner

@rmm5t rmm5t Nov 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm inclined to merge this PR even though the test suite relies on your private branch at the moment. Would you mind coming back to submit another PR after your active_attr PR is merged?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I marked this PR as a draft specifically to prevent premature merging. The reason I put up the draft is so that other developers can see that this effort is already in progress and they don't need to investigate themselves (or open issues).

Copy link
Owner

@rmm5t rmm5t Nov 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would a "premature" merge be a problem? This gem doesn't have a required runtime dependency on active_attr. ActiveAttr is an optional dependency.

We should be able to merge this PR and when active_attr is updated, projects will get its dependency benefits when it also supports rails 8.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. Keeping this PR as a draft just holds back those projects that depend on strip_attributes but don't have a dependency on active_attr.


gemspec path: "../"
4 changes: 2 additions & 2 deletions strip_attributes.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ 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_development_dependency "active_attr", "~> 0.15"
spec.add_runtime_dependency "activemodel", ">= 3.0", "< 8.1"
spec.add_development_dependency "active_attr", ">= 0.15.0", "< 0.19"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[QUESTION] Please help me understand why this active_attr restriction was necessary as compared to ~> 0.15 (considering the latest release of active_attr is 0.17).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we need cgriego/active_attr#205 which will (probably) be published as active_attr v0.18.0.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't explain the difference between "~> 0.15" and ">= 0.15.0", "< 0.19"

[PLEASE REVERT] back to ~> 0.15

spec.add_development_dependency "minitest", ">= 5.0", "< 6.0"
spec.add_development_dependency "minitest-matchers_vaccine", "~> 1.0" unless ENV["SKIP_VACCINE"]
spec.add_development_dependency "minitest-reporters", ">= 0.14.24"
Expand Down