lib/commands/owner.rb in gemcutter-0.2.1 vs lib/commands/owner.rb in gemcutter-0.3.0.pre

- old
+ new

@@ -1,10 +1,19 @@ class Gem::Commands::OwnerCommand < Gem::AbstractCommand + def description 'Manage gem owners on Gemcutter.' end + def arguments + "GEM_NAME name of gem to manage owners for." + end + + def usage + "#{program_name} GEM_NAME" + end + def initialize super 'owner', description defaults.merge!(:add => [], :remove => []) add_option('-a', '--add EMAIL', 'Add an owner') do |value, options| @@ -55,10 +64,11 @@ say "Error removing owner: #{owner}" end end end def show_owners(name) - require 'json/pure' + require 'json/pure' unless defined?(JSON::JSON_LOADED) + response = make_request(:get, "gems/#{name}/owners.json") do |request| request.add_field("Authorization", api_key) end case response