zombie_passenger_killer 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zombie_passenger_killer (0.2.2)
4
+ zombie_passenger_killer (0.2.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/Readme.md CHANGED
@@ -28,6 +28,7 @@ Usage
28
28
  -i, --interval [SECONDS] Check every SECONDS (default: 10)
29
29
  -p, --pattern [PATTERN] Find processes with this pattern (default: ' Rack: ')
30
30
  -1, --once Check once and exit
31
+ --rvmsudo Use `rvmsudo` to see passenger-status
31
32
  -h, --help Show this
32
33
  -v, --version Show Version
33
34
  -t, --time Show time in output
@@ -22,6 +22,7 @@ BANNER
22
22
  opts.on("-i", "--interval [SECONDS]", Integer, "Check every SECONDS (default: 10)") {|i| options[:interval]=i }
23
23
  opts.on("-p", "--pattern [PATTERN]", String, "Find processes with this pattern (default: ' Rack: ')") {|i| options[:pattern]=i }
24
24
  opts.on("-1", "--once", "Check once and exit") { options[:once]=true }
25
+ opts.on("--rvmsudo", "Use `rvmsudo` to see passenger-status") { options[:rvmsudo]=true }
25
26
  opts.on("-h", "--help","Show this") { puts opts; exit }
26
27
  opts.on("-v", "--version","Show Version"){ puts version; exit }
27
28
  opts.on("-t", "--timing","Show timing on output") { options[:show_times]=true }
@@ -14,6 +14,7 @@ module ZombiePassengerKiller
14
14
  @interval = options[:interval] || 10
15
15
  @strace_time = 5
16
16
  @out = STDOUT
17
+ @rvmsudo = options[:rvmsudo]
17
18
  end
18
19
 
19
20
  def lurk
@@ -64,7 +65,7 @@ module ZombiePassengerKiller
64
65
 
65
66
  # return array of pids reported from passenger-status command, nil if passenger-status doesn't run
66
67
  def passenger_pids
67
- pids = %x(passenger-status|grep PID).split("\n").map { |x| x.strip.match(/PID: \d*/).to_s.split[1].to_i }
68
+ pids = %x(#{'rvmsudo ' if @rvmsudo}passenger-status|grep PID).split("\n").map { |x| x.strip.match(/PID: \d*/).to_s.split[1].to_i }
68
69
  pids if $?.exitstatus.zero?
69
70
  end
70
71
 
@@ -1,3 +1,3 @@
1
1
  module ZombiePassengerKiller
2
- Version = VERSION = '0.2.2'
2
+ Version = VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zombie_passenger_killer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-15 00:00:00 Z
18
+ date: 2012-03-18 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: