dogids-cli 0.0.4 → 0.0.5

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: 07d0fd4f76b92e76013081f27e9d2cdcf456b7d5
4
- data.tar.gz: d0dd3752fba28661dea43e02f225ecfce7919af5
3
+ metadata.gz: 6ef326f9a3b2864e892be3f7b906fe7178aeef87
4
+ data.tar.gz: 0992cc431e88d547b2418daafbeadf7c1635273f
5
5
  SHA512:
6
- metadata.gz: 626d46f2093795289f0c5e2fa6f40fb9bbd5cf948252b9b98bdb45433f3def4be06b8e8e21960ba77a26b9e445092ff6c88d7e2f163fb2506bcf68953367c442
7
- data.tar.gz: 6260df51437a6defeec13d152bed7e87d5408c6eb8d51f826013a12222f00e5d26ae4a7757bab6841e68d16e898f78a2d1371c90aca476a969d455941a72107d
6
+ metadata.gz: a7ecce287e060a5e07b259b5f95bae45ed0f9c1e141c71b832acac97aaf07c6d70a653734c37a86f3eddff97ffb987364835bceff96c6f98f2e5d916f22223a5
7
+ data.tar.gz: add32a2a3a0663e11584496120c83135b42df9347895245a59de21f1f5c51af810080b7cf0962b2c099d751533469c8ff382de499ebc17f45424ceeb8b798c88
@@ -8,10 +8,13 @@ module Dogids
8
8
  print_heading("Deploying dogids-backgrounder...")
9
9
 
10
10
  Net::SSH.start("worker1.dogids.codelation.net", "dogids") do |ssh|
11
- commands = []
12
- commands << "cd apps/dogids-backgrounder"
13
- commands << "git pull origin master"
14
- ssh.exec!(commands.join("&& ")) do |_channel, _stream, data|
11
+ print_command("Pulling latest from master...")
12
+ ssh.exec!(worker_git_pull_command) do |_channel, _stream, data|
13
+ print_command(data)
14
+ end
15
+
16
+ print_heading("Running bundle install...")
17
+ ssh.exec!(worker_bundle_install_command) do |_channel, _stream, data|
15
18
  print_command(data)
16
19
  end
17
20
 
@@ -26,5 +29,21 @@ module Dogids
26
29
  print_heading("Done.")
27
30
  end
28
31
  end
32
+
33
+ private
34
+
35
+ def worker_git_pull_command
36
+ commands = []
37
+ commands << "cd /home/dogids/apps/dogids-backgrounder"
38
+ commands << "git pull origin master"
39
+ commands.join("&& ")
40
+ end
41
+
42
+ def worker_bundle_install_command
43
+ commands = []
44
+ commands << "cd /home/dogids/apps/dogids-backgrounder"
45
+ commands << "/home/dogids/ruby/bin/bundle install --deployment --without development test"
46
+ commands.join("&& ")
47
+ end
29
48
  end
30
49
  end
@@ -3,7 +3,7 @@ require "open-uri"
3
3
  require "thor"
4
4
 
5
5
  module Dogids
6
- VERSION = "0.0.4"
6
+ VERSION = "0.0.5"
7
7
 
8
8
  class Cli < Thor
9
9
  desc "update", "Update dogids-cli to latest version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogids-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pattison