dylanvaughn-bluepill 0.0.39 → 0.0.40
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bluepill.gemspec +3 -2
- data/dylanvaughn-bluepill.gemspec +86 -0
- data/lib/bluepill.rb +1 -2
- data/lib/bluepill/process_conditions.rb +1 -1
- data/lib/bluepill/process_conditions/http.rb +1 -1
- data/lib/bluepill/system.rb +3 -3
- data/lib/bluepill/version.rb +1 -1
- metadata +5 -4
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ begin
|
|
8
8
|
gem.summary = %Q{A process monitor written in Ruby with stability and minimalism in mind.}
|
9
9
|
gem.description = %Q{Bluepill keeps your daemons up while taking up as little resources as possible. After all you probably want the resources of your server to be used by whatever daemons you are running rather than the thing that's supposed to make sure they are brought back up, should they die or misbehave.}
|
10
10
|
gem.email = "dylancvaughn@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/
|
11
|
+
gem.homepage = "http://github.com/dylanvaughn/bluepill"
|
12
12
|
gem.authors = ["Arya Asemanfar", "Gary Tsang", "Rohith Ravi"]
|
13
13
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
14
|
gem.add_dependency("daemons", ">= 1.0.9")
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.40
|
data/bluepill.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bluepill}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.39"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Arya Asemanfar", "Gary Tsang", "Rohith Ravi"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-02}
|
13
13
|
s.default_executable = %q{bluepill}
|
14
14
|
s.description = %q{Bluepill keeps your daemons up while taking up as little resources as possible. After all you probably want the resources of your server to be used by whatever daemons you are running rather than the thing that's supposed to make sure they are brought back up, should they die or misbehave.}
|
15
15
|
s.email = %q{entombedvirus@gmail.com}
|
@@ -41,6 +41,7 @@ Gem::Specification.new do |s|
|
|
41
41
|
"lib/bluepill/process_conditions.rb",
|
42
42
|
"lib/bluepill/process_conditions/always_true.rb",
|
43
43
|
"lib/bluepill/process_conditions/cpu_usage.rb",
|
44
|
+
"lib/bluepill/process_conditions/http.rb",
|
44
45
|
"lib/bluepill/process_conditions/mem_usage.rb",
|
45
46
|
"lib/bluepill/process_conditions/process_condition.rb",
|
46
47
|
"lib/bluepill/process_statistics.rb",
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{dylanvaughn-bluepill}
|
8
|
+
s.version = "0.0.40"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Arya Asemanfar", "Gary Tsang", "Rohith Ravi"]
|
12
|
+
s.date = %q{2010-08-06}
|
13
|
+
s.default_executable = %q{bluepill}
|
14
|
+
s.description = %q{Bluepill keeps your daemons up while taking up as little resources as possible. After all you probably want the resources of your server to be used by whatever daemons you are running rather than the thing that's supposed to make sure they are brought back up, should they die or misbehave.}
|
15
|
+
s.email = %q{dylancvaughn@gmail.com}
|
16
|
+
s.executables = ["bluepill"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".gitignore",
|
23
|
+
"DESIGN.md",
|
24
|
+
"LICENSE",
|
25
|
+
"README.md",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/bluepill",
|
29
|
+
"bin/bpsv",
|
30
|
+
"bluepill.gemspec",
|
31
|
+
"dylanvaughn-bluepill.gemspec",
|
32
|
+
"lib/bluepill.rb",
|
33
|
+
"lib/bluepill/application.rb",
|
34
|
+
"lib/bluepill/application/client.rb",
|
35
|
+
"lib/bluepill/application/server.rb",
|
36
|
+
"lib/bluepill/condition_watch.rb",
|
37
|
+
"lib/bluepill/controller.rb",
|
38
|
+
"lib/bluepill/dsl.rb",
|
39
|
+
"lib/bluepill/group.rb",
|
40
|
+
"lib/bluepill/logger.rb",
|
41
|
+
"lib/bluepill/process.rb",
|
42
|
+
"lib/bluepill/process_conditions.rb",
|
43
|
+
"lib/bluepill/process_conditions/always_true.rb",
|
44
|
+
"lib/bluepill/process_conditions/cpu_usage.rb",
|
45
|
+
"lib/bluepill/process_conditions/http.rb",
|
46
|
+
"lib/bluepill/process_conditions/mem_usage.rb",
|
47
|
+
"lib/bluepill/process_conditions/process_condition.rb",
|
48
|
+
"lib/bluepill/process_statistics.rb",
|
49
|
+
"lib/bluepill/socket.rb",
|
50
|
+
"lib/bluepill/system.rb",
|
51
|
+
"lib/bluepill/trigger.rb",
|
52
|
+
"lib/bluepill/triggers/flapping.rb",
|
53
|
+
"lib/bluepill/util/rotational_array.rb",
|
54
|
+
"lib/bluepill/version.rb",
|
55
|
+
"lib/example.rb",
|
56
|
+
"lib/runit_example.rb"
|
57
|
+
]
|
58
|
+
s.homepage = %q{http://github.com/dylanvaughn/bluepill}
|
59
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
60
|
+
s.require_paths = ["lib"]
|
61
|
+
s.rubygems_version = %q{1.3.7}
|
62
|
+
s.summary = %q{A process monitor written in Ruby with stability and minimalism in mind.}
|
63
|
+
|
64
|
+
if s.respond_to? :specification_version then
|
65
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
66
|
+
s.specification_version = 3
|
67
|
+
|
68
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
69
|
+
s.add_runtime_dependency(%q<daemons>, [">= 1.0.9"])
|
70
|
+
s.add_runtime_dependency(%q<blankslate>, [">= 2.1.2.2"])
|
71
|
+
s.add_runtime_dependency(%q<state_machine>, [">= 0.8.0"])
|
72
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.4"])
|
73
|
+
else
|
74
|
+
s.add_dependency(%q<daemons>, [">= 1.0.9"])
|
75
|
+
s.add_dependency(%q<blankslate>, [">= 2.1.2.2"])
|
76
|
+
s.add_dependency(%q<state_machine>, [">= 0.8.0"])
|
77
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.4"])
|
78
|
+
end
|
79
|
+
else
|
80
|
+
s.add_dependency(%q<daemons>, [">= 1.0.9"])
|
81
|
+
s.add_dependency(%q<blankslate>, [">= 2.1.2.2"])
|
82
|
+
s.add_dependency(%q<state_machine>, [">= 0.8.0"])
|
83
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.4"])
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
data/lib/bluepill.rb
CHANGED
@@ -9,7 +9,6 @@ require 'logger'
|
|
9
9
|
require 'active_support/inflector'
|
10
10
|
require 'active_support/core_ext/hash'
|
11
11
|
require 'active_support/core_ext/numeric'
|
12
|
-
require 'active_support/core_ext/object/misc'
|
13
12
|
require 'active_support/duration'
|
14
13
|
|
15
14
|
require 'bluepill/application'
|
@@ -29,4 +28,4 @@ require "bluepill/process_conditions"
|
|
29
28
|
|
30
29
|
require "bluepill/util/rotational_array"
|
31
30
|
|
32
|
-
require "bluepill/version"
|
31
|
+
require "bluepill/version"
|
@@ -8,7 +8,7 @@ module Bluepill
|
|
8
8
|
@uri = URI.parse(options[:url])
|
9
9
|
@kind = case options[:kind]
|
10
10
|
when Fixnum then Net::HTTPResponse::CODE_TO_OBJ[options[:kind].to_s]
|
11
|
-
when String, Symbol then "
|
11
|
+
when String, Symbol then Net.const_get("HTTP#{options[:kind].to_s.camelize}")
|
12
12
|
else
|
13
13
|
Net::HTTPSuccess
|
14
14
|
end
|
data/lib/bluepill/system.rb
CHANGED
@@ -33,7 +33,7 @@ module Bluepill
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def get_children(parent_pid)
|
36
|
-
|
36
|
+
Array.new.tap do |child_pids|
|
37
37
|
ps_axu.each_pair do |pid, chunks|
|
38
38
|
child_pids << chunks[IDX_MAP[:pid]].to_i if chunks[IDX_MAP[:ppid]].to_i == parent_pid.to_i
|
39
39
|
end
|
@@ -68,7 +68,7 @@ module Bluepill
|
|
68
68
|
to_daemonize = lambda do
|
69
69
|
# Setting end PWD env emulates bash behavior when dealing with symlinks
|
70
70
|
Dir.chdir(ENV["PWD"] = options[:working_dir]) if options[:working_dir]
|
71
|
-
options[:environment].each { |key, value| ENV[key] = value }
|
71
|
+
options[:environment].each { |key, value| ENV[key] = value } if options[:environment]
|
72
72
|
|
73
73
|
redirect_io(*options.values_at(:stdin, :stdout, :stderr))
|
74
74
|
|
@@ -115,7 +115,7 @@ module Bluepill
|
|
115
115
|
drop_privileges(options[:uid], options[:gid])
|
116
116
|
|
117
117
|
Dir.chdir(ENV["PWD"] = options[:working_dir]) if options[:working_dir]
|
118
|
-
options[:environment].each { |key, value| ENV[key] = value }
|
118
|
+
options[:environment].each { |key, value| ENV[key] = value } if options[:environment]
|
119
119
|
|
120
120
|
# close unused fds so ancestors wont hang. This line is the only reason we are not
|
121
121
|
# using something like popen3. If this fd is not closed, the .read call on the parent
|
data/lib/bluepill/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dylanvaughn-bluepill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 79
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 40
|
10
|
+
version: 0.0.40
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Arya Asemanfar
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- bin/bluepill
|
105
105
|
- bin/bpsv
|
106
106
|
- bluepill.gemspec
|
107
|
+
- dylanvaughn-bluepill.gemspec
|
107
108
|
- lib/bluepill.rb
|
108
109
|
- lib/bluepill/application.rb
|
109
110
|
- lib/bluepill/application/client.rb
|
@@ -130,7 +131,7 @@ files:
|
|
130
131
|
- lib/example.rb
|
131
132
|
- lib/runit_example.rb
|
132
133
|
has_rdoc: true
|
133
|
-
homepage: http://github.com/
|
134
|
+
homepage: http://github.com/dylanvaughn/bluepill
|
134
135
|
licenses: []
|
135
136
|
|
136
137
|
post_install_message:
|