passenger 5.0.21 → 5.0.22

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.

Files changed (203) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +38 -2
  5. data/CONTRIBUTORS +3 -0
  6. data/README.md +5 -1
  7. data/bin/passenger-status +2 -7
  8. data/build/agent.rb +2 -0
  9. data/build/cxx_dependency_map.rb +1464 -162
  10. data/build/node_tests.rb +1 -1
  11. data/build/packaging.rb +1 -1
  12. data/dev/ci/run_travis.sh +1 -1
  13. data/dev/vagrant/provision.sh +1 -1
  14. data/npm-shrinkwrap.json +635 -125
  15. data/package.json +1 -1
  16. data/resources/templates/standalone/config.erb +33 -161
  17. data/resources/templates/standalone/global.erb +15 -0
  18. data/resources/templates/standalone/http.erb +40 -0
  19. data/resources/templates/standalone/mass_deployment_default_server.erb +11 -0
  20. data/resources/templates/standalone/rails_asset_pipeline.erb +22 -0
  21. data/resources/templates/standalone/server.erb +58 -0
  22. data/src/agent/Core/ApiServer.h +37 -32
  23. data/src/agent/Core/ApplicationPool/BasicGroupInfo.h +1 -1
  24. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +6 -0
  25. data/src/agent/Core/ApplicationPool/Common.h +1 -1
  26. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
  27. data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +4 -0
  28. data/src/agent/Core/ApplicationPool/Implementation.cpp +2 -2
  29. data/src/agent/Core/ApplicationPool/Options.h +18 -1
  30. data/src/agent/Core/ApplicationPool/Pool.h +1 -1
  31. data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +6 -6
  32. data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +3 -3
  33. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +1 -1
  34. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +6 -0
  35. data/src/agent/Core/ApplicationPool/Process.h +6 -1
  36. data/src/agent/Core/ApplicationPool/Socket.h +9 -12
  37. data/src/agent/Core/Controller.h +422 -0
  38. data/src/agent/Core/{RequestHandler → Controller}/AppResponse.h +2 -0
  39. data/src/agent/Core/{RequestHandler → Controller}/BufferBody.cpp +27 -5
  40. data/src/agent/Core/{RequestHandler → Controller}/CheckoutSession.cpp +61 -31
  41. data/src/agent/Core/{RequestHandler → Controller}/Client.h +5 -2
  42. data/src/agent/Core/{RequestHandler → Controller}/ForwardResponse.cpp +93 -42
  43. data/src/agent/Core/{RequestHandler → Controller}/Hooks.cpp +107 -60
  44. data/src/agent/Core/Controller/Implementation.cpp +38 -0
  45. data/src/agent/Core/{RequestHandler → Controller}/InitRequest.cpp +134 -80
  46. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +165 -0
  47. data/src/agent/Core/{RequestHandler/Utils.cpp → Controller/InternalUtils.cpp} +49 -32
  48. data/src/agent/Core/Controller/Miscellaneous.cpp +116 -0
  49. data/src/agent/Core/{RequestHandler → Controller}/Request.h +6 -4
  50. data/src/agent/Core/{RequestHandler → Controller}/SendRequest.cpp +205 -130
  51. data/src/agent/Core/Controller/StateInspectionAndConfiguration.cpp +161 -0
  52. data/src/agent/Core/{RequestHandler → Controller}/TurboCaching.h +3 -0
  53. data/src/agent/Core/CoreMain.cpp +62 -51
  54. data/src/agent/Core/OptionParser.h +24 -0
  55. data/src/agent/Core/ResponseCache.h +5 -5
  56. data/src/agent/Core/SpawningKit/Config.h +2 -2
  57. data/src/agent/Core/SpawningKit/SmartSpawner.h +1 -1
  58. data/src/agent/Core/UnionStation/{Core.h → Context.h} +14 -18
  59. data/src/agent/Core/UnionStation/StopwatchLog.h +3 -2
  60. data/src/agent/Core/UnionStation/Transaction.h +7 -7
  61. data/src/agent/Shared/ApiServerUtils.h +9 -1
  62. data/src/agent/UstRouter/ApiServer.h +5 -2
  63. data/src/agent/UstRouter/Controller.h +27 -9
  64. data/src/agent/UstRouter/UstRouterMain.cpp +1 -0
  65. data/src/agent/Watchdog/ApiServer.h +5 -2
  66. data/src/apache2_module/ConfigurationCommands.cpp +7 -0
  67. data/src/apache2_module/ConfigurationFields.hpp +2 -0
  68. data/src/apache2_module/ConfigurationSetters.cpp +24 -0
  69. data/src/apache2_module/CreateDirConfig.cpp +1 -0
  70. data/src/apache2_module/Hooks.cpp +6 -5
  71. data/src/apache2_module/MergeDirConfig.cpp +7 -0
  72. data/src/apache2_module/SetHeaders.cpp +5 -0
  73. data/src/cxx_supportlib/Constants.h +5 -3
  74. data/src/cxx_supportlib/SafeLibev.h +2 -1
  75. data/src/cxx_supportlib/UnionStationFilterSupport.h +2 -1
  76. data/src/cxx_supportlib/Utils/ReleaseableScopedPointer.h +70 -0
  77. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_raw_buffer.cpp +6 -6
  78. data/src/helper-scripts/node-loader.js +59 -0
  79. data/src/nginx_module/CacheLocationConfig.c +48 -0
  80. data/src/nginx_module/ConfigurationCommands.c +20 -0
  81. data/src/nginx_module/ConfigurationFields.h +4 -0
  82. data/src/nginx_module/CreateLocationConfig.c +8 -0
  83. data/src/nginx_module/MergeLocationConfig.c +12 -0
  84. data/src/nodejs_supportlib/phusion_passenger/log_express.js +106 -0
  85. data/src/nodejs_supportlib/phusion_passenger/log_mongodb.js +203 -0
  86. data/src/nodejs_supportlib/phusion_passenger/ustreporter.js +227 -0
  87. data/src/nodejs_supportlib/phusion_passenger/ustrouter_connector.js +446 -0
  88. data/src/nodejs_supportlib/vendor-copy/codify/codify.js +44 -0
  89. data/src/nodejs_supportlib/vendor-copy/codify/package.json +29 -0
  90. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/context.js +200 -0
  91. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/glue.js +488 -0
  92. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/index.js +407 -0
  93. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/node_modules/shimmer/index.js +90 -0
  94. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/node_modules/shimmer/package.json +40 -0
  95. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/package.json +54 -0
  96. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/listener.js +160 -0
  97. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/node_modules/shimmer/index.js +90 -0
  98. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/node_modules/shimmer/package.json +40 -0
  99. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/package.json +46 -0
  100. data/src/nodejs_supportlib/vendor-copy/continuation-local-storage/package.json +56 -0
  101. data/src/nodejs_supportlib/vendor-copy/network-byte-order/lib/index.js +102 -0
  102. data/src/nodejs_supportlib/vendor-copy/network-byte-order/package.json +51 -0
  103. data/src/nodejs_supportlib/vendor-copy/winston/LICENSE +19 -0
  104. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston.js +165 -0
  105. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/common.js +483 -0
  106. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config.js +62 -0
  107. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/cli-config.js +35 -0
  108. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/npm-config.js +27 -0
  109. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/syslog-config.js +31 -0
  110. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/container.js +127 -0
  111. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/exception.js +56 -0
  112. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/logger.js +701 -0
  113. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports.js +34 -0
  114. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/console.js +128 -0
  115. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/daily-rotate-file.js +601 -0
  116. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/file.js +675 -0
  117. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/http.js +232 -0
  118. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/memory.js +89 -0
  119. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/transport.js +135 -0
  120. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/webhook.js +146 -0
  121. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/async/LICENSE +19 -0
  122. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/async/lib/async.js +1283 -0
  123. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/async/package.json +66 -0
  124. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/async/support/sync-package-managers.js +53 -0
  125. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/MIT-LICENSE.txt +23 -0
  126. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/colors.js +176 -0
  127. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/custom/trap.js +45 -0
  128. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/custom/zalgo.js +104 -0
  129. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/extendStringPrototype.js +118 -0
  130. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/index.js +12 -0
  131. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/america.js +12 -0
  132. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/rainbow.js +13 -0
  133. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/random.js +8 -0
  134. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/zebra.js +5 -0
  135. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/styles.js +77 -0
  136. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/system/supports-colors.js +61 -0
  137. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/package.json +35 -0
  138. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/safe.js +9 -0
  139. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/themes/generic-logging.js +12 -0
  140. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/cycle/cycle.js +170 -0
  141. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/cycle/package.json +30 -0
  142. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/LICENSE +20 -0
  143. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/lib/eyes.js +236 -0
  144. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/package.json +42 -0
  145. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/LICENSE.md +11 -0
  146. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/isstream.js +27 -0
  147. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/package.json +42 -0
  148. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/LICENSE +19 -0
  149. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/lib/pkginfo.js +136 -0
  150. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/package.json +56 -0
  151. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/License +19 -0
  152. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/lib/stack-trace.js +111 -0
  153. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/package.json +33 -0
  154. data/src/nodejs_supportlib/vendor-copy/winston/package.json +87 -0
  155. data/src/ruby_supportlib/phusion_passenger.rb +3 -4
  156. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +19 -2
  157. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +8 -0
  158. data/src/ruby_supportlib/phusion_passenger/config/list_instances_command.rb +2 -6
  159. data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +13 -0
  160. data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +3 -0
  161. data/src/ruby_supportlib/phusion_passenger/config/utils.rb +9 -7
  162. data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +8 -1
  163. data/src/ruby_supportlib/phusion_passenger/constants.rb +3 -1
  164. data/src/ruby_supportlib/phusion_passenger/native_support.rb +20 -4
  165. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +8 -0
  166. data/src/ruby_supportlib/phusion_passenger/packaging.rb +1 -0
  167. data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +1 -1
  168. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +11 -4
  169. data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
  170. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +647 -0
  171. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +229 -15
  172. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +35 -323
  173. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +36 -12
  174. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +123 -14
  175. data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +32 -17
  176. data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +32 -21
  177. data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +5 -5
  178. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README.md +2 -2
  179. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Rakefile +5 -1
  180. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +68 -24
  181. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +9 -1
  182. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/context.rb +9 -7
  183. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter.rb +3 -2
  184. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/basics.rb +8 -5
  185. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/simple_json.rb +395 -0
  186. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb +10 -7
  187. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/utils.rb +14 -0
  188. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +2 -2
  189. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml +4 -2
  190. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.example +2 -2
  191. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis +2 -2
  192. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis-with-sudo +16 -0
  193. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile +1 -1
  194. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile.lock +2 -2
  195. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/README.md +1 -1
  196. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails.rb +44 -17
  197. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_cache_subscriber.rb +16 -7
  198. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version_data.rb +2 -2
  199. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/union_station_hooks_rails.gemspec +1 -1
  200. metadata +99 -16
  201. metadata.gz.asc +7 -7
  202. data/resources/oss-binaries.phusionpassenger.com.crt +0 -248
  203. data/src/agent/Core/RequestHandler.h +0 -471
