bluepill 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/bluepill +3 -3
- data/bluepill.gemspec +1 -1
- data/lib/bluepill/application.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.17
|
data/bin/bluepill
CHANGED
@@ -20,13 +20,13 @@ OptionParser.new do |opts|
|
|
20
20
|
end
|
21
21
|
end.parse!
|
22
22
|
|
23
|
-
|
23
|
+
APPLICATION_COMMANDS = %w(status start stop restart unmonitor quit)
|
24
24
|
|
25
25
|
controller = Bluepill::Controller.new(options.slice(:base_dir))
|
26
26
|
|
27
27
|
if controller.list.include?(ARGV.first)
|
28
28
|
options[:application] = ARGV.shift
|
29
|
-
elsif
|
29
|
+
elsif APPLICATION_COMMANDS.include?(ARGV.first)
|
30
30
|
if controller.list.length == 1
|
31
31
|
options[:application] = controller.list.first
|
32
32
|
elsif controller.list.length > 1
|
@@ -57,7 +57,7 @@ when "log"
|
|
57
57
|
cmd = "echo 'Tailing log for #{orig_pattern}...'; #{cmd}"
|
58
58
|
Kernel.exec(cmd)
|
59
59
|
|
60
|
-
when *
|
60
|
+
when *APPLICATION_COMMANDS
|
61
61
|
process_or_group_name = ARGV.shift
|
62
62
|
puts controller.send_cmd(options[:application], options[:command], process_or_group_name)
|
63
63
|
|
data/bluepill.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
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.17"
|
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"]
|
data/lib/bluepill/application.rb
CHANGED
@@ -124,11 +124,11 @@ module Bluepill
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def send_to_server(method)
|
127
|
+
buffer = ""
|
127
128
|
begin
|
128
129
|
status = Timeout::timeout(self.socket_timeout) do
|
129
130
|
self.socket = Bluepill::Socket.new(name, base_dir).client # Something that should be interrupted if it takes too much time...
|
130
131
|
socket.write(method + "\n")
|
131
|
-
buffer = ""
|
132
132
|
while(line = socket.gets)
|
133
133
|
buffer << line
|
134
134
|
end
|
@@ -138,7 +138,7 @@ module Bluepill
|
|
138
138
|
rescue Errno::ECONNREFUSED
|
139
139
|
abort("Connection Refused: Server is not running")
|
140
140
|
end
|
141
|
-
|
141
|
+
buffer
|
142
142
|
end
|
143
143
|
|
144
144
|
private
|