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
#deploy ⇒ Object
22 23 24 25 26 27 |
# File 'lib/rmd/cli.rb', line 22 def deploy Cli.load_config DeployService.deploy([:server]) rescue Exception => e $stdout.puts(e.) end |
#restart ⇒ Object
31 32 33 34 35 36 |
# File 'lib/rmd/cli.rb', line 31 def restart Cli.load_config DeployService.restart([:server]) rescue Exception => e $stdout.puts(e.) end |