dogids-cli 0.0.9 → 0.0.10

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: d592340a1285019dca9de5e0df72d14f453ca509
4
- data.tar.gz: fba72ac83b3f572b9b37f523d35ca12c1307d6c8
3
+ metadata.gz: ec3f8c06f22edfae0132dcda485cb7193948bb6a
4
+ data.tar.gz: e567cd03eb3a5e234e9a12bc112f787c0982dcaa
5
5
  SHA512:
6
- metadata.gz: 005b71a01ce3c05fc6fef3a3cb1acdd203f6ce7792375d20afb06e3e92d9c46bd522e8778ffa40b9c98620ee6af2aa7c16bce40c68453ebc78274c85ed796967
7
- data.tar.gz: 22228fa84f6398d39468277236b91dca273acb883816ea2fdd0df60320577bc44fe7dad1f58a650697845ad42944fe6ea01cea0b980fb99e6de9859197a1af37
6
+ metadata.gz: 353f5309d01465ccc2608ff5b3879b12b0d7dd46e68b4b043263e898a8215eee9221e65d635c7361f161ba1fd83791ebc72becac8eb15cbac83bf784efdae418
7
+ data.tar.gz: b0e64d370875ce3030ea639522adae9cfa31723bbbd6698f0346d60d6adcbee8cb2441afc362e77e9b886f44372d51de08d05c059f556bf39f142f94fe123e5e
@@ -7,21 +7,29 @@ module Dogids
7
7
  def deploy_web
8
8
  print_heading("Deploying dogids.com")
9
9
 
10
- Net::SSH.start("web1.dogids.codelation.net", "dogids") do |ssh|
11
- print_command("Checking the current git status")
12
- ssh.exec!(web_git_status_command) do |_channel, _stream, data|
13
- print_command(data)
14
- end
10
+ server_addresses = [
11
+ "web2.dogids.codelation.net"
12
+ ]
13
+
14
+ server_addresses.each do |server_address|
15
+ print_command("Server: #{server_address}")
15
16
 
16
- if yes?("-----> Continue with deployment? [no]")
17
- print_command("Pulling latest from master")
18
- ssh.exec!(web_git_pull_command) do |_channel, _stream, data|
17
+ Net::SSH.start(server_address, "dogids") do |ssh|
18
+ print_command("Checking the current git status")
19
+ ssh.exec!(web_git_status_command) do |_channel, _stream, data|
19
20
  print_command(data)
20
21
  end
21
22
 
22
- print_command("Updating file permissions")
23
- ssh.exec!(web_update_permissions_command) do |_channel, _stream, data|
24
- print_command(data)
23
+ if yes?("-----> Continue with deployment? [no]")
24
+ print_command("Pulling latest from master")
25
+ ssh.exec!(web_git_pull_command) do |_channel, _stream, data|
26
+ print_command(data)
27
+ end
28
+
29
+ print_command("Updating file permissions")
30
+ ssh.exec!(web_update_permissions_command) do |_channel, _stream, data|
31
+ print_command(data)
32
+ end
25
33
  end
26
34
  end
27
35
  end
@@ -35,6 +43,7 @@ module Dogids
35
43
  def web_git_pull_command
36
44
  commands = []
37
45
  commands << "cd /home/dogids/apps/dogids.com"
46
+ commands << "sudo chown dogids:dogids -R .git"
38
47
  commands << "sudo chown dogids:www-data -R blog/wp-content"
39
48
  commands << "sudo chown dogids:www-data -R resources"
40
49
  commands << "sudo chown dogids:www-data -R templates"
@@ -9,7 +9,7 @@ module Dogids
9
9
  puts "Running: `ssh -R 52698:localhost:52698 dogids@db1.dogids.codelation.net`"
10
10
  exec("ssh -R 52698:localhost:52698 dogids@db1.dogids.codelation.net")
11
11
  when "web"
12
- puts "Running: `ssh -R 52698:localhost:52698 dogids@web1.dogids.codelation.net`"
12
+ puts "Running: `ssh -R 52698:localhost:52698 dogids@web2.dogids.codelation.net`"
13
13
  exec("ssh -R 52698:localhost:52698 dogids@web1.dogids.codelation.net")
14
14
  when "worker"
15
15
  puts "Running: `ssh -R 52698:localhost:52698 dogids@worker1.dogids.codelation.net`"
@@ -3,7 +3,7 @@ require "open-uri"
3
3
  require "thor"
4
4
 
5
5
  module Dogids
6
- VERSION = "0.0.9"
6
+ VERSION = "0.0.10"
7
7
 
8
8
  class Cli < Thor
9
9
  desc "update", "Update dogids-cli to latest version"
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pattison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-28 00:00:00.000000000 Z
11
+ date: 2015-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -90,4 +90,3 @@ signing_key:
90
90
  specification_version: 4
91
91
  summary: Command line tool for dogIDs tasks
92
92
  test_files: []
93
- has_rdoc: