rails_pwnerer 0.5.3 → 0.5.4

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.5.4. Bugfix release: the manifest was busted in 0.5.3.
2
+
1
3
  v0.5.3. Better control of mongrels using the process table and configuration database.
2
4
 
3
5
  v0.5.2. Extracts per-app and per-instance configuration from the application dir.
data/Manifest CHANGED
@@ -13,6 +13,7 @@ lib/pwnage/base/dirs.rb
13
13
  lib/pwnage/base/gems.rb
14
14
  lib/pwnage/base/hostname.rb
15
15
  lib/pwnage/base/packages.rb
16
+ lib/pwnage/base/process.rb
16
17
  lib/pwnage/base/startup.rb
17
18
  lib/pwnage/base.rb
18
19
  lib/pwnage/config/app.rb
@@ -0,0 +1,38 @@
1
+ # extends Base with process management features
2
+
3
+ begin
4
+ require 'sys/proctable'
5
+
6
+ module RailsPwnage::Base
7
+
8
+ # returns information about a process
9
+ def process_info(pid = nil)
10
+ info = Hash.new
11
+ Sys::ProcTable.ps.each do |process|
12
+ item = { :cmdline => process.cmdline, :pid => pid.to_s }
13
+
14
+ if pid.nil?
15
+ info[process.pid.to_s] = item
16
+ else
17
+ return item if item.pid.to_s == pid.to_s
18
+ end
19
+ end
20
+ if pid.nil?
21
+ return info
22
+ else
23
+ return nil
24
+ end
25
+ end
26
+ end
27
+ rescue
28
+ # the sys-proctable gem isn't available during scaffolding
29
+ module RailsPwnage::Base
30
+ def process_info(pid = nil)
31
+ if pid.nil?
32
+ return {}
33
+ else
34
+ return nil
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,11 +1,11 @@
1
1
 
2
- # Gem::Specification for Rails_pwnerer-0.5.3
2
+ # Gem::Specification for Rails_pwnerer-0.5.4
3
3
  # Originally generated by Echoe
4
4
 
5
5
  --- !ruby/object:Gem::Specification
6
6
  name: rails_pwnerer
7
7
  version: !ruby/object:Gem::Version
8
- version: 0.5.3
8
+ version: 0.5.4
9
9
  platform: ruby
10
10
  authors:
11
11
  - Victor Costan
@@ -48,6 +48,7 @@ extra_rdoc_files:
48
48
  - lib/pwnage/base/gems.rb
49
49
  - lib/pwnage/base/hostname.rb
50
50
  - lib/pwnage/base/packages.rb
51
+ - lib/pwnage/base/process.rb
51
52
  - lib/pwnage/base/startup.rb
52
53
  - lib/pwnage/base.rb
53
54
  - lib/pwnage/config/app.rb
@@ -84,6 +85,7 @@ files:
84
85
  - lib/pwnage/base/gems.rb
85
86
  - lib/pwnage/base/hostname.rb
86
87
  - lib/pwnage/base/packages.rb
88
+ - lib/pwnage/base/process.rb
87
89
  - lib/pwnage/base/startup.rb
88
90
  - lib/pwnage/base.rb
89
91
  - lib/pwnage/config/app.rb
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -45,6 +45,7 @@ extra_rdoc_files:
45
45
  - lib/pwnage/base/gems.rb
46
46
  - lib/pwnage/base/hostname.rb
47
47
  - lib/pwnage/base/packages.rb
48
+ - lib/pwnage/base/process.rb
48
49
  - lib/pwnage/base/startup.rb
49
50
  - lib/pwnage/base.rb
50
51
  - lib/pwnage/config/app.rb
@@ -81,6 +82,7 @@ files:
81
82
  - lib/pwnage/base/gems.rb
82
83
  - lib/pwnage/base/hostname.rb
83
84
  - lib/pwnage/base/packages.rb
85
+ - lib/pwnage/base/process.rb
84
86
  - lib/pwnage/base/startup.rb
85
87
  - lib/pwnage/base.rb
86
88
  - lib/pwnage/config/app.rb