JasonKing-pulp 0.0.3 → 0.0.4
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.
- data/lib/passenger/config.rb +10 -6
- metadata +1 -1
data/lib/passenger/config.rb
CHANGED
@@ -13,7 +13,7 @@ module Passenger
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class Config
|
16
|
-
VERSION = '0.8.
|
16
|
+
VERSION = '0.8.3'
|
17
17
|
attr_reader :domain
|
18
18
|
attr_reader :ip
|
19
19
|
attr_reader :hosts
|
@@ -260,7 +260,7 @@ module Passenger
|
|
260
260
|
#
|
261
261
|
@_conf_strings = {
|
262
262
|
:vhost => /^\s*NameVirtualHost\s+(\S+)/i,
|
263
|
-
:load => %r{^\s*LoadModule\s+passenger_module\s+((/\S+)/lib/ruby/gems/\S+/passenger-([\d.]+))/ext/apache2/mod_passenger.so}i,
|
263
|
+
:load => %r{^\s*LoadModule\s+passenger_module\s+(((/\S+)/lib/ruby/gems/\S+/passenger-([\d.]+))/ext/apache2/mod_passenger.so)}i,
|
264
264
|
:root => %r{^\s*PassengerRoot\s+(['"]?)(/\S+/lib/ruby/gems/\S+/passenger-([\d.]+))\1}i,
|
265
265
|
:ruby => %r{^\s*PassengerRuby\s+(['"]?)(/\S+)/bin/ruby\1}i,
|
266
266
|
:renv => %r{^\s*RailsEnv\s+(['"]?)(\S+)\1}i
|
@@ -306,12 +306,12 @@ module Passenger
|
|
306
306
|
def ensure_conf
|
307
307
|
_need_re_read = false
|
308
308
|
unless @conf_files[:root]
|
309
|
-
add_to_conf( "PassengerRoot #{@conf_files[:load][:match][
|
309
|
+
add_to_conf( "PassengerRoot #{@conf_files[:load][:match][2]}", :load, :root )
|
310
310
|
_need_re_read = true
|
311
311
|
end
|
312
312
|
|
313
313
|
unless @conf_files[:ruby]
|
314
|
-
add_to_conf( "PassengerRuby #{@conf_files[:load][:match][
|
314
|
+
add_to_conf( "PassengerRuby #{@conf_files[:load][:match][3]}/bin/ruby", :root, :ruby )
|
315
315
|
_need_re_read = true
|
316
316
|
end
|
317
317
|
|
@@ -355,6 +355,10 @@ module Passenger
|
|
355
355
|
raise "LoadModule line missing, maybe you forgot to run: passenger-install-apache2-module"
|
356
356
|
end
|
357
357
|
|
358
|
+
unless File.exist?( _load_module_file = @conf_files[:load][:match][1])
|
359
|
+
raise "LoadModule file '#{_load_module_file}' missing, maybe you forgot to run: passenger-install-apache2-module"
|
360
|
+
end
|
361
|
+
|
358
362
|
_load_order = @conf_files[:load][:order]
|
359
363
|
[ :root, :ruby, :renv ].each do |s|
|
360
364
|
next unless @conf_files[s]
|
@@ -363,7 +367,7 @@ module Passenger
|
|
363
367
|
end
|
364
368
|
end
|
365
369
|
|
366
|
-
_load_passenger_location = @conf_files[:load][:match][
|
370
|
+
_load_passenger_location = @conf_files[:load][:match][2]
|
367
371
|
if @conf_files[:root]
|
368
372
|
unless _load_passenger_location == _root_passenger_location = @conf_files[:root][:match][2]
|
369
373
|
raise "Passenger module location #{_load_passenger_location} and PassengerRoot setting #{_root_passenger_location} should be the same."
|
@@ -379,7 +383,7 @@ module Passenger
|
|
379
383
|
end
|
380
384
|
end
|
381
385
|
|
382
|
-
_load_passenger_prefix = @conf_files[:load][:match][
|
386
|
+
_load_passenger_prefix = @conf_files[:load][:match][3]
|
383
387
|
if @conf_files[:ruby]
|
384
388
|
unless _load_passenger_prefix == _ruby_passenger_prefix = @conf_files[:ruby][:match][2]
|
385
389
|
raise "Passenger module prefix #{_load_passenger_prefix} and PassengerRuby prefix #{_ruby_passenger_prefix} should be the same."
|