Parent

Class Index [+]

Quicksearch

Gem::Commands::PushCommand

Public Class Methods

new() click to toggle source
    # File lib/rubygems/commands/push_command.rb, line 21
21:   def initialize
22:     super 'push', description
23:     add_proxy_option
24:   end

Public Instance Methods

execute() click to toggle source
    # File lib/rubygems/commands/push_command.rb, line 26
26:   def execute
27:     sign_in
28:     send_gem get_one_gem_name
29:   end
send_gem(name) click to toggle source
    # File lib/rubygems/commands/push_command.rb, line 31
31:   def send_gem name
32:     say "Pushing gem to RubyGems.org..."
33: 
34:     response = rubygems_api_request :post, "api/v1/gems" do |request|
35:       request.body = Gem.read_binary name
36:       request.add_field "Content-Length", request.body.size
37:       request.add_field "Content-Type",   "application/octet-stream"
38:       request.add_field "Authorization",  Gem.configuration.rubygems_api_key
39:     end
40: 
41:     with_response response
42:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.