bluepill 0.0.40 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/bluepill +1 -1
- data/bluepill.gemspec +2 -2
- data/lib/bluepill/dsl.rb +11 -5
- data/lib/bluepill/system.rb +2 -2
- data/lib/bluepill/version.rb +1 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.42
|
data/bin/bluepill
CHANGED
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.42"
|
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-08-
|
12
|
+
s.date = %q{2010-08-23}
|
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}
|
data/lib/bluepill/dsl.rb
CHANGED
@@ -69,12 +69,18 @@ module Bluepill
|
|
69
69
|
process
|
70
70
|
end
|
71
71
|
end
|
72
|
-
|
73
72
|
app_proxy = Class.new do
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
73
|
+
if RUBY_VERSION >= '1.9'
|
74
|
+
class_variable_set(:@@app, app)
|
75
|
+
class_variable_set(:@@process_proxy, process_proxy)
|
76
|
+
class_variable_set(:@@process_keys, Hash.new) # because I don't want to require Set just for validations
|
77
|
+
class_variable_set(:@@pid_files, Hash.new)
|
78
|
+
else
|
79
|
+
@@app = app
|
80
|
+
@@process_proxy = process_proxy
|
81
|
+
@@process_keys = Hash.new
|
82
|
+
@@pid_files = Hash.new
|
83
|
+
end
|
78
84
|
attr_accessor :working_dir, :uid, :gid, :environment
|
79
85
|
|
80
86
|
def validate_process(process, process_name)
|
data/lib/bluepill/system.rb
CHANGED
@@ -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 } if options[:environment]
|
71
|
+
options[:environment].each { |key, value| ENV[key.to_s] = value.to_s } 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 } if options[:environment]
|
118
|
+
options[:environment].each { |key, value| ENV[key.to_s] = value.to_s } 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: bluepill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 75
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 42
|
10
|
+
version: 0.0.42
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Arya Asemanfar
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-08-
|
20
|
+
date: 2010-08-23 00:00:00 -07:00
|
21
21
|
default_executable: bluepill
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|