-
Notifications
You must be signed in to change notification settings - Fork 55
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
Conditionally version sqlite3 gem #316
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tvdeyen
reviewed
Jan 14, 2025
21741ea
to
35674d4
Compare
2baa04e
to
078f203
Compare
Older versions of Rails, and thus older versions of Solidus, are incompatible with the `sqlite3` gem 1.x. This makes sure we use the right version for each Rails version.
We're expecting the install generator of this gem to change things in the starter frontend, but the generated Dummy app runs on the legacy frontend. This fails, migrations don't run, and all tests fail. This is not the cleanest solution: Ideally we'd have an install generator for dummy apps that works with the starter frontend template, but we're not there.
People might have other authentication solutions, and we can simply not load solidus_auth_devise in specs.
aa881ac
to
2cbc1a9
Compare
tvdeyen
reviewed
Feb 12, 2025
Comment on lines
+21
to
+22
rails_version = Gem::Requirement.new(rails_requirement_string).requirements[0][1] | ||
sqlite_version = rails_version < Gem::Version.new(7.2) ? "~> 1.4" : "~> 2.0" |
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.
Can we simplify this to?
Suggested change
rails_version = Gem::Requirement.new(rails_requirement_string).requirements[0][1] | |
sqlite_version = rails_version < Gem::Version.new(7.2) ? "~> 1.4" : "~> 2.0" | |
rails_version = Gem::Version.new(rails_requirement_string) | |
sqlite_version = rails_version < Gem::Version.new(7.2) ? "~> 1.4" : "~> 2.0" |
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.
No, because the circleci image specifies the rails version as ~> 7.0
...
superseded by #321 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Older versions of Rails, and thus older versions of Solidus, are incompatible with the
sqlite3
gem 1.x. This makes sure we use the right version for each Solidus version.