(PUP-9175) Use modern version of Rake gem#7168
Merged
joshcooper merged 1 commit intopuppetlabs:5.5.xfrom Oct 16, 2018
Merged
Conversation
Previously the version of Rake was pinned to an old Ruby 1.9 compatible version however this is beginning to cause issues with compatibility in other gems, for example the packaging gem. This commit changes the rake requirement in the gemfile to use the older version for old versions of Ruby (< 2.0) and uses a more relaxed pin, protecting on major version, for newer Ruby versions (>= 2.0). This commit also adds a RAKE_LOCATION environment variable which can be used in any instance to specify the the version of Rake required, much like the FACTER and HIERA variables. Note the rubocop disable is needed because rubocop doesn't understand the conditional statements which ensures only one rake gem is ever actually specified.
961b5b0 to
6e88c55
Compare
|
CLA signed by all contributors. |
mwaggett
approved these changes
Oct 15, 2018
joshcooper
reviewed
Oct 16, 2018
| gem "rake", '~> 12.2.1', :require => false | ||
| gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 12.2.1') if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') | ||
| gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 12.2') if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0') # rubocop:disable Bundler/DuplicatedGem | ||
|
|
Contributor
There was a problem hiding this comment.
This looks good, but in the merge up to 6.0.x, we should delete the < 2.0 case, because puppet requires 2.3 or later in puppet6.
Contributor
|
@glennsarti Can you submit a new PR to 6.0.x to eliminate the < 2.0 case? |
Contributor
|
Due to upcoming release deadlines, I took care of this in #7171 |
This file contains hidden or 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
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.
Previously the version of Rake was pinned to an old Ruby 1.9 compatible version
however this is beginning to cause issues with compatibility in other gems,
for example the packaging gem. This commit changes the rake requirement in the
gemfile to use the older version for old versions of Ruby (< 2.0) and uses a
more relaxed pin, protecting on major version, for newer Ruby versions (>= 2.0).
This commit also adds a RAKE_LOCATION environment variable which can be used in
any instance to specify the the version of Rake required, much like the FACTER
and HIERA variables.