Class: Gleis::CLI::App
- Inherits:
-
Thor
- Object
- Thor
- Gleis::CLI::App
- Defined in:
- lib/gleis/cli/app.rb
Overview
Application-related CLI commands
Instance Method Summary collapse
- #config(env_var = '') ⇒ Object
- #create ⇒ Object
- #deployments ⇒ Object
- #destroy ⇒ Object
- #exec(command) ⇒ Object
- #git ⇒ Object
- #logs ⇒ Object
- #maintenance ⇒ Object
- #ps ⇒ Object
- #rebuild ⇒ Object
- #restart ⇒ Object
- #rollback(commit) ⇒ Object
- #scale(replica) ⇒ Object
- #start ⇒ Object
- #status ⇒ Object
- #stop ⇒ Object
Instance Method Details
#config(env_var = '') ⇒ Object
8 9 10 |
# File 'lib/gleis/cli/app.rb', line 8 def config(env_var = '') Application.config([:app], env_var) end |
#create ⇒ Object
13 14 15 |
# File 'lib/gleis/cli/app.rb', line 13 def create Application.create([:app]) end |
#deployments ⇒ Object
23 24 25 |
# File 'lib/gleis/cli/app.rb', line 23 def deployments Application.deployments([:app]) end |
#destroy ⇒ Object
18 19 20 |
# File 'lib/gleis/cli/app.rb', line 18 def destroy Application.destroy([:app]) end |
#exec(command) ⇒ Object
28 29 30 |
# File 'lib/gleis/cli/app.rb', line 28 def exec(command) Application.exec([:app], command) end |
#git ⇒ Object
34 35 36 |
# File 'lib/gleis/cli/app.rb', line 34 def git Application.git([:app], [:quiet]) end |
#logs ⇒ Object
43 44 45 |
# File 'lib/gleis/cli/app.rb', line 43 def logs Application.logs([:app], [:follow], [:process]) end |
#maintenance ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/gleis/cli/app.rb', line 50 def maintenance abort('On and off are mutually exclusive options.') if [:on] && [:off] if [:on] mode = true elsif [:off] mode = false end Application.maintenance([:app], mode) end |
#ps ⇒ Object
61 62 63 |
# File 'lib/gleis/cli/app.rb', line 61 def ps Application.ps([:app]) end |
#rebuild ⇒ Object
66 67 68 |
# File 'lib/gleis/cli/app.rb', line 66 def rebuild Application.rebuild([:app]) end |
#restart ⇒ Object
71 72 73 |
# File 'lib/gleis/cli/app.rb', line 71 def restart Application.restart([:app]) end |
#rollback(commit) ⇒ Object
76 77 78 |
# File 'lib/gleis/cli/app.rb', line 76 def rollback(commit) Application.rollback([:app], commit) end |
#scale(replica) ⇒ Object
81 82 83 |
# File 'lib/gleis/cli/app.rb', line 81 def scale(replica) Application.scale([:app], replica) end |
#start ⇒ Object
86 87 88 |
# File 'lib/gleis/cli/app.rb', line 86 def start Application.start([:app]) end |
#status ⇒ Object
91 92 93 |
# File 'lib/gleis/cli/app.rb', line 91 def status Application.status([:app]) end |
#stop ⇒ Object
96 97 98 |
# File 'lib/gleis/cli/app.rb', line 96 def stop Application.stop([:app]) end |