@@ -31,9 +31,10 @@ module UnionStationHooks
31
31
  class Transaction
32
32
  attr_reader :txn_id
33
33
 
34
- def initialize(connection, txn_id)
34
+ def initialize(connection, txn_id, delta_monotonic = 0)
35
35
  @connection = connection
36
36
  @txn_id = txn_id
37
+ @delta_monotonic = delta_monotonic
37
38
  if connection
38
39
  raise ArgumentError, 'Transaction ID required' if txn_id.nil?
39
40
  connection.ref
@@ -83,35 +84,37 @@ module UnionStationHooks
83
84
  end
84
85
 
85
86
  def log_activity_begin(name, time = UnionStationHooks.now, extra_info = nil)
87
+ monotime = Utils.encoded_monotime_now(@delta_monotonic)
86
88
  if extra_info
87
89
  extra_info_base64 = Utils.base64(extra_info)
88
90
  else
89
91
  extra_info_base64 = nil
90
92
  end
91
93
  if time.is_a?(TimePoint)
92
- message "BEGIN: #{name} (#{Utils.encoded_timestamp(time)}," \
94
+ message "BEGIN: #{name} (#{monotime}," \
93
95
  "#{time.utime.to_s(36)},#{time.stime.to_s(36)}) " \
94
96
  "#{extra_info_base64}"
