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.



251
252
253
254
# File 'lib/ggem/cli/commands.rb', line 251

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

Instance Method Details

#helpObject



270
271
272
273
274
275
# File 'lib/ggem/cli/commands.rb', line 270

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

#run(argv, *args) ⇒ Object



256
257
258
259
260
261
262
263
264
# File 'lib/ggem/cli/commands.rb', line 256

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



266
267
268
# File 'lib/ggem/cli/commands.rb', line 266

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