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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f470f620410684901952344ba1a22253b590656
4
- data.tar.gz: ddfbeb677c59461700e3d2d4e8d9c01cc8ae2546
3
+ metadata.gz: 3450d4ee25e242039a0ead5058bdcb6f9b3e9889
4
+ data.tar.gz: 8d02423011cbe938fb897bcdd4620c159b6bee9d
5
5
  SHA512:
6
- metadata.gz: 266b2aa21f8920c642d345323772113d34af093a116b10befde4fed417eed01d7b520611f70ad65d1318b80ca96f1e90ead8632b44d1ffaa6b4b357f709019d7
7
- data.tar.gz: b05f013afa9598b4fd60b1372284200e94514d249b8f973a2d9a01d17dd75725ee4ed626f12e06e2a1fab04dbeff4e6d2e30a708d90a2be8f369ca008b52eb90
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.23"
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
- system("rm ~/.dogids/conf.yaml") if yes?("------->Remove all configurations? [no]")
14
- say("All configurations removed","\e[31m")
15
- puts " "
16
- puts "You should probably copy and paste EACH of the following:"
17
- puts " "
18
- puts " dogids config:dev dev 55.55.55.30"
19
- puts " dogids config:dev lb 55.55.55.20"
20
- puts " "
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
- lamp_restart_command(dev_machine, "dogids") if dev_machine == dev
51
- lb_restart_command(dev_machine, "dogids") if dev_machine == lb
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
 
@@ -15,7 +15,7 @@ module Dogids
15
15
 
16
16
  desc "version", "Show version information"
17
17
  def version
18
- gem_version = "v0.0.23"
18
+ gem_version = "v0.0.24"
19
19
 
20
20
  # Grab the latest version of the RubyGem
21
21
  rubygems_json = open("https://rubygems.org/api/v1/gems/dogids-cli.json").read
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.23
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-02 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh