Class: Gem::Commands::FuryCommand

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

Instance Method Summary collapse

Constructor Details

#initializeFuryCommand

Returns a new instance of FuryCommand


17
18
19
20
21
22
# File 'lib/rubygems/commands/fury_command.rb', line 17

def initialize
  super 'fury', description
  add_option('-a', '--as USERNAME', 'Impersonate another account') do |value, options|
    options[:as] = value
  end
end

Instance Method Details

#argumentsObject


9
10
11
# File 'lib/rubygems/commands/fury_command.rb', line 9

def arguments
  "GEM       built gem file to push"
end

#descriptionObject


5
6
7
# File 'lib/rubygems/commands/fury_command.rb', line 5

def description
  'Push a private gem to your Gemfury account'
end

#executeObject


24
25
26
27
28
# File 'lib/rubygems/commands/fury_command.rb', line 24

def execute
  opts = options.dup
  args = opts.delete(:args)
  Gemfury::Command::App.send(:dispatch, "push", args, opts, {})
end

#usageObject


13
14
15
# File 'lib/rubygems/commands/fury_command.rb', line 13

def usage
  "#{program_name} GEM"
end