-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow suspenders to be used with a range of Ruby versions (#1129)
Suspenders locks the user in a particular Ruby version (3.0.5 at the time of writing), a restriction that can sometimes be annoying. This PR enables Suspenders to be used with a range of safe Ruby versions, initially from 3.0.5 to 3.2.2 Contrary to the Rails version, the Ruby version can be more flexible if our gems are compatible. Major Rails versions, on the other hand, tend to be a bit more disruptive and may require deeper changes to Suspenders. [The last main breaking change](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) was on Ruby 3.0, but we're already past that point. `.ruby-versions` was the source of truth for the canonical Ruby version, but in this PR it represents the maximum version. Unfortunately, it is still needed by CI so we can't delete it. Note that even without such a file, rubybems validates the runtime Ruby version through the gemspec. Closes #1073
- Loading branch information
Showing
7 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0.5 | ||
3.2.2 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
module Suspenders | ||
RAILS_VERSION = "~> 7.0.0".freeze | ||
RUBY_VERSION = IO | ||
.read("#{File.dirname(__FILE__)}/../../.ruby-version") | ||
.strip | ||
.freeze | ||
|
||
minimum_ruby_version = "3.0.5" | ||
maximum_ruby_version = Pathname(__dir__).join("../../.ruby-version").read.strip | ||
|
||
RUBY_VERSION_RANGE = [minimum_ruby_version, maximum_ruby_version].freeze | ||
VERSION = "20230113.0".freeze | ||
end |
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
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
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