passenger 3.0.0.pre3 → 3.0.0.pre4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

@@ -885,7 +885,7 @@ Attribution-Share Alike 3.0 Unported License</a>.</p></div>
885
885
  <div id="footnotes"><hr /></div>
886
886
  <div id="footer">
887
887
  <div id="footer-text">
888
- Last updated 2009-11-24 13:33:45 CET
888
+ Last updated 2010-09-25 20:09:08 CEST
889
889
  </div>
890
890
  </div>
891
891
  </body>
@@ -762,7 +762,7 @@ feel free to discuss it with us.</p></div>
762
762
  <div id="footnotes"><hr /></div>
763
763
  <div id="footer">
764
764
  <div id="footer-text">
765
- Last updated 2009-11-24 13:33:45 CET
765
+ Last updated 2010-09-25 20:09:08 CEST
766
766
  </div>
767
767
  </div>
768
768
  </body>
@@ -26,7 +26,7 @@
26
26
  #define _PASSENGER_CONSTANTS_H_
27
27
 
28
28
  /* Don't forget to update lib/phusion_passenger.rb too. */
29
- #define PASSENGER_VERSION "3.0.0.pre3"
29
+ #define PASSENGER_VERSION "3.0.0.pre4"
30
30
 
31
31
  #define FEEDBACK_FD 3
32
32
 
@@ -9,6 +9,18 @@ if ! test -f "$ngx_addon_dir/../common/libpassenger_common.a" || \
9
9
  fi
10
10
  fi
11
11
 
12
+ ngx_feature="Math library"
13
+ ngx_feature_name=
14
+ ngx_feature_run=no
15
+ ngx_feature_incs="#include <math.h>"
16
+ ngx_feature_path=
17
+ ngx_feature_libs="-lm"
18
+ ngx_feature_test="pow(1, 2)"
19
+ . auto/feature
20
+ if [ $ngx_found = yes ]; then
21
+ CORE_LIBS="$CORE_LIBS -lm"
22
+ fi
23
+
12
24
  ngx_addon_name=ngx_http_passenger_module
13
25
  HTTP_MODULES="$HTTP_MODULES ngx_http_passenger_module"
14
26
  NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
@@ -26,9 +38,6 @@ CORE_LIBS="$CORE_LIBS \
26
38
  ${ngx_addon_dir}/../common/libpassenger_common.a \
27
39
  ${ngx_addon_dir}/../common/libboost_oxt.a \
28
40
  -lstdc++ -lpthread"
29
- if test x`uname` = xOpenBSD; then
30
- CORE_LIBS="$CORE_LIBS -lm"
31
- fi
32
41
 
33
42
  nginx_version=`grep 'NGINX_VERSION ' src/core/nginx.h | awk '{ print $3 }' | sed 's/"//g'`
34
43
 
@@ -25,10 +25,10 @@ module PhusionPassenger
25
25
  ###### Version numbers ######
26
26
 
27
27
  # Phusion Passenger version number. Don't forget to edit ext/common/Constants.h too.
28
- VERSION_STRING = '3.0.0.pre3'
28
+ VERSION_STRING = '3.0.0.pre4'
29
29
 
30
30
  PREFERRED_NGINX_VERSION = '0.7.67'
31
- PREFERRED_PCRE_VERSION = '8.02'
31
+ PREFERRED_PCRE_VERSION = '8.10'
32
32
  STANDALONE_INTERFACE_VERSION = 1
33
33
 
34
34
 
@@ -97,7 +97,7 @@ module PlatformInfo
97
97
  end
98
98
 
99
99
  # Returns whether the Ruby interpreter supports process forking.
100
- def self.fork_supported?
100
+ def self.ruby_supports_fork?
101
101
  # MRI >= 1.9.2's respond_to? returns false for methods
102
102
  # that are not implemented.
103
103
  return Process.respond_to?(:fork) &&
@@ -108,7 +108,7 @@ module PlatformInfo
108
108
 
109
109
  # Returns the correct 'gem' command for this Ruby interpreter.
110
110
  def self.gem_command
111
- return locate_ruby_executable('gem')
111
+ return locate_ruby_tool('gem')
112
112
  end
113
113
  memoize :gem_command
114
114
 
