Class | Gem::PackageTask |
In: |
lib/rubygems/package_task.rb
|
Parent: | Rake::PackageTask |
Create a package based upon a Gem::Specification. Gem packages, as well as zip files and tar/gzipped packages can be produced by this task.
In addition to the Rake targets generated by Rake::PackageTask, a Gem::PackageTask will also generate the following tasks:
Example using a Gem::Specification:
require 'rubygems' require 'rubygems/package_task' spec = Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.summary = "Ruby based make-like utility." s.name = 'rake' s.version = PKG_VERSION s.requirements << 'none' s.require_path = 'lib' s.autorequire = 'rake' s.files = PKG_FILES s.description = <<-EOF Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. EOF end Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = true pkg.need_tar = true end
gem_spec | [RW] | Ruby Gem::Specification containing the metadata for this package. The name, version and package_files are automatically determined from the gemspec and don‘t need to be explicitly provided. |
Create the Rake tasks and actions specified by this Gem::PackageTask. (define is automatically called if a block is given to new).