95
97
  else
96
- message "BEGIN: #{name} (#{Utils.encoded_timestamp(time)})" \
98
+ message "BEGIN: #{name} (#{monotime})" \
97
99
  " #{extra_info_base64}"
98
100
  end
99
101
  end
100
102
 
101
103
  def log_activity_end(name, time = UnionStationHooks.now, has_error = false)
104
+ monotime = Utils.encoded_monotime_now(@delta_monotonic)
102
105
  if time.is_a?(TimePoint)
103
106
  if has_error
104
- message "FAIL: #{name} (#{Utils.encoded_timestamp(time)}," \
107
+ message "FAIL: #{name} (#{monotime}," \
105
108
  "#{time.utime.to_s(36)},#{time.stime.to_s(36)})"
106
109
  else
107
- message "END: #{name} (#{Utils.encoded_timestamp(time)}," \
110
+ message "END: #{name} (#{monotime}," \
108
111
  "#{time.utime.to_s(36)},#{time.stime.to_s(36)})"
109
112
  end
110
113
  else
111
114
  if has_error
112
- message "FAIL: #{name} (#{Utils.encoded_timestamp(time)})"
115
+ message "FAIL: #{name} (#{monotime})"
113
116
  else
114
- message "END: #{name} (#{Utils.encoded_timestamp(time)})"
117
+ message "END: #{name} (#{monotime})"
115
118
  end
