Class: GGem::CLI::PushCommand

Inherits:
Object
  • Object
show all
Includes:
GemspecCommand
Defined in:
lib/ggem/cli/commands.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ PushCommand

Returns a new instance of PushCommand.



234
235
236
237
# File 'lib/ggem/cli/commands.rb', line 234

def initialize(*args)
  super
  @build_command = BuildCommand.new(*args)
end

Instance Method Details

#helpObject



253
254
255
256
257
258
# File 'lib/ggem/cli/commands.rb', line 253

def help
  "Usage: ggem push [options]\n\n" \
  "Options: #{@clirb}\n" \
  "Description:\n" \
  "  #{summary}"
end

#run(argv, *args) ⇒ Object



239
240
241
242
243
244
245
246
247
# File 'lib/ggem/cli/commands.rb', line 239

def run(argv, *args)
  super
  @build_command.run([])

  @stdout.puts "Pushing #{@spec.gem_file_name} to #{@spec.push_host}..."
  notify("#{@spec.gem_file_name} received.") do
    @spec.run_push_cmd
  end
end

#summaryObject



249
250
251
# File 'lib/ggem/cli/commands.rb', line 249

def summary
  "Push built #{@spec.gem_file_name} to #{@spec.push_host}"
end