Class: Gem::Tasks::Install
- Defined in:
- lib/rubygems/tasks/install.rb
Overview
The install
task.
Constant Summary
Constants included from Printing
Printing::ANSI_BRIGHT, Printing::ANSI_CLEAR, Printing::ANSI_GREEN, Printing::ANSI_RED, Printing::ANSI_YELLOW, Printing::DEBUG_PREFIX, Printing::ERROR_PREFIX, Printing::STATUS_PREFIX
Instance Attribute Summary
Attributes inherited from Task
Instance Method Summary collapse
-
#define ⇒ Object
Defines the
install
task. -
#initialize(options = {}) {|_self| ... } ⇒ Install
constructor
Initializes the
install
task. -
#install(path) ⇒ Boolean
Pushes the gem by running
gem install
.
Methods inherited from Task
#bundle, #gem, #gemspec_tasks, #invoke, #namespaced_tasks, #run, #task?
Methods included from Printing
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Install
Initializes the install
task.
16 17 18 19 20 21 |
# File 'lib/rubygems/tasks/install.rb', line 16 def initialize(={}) super() yield self if block_given? define end |
Instance Method Details
#define ⇒ Object
Defines the install
task.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# 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) ⇒ Boolean
Pushes the gem by running gem install
.
56 57 58 |
# File 'lib/rubygems/tasks/install.rb', line 56 def install(path) gem 'install', '-q', path end |