-
Notifications
You must be signed in to change notification settings - Fork 45
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
Refactor gemfiles #438
Refactor gemfiles #438
Conversation
We have several gemfiles in which we have specific version requirements for `activejob` and `activerecord`, for use in our CI matrix. The current approach breaks on Ruby HEAD because it is detected as specifying multiple versions/sources for those gems. Instead, this refactors them to use an instance variable approach, similar to that used in Shopify/maintenance_tasks.
@@ -11,6 +11,17 @@ gemspec | |||
gem "sidekiq" | |||
gem "resque" | |||
|
|||
if defined?(@rails_gems_requirements) && @rails_gems_requirements | |||
# We avoid the `gem "..."` syntax here so Dependabot doesn't try to update these gems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this approach works on latest Ruby HEAD, as opposed to the previous approach which no longer works as of this writing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love the dependabot work-around, but it's better than broken CI.
Yeah, it's weird. Shopify/maintenance_tasks#496 has context on how and why they got to their rails = "rails"
gem rails, @rails_gem_requirement approach, which I adapted. |
We have several gemfiles in which we have specific version requirements for
activejob
andactiverecord
, for use in our CI matrix.The current approach breaks on Ruby HEAD because it is detected as specifying multiple versions/sources for those gems. Instead, this refactors them to use an instance variable approach, similar to that used in Shopify/maintenance_tasks.