class ChefDK::Command::GemForwarder
Forwards all commands to rubygems.
Public Instance Methods
needs_version?(params)
click to toggle source
Lazy solution: By automatically returning false, we force ChefDK::Base to call this class' run method, so that Gem::GemRunner can handle the -v flag appropriately (showing the gem version, or installing a specific version of a gem).
# File lib/chef-dk/command/gem.rb, line 43 def needs_version?(params) false end
run(params)
click to toggle source
# File lib/chef-dk/command/gem.rb, line 32 def run(params) retval = Gem::GemRunner.new.run( params.clone ) retval.nil? ? true : retval rescue Gem::SystemExitException => e exit( e.exit_code ) end