116
119
  end
117
120
  end
@@ -89,6 +89,20 @@ module UnionStationHooks
89
89
  end
90
90
  end
91
91
 
92
+ if Process.const_defined?(:CLOCK_MONOTONIC)
93
+ def encoded_monotime_now(delta_monotonic)
94
+ time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
95
+ timestamp = (time * 1_000_000).to_i
96
+ timestamp.to_s(36)
97
+ end
98
+ else
99
+ def encoded_monotime_now(delta_monotonic)
100
+ time = Time.now
101
+ timestamp = time.to_i * 1_000_000 + time.usec - delta_monotonic
102
+ timestamp.to_s(36)
103
+ end
104
+ end
105
+
92
106
  def encoded_timestamp(time = Time.now)
93
107
  timestamp = time.to_i * 1_000_000 + time.usec
94
108
  timestamp.to_s(36)
@@ -39,6 +39,6 @@
39
39
  {
40
40
  :major => 2,
41
41
  :minor => 0,
42
- :tiny => 1,
43
- :string => '2.0.1'
42
+ :tiny => 5,
43
+ :string => '2.0.5'
44
44
  }
@@ -1,2 +1,4 @@
1
- - name: Ruby 1.9.3
2
- command: rvm-exec ruby-1.9.3-p547 bundle exec ruby
1
+ #- name: Ruby 1.9.3
2
+ # command: rvm-exec ruby-1.9.3-p547 bundle exec ruby
3
+ - name: Ruby 2.2.3
4
+ command: rvm-exec ruby-2.2.3 ruby
@@ -12,5 +12,5 @@
12
12
  command: rvm-exec ruby-1.9.3-p547 bundle exec ruby
13
13
  - name: Ruby 2.2.1
14
14
  command: rvm-exec ruby-2.2.1 ruby
15
- - name: JRuby 9.0.0.0
16
- command: rvm-exec jruby-9.0.0.0.pre1 ruby --dev
15
+ - name: JRuby 9.0.4.0
16
+ command: rvm-exec jruby-9.0.4.0 ruby --dev
@@ -7,9 +7,9 @@
7
7
  # example below, this is the case for Ruby 1.9.3.
8
8
 
9
9
  - name: Ruby 1.8.7
10
- command: rvm-exec ruby-1.8.7 ruby
10
+ command: rvm-exec ruby-1.8.7-p374 ruby
11
11
  - name: Ruby 1.9.3
12
- command: rvm-exec ruby-1.9.3 bundle exec ruby
12
+ command: rvm-exec ruby-1.9.3-p551 bundle exec ruby
13
13
  - name: Ruby 2.1.5
14
14
  command: rvm-exec ruby-2.1.5 ruby
15
15
  - name: Ruby 2.2.0
