Class: Gem::Tasks::Sign::Task

Inherits:
Task
  • Object
show all
Defined in:
lib/rubygems/tasks/sign/task.rb

Direct Known Subclasses

Checksum

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

#project

Instance Method Summary collapse

Methods inherited from Task

#bundle, #gem, #gemspec_tasks, #initialize, #invoke, #namespaced_tasks, #run, #task?

Methods included from Printing

#debug, #error, #status

Constructor Details

This class inherits a constructor from Gem::Tasks::Task

Instance Method Details

#define(name) ⇒ Object

Defines signing tasks for the various packages.

Parameters:

  • name (Symbol)

    The name for the sign: task.


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/rubygems/tasks/sign/task.rb', line 16

def define(name)
  @project.builds.each do |build,packages|
    packages.each do |format,path|
      namespace :sign do
        namespace name do 
          namespace build do
            task format => path do
              sign(path)
            end
          end
        end
      end
    end

    namespaced_tasks "sign:#{name}:#{build}", packages.keys

    task "sign:#{name}"  => "sign:#{name}:#{build}"
    task "sign:#{build}" => "sign:#{name}:#{build}"

    desc "Signs all packages" unless task?(:sign)
    task :sign           => "sign:#{name}:#{build}"
  end
end

#sign(path) ⇒ Object

This method is abstract.

Signs a package.

Parameters:

  • path (String)

    The path to the package.


48
49
# File 'lib/rubygems/tasks/sign/task.rb', line 48

def sign(path)
end