Class: Gem::Tasks::Build::Gem
- Defined in:
- lib/rubygems/tasks/build/gem.rb
Overview
The build:gem
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
-
#build(path, gemspec) ⇒ Object
Builds the
.gem
package. -
#define ⇒ Object
Defines the
build:gem
task. -
#initialize(options = {}) {|_self| ... } ⇒ Gem
constructor
Initializes the
build:gem
task.
Methods inherited from Task
#bundle, #gem, #gemspec_tasks, #invoke, #namespaced_tasks, #run, #task?
Methods included from Printing
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Gem
Initializes the build:gem
task.
21 22 23 24 25 26 |
# File 'lib/rubygems/tasks/build/gem.rb', line 21 def initialize(={}) super() yield self if block_given? define end |
Instance Method Details
#build(path, gemspec) ⇒ Object
Builds the .gem
package.
52 53 54 55 56 57 58 59 60 |
# File 'lib/rubygems/tasks/build/gem.rb', line 52 def build(path,gemspec) gem = if ::Gem::VERSION > '2.' ::Gem::Package.build(gemspec) else ::Gem::Builder.new(gemspec).build end mv gem, Project::PKG_DIR end |
#define ⇒ Object
Defines the build:gem
task.
31 32 33 34 35 36 37 38 39 |
# File 'lib/rubygems/tasks/build/gem.rb', line 31 def define build_task :gem # backwards compatibility for Gem::PackageTask task :gem => 'build:gem' # backwards compatibility for Hoe task :package => 'build:gem' end |