Class: Gem::Tasks::Sign::PGP
- Defined in:
- lib/rubygems/tasks/sign/pgp.rb
Overview
The sign:pgp
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
-
#define ⇒ Object
Defines the
sign:pgp
task. -
#initialize(options = {}) {|_self| ... } ⇒ PGP
constructor
Initializes the
sign
task. -
#sign(path) ⇒ Object
PGP signs a package.
Methods inherited from Task
#bundle, #gem, #gemspec_tasks, #invoke, #namespaced_tasks, #run, #task?
Methods included from Printing
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ PGP
Initializes the sign
task.
17 18 19 20 21 22 |
# File 'lib/rubygems/tasks/sign/pgp.rb', line 17 def initialize(={}) super() yield self if block_given? define end |
Instance Method Details
#define ⇒ Object
Defines the sign:pgp
task.
27 28 29 30 31 |
# File 'lib/rubygems/tasks/sign/pgp.rb', line 27 def define super(:pgp) task :pgp => 'sign:pgp' end |
#sign(path) ⇒ Object
PGP signs a package.
41 42 43 44 45 |
# 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 |