Class: Furious::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/furious/cli.rb

Constant Summary collapse

COMMANDS =
{
  'package' => 'build a gem package',
  'tag' => 'tags the current gem version in the Git repository',
  'push' => 'pushes the gem to Gemfury (requires a package to be present, and GEMFURY_TOKEN/GEMFURY_ACCOUNT environment variables to be set)',
  'release' => 'combines `package`, `tag`, and `push`'
}

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Cli

Returns a new instance of Cli.



10
11
12
13
14
15
# File 'lib/furious/cli.rb', line 10

def initialize(argv)
  argv ||= []
  usage! unless argv.size == 1 && COMMANDS.include?(argv.first)

  @command = argv.first
end

Instance Method Details

#runObject



17
18
19
# File 'lib/furious/cli.rb', line 17

def run
  send("run_#{@command}".to_sym)
end