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.



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

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



11
12
13
# File 'lib/rubygems/commands/fury_command.rb', line 11

def arguments
  'GEM       built gem file to push'
end

#descriptionObject



7
8
9
# File 'lib/rubygems/commands/fury_command.rb', line 7

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

#executeObject



26
27
28
29
30
# File 'lib/rubygems/commands/fury_command.rb', line 26

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

#usageObject



15
16
17
# File 'lib/rubygems/commands/fury_command.rb', line 15

def usage
  "#{program_name} GEM"
end