dogids-cli 0.0.23 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dogids_cli.gemspec +1 -1
- data/lib/dogids/config.rb +17 -9
- data/lib/dogids/reload.rb +4 -3
- data/lib/dogids/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3450d4ee25e242039a0ead5058bdcb6f9b3e9889
|
4
|
+
data.tar.gz: 8d02423011cbe938fb897bcdd4620c159b6bee9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5173f0aba46d06d3698c4e13088c351008ae994b22e29c4bb5f8c28510a8248feb760fc7ca5186f5ad0e4ab024f9dee9a9981c0c5b2cd10d9caf1ba33eec646f
|
7
|
+
data.tar.gz: '0864c6a0f133d50563201e0f83ada516e0005c074b05a2a0ba15b4f6d267c46d4cf522fdf12b6771fbbae23e32d094529b6aaa7ce4929f75c9fee8b676d47c5e'
|
data/dogids_cli.gemspec
CHANGED
@@ -5,7 +5,7 @@ require "dogids/version"
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "dogids-cli"
|
8
|
-
spec.version = "0.0.
|
8
|
+
spec.version = "0.0.24"
|
9
9
|
spec.authors = ["Jaryd Krishnan"]
|
10
10
|
spec.email = ["jaryd@dogids.com"]
|
11
11
|
spec.summary = "Command line tool for dogIDs tasks"
|
data/lib/dogids/config.rb
CHANGED
@@ -10,14 +10,16 @@ module Dogids
|
|
10
10
|
when "list"
|
11
11
|
list
|
12
12
|
when "clear"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
if yes?("------->Remove all configurations? [no]")
|
14
|
+
system("rm ~/.dogids/conf.yaml")
|
15
|
+
puts " "
|
16
|
+
say("All configurations removed","\e[31m")
|
17
|
+
set_default_configuration
|
18
|
+
puts " "
|
19
|
+
list
|
20
|
+
else
|
21
|
+
say("Fine, I didn't want to remove anything anyway","\e[31m")
|
22
|
+
end
|
21
23
|
else
|
22
24
|
puts " "
|
23
25
|
puts "Config Commands:"
|
@@ -102,7 +104,13 @@ module Dogids
|
|
102
104
|
dogids_config.save
|
103
105
|
say("The new URL/IP for #{location}: #{new_value}","\e[32m")
|
104
106
|
end
|
105
|
-
end
|
106
107
|
|
108
|
+
def set_default_configuration
|
109
|
+
dogids_config = set_config_location
|
110
|
+
dogids_config["dev"] = {"lb"=>"55.55.55.20","dev"=>"55.55.55.30"}
|
111
|
+
dogids_config.save
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
107
115
|
end
|
108
116
|
end
|
data/lib/dogids/reload.rb
CHANGED
@@ -8,10 +8,11 @@ module Dogids
|
|
8
8
|
# TODO add environments
|
9
9
|
# @param [string] app_name
|
10
10
|
def reload(app_name = nil)
|
11
|
+
ssh_address = get_config_url("dev","dev")
|
11
12
|
if yes?("-----> Reload development? [no]")
|
12
13
|
reload_development_machine
|
14
|
+
restart_lamp(ssh_address, "dogids")
|
13
15
|
elsif yes?("-----> Restart LAMP stack? [no]")
|
14
|
-
ssh_address = get_config_url("dev","dev")
|
15
16
|
restart_lamp(ssh_address, "dogids")
|
16
17
|
elsif yes?("-----> Restart LB and LAMP stack? [no]")
|
17
18
|
restart_all
|
@@ -47,8 +48,8 @@ module Dogids
|
|
47
48
|
dev_machines = get_config_url("dev")
|
48
49
|
dev_machines.each do |key,dev_machine|
|
49
50
|
ssh_address = get_config_url("dev",dev_machine)
|
50
|
-
|
51
|
-
|
51
|
+
restart_lamp(ssh_address, "dogids") if dev_machine == dev
|
52
|
+
restart_lb(ssh_address, "dogids") if dev_machine == lb
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
data/lib/dogids/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogids-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaryd Krishnan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|