class Gem::Tasks::Build::Tar
The `build:tar` task.
Public Class Methods
new(options={}) { |self| ... }
click to toggle source
Initializes the `build:tar` task.
@param [Hash] options
Additional options.
Calls superclass method
# File lib/rubygems/tasks/build/tar.rb, line 19 def initialize(options={}) super() yield self if block_given? define end
Public Instance Methods
build(path,gemspec)
click to toggle source
Builds a `.tar.gz` archive.
@param [String] path
The path for the `.tar.gz` archive.
@param [Gem::Specification] gemspec
The gemspec to generate the archive from.
@api semipublic
# File lib/rubygems/tasks/build/tar.rb, line 44 def build(path,gemspec) run 'tar', 'czf', path, *gemspec.files end
define()
click to toggle source
Defines the `build:tar` task.
# File lib/rubygems/tasks/build/tar.rb, line 29 def define build_task :tar, 'tar.gz' end