-
Notifications
You must be signed in to change notification settings - Fork 106
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
Conversation
lib/pdk/util/ruby_version.rb
Outdated
@@ -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? |
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 think you meant to return '2.4.4'
here
lib/pdk/util/ruby_version.rb
Outdated
@@ -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 |
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.
Should change this line to just call latest_ruby_version
now to get rid of the duplicated code
9fc0623
to
854c10f
Compare
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.
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. :)
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.