@@ -0,0 +1,16 @@
1
+ # This configuration file tells the test suite which Ruby interpreters to
2
+ # test against. Below is an example utilizing RVM.
3
+ #
4
+ # If you want test coverage reporting via simplecov to work, then this list
5
+ # must contain the main Ruby interpreter that you are using, and the entry
6
+ # for that Ruby interpreter must execute Ruby through 'bundle exec'. In the
7
+ # example below, this is the case for Ruby 1.9.3.
8
+
9
+ - name: Ruby 1.8.7
10
+ command: rvm-exec ruby-1.8.7-p374 ruby
11
+ - name: Ruby 1.9.3
12
+ command: rvm-exec ruby-1.9.3-p551 bundle exec ruby
13
+ - name: Ruby 2.1.5
14
+ command: rvm-exec ruby-2.1.5 ruby
15
+ - name: Ruby 2.2.0
16
+ command: rvm-exec ruby-2.2.0 ruby
@@ -7,7 +7,7 @@ gem 'rspec'
7
7
  # the version in union_station_hooks_rails.gemspec
8
8
  # and union_station_hooks_rails.rb method
9
9
  # `require_and_check_union_station_hooks_core`.
10
- gem 'union_station_hooks_core', '~> 2.0'
10
+ gem 'union_station_hooks_core', '~> 2.0.4'
11
11
 
12
12
  group :notravis do
13
13
  gem 'rubocop'
@@ -30,7 +30,7 @@ GEM
30
30
  rainbow (>= 1.99.1, < 3.0)
31
31
  ruby-progressbar (~> 1.4)
32
32
  ruby-progressbar (1.7.5)
33
- union_station_hooks_core (2.0.0)
33
+ union_station_hooks_core (2.0.4)
34
34
 
35
35
  PLATFORMS
36
36
  ruby
@@ -39,7 +39,7 @@ DEPENDENCIES
39
39
  rake
40
40
  rspec
41
41
  rubocop
42
- union_station_hooks_core (~> 2.0)
42
+ union_station_hooks_core (~> 2.0.4)
43
43
 
44
44
  BUNDLED WITH
45
45
  1.10.6
@@ -1,4 +1,4 @@
1
- # Union Station Ruby hooks rails
1
+ # Union Station Ruby on Rails hooks
2
2
 
