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.



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

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

Instance Method Details

#helpObject



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

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

#run(argv, *args) ⇒ Object



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

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

  @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



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

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