class Gem::Tasks::Install
The `install` task.
Public Class Methods
new(options={}) { |self| ... }
click to toggle source
Initializes the `install` task.
@param [Hash] options
Additional options.
Calls superclass method
# File lib/rubygems/tasks/install.rb, line 16 def initialize(options={}) super() yield self if block_given? define end
Public Instance Methods
define()
click to toggle source
Defines the `install` task.
# File lib/rubygems/tasks/install.rb, line 26 def define namespace :install do @project.builds.each do |build,packages| path = packages[:gem] task build => path do status "Installing #{File.basename(path)} ..." install(path) end end end desc "Installs all built gem packages" gemspec_tasks :install task :install_gem => :install # backwards compatibility with Hoe end
install(path)
click to toggle source
Pushes the gem by running `gem install`.
@param [String] path
The path to the `.gem` file.
@return [Boolean]
Specifies whether `gem install` was successful or not.
@api semipublic
# File lib/rubygems/tasks/install.rb, line 56 def install(path) run 'gem', 'install', '-q', path end