class Gem::Tasks::Sign::PGP

The `sign:pgp` task.

Public Class Methods

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

Initializes the `sign` task.

@param [Hash] options

Digest options.
Calls superclass method
# File lib/rubygems/tasks/sign/pgp.rb, line 17
def initialize(options={})
  super()

  yield self if block_given?
  define
end

Public Instance Methods

define() click to toggle source

Defines the `sign:pgp` task.

# File lib/rubygems/tasks/sign/pgp.rb, line 27
def define
  sign_task :pgp

  task :pgp => 'sign:pgp'
end
sign(path) click to toggle source

PGP signs a package.

@param [String] path

The path to the package.

@api semipublic

# File lib/rubygems/tasks/sign/pgp.rb, line 41
def sign(path)
  status "Signing #{File.basename(path)} ..."

  run 'gpg', '--sign', '--detach-sign', '--armor', path
end