Class: SinatraToTheMoon::CLI
- Inherits:
-
Thor
- Object
- Thor
- SinatraToTheMoon::CLI
- Defined in:
- lib/sinatra_to_the_moon/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
12 13 14 |
# File 'lib/sinatra_to_the_moon/cli.rb', line 12 def self.exit_on_failure? true end |
Instance Method Details
#new(app_name) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/sinatra_to_the_moon/cli.rb', line 28 def new(app_name) profile = selected_profile files = Generator.generate( name: app_name, profile: profile, force: [:force], dry_run: [:dry_run] ) action = [:dry_run] ? "would create" : "created" files.each { |file| say("#{action} #{file}", :green) } say "\nReady for launch: #{launch_command(app_name, profile)}" rescue Error => e raise Thor::Error, e. end |
#version ⇒ Object
45 46 47 |
# File 'lib/sinatra_to_the_moon/cli.rb', line 45 def version say SinatraToTheMoon::VERSION end |