god 0.7.20 → 0.7.21
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/History.txt +5 -0
- data/VERSION.yml +1 -1
- data/god.gemspec +5 -2
- data/lib/god/configurable.rb +2 -2
- data/lib/god/simple_logger.rb +2 -2
- data/lib/god/system/process.rb +10 -2
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.7.21 / 2009-09-29
|
2
|
+
* Minor Enhancements
|
3
|
+
* Cache some frequent lookups to reduce object creation [github.com/eric]
|
4
|
+
* Try to make SimpleLogger less leaky [github.com/eric]
|
5
|
+
|
1
6
|
== 0.7.20 / 2009-09-24
|
2
7
|
* Minor Enhancements
|
3
8
|
* Rewrite `god status` command to be not as horrible. Add ability to get
|
data/VERSION.yml
CHANGED
data/god.gemspec
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{god}
|
5
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.21"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
11
|
s.authors = ["Tom Preston-Werner"]
|
9
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-10-29}
|
10
13
|
s.default_executable = %q{god}
|
11
14
|
s.description = %q{God is an easy to configure, easy to extend monitoring framework written in Ruby.}
|
12
15
|
s.email = %q{tom@mojombo.com}
|
data/lib/god/configurable.rb
CHANGED
@@ -32,7 +32,7 @@ module God
|
|
32
32
|
|
33
33
|
def base_name
|
34
34
|
x = 1 # fix for MRI's local scope optimization bug DO NOT REMOVE!
|
35
|
-
self.class.name.split('::').last
|
35
|
+
@base_name ||= self.class.name.split('::').last
|
36
36
|
end
|
37
37
|
|
38
38
|
def friendly_name
|
@@ -54,4 +54,4 @@ module God
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
end
|
57
|
+
end
|
data/lib/god/simple_logger.rb
CHANGED
@@ -26,7 +26,7 @@ module God
|
|
26
26
|
|
27
27
|
time = Time.now.strftime(self.datetime_format)
|
28
28
|
label = SEV_LABEL[level]
|
29
|
-
@io.print(
|
29
|
+
@io.print(label[0..0], ' [', time, '] ', label.rjust(5), ': ', msg, "\n")
|
30
30
|
end
|
31
31
|
|
32
32
|
def fatal(msg)
|
@@ -50,4 +50,4 @@ module God
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
end
|
53
|
+
end
|
data/lib/god/system/process.rb
CHANGED
@@ -2,9 +2,17 @@ module God
|
|
2
2
|
module System
|
3
3
|
|
4
4
|
class Process
|
5
|
+
def self.fetch_system_poller
|
6
|
+
@@poller ||= if SlashProcPoller.usable?
|
7
|
+
SlashProcPoller
|
8
|
+
else
|
9
|
+
PortablePoller
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
5
13
|
def initialize(pid)
|
6
14
|
@pid = pid.to_i
|
7
|
-
@poller = fetch_system_poller.new(@pid)
|
15
|
+
@poller = self.class.fetch_system_poller.new(@pid)
|
8
16
|
end
|
9
17
|
|
10
18
|
# Return true if this process is running, false otherwise
|
@@ -39,4 +47,4 @@ module God
|
|
39
47
|
end
|
40
48
|
|
41
49
|
end
|
42
|
-
end
|
50
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: god
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-29 00:00:00 -07:00
|
13
13
|
default_executable: god
|
14
14
|
dependencies: []
|
15
15
|
|