god 0.13.6 → 0.13.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,12 @@
1
+ == 0.13.7 / 2015-08-19
2
+ * Bug fixes
3
+ * Fixed slack integration (#217)
4
+ * Update twitter gem to support newer rubies (#219)
5
+ * Make stop_all work with newer rubies (#209)
6
+ * Don't start more DRb servers than necessary
7
+ * Minor Enhancements
8
+ * Allow uid and gid to be specified as an integer (#202)
9
+
1
10
  == 0.13.6 / 2015-02-21
2
11
  * Minor Enhancements
3
12
  * sensu notifier (#199)
data/Rakefile CHANGED
@@ -48,8 +48,17 @@ task :default => :test
48
48
 
49
49
  require 'rake/testtask'
50
50
  Rake::TestTask.new(:test) do |test|
51
+ file_list = FileList['test/**/test_*.rb']
52
+ file_list = file_list.exclude("test/test_god_system.rb")
53
+ test.test_files = file_list
51
54
  test.libs << 'lib' << 'test'
52
- test.pattern = 'test/**/test_*.rb'
55
+ test.verbose = true
56
+ end
57
+
58
+ require 'rake/testtask'
59
+ Rake::TestTask.new(:system_test) do |test|
60
+ test.libs << 'lib' << 'test'
61
+ test.pattern = 'test/**/test_god_system.rb'
53
62
  test.verbose = true
54
63
  end
55
64
 
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = 'god'
6
- s.version = '0.13.6'
7
- s.date = '2015-03-21'
6
+ s.version = '0.13.7'
7
+ s.date = '2015-10-19'
8
8
 
9
9
  s.summary = "Process monitoring framework."
10
10
  s.description = "An easy to configure, easy to extend monitoring framework written in Ruby."
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency('rake')
28
28
  s.add_development_dependency('minitest')
29
29
  s.add_development_dependency('rdoc', '~> 3.10')
30
- s.add_development_dependency('twitter', '~> 4.0')
30
+ s.add_development_dependency('twitter', '~> 5.0')
31
31
  s.add_development_dependency('prowly', '~> 0.3')
32
32
  s.add_development_dependency('xmpp4r', '~> 0.5')
33
33
  s.add_development_dependency('dike', '~> 0.0.3')
@@ -146,6 +146,7 @@ Gem::Specification.new do |s|
146
146
  test/configs/task/logs/.placeholder
147
147
  test/configs/task/task.god
148
148
  test/configs/test.rb
149
+ test/configs/usr1_trapper.rb
149
150
  test/helper.rb
150
151
  test/suite.rb
151
152
  test/test_airbrake.rb
@@ -162,6 +163,7 @@ Gem::Specification.new do |s|
162
163
  test/test_email.rb
163
164
  test/test_event_handler.rb
164
165
  test/test_god.rb
166
+ test/test_god_system.rb
165
167
  test/test_handlers_kqueue_handler.rb
166
168
  test/test_hipchat.rb
167
169
  test/test_jabber.rb
data/lib/god.rb CHANGED
@@ -161,7 +161,7 @@ end
161
161
 
162
162
  module God
163
163
  # The String version number for this package.
164
- VERSION = '0.13.6'
164
+ VERSION = '0.13.7'
165
165
 
166
166
  # The Integer number of lines of backlog to keep for the logger.
167
167
  LOG_BUFFER_SIZE_DEFAULT = 100
@@ -490,8 +490,8 @@ module God
490
490
  def self.stop_all
491
491
  self.watches.sort.each do |name, w|
492
492
  Thread.new do
493
+ w.action(:stop)
493
494
  w.unmonitor if w.state != :unmonitored
494
- w.action(:stop) if w.alive?
495
495
  end
496
496
  end
497
497
 
@@ -12,7 +12,6 @@ module God
12
12
 
13
13
  def setup
14
14
  # connect to drb unix socket
15
- DRb.start_service("druby://127.0.0.1:0")
16
15
  @server = DRbObject.new(nil, God::Socket.socket(@options[:port]))
17
16
 
18
17
  # ping server to ensure that it is responsive
@@ -19,7 +19,7 @@ module God
19
19
 
20
20
  class Slack < Contact
21
21
  class << self
22
- attr_accessor :account, :token, :channel, :notify_channel, :format, :username, :emoji
22
+ attr_accessor :url, :channel, :notify_channel, :format, :username, :emoji
23
23
  end
24
24
 
25
25
  self.channel = "#general"
@@ -28,12 +28,11 @@ module God
28
28
 
29
29
  def valid?
30
30
  valid = true
31
- valid &= complain("Attribute 'account' must be specified", self) unless arg(:account)
32
- valid &= complain("Attribute 'token' must be specified", self) unless arg(:token)
31
+ valid &= complain("Attribute 'url' must be specified", self) unless arg(:url)
33
32
  valid
34
33
  end
35
34
 
36
- attr_accessor :account, :token, :channel, :notify_channel, :format, :username, :emoji
35
+ attr_accessor :url, :channel, :notify_channel, :format, :username, :emoji
37
36
 
38
37
  def text(data)
39
38
  text = ""
@@ -63,7 +62,7 @@ module God
63
62
  end
64
63
 
65
64
  def api_url
66
- URI.parse("https://#{arg(:account)}.slack.com/services/hooks/incoming-webhook?token=#{arg(:token)}")
65
+ URI.parse arg(:url)
67
66
  end
68
67
 
69
68
  def request(text)
@@ -96,5 +95,4 @@ module God
96
95
  end
97
96
 
98
97
  end
99
- end
100
-
98
+ end
@@ -30,9 +30,15 @@ module God
30
30
  def file_writable?(file)
31
31
  pid = fork do
32
32
  begin
33
- uid_num = Etc.getpwnam(self.uid).uid if self.uid
34
- gid_num = Etc.getgrnam(self.gid).gid if self.gid
35
- gid_num = Etc.getpwnam(self.uid).gid if self.gid.nil? && self.uid
33
+ if self.uid
34
+ user_method = self.uid.is_a?(Integer) ? :getpwuid : :getpwnam
35
+ uid_num = Etc.send(user_method, self.uid).uid
36
+ gid_num = Etc.send(user_method, self.uid).gid
37
+ end
38
+ if self.gid
39
+ group_method = self.gid.is_a?(Integer) ? :getgrgid : :getgrnam
40
+ gid_num = Etc.send(group_method, self.gid).gid
41
+ end
36
42
 
37
43
  ::Dir.chroot(self.chroot) if self.chroot
38
44
  ::Process.groups = [gid_num] if gid_num
@@ -78,7 +78,6 @@ module God
78
78
  applog(nil, :info, "Started on #{DRb.uri}")
79
79
  rescue Errno::EADDRINUSE
80
80
  applog(nil, :info, "Socket already in use")
81
- DRb.start_service
82
81
  server = DRbObject.new(nil, self.socket)
83
82
 
84
83
  begin
@@ -95,8 +94,15 @@ module God
95
94
  end
96
95
 
97
96
  if File.exists?(self.socket_file)
98
- uid = Etc.getpwnam(@user).uid if @user
99
- gid = Etc.getgrnam(@group).gid if @group
97
+ if @user
98
+ user_method = @user.is_a?(Integer) ? :getpwuid : :getpwnam
99
+ uid = Etc.send(user_method, @user).uid
100
+ gid = Etc.send(user_method, @user).gid
101
+ end
102
+ if @group
103
+ group_method = @group.is_a?(Integer) ? :getgrgid : :getgrnam
104
+ gid = Etc.send(group_method, @group).gid
105
+ end
100
106
 
101
107
  File.chmod(Integer(@perm), socket_file) if @perm
102
108
  File.chown(uid, gid, socket_file) if uid or gid
@@ -0,0 +1,10 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ Signal.trap 'USR1' do
4
+ puts "can't stop won't stop"
5
+ end
6
+
7
+ loop do
8
+ puts 'server'
9
+ sleep 1
10
+ end
@@ -0,0 +1,201 @@
1
+ require File.dirname(__FILE__) + '/helper'
2
+
3
+ class TestGodSystem < MiniTest::Test
4
+ def assert_watch_running(watch_name)
5
+ assert_equal true, God.watches[watch_name].alive?
6
+ end
7
+
8
+ def with_god_cleanup
9
+ old_terminate = God.method(:terminate)
10
+ # necessary cuz actual god terminate will do exit(0) will stops tests
11
+ God.class_eval do
12
+ def self.terminate
13
+ FileUtils.rm_f(self.pid) if self.pid
14
+ self.server.stop if self.server
15
+ end
16
+ end
17
+ begin
18
+ yield
19
+ ensure
20
+ God.stop_all
21
+ God.terminate # use our monkeypatched terminate
22
+ God.watches.each do |name, w|
23
+ w.stop_signal = 'KILL'
24
+ w.action(:stop)
25
+ end
26
+ God.inited = false
27
+ God.terminate_timeout = ::God::TERMINATE_TIMEOUT_DEFAULT
28
+ God.internal_init # reset config, set running to false, etc.
29
+ # set termiante back to old method, for other tests
30
+ God.define_singleton_method(:terminate, old_terminate)
31
+ end
32
+ end
33
+
34
+ def test_start_running
35
+ with_god_cleanup do
36
+ God.start
37
+ assert_equal(God.running, true)
38
+ end
39
+ end
40
+
41
+ def test_add_watch
42
+ with_god_cleanup do
43
+ God.start
44
+ God.watch do |w|
45
+ w.name = 'add_watch'
46
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
47
+ end
48
+ assert God.watches['add_watch'] != nil
49
+ end
50
+ end
51
+
52
+ def test_start_watch
53
+ with_god_cleanup do
54
+ God.start
55
+ God.watch do |w|
56
+ w.name = 'start_watch'
57
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
58
+ end
59
+ God.watches['start_watch'].action(:start)
60
+ sleep 2
61
+ assert_equal true, God.watches['start_watch'].alive?
62
+ end
63
+ end
64
+
65
+ def test_start_watch
66
+ with_god_cleanup do
67
+ God.start
68
+ God.watch do |w|
69
+ w.name = 'start_watch'
70
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
71
+ end
72
+ God.watches['start_watch'].action(:start)
73
+ sleep 2
74
+ assert_equal true, God.watches['start_watch'].alive?
75
+ end
76
+ end
77
+
78
+ def test_stop_all_with_one
79
+ with_god_cleanup do
80
+ God.start
81
+ God.watch do |w|
82
+ w.name = 'start_watch'
83
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
84
+ end
85
+ God.watches['start_watch'].action(:start)
86
+ sleep 2
87
+ assert_equal true, God.watches['start_watch'].alive?
88
+ God.stop_all
89
+ assert_equal false, God.watches.any? { |name, w| w.alive? }
90
+ end
91
+ end
92
+
93
+ # default 10s timeout will expire before SIGKILL sent
94
+ def test_stop_all_with_non_killing_signal_long_timeout
95
+ with_god_cleanup do
96
+ God.start
97
+ God.watch do |w|
98
+ w.name = 'long_timeout'
99
+ w.stop_signal = 'USR1'
100
+ w.stop_timeout = ::God::STOP_TIMEOUT_DEFAULT + 1
101
+ w.start = File.join(GOD_ROOT, *%w[test configs usr1_trapper.rb])
102
+ end
103
+ God.watches['long_timeout'].action(:start)
104
+ sleep 2
105
+ assert_equal true, God.watches['long_timeout'].alive?
106
+ God.stop_all
107
+ assert_watch_running('long_timeout')
108
+ end
109
+ end
110
+
111
+ # use short timeout to send SIGKILL before 10s timeout
112
+ def test_stop_all_with_non_killing_signal_short_timeout
113
+ with_god_cleanup do
114
+ God.start
115
+ God.watch do |w|
116
+ w.name = 'short_timeout'
117
+ w.stop_signal = 'USR1'
118
+ w.stop_timeout = ::God::STOP_TIMEOUT_DEFAULT - 1
119
+ w.start = File.join(GOD_ROOT, *%w[test configs usr1_trapper.rb])
120
+ end
121
+ God.watches['short_timeout'].action(:start)
122
+ sleep 2
123
+ assert_equal true, God.watches['short_timeout'].alive?
124
+ God.stop_all
125
+ assert_equal false, God.watches.any? { |name, w| w.alive? }
126
+ end
127
+ end
128
+
129
+ # should be able to stop many simple watches within default timeout
130
+ def test_stop_all_with_many_watches
131
+ with_god_cleanup do
132
+ God.start
133
+ 20.times do |i|
134
+ God.watch do |w|
135
+ w.name = "many_watches_#{i}"
136
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
137
+ end
138
+ God.watches["many_watches_#{i}"].action(:start)
139
+ end
140
+ while true do
141
+ all_running = God.watches.select{ |name, w| name =~ /many_watches_/ }.all?{ |name, w| w.alive? }
142
+ size = God.watches.size
143
+ break if all_running && size >= 20
144
+ sleep 2
145
+ end
146
+ God.stop_all
147
+ assert_equal false, God.watches.any? { |name, w| w.alive? }
148
+ end
149
+ end
150
+
151
+ # should be able to stop many simple watches within short timeout
152
+ def test_stop_all_with_many_watches_short_timeout
153
+ with_god_cleanup do
154
+ God.start
155
+ God.terminate_timeout = 1
156
+ 100.times do |i|
157
+ God.watch do |w|
158
+ w.name = "tons_of_watches_#{i}"
159
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
160
+ w.keepalive
161
+ end
162
+ God.watches["tons_of_watches_#{i}"].action(:start)
163
+ end
164
+ while true do
165
+ all_running = God.watches.select{ |name, w| name =~ /tons_of_watches_/ }.all?{ |name, w| w.alive? }
166
+ size = God.watches.size
167
+ break if all_running && size >= 100
168
+ sleep 2
169
+ end
170
+ God.stop_all
171
+ assert_equal false, God.watches.any? { |name, w| w.alive? }
172
+ end
173
+ end
174
+
175
+ def test_god_terminate_with_many_watches_short_timeout
176
+ with_god_cleanup do
177
+ God.start
178
+ God.terminate_timeout = 1
179
+ 100.times do |i|
180
+ God.watch do |w|
181
+ w.name = "tons_of_watches_#{i}"
182
+ w.start = File.join(GOD_ROOT, *%w[test configs complex simple_server.rb])
183
+ w.keepalive
184
+ end
185
+ God.watches["tons_of_watches_#{i}"].action(:start)
186
+ end
187
+ while true do
188
+ all_running = God.watches.select{ |name, w| name =~ /tons_of_watches_/ }.all?{ |name, w| w.alive? }
189
+ size = God.watches.size
190
+ break if all_running && size >= 100
191
+ sleep 2
192
+ end
193
+ begin
194
+ God::CLI::Command.new('terminate', {port: 17165}, [])
195
+ rescue SystemExit
196
+ ensure
197
+ assert_equal false, God.watches.any? { |name, w| w.alive? }
198
+ end
199
+ end
200
+ end
201
+ end
@@ -3,8 +3,9 @@ require File.dirname(__FILE__) + '/helper'
3
3
  class TestSlack < Minitest::Test
4
4
  def setup
5
5
  @slack = God::Contacts::Slack.new
6
- @slack.account = "foo"
7
- @slack.token = "foo"
6
+
7
+ # new slack webhook url contains three random 'tokens' with length of 9, 9 and 24 characters
8
+ @slack.url = "https://hooks.slack.com/services/ABCABCABC/DEFDEFDEF/ABCDEFABCDEFABCDEFABCDEF"
8
9
 
9
10
  @sample_data = {
10
11
  :message => "a sample message",
@@ -16,7 +17,7 @@ class TestSlack < Minitest::Test
16
17
  end
17
18
 
18
19
  def test_api_url
19
- assert_equal "https://foo.slack.com/services/hooks/incoming-webhook?token=foo", @slack.api_url.to_s
20
+ assert_equal @slack.url, @slack.api_url.to_s
20
21
  end
21
22
 
22
23
  def test_notify
metadata CHANGED
@@ -1,309 +1,312 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: god
3
- version: !ruby/object:Gem::Version
4
- hash: 39
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.13.7
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 13
9
- - 6
10
- version: 0.13.6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Tom Preston-Werner
14
9
  - Kevin Clark
15
10
  - Eric Lindvall
16
11
  autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
-
20
- date: 2015-03-21 00:00:00 -07:00
21
- default_executable:
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 1
32
- - 6
33
- version: "1.6"
34
- prerelease: false
35
- requirement: *id001
14
+ date: 2015-10-19 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
36
17
  name: json
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: '1.6'
37
24
  type: :development
38
- - !ruby/object:Gem::Dependency
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
25
  prerelease: false
49
- requirement: *id002
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ~>
30
+ - !ruby/object:Gem::Version
31
+ version: '1.6'
32
+ - !ruby/object:Gem::Dependency
50
33
  name: rake
34
+ requirement: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
51
40
  type: :development
52
- - !ruby/object:Gem::Dependency
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
62
41
  prerelease: false
63
- requirement: *id003
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ - !ruby/object:Gem::Dependency
64
49
  name: minitest
65
- type: :development
66
- - !ruby/object:Gem::Dependency
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
50
+ requirement: !ruby/object:Gem::Requirement
68
51
  none: false
69
- requirements:
70
- - - ~>
71
- - !ruby/object:Gem::Version
72
- hash: 19
73
- segments:
74
- - 3
75
- - 10
76
- version: "3.10"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ type: :development
77
57
  prerelease: false
78
- requirement: *id004
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ - !ruby/object:Gem::Dependency
79
65
  name: rdoc
80
- type: :development
81
- - !ruby/object:Gem::Dependency
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
66
+ requirement: !ruby/object:Gem::Requirement
83
67
  none: false
84
- requirements:
68
+ requirements:
85
69
  - - ~>
86
- - !ruby/object:Gem::Version
87
- hash: 27
88
- segments:
89
- - 4
90
- - 0
91
- version: "4.0"
70
+ - !ruby/object:Gem::Version
71
+ version: '3.10'
72
+ type: :development
92
73
  prerelease: false
93
- requirement: *id005
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: '3.10'
80
+ - !ruby/object:Gem::Dependency
94
81
  name: twitter
95
- type: :development
96
- - !ruby/object:Gem::Dependency
97
- version_requirements: &id006 !ruby/object:Gem::Requirement
82
+ requirement: !ruby/object:Gem::Requirement
98
83
  none: false
99
- requirements:
84
+ requirements:
100
85
  - - ~>
101
- - !ruby/object:Gem::Version
102
- hash: 13
103
- segments:
104
- - 0
105
- - 3
106
- version: "0.3"
86
+ - !ruby/object:Gem::Version
87
+ version: '5.0'
88
+ type: :development
107
89
  prerelease: false
108
- requirement: *id006
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ~>
94
+ - !ruby/object:Gem::Version
95
+ version: '5.0'
96
+ - !ruby/object:Gem::Dependency
109
97
  name: prowly
110
- type: :development
111
- - !ruby/object:Gem::Dependency
112
- version_requirements: &id007 !ruby/object:Gem::Requirement
98
+ requirement: !ruby/object:Gem::Requirement
113
99
  none: false
114
- requirements:
100
+ requirements:
115
101
  - - ~>
116
- - !ruby/object:Gem::Version
117
- hash: 1
118
- segments:
119
- - 0
120
- - 5
121
- version: "0.5"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.3'
104
+ type: :development
122
105
  prerelease: false
123
- requirement: *id007
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ~>
110
+ - !ruby/object:Gem::Version
111
+ version: '0.3'
112
+ - !ruby/object:Gem::Dependency
124
113
  name: xmpp4r
125
- type: :development
126
- - !ruby/object:Gem::Dependency
127
- version_requirements: &id008 !ruby/object:Gem::Requirement
114
+ requirement: !ruby/object:Gem::Requirement
128
115
  none: false
129
- requirements:
116
+ requirements:
130
117
  - - ~>
131
- - !ruby/object:Gem::Version
132
- hash: 25
133
- segments:
134
- - 0
135
- - 0
136
- - 3
137
- version: 0.0.3
118
+ - !ruby/object:Gem::Version
119
+ version: '0.5'
120
+ type: :development
138
121
  prerelease: false
139
- requirement: *id008
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ~>
126
+ - !ruby/object:Gem::Version
127
+ version: '0.5'
128
+ - !ruby/object:Gem::Dependency
140
129
  name: dike
141
- type: :development
142
- - !ruby/object:Gem::Dependency
143
- version_requirements: &id009 !ruby/object:Gem::Requirement
130
+ requirement: !ruby/object:Gem::Requirement
144
131
  none: false
145
- requirements:
132
+ requirements:
146
133
  - - ~>
147
- - !ruby/object:Gem::Version
148
- hash: 13
149
- segments:
150
- - 1
151
- - 1
152
- version: "1.1"
134
+ - !ruby/object:Gem::Version
135
+ version: 0.0.3
136
+ type: :development
153
137
  prerelease: false
154
- requirement: *id009
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ~>
142
+ - !ruby/object:Gem::Version
143
+ version: 0.0.3
144
+ - !ruby/object:Gem::Dependency
155
145
  name: daemons
156
- type: :development
157
- - !ruby/object:Gem::Dependency
158
- version_requirements: &id010 !ruby/object:Gem::Requirement
146
+ requirement: !ruby/object:Gem::Requirement
159
147
  none: false
160
- requirements:
148
+ requirements:
161
149
  - - ~>
162
- - !ruby/object:Gem::Version
163
- hash: 31
164
- segments:
165
- - 0
166
- - 10
167
- version: "0.10"
150
+ - !ruby/object:Gem::Version
151
+ version: '1.1'
152
+ type: :development
168
153
  prerelease: false
169
- requirement: *id010
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ~>
158
+ - !ruby/object:Gem::Version
159
+ version: '1.1'
160
+ - !ruby/object:Gem::Dependency
170
161
  name: mocha
171
- type: :development
172
- - !ruby/object:Gem::Dependency
173
- version_requirements: &id011 !ruby/object:Gem::Requirement
162
+ requirement: !ruby/object:Gem::Requirement
174
163
  none: false
175
- requirements:
164
+ requirements:
176
165
  - - ~>
177
- - !ruby/object:Gem::Version
178
- hash: 25
179
- segments:
180
- - 1
181
- - 3
182
- - 1
183
- version: 1.3.1
166
+ - !ruby/object:Gem::Version
167
+ version: '0.10'
168
+ type: :development
184
169
  prerelease: false
185
- requirement: *id011
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ~>
174
+ - !ruby/object:Gem::Version
175
+ version: '0.10'
176
+ - !ruby/object:Gem::Dependency
186
177
  name: gollum
178
+ requirement: !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - ~>
182
+ - !ruby/object:Gem::Version
183
+ version: 1.3.1
187
184
  type: :development
188
- - !ruby/object:Gem::Dependency
189
- version_requirements: &id012 !ruby/object:Gem::Requirement
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ none: false
188
+ requirements:
189
+ - - ~>
190
+ - !ruby/object:Gem::Version
191
+ version: 1.3.1
192
+ - !ruby/object:Gem::Dependency
193
+ name: mustache
194
+ requirement: !ruby/object:Gem::Requirement
190
195
  none: false
191
- requirements:
196
+ requirements:
192
197
  - - ~>
193
- - !ruby/object:Gem::Version
194
- hash: 403
195
- segments:
196
- - 0
197
- - 99
198
- - 0
198
+ - !ruby/object:Gem::Version
199
199
  version: 0.99.0
200
200
  - - <
201
- - !ruby/object:Gem::Version
202
- hash: 413
203
- segments:
204
- - 0
205
- - 99
206
- - 7
201
+ - !ruby/object:Gem::Version
207
202
  version: 0.99.7
208
- prerelease: false
209
- requirement: *id012
210
- name: mustache
211
203
  type: :development
212
- - !ruby/object:Gem::Dependency
213
- version_requirements: &id013 !ruby/object:Gem::Requirement
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
214
206
  none: false
215
- requirements:
207
+ requirements:
216
208
  - - ~>
217
- - !ruby/object:Gem::Version
218
- hash: 13
219
- segments:
220
- - 3
221
- - 1
222
- - 7
223
- version: 3.1.7
224
- prerelease: false
225
- requirement: *id013
209
+ - !ruby/object:Gem::Version
210
+ version: 0.99.0
211
+ - - <
212
+ - !ruby/object:Gem::Version
213
+ version: 0.99.7
214
+ - !ruby/object:Gem::Dependency
226
215
  name: airbrake
227
- type: :development
228
- - !ruby/object:Gem::Dependency
229
- version_requirements: &id014 !ruby/object:Gem::Requirement
216
+ requirement: !ruby/object:Gem::Requirement
230
217
  none: false
231
- requirements:
218
+ requirements:
232
219
  - - ~>
233
- - !ruby/object:Gem::Version
234
- hash: 3
235
- segments:
236
- - 1
237
- - 5
238
- - 0
239
- version: 1.5.0
220
+ - !ruby/object:Gem::Version
221
+ version: 3.1.7
222
+ type: :development
240
223
  prerelease: false
241
- requirement: *id014
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ~>
228
+ - !ruby/object:Gem::Version
229
+ version: 3.1.7
230
+ - !ruby/object:Gem::Dependency
242
231
  name: nokogiri
232
+ requirement: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ~>
236
+ - !ruby/object:Gem::Version
237
+ version: 1.5.0
243
238
  type: :development
244
- - !ruby/object:Gem::Dependency
245
- version_requirements: &id015 !ruby/object:Gem::Requirement
246
- none: false
247
- requirements:
248
- - - ">="
249
- - !ruby/object:Gem::Version
250
- hash: 23
251
- segments:
252
- - 2
253
- - 3
254
- - 10
239
+ prerelease: false
240
+ version_requirements: !ruby/object:Gem::Requirement
241
+ none: false
242
+ requirements:
243
+ - - ~>
244
+ - !ruby/object:Gem::Version
245
+ version: 1.5.0
246
+ - !ruby/object:Gem::Dependency
247
+ name: activesupport
248
+ requirement: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
255
253
  version: 2.3.10
256
254
  - - <
257
- - !ruby/object:Gem::Version
258
- hash: 63
259
- segments:
260
- - 4
261
- - 0
262
- - 0
255
+ - !ruby/object:Gem::Version
263
256
  version: 4.0.0
264
- prerelease: false
265
- requirement: *id015
266
- name: activesupport
267
257
  type: :development
268
- - !ruby/object:Gem::Dependency
269
- version_requirements: &id016 !ruby/object:Gem::Requirement
270
- none: false
271
- requirements:
272
- - - ">="
273
- - !ruby/object:Gem::Version
274
- hash: 3
275
- segments:
276
- - 0
277
- version: "0"
278
258
  prerelease: false
279
- requirement: *id016
259
+ version_requirements: !ruby/object:Gem::Requirement
260
+ none: false
261
+ requirements:
262
+ - - ! '>='
263
+ - !ruby/object:Gem::Version
264
+ version: 2.3.10
265
+ - - <
266
+ - !ruby/object:Gem::Version
267
+ version: 4.0.0
268
+ - !ruby/object:Gem::Dependency
280
269
  name: statsd-ruby
270
+ requirement: !ruby/object:Gem::Requirement
271
+ none: false
272
+ requirements:
273
+ - - ! '>='
274
+ - !ruby/object:Gem::Version
275
+ version: '0'
281
276
  type: :development
282
- - !ruby/object:Gem::Dependency
283
- version_requirements: &id017 !ruby/object:Gem::Requirement
277
+ prerelease: false
278
+ version_requirements: !ruby/object:Gem::Requirement
284
279
  none: false
285
- requirements:
280
+ requirements:
281
+ - - ! '>='
282
+ - !ruby/object:Gem::Version
283
+ version: '0'
284
+ - !ruby/object:Gem::Dependency
285
+ name: i18n
286
+ requirement: !ruby/object:Gem::Requirement
287
+ none: false
288
+ requirements:
286
289
  - - <
287
- - !ruby/object:Gem::Version
288
- hash: 3
289
- segments:
290
- - 0
291
- - 7
292
- - 0
290
+ - !ruby/object:Gem::Version
293
291
  version: 0.7.0
294
- prerelease: false
295
- requirement: *id017
296
- name: i18n
297
292
  type: :development
298
- description: An easy to configure, easy to extend monitoring framework written in Ruby.
293
+ prerelease: false
294
+ version_requirements: !ruby/object:Gem::Requirement
295
+ none: false
296
+ requirements:
297
+ - - <
298
+ - !ruby/object:Gem::Version
299
+ version: 0.7.0
300
+ description: An easy to configure, easy to extend monitoring framework written in
301
+ Ruby.
299
302
  email: god-rb@googlegroups.com
300
- executables:
303
+ executables:
301
304
  - god
302
- extensions:
305
+ extensions:
303
306
  - ext/god/extconf.rb
304
- extra_rdoc_files:
307
+ extra_rdoc_files:
305
308
  - README.md
306
- files:
309
+ files:
307
310
  - Announce.txt
308
311
  - Gemfile
309
312
  - History.txt
@@ -406,6 +409,7 @@ files:
406
409
  - test/configs/task/logs/.placeholder
407
410
  - test/configs/task/task.god
408
411
  - test/configs/test.rb
412
+ - test/configs/usr1_trapper.rb
409
413
  - test/helper.rb
410
414
  - test/suite.rb
411
415
  - test/test_airbrake.rb
@@ -422,6 +426,7 @@ files:
422
426
  - test/test_email.rb
423
427
  - test/test_event_handler.rb
424
428
  - test/test_god.rb
429
+ - test/test_god_system.rb
425
430
  - test/test_handlers_kqueue_handler.rb
426
431
  - test/test_hipchat.rb
427
432
  - test/test_jabber.rb
@@ -442,42 +447,33 @@ files:
442
447
  - test/test_trigger.rb
443
448
  - test/test_watch.rb
444
449
  - test/test_webhook.rb
445
- has_rdoc: true
446
450
  homepage: http://god.rubyforge.org/
447
451
  licenses: []
448
-
449
452
  post_install_message:
450
- rdoc_options:
453
+ rdoc_options:
451
454
  - --charset=UTF-8
452
- require_paths:
455
+ require_paths:
453
456
  - lib
454
457
  - ext
455
- required_ruby_version: !ruby/object:Gem::Requirement
458
+ required_ruby_version: !ruby/object:Gem::Requirement
456
459
  none: false
457
- requirements:
458
- - - ">="
459
- - !ruby/object:Gem::Version
460
- hash: 3
461
- segments:
462
- - 0
463
- version: "0"
464
- required_rubygems_version: !ruby/object:Gem::Requirement
460
+ requirements:
461
+ - - ! '>='
462
+ - !ruby/object:Gem::Version
463
+ version: '0'
464
+ required_rubygems_version: !ruby/object:Gem::Requirement
465
465
  none: false
466
- requirements:
467
- - - ">="
468
- - !ruby/object:Gem::Version
469
- hash: 3
470
- segments:
471
- - 0
472
- version: "0"
466
+ requirements:
467
+ - - ! '>='
468
+ - !ruby/object:Gem::Version
469
+ version: '0'
473
470
  requirements: []
474
-
475
471
  rubyforge_project: god
476
- rubygems_version: 1.6.2
472
+ rubygems_version: 1.8.23.2
477
473
  signing_key:
478
474
  specification_version: 2
479
475
  summary: Process monitoring framework.
480
- test_files:
476
+ test_files:
481
477
  - test/test_airbrake.rb
482
478
  - test/test_behavior.rb
483
479
  - test/test_campfire.rb
@@ -492,6 +488,7 @@ test_files:
492
488
  - test/test_email.rb
493
489
  - test/test_event_handler.rb
494
490
  - test/test_god.rb
491
+ - test/test_god_system.rb
495
492
  - test/test_handlers_kqueue_handler.rb
496
493
  - test/test_hipchat.rb
497
494
  - test/test_jabber.rb