lib/rmd/cli.rb in rmdd-0.1.11 vs lib/rmd/cli.rb in rmdd-0.1.12
- old
+ new
@@ -24,11 +24,11 @@
DeployService.deploy(options[:server])
rescue Exception => e
$stdout.puts(e.message)
end
- desc 'restart', 'Restart a server. Please note that the latest image will be pulled to deploy to servers'
+ desc 'restart', 'Restart a server'
method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
def restart
Cli.load_config
DeployService.restart(options[:server])
rescue Exception => e
@@ -57,9 +57,18 @@
desc 'bash', 'Bash of servers'
method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
def bash
Cli.load_config
DeployService.bash(options[:server])
+ rescue Exception => e
+ $stdout.puts(e.message)
+ end
+
+ desc 'config', 'Config of servers. You are expected to be familiar with VIM to edit the config'
+ method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
+ def config
+ Cli.load_config
+ DeployService.config(options[:server])
rescue Exception => e
$stdout.puts(e.message)
end
end
end