Class: Gem::Commands::PushCommand

Inherits:
Gem::Command
  • Object
show all
Defined in:
lib/rubygems/commands/fake_push_command.rb

Overview

Because of the way Gem commands are loaded, it isn’t possible at this time to override the #send_gem method without resorting to monkey patching.

Instance Method Summary collapse

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/rubygems/commands/fake_push_command.rb', line 6

def execute
  name = get_one_gem_name
  gem_name, version = File.basename(name).scan(/(.*)-([\d\.]+).gem/).first

  sleep 0.5
  puts 'Pushing gem to RubyGems.org...'

  sleep 2
  puts "Successfully registered gem: #{gem_name} (#{version})"
end