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.



332
333
334
335
336
# File 'lib/ggem/cli/commands.rb', line 332

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

Instance Method Details

#helpObject



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

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



338
339
340
341
342
# File 'lib/ggem/cli/commands.rb', line 338

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

#summaryObject



344
345
346
347
# File 'lib/ggem/cli/commands.rb', line 344

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