Class: OpsPreflight::Client
- Inherits:
-
Thor
- Object
- Thor
- OpsPreflight::Client
- Includes:
- ExitCode, Thor::Actions
- Defined in:
- lib/ops_preflight/client.rb
Class Method Summary collapse
-
.banner(command, namespace = nil, subcommand = false) ⇒ Object
Fixes thor’s banners when used with :default namespace.
Instance Method Summary collapse
Class Method Details
.banner(command, namespace = nil, subcommand = false) ⇒ Object
Fixes thor’s banners when used with :default namespace
31 32 33 |
# File 'lib/ops_preflight/client.rb', line 31 def self.(command, namespace = nil, subcommand = false) "#{basename} #{command.formatted_usage(self, false, subcommand)}" end |
Instance Method Details
#deploy(rails_env) ⇒ Object
26 27 28 |
# File 'lib/ops_preflight/client.rb', line 26 def deploy(rails_env) run "bundle exec mina deploy RAILS_ENV=#{rails_env} #{Config.new.client_args(rails_env)} #{mina_args}", :verbose => false end |
#init ⇒ Object
15 16 17 18 |
# File 'lib/ops_preflight/client.rb', line 15 def init copy_file 'data/preflight.yml', 'config/preflight.yml' say 'Please edit config/preflight.yml to finish setting up preflight.' end |
#setup(rails_env) ⇒ Object
21 22 23 |
# File 'lib/ops_preflight/client.rb', line 21 def setup(rails_env) run "bundle exec mina setup RAILS_ENV=#{rails_env} #{Config.new.client_args(rails_env)} #{mina_args}", :verbose => false end |