@@ -119,7 +119,7 @@ module PlatformInfo
119
119
  # The return value may not be the actual correct invocation
120
120
  # for Rake. Use rake_command for that.
121
121
  def self.rake
122
- return locate_ruby_executable('rake')
122
+ return locate_ruby_tool('rake')
123
123
  end
124
124
  memoize :rake
125
125
 
@@ -146,7 +146,7 @@ module PlatformInfo
146
146
  # belongs to the current Ruby interpreter. Returns nil if it
147
147
  # doesn't exist.
148
148
  def self.rspec
149
- return locate_ruby_executable('spec')
149
+ return locate_ruby_tool('spec')
150
150
  end
151
151
  memoize :rspec
152
152
 
@@ -237,12 +237,32 @@ module PlatformInfo
237
237
  end
238
238
  end
239
239
 
240
- # Locate a Ruby tool command, e.g. 'gem', 'rake', 'bundle', etc. Instead of
240
+ # Locates a Ruby tool command, e.g. 'gem', 'rake', 'bundle', etc. Instead of
241
241
  # naively looking in $PATH, this function uses a variety of search heuristics
242
242
  # to find the command that's really associated with the current Ruby interpreter.
243
243
  # It should never locate a command that's actually associated with a different
244
244
  # Ruby interpreter.
245
- def self.locate_ruby_executable(name)
245
+ # Returns nil when nothing's found.
246
+ def self.locate_ruby_tool(name)
247
+ result = locate_ruby_tool_by_basename(name)
248
+ if !result
249
+ exeext = Config::CONFIG['EXEEXT']
250
+ exeext = nil if exeext.empty?
251
+ if exeext
252
+ result = locate_ruby_tool_by_basename("#{name}#{exeext}")
253
+ end
254
+ if !result
255
+ result = locate_ruby_tool_by_basename(transform_according_to_ruby_exec_format(name))
256
+ end
257
+ if !result && exeext
258
+ result = locate_ruby_tool_by_basename(transform_according_to_ruby_exec_format(name) + exeext)
259
+ end
260
+ end
261
+ return result
262
+ end
263
+
264
+ private
265
+ def self.locate_ruby_tool_by_basename(name)
246
266
  if RUBY_PLATFORM =~ /darwin/ &&
247
267
  ruby_command =~ %r(\A/System/Library/Frameworks/Ruby.framework/Versions/.*?/usr/bin/ruby\Z)
248
268
  # On OS X we must look for Ruby binaries in /usr/bin.
@@ -288,8 +308,8 @@ module PlatformInfo
288
308
 
289
309
  filename
290
310
  end
291
-
292
- private
311
+ private_class_method :locate_ruby_tool_by_basename
312
+
293
313
  def self.is_ruby_program?(filename)
294
314
  File.open(filename, 'rb') do |f|
295
315
  return f.readline =~ /ruby/
@@ -298,6 +318,21 @@ private
298
318
  return false
299
319
  end
300
320
  private_class_method :is_ruby_program?
321
+
322
+ # Deduce Ruby's --program-prefix and --program-suffix from its install name
323
+ # and transforms the given input name accordingly.
324
+ #
325
+ # transform_according_to_ruby_exec_format("rake") => "jrake", "rake1.8", etc
326
+ def self.transform_according_to_ruby_exec_format(name)
327
+ install_name = Config::CONFIG['RUBY_INSTALL_NAME']
328
+ if install_name.include?('ruby')
329
+ format = install_name.sub('ruby', '%s')
330
+ return sprintf(format, name)
331
+ else
332
+ return name
333
+ end
334
+ end
335
+ private_class_method :transform_according_to_ruby_exec_format
301
336
  end
302
337
 
303
338
  end # module PhusionPassenger
@@ -375,7 +375,7 @@ private
375
375
  pid = fork
376
376
  if pid
377
377
  # Parent
378
- exit!
378
+ exit!(0)
379
379
  else
380
380
  # Child
381
381
  trap "HUP", "IGNORE"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1876988210
4
+ hash: -1876988209
5
5
  prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 0
10
- - pre3
11
- version: 3.0.0.pre3
10
+ - pre4
11
+ version: 3.0.0.pre4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Phusion - http://www.phusion.nl/
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-20 00:00:00 +02:00
19
+ date: 2010-10-01 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency