sprinkle-tool / sprinkle

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created
https://github.com/sprinkle-tool/sprinkle
MIT License
1.15k stars 138 forks source link

Add gem2 installer to use `gem2.0`. #210

Open weakish opened 8 years ago

weakish commented 8 years ago

Same as gem installer except it uses gem2.0.

joshgoebel commented 8 years ago

This should be handled by gem supporting a :binary_name option that changes the default from gem to gem2.0 and then someone who needs this can define a helper gem2 function that just calls gem but merges in the binary_name argument.

In fact I'd be ok with gem2 in the API, but it should be part of gem.rb, not a whole new thing.

weakish commented 8 years ago

it should be part of gem.rb

Merged into gem.rb

This should be handled by gem supporting a :binary_name option that changes the default from gem to gem2.0 and then someone who needs this can define a helper gem2 function

I implemented it as an option gem_command.

joshgoebel commented 8 years ago

That's fine, but I also imagined you'd have a gem2 api call that provided an easy way to call it without having to know about the internals of gem_command.

joshgoebel commented 8 years ago

Something like:

 def gem2(name, options = {}, &block)
    gem(name, options.merge(:gem_command => "gem2.0"), &block)
end