Class: Gem::Commands::BuildCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygems/openpgp/sign_plugins.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/rubygems/openpgp/sign_plugins.rb', line 18

def execute
  original_execute

  if Gem::OpenPGP.options[:sign]
    gemspec = get_one_gem_name
    if File.exist? gemspec then
      spec = Gem::Specification.load gemspec
      file_name = File.join(".", File.basename(spec.cache_file))
      Gem::OpenPGP.sign_gem file_name, key=Gem::OpenPGP.options[:key]
    end
  end
end

#original_executeObject



17
# File 'lib/rubygems/openpgp/sign_plugins.rb', line 17

alias_method :original_execute, :execute