3
3
  [![Build Status](https://travis-ci.org/phusion/union_station_hooks_rails.svg?branch=master)](https://travis-ci.org/phusion/union_station_hooks_rails)
4
4
 
@@ -89,20 +89,41 @@ module UnionStationHooksRails
89
89
  return false if !should_initialize?
90
90
  return true if initialized?
91
91
 
92
- require_lib('initialize')
93
- require_lib('active_record_subscriber')
94
- require_lib('exception_logger')
95
- if defined?(ActionView)
96
- require_lib('action_view_subscriber')
97
- end
98
- if defined?(ActiveSupport::Cache::Store)
99
- require_lib('active_support_cache_subscriber')
100
- end
101
- if defined?(ActionController::Base)
102
- require_lib('action_controller_extension')
103
- end
104
- if defined?(ActiveSupport::Benchmarkable)
105
- require_lib('active_support_benchmarkable_extension')
92
+ begin
93
+ require_lib('initialize')
94
+ require_lib('active_record_subscriber')
95
+ require_lib('exception_logger')
96
+ if defined?(ActionView)
97
+ require_lib('action_view_subscriber')
98
+ end
99
+ if defined?(ActiveSupport::Cache::Store)
100
+ require_lib('active_support_cache_subscriber')
101
+ end
102
+ if defined?(ActionController::Base)
103
+ require_lib('action_controller_extension')
104
+ end
105
+ if defined?(ActiveSupport::Benchmarkable)
106
+ require_lib('active_support_benchmarkable_extension')
107
+ end
108
+ rescue => e
109
+ if UnionStationHooks.config[:initialize_from_check]
110
+ # The union_station_hooks_core gem already reported the error
111
+ # to Union Station.
112
+ STDERR.puts(' *** WARNING: an error occurred while initializing ' \
113
+ 'the Union Station Rails hooks. This is because you did not ' \
114
+ 'initialize the Union Station hooks from an initializer file. ' \
115
+ 'Please create an initializer file ' \
116
+ '`config/initializers/union_station.rb` in which you call ' \
117
+ "this:\n\n" \
118
+ " if defined?(UnionStationHooks)\n" \
119
+ " UnionStationHooks.initialize!\n" \
120
+ " end\n\n" \
121
+ "The error is as follows:\n" \
122
+ "#{e} (#{e.class})\n " +
123
+ e.backtrace.join("\n "))
124
+ else
125
+ raise e
126
+ end
106
127
  end
107
128
 
108
129
  @@initialized = true
@@ -157,14 +178,20 @@ module UnionStationHooksRails
157
178
  # If you update the dependency version here, also update
158
179
  # the version in the gemspec and in the Gemfile.
159
180
  compatible = UnionStationHooks::MAJOR_VERSION == 2 &&
160
- UnionStationHooks::MINOR_VERSION >= 0
181
+ ush_core_minor_and_tiny_version_compatible?
161
182
  if !compatible
162
183
  raise "This version of the union_station_hooks_rails gem " \
163
184
  "(#{VERSION_STRING}) is only compatible with the " \
164
- "union_station_hooks_core gem 2.x.x. However, you have loaded " \
165
- "union_station_hooks_core #{UnionStationHooks::VERSION_STRING}"
185
+ "union_station_hooks_core gem 2.x.x, starting from v2.0.3. " \
186
+ "However, you have loaded union_station_hooks_core #{UnionStationHooks::VERSION_STRING}"
166
187
  end
167
188
  end
189
+
190
+ # @private
191
+ def ush_core_minor_and_tiny_version_compatible?
192
+ UnionStationHooks::MINOR_VERSION >= 1 ||
193
+ UnionStationHooks::TINY_VERSION >= 4
194
+ end
168
195
  end
169
196
  end
170
197
 
@@ -55,14 +55,23 @@ module UnionStationHooksRails
55
55
  end
56
56
  end
57
57
 
58
- ActiveSupport::Cache::Store.instrument = true
58
+ # Instrumentation is always on since 4.2. This method will be removed in Rails 5.
59
+ if defined?(ActiveSupport::Cache::Store) &&
60
+ ActiveSupport::Cache::Store.respond_to?(:instrument=)
59
61
 
60
- if defined?(PhusionPassenger)
61
- PhusionPassenger.on_event(:starting_request_handler_thread) do
62
- if defined?(ActiveSupport::Cache::Store)
63
- # This flag is thread-local, so re-initialize it for every
64
- # request handler thread.
65
- ActiveSupport::Cache::Store.instrument = true
62
+ ActiveSupport::Deprecation.silence do
63
+ ActiveSupport::Cache::Store.instrument = true
64
+ end
65
+
66
+ if defined?(PhusionPassenger)
67
+ PhusionPassenger.on_event(:starting_request_handler_thread) do
68
+ if defined?(ActiveSupport::Cache::Store)
69
+ ActiveSupport::Deprecation.silence do
70
+ # This flag is thread-local, so re-initialize it for every
71
+ # request handler thread.
72
+ ActiveSupport::Cache::Store.instrument = true
73
+ end
74
+ end
66
75
  end
67
76
  end
68
77
  end
@@ -39,6 +39,6 @@
39
39
  {
40
40
  :major => 2,
41
41
  :minor => 0,
42
- :tiny => 0,
43
- :string => '2.0.0'
42
+ :tiny => 1,
43
+ :string => '2.0.1'
44
44
  }
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  # If you update the dependency version here, also update
22
22
  # the version in Gemfile and union_station_hooks_rails.rb method
23
23
  # `require_and_check_union_station_hooks_core`
24
- s.add_dependency("union_station_hooks_core", "~> 2.0")
24
+ s.add_dependency("union_station_hooks_core", "~> 2.0.4")
25
25
 
26
26
  s.add_dependency("activesupport", ">= 3.0")
27
27
  s.add_dependency("activemodel", ">= 3.0")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.21
4
+ version: 5.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -216,7 +216,6 @@ files:
216
216
  - package.json
217
217
  - passenger.gemspec
218
218
  - resources/mime.types
219
- - resources/oss-binaries.phusionpassenger.com.crt
220
219
  - resources/release.txt
221
220
  - resources/standalone_default_root/index.html
222
221
  - resources/templates/apache2/apache_install_broken.txt.erb
@@ -266,6 +265,11 @@ files:
266
265
  - resources/templates/nginx/welcome.txt.erb
267
266
  - resources/templates/standalone/cannot_write_to_dir.txt.erb
268
267
  - resources/templates/standalone/config.erb
268
+ - resources/templates/standalone/global.erb
269
+ - resources/templates/standalone/http.erb
270
+ - resources/templates/standalone/mass_deployment_default_server.erb
271
+ - resources/templates/standalone/rails_asset_pipeline.erb
272
+ - resources/templates/standalone/server.erb
269
273
  - resources/templates/undisclosed_error.html.template
270
274
  - resources/union_station_gateway.crt
271
275
  - src/README.md
@@ -301,20 +305,24 @@ files:
301
305
  - src/agent/Core/ApplicationPool/Process.h
302
306
  - src/agent/Core/ApplicationPool/Session.h
303
307
  - src/agent/Core/ApplicationPool/Socket.h
308
+ - src/agent/Core/Controller.h
309
+ - src/agent/Core/Controller/AppResponse.h
310
+ - src/agent/Core/Controller/BufferBody.cpp
311
+ - src/agent/Core/Controller/CheckoutSession.cpp
312
+ - src/agent/Core/Controller/Client.h
313
+ - src/agent/Core/Controller/ForwardResponse.cpp
314
+ - src/agent/Core/Controller/Hooks.cpp
315
+ - src/agent/Core/Controller/Implementation.cpp
316
+ - src/agent/Core/Controller/InitRequest.cpp
317
+ - src/agent/Core/Controller/InitializationAndShutdown.cpp
318
+ - src/agent/Core/Controller/InternalUtils.cpp
319
+ - src/agent/Core/Controller/Miscellaneous.cpp
320
+ - src/agent/Core/Controller/Request.h
321
+ - src/agent/Core/Controller/SendRequest.cpp
322
+ - src/agent/Core/Controller/StateInspectionAndConfiguration.cpp
323
+ - src/agent/Core/Controller/TurboCaching.h
304
324
  - src/agent/Core/CoreMain.cpp
305
325
  - src/agent/Core/OptionParser.h
306
- - src/agent/Core/RequestHandler.h
307
- - src/agent/Core/RequestHandler/AppResponse.h
308
- - src/agent/Core/RequestHandler/BufferBody.cpp
309
- - src/agent/Core/RequestHandler/CheckoutSession.cpp
310
- - src/agent/Core/RequestHandler/Client.h
311
- - src/agent/Core/RequestHandler/ForwardResponse.cpp
312
- - src/agent/Core/RequestHandler/Hooks.cpp
313
- - src/agent/Core/RequestHandler/InitRequest.cpp
314
- - src/agent/Core/RequestHandler/Request.h
315
- - src/agent/Core/RequestHandler/SendRequest.cpp
316
- - src/agent/Core/RequestHandler/TurboCaching.h
317
- - src/agent/Core/RequestHandler/Utils.cpp
318
326
  - src/agent/Core/ResponseCache.h
319
327
  - src/agent/Core/SpawningKit/BackgroundIOCapturer.h
320
328
  - src/agent/Core/SpawningKit/Config.h
@@ -328,7 +336,7 @@ files:
328
336
  - src/agent/Core/SpawningKit/Spawner.h
329
337
  - src/agent/Core/SpawningKit/UserSwitchingRules.h
330
338
  - src/agent/Core/UnionStation/Connection.h
331
- - src/agent/Core/UnionStation/Core.h
339
+ - src/agent/Core/UnionStation/Context.h
332
340
  - src/agent/Core/UnionStation/StopwatchLog.h
333
341
  - src/agent/Core/UnionStation/Transaction.h
334
342
  - src/agent/README.md
@@ -462,6 +470,7 @@ files:
462
470
  - src/cxx_supportlib/Utils/MessagePassing.h
463
471
  - src/cxx_supportlib/Utils/OptionParsing.h
464
472
  - src/cxx_supportlib/Utils/ProcessMetricsCollector.h
473
+ - src/cxx_supportlib/Utils/ReleaseableScopedPointer.h
465
474
  - src/cxx_supportlib/Utils/ScopeGuard.h
466
475
  - src/cxx_supportlib/Utils/SpeedMeter.h
467
476
  - src/cxx_supportlib/Utils/StrIntUtils.cpp
@@ -2877,6 +2886,77 @@ files:
2877
2886
  - src/nginx_module/ngx_http_passenger_module.c
2878
2887
  - src/nginx_module/ngx_http_passenger_module.h
2879
2888
  - src/nodejs_supportlib/phusion_passenger/line_reader.js
2889
+ - src/nodejs_supportlib/phusion_passenger/log_express.js
2890
+ - src/nodejs_supportlib/phusion_passenger/log_mongodb.js
2891
+ - src/nodejs_supportlib/phusion_passenger/ustreporter.js
2892
+ - src/nodejs_supportlib/phusion_passenger/ustrouter_connector.js
2893
+ - src/nodejs_supportlib/vendor-copy/codify/codify.js
2894
+ - src/nodejs_supportlib/vendor-copy/codify/package.json
2895
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/context.js
2896
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/glue.js
2897
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/index.js
2898
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/node_modules/shimmer/index.js
2899
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/node_modules/shimmer/package.json
2900
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/async-listener/package.json
2901
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/listener.js
2902
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/node_modules/shimmer/index.js
2903
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/node_modules/shimmer/package.json
2904
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/node_modules/emitter-listener/package.json
2905
+ - src/nodejs_supportlib/vendor-copy/continuation-local-storage/package.json
2906
+ - src/nodejs_supportlib/vendor-copy/network-byte-order/lib/index.js
2907
+ - src/nodejs_supportlib/vendor-copy/network-byte-order/package.json
2908
+ - src/nodejs_supportlib/vendor-copy/winston/LICENSE
2909
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston.js
2910
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/common.js
2911
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/config.js
2912
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/cli-config.js
2913
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/npm-config.js
2914
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/syslog-config.js
2915
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/container.js
2916
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/exception.js
2917
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/logger.js
2918
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports.js
2919
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/console.js
2920
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/daily-rotate-file.js
2921
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/file.js
2922
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/http.js
2923
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/memory.js
2924
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/transport.js
2925
+ - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/webhook.js
2926
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/LICENSE
2927
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/lib/async.js
2928
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/package.json
2929
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/support/sync-package-managers.js
2930
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/MIT-LICENSE.txt
2931
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/colors.js
2932
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/custom/trap.js
2933
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/custom/zalgo.js
2934
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/extendStringPrototype.js
2935
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/index.js
2936
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/america.js
2937
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/rainbow.js
2938
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/random.js
2939
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/maps/zebra.js
2940
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/styles.js
2941
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/lib/system/supports-colors.js
2942
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/package.json
2943
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/safe.js
2944
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/themes/generic-logging.js
2945
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/cycle/cycle.js
2946
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/cycle/package.json
2947
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/LICENSE
2948
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/lib/eyes.js
2949
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/package.json
2950
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/LICENSE.md
2951
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/isstream.js
2952
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/package.json
2953
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/LICENSE
2954
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/lib/pkginfo.js
2955
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/package.json
2956
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/License
2957
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/lib/stack-trace.js
2958
+ - src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/package.json
2959
+ - src/nodejs_supportlib/vendor-copy/winston/package.json
2880
2960
  - src/ruby_native_extension/extconf.rb
2881
2961
  - src/ruby_native_extension/passenger_native_support.c
2882
2962
  - src/ruby_supportlib/phusion_passenger.rb
@@ -2948,6 +3028,7 @@ files:
2948
3028
  - src/ruby_supportlib/phusion_passenger/simple_benchmarking.rb
2949
3029
  - src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb
2950
3030
  - src/ruby_supportlib/phusion_passenger/standalone/command.rb
3031
+ - src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb
2951
3032
  - src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb
2952
3033
  - src/ruby_supportlib/phusion_passenger/standalone/control_utils.rb
2953
3034
  - src/ruby_supportlib/phusion_passenger/standalone/main.rb
@@ -2997,6 +3078,7 @@ files:
2997
3078
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/controllers.rb
2998
3079
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/misc.rb
2999
3080
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/view_rendering.rb
3081
+ - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/simple_json.rb
3000
3082
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/spec_helper.rb
3001
3083
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/time_point.rb
3002
3084
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb
@@ -3006,6 +3088,7 @@ files:
3006
3088
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml
3007
3089
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.example
3008
3090
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis
3091
+ - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis-with-sudo
3009
3092
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/union_station_hooks_core.gemspec
3010
3093
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile
3011
3094
  - src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile.lock