class Gem::Tasks::Build::Zip

The `build:zip` task.

Public Class Methods

new(options={}) { |self| ... } click to toggle source

Initializes the `build:zip` task.

@param [Hash] options

Additional options.
Calls superclass method Gem::Tasks::Task.new
# File lib/rubygems/tasks/build/zip.rb, line 17
def initialize(options={})
  super()

  yield self if block_given?
  define
end

Public Instance Methods

build(path,gemspec) click to toggle source

Builds the `.zip` archive.

@param [String] path

The path for the `.zip` archive.

@param [Gem::Specification] gemspec

The gemspec to build the archive from.

@api semipublic

# File lib/rubygems/tasks/build/zip.rb, line 42
def build(path,gemspec)
  run 'zip', '-q', path, *gemspec.files
end
define() click to toggle source

Defines the `build:zip` task.

# File lib/rubygems/tasks/build/zip.rb, line 27
def define
  build_task :zip
end