Class: Licensed::CLI
- Inherits:
-
Thor
- Object
- Thor
- Licensed::CLI
- Defined in:
- lib/licensed/cli.rb
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
If an error occurs (e.g. a missing command or argument), exit 1.
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
If an error occurs (e.g. a missing command or argument), exit 1.
56 57 58 |
# File 'lib/licensed/cli.rb', line 56 def self.exit_on_failure? true end |
Instance Method Details
#cache ⇒ Object
13 14 15 |
# File 'lib/licensed/cli.rb', line 13 def cache run Licensed::Commands::Cache.new(config: config), force: [:force] end |
#list ⇒ Object
27 28 29 |
# File 'lib/licensed/cli.rb', line 27 def list run Licensed::Commands::List.new(config: config) end |
#migrate ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/licensed/cli.rb', line 43 def migrate case ["from"] when "v1" Licensed::Migrations::V2.migrate(["config"]) else shell = Thor::Base.shell.new shell.say "Unrecognized option from=#{["from"]}", :red CLI.command_help(shell, "migrate") exit 1 end end |