Class: GGem::CLI::ReleaseCommand

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ReleaseCommand

Returns a new instance of ReleaseCommand.



334
335
336
337
338
# File 'lib/ggem/cli/commands.rb', line 334

def initialize(*args)
  super
  @tag_command  = TagCommand.new(*args)
  @push_command = PushCommand.new(*args)
end

Instance Method Details

#helpObject



351
352
353
354
355
356
357
# File 'lib/ggem/cli/commands.rb', line 351

def help
  "Usage: ggem release [options]\n\n" \
  "Options: #{@clirb}\n" \
  "Description:\n" \
  "  #{summary}\n" \
  "  (macro for running `ggem tag && ggem push`)"
end

#run(argv, *args) ⇒ Object



340
341
342
343
344
# File 'lib/ggem/cli/commands.rb', line 340

def run(argv, *args)
  super
  @tag_command.run(clirb.opts["force-tag"] ? ["--force-tag"] : [])
  @push_command.run([])
end

#summaryObject



346
347
348
349
# File 'lib/ggem/cli/commands.rb', line 346

def summary
  "Tag #{@spec.version_tag} and push built #{@spec.gem_file_name} to " \
  "#{@spec.push_host}"
end