zerg_support 0.0.8 → 0.0.9

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/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.0.9. Changed ProcTable wrapper to deal with API change in 0.8.0.
2
+
1
3
  v0.0.8. Extension emulation works in Windows without a build environment.
2
4
 
3
5
  v0.0.7. Windows support.
@@ -54,7 +54,7 @@ module Zerg::Support::Process
54
54
 
55
55
  # Collects information about a single process. Returns nil
56
56
  def self.process_info(pid)
57
- pinfo = Sys::ProcTable.ps pid
57
+ pinfo = ps pid
58
58
  pinfo ? xlate_process_info(pinfo) : nil
59
59
  end
60
60
 
@@ -66,9 +66,9 @@ module Zerg::Support::Process
66
66
  else
67
67
  begin
68
68
  if pids
69
- ps_result = Sys::ProcTable.ps(pids)
69
+ ps_result = ps(pids)
70
70
  else
71
- ps_result = Sys::ProcTable.ps
71
+ ps_result = ps
72
72
  end
73
73
  ps_result.map { |pinfo| xlate_process_info pinfo }
74
74
  rescue TypeError
@@ -151,16 +151,19 @@ begin
151
151
 
152
152
  require 'time'
153
153
  require 'sys/proctable'
154
+
155
+ module Zerg::Support::Process
156
+ def self.ps(pid = nil)
157
+ Sys::ProcTable.ps pid
158
+ end
159
+ end
154
160
  rescue Exception
155
161
  # Emulate the sys-proctable gem using the ps command.
156
162
  # This will be slower than having native syscalls, but at least it doesn't
157
163
  # crash ruby. (yes, sys-proctable 0.7.6, I mean you!)
158
-
159
- #:nodoc: all
160
- module Sys; end
161
-
164
+
162
165
  #:nodoc: all
163
- module Sys::ProcTable
166
+ module Zerg::Support::ProcTable
164
167
  class ProcInfo
165
168
  def initialize(pid, ppid, ruid, rgid, uid, gid, start, nice, rss, rssize,
166
169
  text_size, vsz, user_time, total_time, pctcpu, pctmem,
@@ -213,4 +216,10 @@ rescue Exception
213
216
  return pids.length == 1 ? retval.first : retval
214
217
  end
215
218
  end
219
+
220
+ module Zerg::Support::Process
221
+ def self.ps(pid = nil)
222
+ Zerg::Support::ProcTable.ps pid
223
+ end
224
+ end
216
225
  end
data/zerg_support.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{zerg_support}
5
- s.version = "0.0.8"
5
+ s.version = "0.0.9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
9
- s.date = %q{2009-02-24}
9
+ s.date = %q{2009-03-28}
10
10
  s.description = %q{Support libraries used by Zergling.Net deployment code.}
11
11
  s.email = %q{victor@zergling.net}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/zerg_support/event_machine/connection_mocks.rb", "lib/zerg_support/event_machine/frame_protocol.rb", "lib/zerg_support/event_machine/object_protocol.rb", "lib/zerg_support/gems.rb", "lib/zerg_support/open_ssh.rb", "lib/zerg_support/process.rb", "lib/zerg_support/spawn.rb", "lib/zerg_support.rb", "LICENSE", "README"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zerg_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-24 00:00:00 -05:00
12
+ date: 2009-03-28 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency