capistrano-resque_monit 0.1.1 → 0.1.2

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: e8b195dfcf0812ee5732cbf02614eab3fb9436c8
4
- data.tar.gz: 6e07c942ebb8ade2208ea5eac4619bc604489306
3
+ metadata.gz: 38d6355333ddda5a6ead1da14d0bb4ccd3ef23a8
4
+ data.tar.gz: 3816424971eab4f46b1a27627dc3200ac26c1185
5
5
  SHA512:
6
- metadata.gz: ef46222850315910fc81a015f614ab61033471c69cc0e886f1ebec171192379daa85ab19e35868cae73ecb372c25f092c1581d6060f02024e6aea8300319bf75
7
- data.tar.gz: 0ac977bce99815f2f60888a8be73ecf484d39e12ff602ca4999839feb2f5a79a75cb08227cb795e22936e9d190c9023db7bfac74a419ec1e0b4c3eda1df16b80
6
+ metadata.gz: 3ba9069b23ac741e52c9b2f9260196869a63901a4bdcf33157cd0be9ae790633d4f4a58f68c56aeb49f6aeef167e7b6eadda31fc5ef51bbc11f939438ef78e55
7
+ data.tar.gz: bf1b0e20cd80cb56de918d79f21b823542affc8b3d5463effe822d84a1b12c6d4fe4c0b9f644064c0ce3a6fb382b9d1c7661570240755458e0146db1131c73e0
@@ -52,7 +52,7 @@ namespace :monit do
52
52
  file = Capistrano::ResqueMonit.file_name('resque_scheduler')
53
53
  script = Capistrano::ResqueMonit.template(
54
54
  'etc/init.d/resque_scheduler',
55
- gem_home: fetch(:gem_home),
55
+ gem_home: fetch(:gem_home, Capistrano::ResqueMonit.find_gem_home(host)),
56
56
  current_path: current_path,
57
57
  rails_env: fetch(:rails_env),
58
58
  file: file
@@ -62,7 +62,7 @@ def resque_worker_initd(worker, host, options = {})
62
62
  file = Capistrano::ResqueMonit.file_name(worker)
63
63
  script = Capistrano::ResqueMonit.template(
64
64
  'resque_initd',
65
- gem_home: fetch(:gem_home),
65
+ gem_home: fetch(:gem_home, Capistrano::ResqueMonit.find_gem_home(host)),
66
66
  current_path: current_path,
67
67
  rails_env: fetch(:rails_env),
68
68
  queue: queue,
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module ResqueMonit
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -28,5 +28,15 @@ module Capistrano
28
28
  execute :sudo, "chown root:root #{destination}"
29
29
  end
30
30
  end
31
+
32
+ def self.find_gem_home(host)
33
+ gem_home = nil
34
+ SSHKit::Coordinator.new(host).each do
35
+ within current_path do
36
+ gem_home = capture(:echo, '$GEM_HOME')
37
+ end
38
+ end
39
+ gem_home
40
+ end
31
41
  end
32
42
  end
@@ -1,7 +1,7 @@
1
1
  #! /bin/sh
2
2
 
3
3
  cd_path="#{current_path}"
4
- export_gem_home="export GEM_HOME=#{rvm_path}/gems/#{rvm_ruby_version}"
4
+ export_gem_home="export GEM_HOME=#{gem_home}"
5
5
 
6
6
  case "$1" in
7
7
  start)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-resque_monit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gino Clement
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-28 00:00:00.000000000 Z
12
+ date: 2015-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano