resurrected_god 1.1.0 → 1.1.1
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.
- checksums.yaml +4 -4
- data/History.md +5 -0
- data/README.md +1 -1
- data/lib/god/cli/command.rb +1 -1
- data/lib/god/conditions/process_running.rb +3 -3
- data/lib/god/contact.rb +1 -1
- data/lib/god/process.rb +1 -1
- data/lib/god/timeline.rb +1 -1
- data/lib/god/version.rb +1 -1
- data/lib/god/watch.rb +2 -2
- data/lib/god.rb +4 -4
- metadata +36 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e65b14e71958dd94729eeba93780283ccdb73e49a202859d816b94832656436f
|
4
|
+
data.tar.gz: 9a32895548e3f07d7a0e0f0907475d20217da6fe58e2227fcc5c852644b968b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37610457947e042fbeaa46aca0087b5f8cf022188ad9049c0512decf13136a879f19b8993da7ace3035dd574163d94fdd2ffb63bb148ab13513aaa45bcb29044
|
7
|
+
data.tar.gz: f0cc1a3ffc8a58c0c6b5285a30134a6a4657ed7479913b4bcfd66ebaf7978eba1aaf2ac3a409543ecf17caf84b872e48fa16b841056b56a07aa33eaadbcd4e3d
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@ ResurrectedGod: The Ruby Framework for Process Management
|
|
2
2
|
==============================================
|
3
3
|
|
4
4
|
[](https://badge.fury.io/rb/resurrected_god)
|
5
|
-
[](https://github.com/mishina2228/resurrected_god/actions/workflows/test.yml)
|
6
6
|
[](https://rubydoc.info/gems/resurrected_god)
|
7
7
|
[](https://codeclimate.com/github/mishina2228/resurrected_god/maintainability)
|
8
8
|
[](https://codecov.io/gh/mishina2228/resurrected_god)
|
data/lib/god/cli/command.rb
CHANGED
@@ -27,7 +27,7 @@ module God
|
|
27
27
|
def dispatch
|
28
28
|
if %w[load status signal log quit terminate].include?(@command)
|
29
29
|
setup
|
30
|
-
send("#{@command}_command")
|
30
|
+
send(:"#{@command}_command")
|
31
31
|
elsif %w[start stop restart monitor unmonitor remove].include?(@command)
|
32
32
|
setup
|
33
33
|
lifecycle_command
|
@@ -48,13 +48,13 @@ module God
|
|
48
48
|
active = pid && System::Process.new(pid).exists?
|
49
49
|
|
50
50
|
if running && active
|
51
|
-
info.
|
51
|
+
info.push('process is running')
|
52
52
|
true
|
53
53
|
elsif !running && !active
|
54
|
-
info.
|
54
|
+
info.push('process is not running')
|
55
55
|
true
|
56
56
|
else
|
57
|
-
info.
|
57
|
+
info.push('process is not running') if running
|
58
58
|
false
|
59
59
|
end
|
60
60
|
end
|
data/lib/god/contact.rb
CHANGED
@@ -28,7 +28,7 @@ module God
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def arg(name)
|
31
|
-
instance_variable_get("@#{name}") || self.class.instance_variable_get("@#{name}")
|
31
|
+
instance_variable_get(:"@#{name}") || self.class.instance_variable_get(:"@#{name}")
|
32
32
|
end
|
33
33
|
|
34
34
|
# Normalize the given notify specification into canonical form.
|
data/lib/god/process.rb
CHANGED
data/lib/god/timeline.rb
CHANGED
data/lib/god/version.rb
CHANGED
data/lib/god/watch.rb
CHANGED
@@ -284,7 +284,7 @@ module God
|
|
284
284
|
before_items = behaviors
|
285
285
|
before_items += [condition] if condition
|
286
286
|
before_items.each do |b|
|
287
|
-
info = b.send("before_#{action}")
|
287
|
+
info = b.send(:"before_#{action}")
|
288
288
|
if info
|
289
289
|
msg = "#{name} before_#{action}: #{info} (#{b.base_name})"
|
290
290
|
applog(self, :info, msg)
|
@@ -304,7 +304,7 @@ module God
|
|
304
304
|
after_items = behaviors
|
305
305
|
after_items += [condition] if condition
|
306
306
|
after_items.each do |b|
|
307
|
-
info = b.send("after_#{action}")
|
307
|
+
info = b.send(:"after_#{action}")
|
308
308
|
if info
|
309
309
|
msg = "#{name} after_#{action}: #{info} (#{b.base_name})"
|
310
310
|
applog(self, :info, msg)
|
data/lib/god.rb
CHANGED
@@ -124,7 +124,7 @@ if $load_god
|
|
124
124
|
class Module
|
125
125
|
def safe_attr_accessor(*args)
|
126
126
|
args.each do |arg|
|
127
|
-
define_method("#{arg}="
|
127
|
+
define_method(:"#{arg}=") do |other|
|
128
128
|
abort "God.#{arg} must be set before any Tasks are defined" if !running && inited
|
129
129
|
|
130
130
|
if running && inited
|
@@ -132,11 +132,11 @@ if $load_god
|
|
132
132
|
return
|
133
133
|
end
|
134
134
|
|
135
|
-
instance_variable_set("@#{arg}"
|
135
|
+
instance_variable_set(:"@#{arg}", other)
|
136
136
|
end
|
137
137
|
|
138
138
|
define_method(arg) do
|
139
|
-
instance_variable_get("@#{arg}"
|
139
|
+
instance_variable_get(:"@#{arg}")
|
140
140
|
end
|
141
141
|
end
|
142
142
|
end
|
@@ -461,7 +461,7 @@ if $load_god
|
|
461
461
|
# Returns true on success, false if all tasks could not be stopped within 10
|
462
462
|
# seconds
|
463
463
|
def self.stop_all
|
464
|
-
watches.sort.each do |_name, w|
|
464
|
+
watches.sort.each do |(_name, w)|
|
465
465
|
Thread.new do
|
466
466
|
w.action(:stop)
|
467
467
|
w.unmonitor if w.state != :unmonitored
|
metadata
CHANGED
@@ -1,18 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resurrected_god
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
8
|
- Kevin Clark
|
9
9
|
- Eric Lindvall
|
10
10
|
- mishina2228
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
15
|
-
dependencies:
|
14
|
+
date: 2023-12-29 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: drb
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: syslog
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - "~>"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0.1'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.1'
|
16
44
|
description: An easy to configure, easy to extend monitoring framework written in
|
17
45
|
Ruby.
|
18
46
|
email:
|
@@ -91,8 +119,8 @@ metadata:
|
|
91
119
|
changelog_uri: https://github.com/mishina2228/resurrected_god/blob/master/History.md
|
92
120
|
homepage_uri: https://github.com/mishina2228/resurrected_god
|
93
121
|
rubygems_mfa_required: 'true'
|
94
|
-
source_code_uri: https://github.com/mishina2228/resurrected_god/tree/v1.1.
|
95
|
-
post_install_message:
|
122
|
+
source_code_uri: https://github.com/mishina2228/resurrected_god/tree/v1.1.1
|
123
|
+
post_install_message:
|
96
124
|
rdoc_options: []
|
97
125
|
require_paths:
|
98
126
|
- lib
|
@@ -108,8 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
136
|
- !ruby/object:Gem::Version
|
109
137
|
version: '0'
|
110
138
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
112
|
-
signing_key:
|
139
|
+
rubygems_version: 3.4.10
|
140
|
+
signing_key:
|
113
141
|
specification_version: 4
|
114
142
|
summary: Process monitoring framework.
|
115
143
|
test_files: []
|