Class: Rmd::Cli
Constant Summary collapse
- CONFIG_PATH =
'./creds.yml'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.load_config ⇒ Object
13 14 15 16 17 |
# File 'lib/rmd/cli.rb', line 13 def load_config fail(FileNotFound, 'Creds file not found. Ask DucLe for it') unless File.file?(CONFIG_PATH) config = YAML.load_file(File.(CONFIG_PATH)) Configure.set(config) end |
Instance Method Details
#bash ⇒ Object
60 61 62 63 64 65 |
# File 'lib/rmd/cli.rb', line 60 def bash Cli.load_config DeployService.bash([:server]) rescue Exception => e $stdout.puts(e.) end |
#config ⇒ Object
69 70 71 72 73 74 |
# File 'lib/rmd/cli.rb', line 69 def config Cli.load_config DeployService.config([:server]) rescue Exception => e $stdout.puts(e.) end |
#deploy ⇒ Object
23 24 25 26 27 28 |
# File 'lib/rmd/cli.rb', line 23 def deploy Cli.load_config DeployService.deploy([:server], [:skip_assets]) rescue Exception => e $stdout.puts(e.) end |
#logs ⇒ Object
41 42 43 44 45 46 |
# File 'lib/rmd/cli.rb', line 41 def logs Cli.load_config DeployService.logs([:server]) rescue Exception => e $stdout.puts(e.) end |
#nginx ⇒ Object
51 52 53 54 55 56 |
# File 'lib/rmd/cli.rb', line 51 def nginx Cli.load_config DeployService.nginx([:server], [:type]) rescue Exception => e $stdout.puts(e.) end |
#restart ⇒ Object
32 33 34 35 36 37 |
# File 'lib/rmd/cli.rb', line 32 def restart Cli.load_config DeployService.restart([:server]) rescue Exception => e $stdout.puts(e.) end |