ruby-style 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/style.rb +11 -2
- metadata +2 -2
data/lib/style.rb
CHANGED
@@ -209,7 +209,7 @@ class Style
|
|
209
209
|
# are supported.
|
210
210
|
def process_unsupervised_command(command)
|
211
211
|
case command
|
212
|
-
when /\A(decrement|
|
212
|
+
when /\A(decrement|increment)\z/
|
213
213
|
puts "#{$1} not supported in unsupervised mode"
|
214
214
|
exit(1)
|
215
215
|
when 'restart'
|
@@ -217,7 +217,7 @@ class Style
|
|
217
217
|
start
|
218
218
|
when 'start'
|
219
219
|
start
|
220
|
-
when
|
220
|
+
when /\A(stop|halt)\z/
|
221
221
|
stop
|
222
222
|
else
|
223
223
|
exit_with_error("Not a valid command: #{command}")
|
@@ -246,6 +246,14 @@ class Style
|
|
246
246
|
config.merge!(config_file_options(config[:config]))
|
247
247
|
config.merge!(config[:cliconfig])
|
248
248
|
end
|
249
|
+
|
250
|
+
# Clear the gem paths so that restarts can pick up gems that have been added
|
251
|
+
# since style was initially started
|
252
|
+
def reload_gems
|
253
|
+
Gem.clear_paths
|
254
|
+
# This is done by clear_paths starting with rubygems-0.9.4.4
|
255
|
+
Gem.instance_variable_set(:@searcher, nil) if Gem::RubyGemsVersion < '0.9.4.4'
|
256
|
+
end
|
249
257
|
|
250
258
|
# Restart stopping children by waiting on them. If the children have died and
|
251
259
|
# are in the list of children, restart them.
|
@@ -298,6 +306,7 @@ class Style
|
|
298
306
|
# Restart Children
|
299
307
|
Dir.chdir(config[:directory]) rescue nil
|
300
308
|
reload_config
|
309
|
+
reload_gems
|
301
310
|
supervisor_restart_children
|
302
311
|
end
|
303
312
|
trap(:INT) do
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-style
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2008-
|
6
|
+
version: 1.1.3
|
7
|
+
date: 2008-03-05 00:00:00 -08:00
|
8
8
|
summary: Supervised TCPServer, Yielding Listeners Easily
|
9
9
|
require_paths:
|
10
10
|
- lib
|