summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/owner_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/owner_command.rb')
-rw-r--r--lib/rubygems/commands/owner_command.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rubygems/commands/owner_command.rb b/lib/rubygems/commands/owner_command.rb
index 8b770e6f54..34f4efaa59 100644
--- a/lib/rubygems/commands/owner_command.rb
+++ b/lib/rubygems/commands/owner_command.rb
@@ -23,6 +23,7 @@ class Gem::Commands::OwnerCommand < Gem::Command
def initialize
super 'owner', description
add_proxy_option
+ add_key_option
defaults.merge! :add => [], :remove => []
add_option '-a', '--add EMAIL', 'Add an owner' do |value, options|
@@ -45,7 +46,7 @@ class Gem::Commands::OwnerCommand < Gem::Command
def show_owners name
response = rubygems_api_request :get, "api/v1/gems/#{name}/owners.yaml" do |request|
- request.add_field "Authorization", Gem.configuration.rubygems_api_key
+ request.add_field "Authorization", api_key
end
with_response response do |resp|
@@ -70,7 +71,7 @@ class Gem::Commands::OwnerCommand < Gem::Command
owners.each do |owner|
response = rubygems_api_request method, "api/v1/gems/#{name}/owners" do |request|
request.set_form_data 'email' => owner
- request.add_field "Authorization", Gem.configuration.rubygems_api_key
+ request.add_field "Authorization", api_key
end
with_response response