Class: Furious::Cli
- Inherits:
-
Object
- Object
- Furious::Cli
- 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
-
#initialize(argv) ⇒ Cli
constructor
A new instance of Cli.
- #run ⇒ Object
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
#run ⇒ Object
17 18 19 |
# File 'lib/furious/cli.rb', line 17 def run send("run_#{@command}".to_sym) end |