Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Allow prereleases to be included in the chefdk #224

Merged
merged 1 commit into from
Nov 11, 2014
Merged

Conversation

jkeiser
Copy link
Contributor

@jkeiser jkeiser commented Nov 10, 2014

No description provided.

@@ -131,7 +131,9 @@ def component_path

def gem_base_dir
return nil if @gem_name_for_base_dir.nil?
Gem::Specification::find_by_name(@gem_name_for_base_dir).gem_dir
gem = Gem::Specification::find_by_name(@gem_name_for_base_dir)
gem ||= Gem::Specification::find_by_name(@gem_name_for_base_dir, '>= 0.a') # Allow prerelease versions
Copy link
Contributor

Choose a reason for hiding this comment

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

i see the comment there, but this could use a more verbose explanation -- "ELI5" -- it would also be good to try to figure out if there's a more obvious "prerelease: true" options flag we could pass or something.

Copy link
Contributor

Choose a reason for hiding this comment

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

The rubygems code is here: https://github.com/rubygems/rubygems/blob/3e365282d1fa4210011b3095d685c10483a7a62c/lib/rubygems/specification.rb#L904-L922

You'll have to dig a bit deeper into Gem::Dependency.new(name, *requirements).to_spec to figure out how it decides whether to allow prereleases to see if there's a more elegant way to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lamont-granquist @danielsdeleo I don't see any way to do it. And https://github.com/rubygems/rubygems/blob/master/lib/rubygems/version.rb#L282 does not give one hope ... but I'll modify the comments for ELI5 before I check in, unless there is something else :)

@lamont-granquist
Copy link
Contributor

yep 👍

@lamont-granquist lamont-granquist deleted the allow-prerelease branch November 11, 2014 19:21
ksubrama pushed a commit that referenced this pull request Jan 11, 2016
Hardcode ruby devkit into Windows customization
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants