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

(PDK-1056) Adds support for Ruby 2.5.1 in packaged PDK version #568

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

bmjen
Copy link
Contributor

@bmjen bmjen commented Aug 30, 2018

Simple change here to ensure that the packaged version of PDK will default to 2.4.4, but also adds a helper function to identify the newest version of Ruby in the package.

@bmjen bmjen requested review from scotje and rodjek August 30, 2018 01:57
@coveralls
Copy link

coveralls commented Aug 30, 2018

Coverage Status

Coverage increased (+0.007%) to 92.882% when pulling 4165cbf on bmjen:r2.5.1 into 02b6bf0 on puppetlabs:master.

@@ -45,10 +45,17 @@ def scan_for_packaged_rubies
end

def default_ruby_version
# For now, the packaged versions will not be using default of 2.4.4.
'2.4.4' if PDK::Util.package_install?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you meant to return '2.4.4' here

@@ -45,10 +45,17 @@ def scan_for_packaged_rubies
end

def default_ruby_version
# For now, the packaged versions will not be using default of 2.4.4.
'2.4.4' if PDK::Util.package_install?

# TODO: may not be a safe assumption that highest available version should be default
versions.keys.sort { |a, b| Gem::Version.new(b) <=> Gem::Version.new(a) }.first
Copy link
Contributor

Choose a reason for hiding this comment

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

Should change this line to just call latest_ruby_version now to get rid of the duplicated code

@bmjen bmjen force-pushed the r2.5.1 branch 2 times, most recently from 9fc0623 to 854c10f Compare August 30, 2018 06:35
Copy link
Contributor

@scotje scotje left a comment

Choose a reason for hiding this comment

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

Ideally I think the unit tests would be written in such a way as to not need us to update version numbers when the packaged rubies change, but this is fine for now. :)

@bmjen bmjen merged commit d6241e1 into puppetlabs:master Aug 30, 2018
@bmjen bmjen deleted the r2.5.1 branch August 30, 2018 19:41
@bmjen bmjen added the feature label Oct 5, 2018
@bmjen bmjen changed the title (PDK-1056) Update default ruby for packaged versions (PDK-1056) Adds support for Ruby 2.5.1 in packaged PDK version Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants