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 18 19 |
# 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) rescue FileNotFound => e $stdout.puts(e.) end |
Instance Method Details
#deploy ⇒ Object
24 25 26 27 28 29 |
# File 'lib/rmd/cli.rb', line 24 def deploy Cli.load_config DeployService.deploy([:server]) rescue ServerNotFound => e $stdout.puts(e.) end |
#restart ⇒ Object
33 34 35 36 37 38 |
# File 'lib/rmd/cli.rb', line 33 def restart Cli.load_config DeployService.restart([:server]) rescue ServerNotFound => e $stdout.puts(e.) end |