rmdd 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e42d4c07d062b543ef26d5c25c1a25a7e62971a
4
- data.tar.gz: a5050c7b2abfbaf7a281b9c6d89a99835d73f9cb
3
+ metadata.gz: ebb8b29ac77890f161737dfe0326e4f9744d355c
4
+ data.tar.gz: d95326b688c1997088cd32bfb631442185db59a9
5
5
  SHA512:
6
- metadata.gz: 3d4b10541d154d3a5b20eaf814c0f2d90192bbd8d3428d66270eeb17d995b131d50f0316078b67bddb6f8acc64191266f17420054f6589b6ac987df55dca01dc
7
- data.tar.gz: 15807511be313f14fcb469ce04a73961a377c8e9cc4700761f9696f00c89a69e0a31beef6bc2da2fea860895bacac1a0a73407694802586af2810b5e349372c3
6
+ metadata.gz: e4752d86739d37376f680588e68c249decbe21cac96f9b9facb8537d2e4103d2867c008429bf98cfcdb18286f8ac2ac30f84cff277dfd7c8e6dc0659cd93b8c1
7
+ data.tar.gz: 93083cae83c56ac2ba10dcbe684aab5756f15432af7d2996672d78bec6d62c653348d5f0380e85037295692167b74c7a2d93643627cd6a16dc3a0f261e3daeff
data/lib/rmd/cli.rb CHANGED
@@ -26,7 +26,7 @@ module Rmd
26
26
  $stdout.puts(e.message)
27
27
  end
28
28
 
29
- desc 'restart', 'Restart a server. Please note that the latest image will be pulled to deploy to servers'
29
+ desc 'restart', 'Restart a server'
30
30
  method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
31
31
  def restart
32
32
  Cli.load_config
@@ -62,5 +62,14 @@ module Rmd
62
62
  rescue Exception => e
63
63
  $stdout.puts(e.message)
64
64
  end
65
+
66
+ desc 'config', 'Config of servers. You are expected to be familiar with VIM to edit the config'
67
+ method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
68
+ def config
69
+ Cli.load_config
70
+ DeployService.config(options[:server])
71
+ rescue Exception => e
72
+ $stdout.puts(e.message)
73
+ end
65
74
  end
66
75
  end
@@ -36,6 +36,13 @@ module Rmd
36
36
  system_cmd(command)
37
37
  end
38
38
 
39
+ def self.config(server)
40
+ validate(server)
41
+ command = %{ssh -t #{master(server)} -p 2200 vim #{NAME}/.env}
42
+ system_cmd(command)
43
+ $stdout.puts('Please remember to restart the servers for the new config to take effect')
44
+ end
45
+
39
46
  private
40
47
 
41
48
  def self.validate(server)
data/lib/rmd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rmd
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duc Le
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler