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
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "pkginfo",
3
+ "version": "0.3.1",
4
+ "license": "MIT",
5
+ "description": "An easy way to expose properties on a module from a package.json",
6
+ "author": {
7
+ "name": "Charlie Robbins",
8
+ "email": "charlie.robbins@gmail.com"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+ssh://git@github.com/indexzero/node-pkginfo.git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/indexzero/node-pkginfo/issues"
16
+ },
17
+ "keywords": [
18
+ "info",
19
+ "tools",
20
+ "package.json"
21
+ ],
22
+ "devDependencies": {
23
+ "vows": "0.7.x"
24
+ },
25
+ "main": "./lib/pkginfo.js",
26
+ "scripts": {
27
+ "test": "vows test/*-test.js --spec"
28
+ },
29
+ "engines": {
30
+ "node": ">= 0.4.0"
31
+ },
32
+ "gitHead": "630fcf486543ee48b4c16afc575c0421fe039f26",
33
+ "homepage": "https://github.com/indexzero/node-pkginfo#readme",
34
+ "_id": "pkginfo@0.3.1",
35
+ "_shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21",
36
+ "_from": "pkginfo@0.3.x",
37
+ "_npmVersion": "2.14.1",
38
+ "_nodeVersion": "0.10.38",
39
+ "_npmUser": {
40
+ "name": "indexzero",
41
+ "email": "charlie.robbins@gmail.com"
42
+ },
43
+ "maintainers": [
44
+ {
45
+ "name": "indexzero",
46
+ "email": "charlie.robbins@gmail.com"
47
+ }
48
+ ],
49
+ "dist": {
50
+ "shasum": "5b29f6a81f70717142e09e765bbeab97b4f81e21",
51
+ "tarball": "http://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz"
52
+ },
53
+ "directories": {},
54
+ "_resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz",
55
+ "readme": "ERROR: No README data found!"
56
+ }
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,111 @@
1
+ exports.get = function(belowFn) {
2
+ var oldLimit = Error.stackTraceLimit;
3
+ Error.stackTraceLimit = Infinity;
4
+
5
+ var dummyObject = {};
6
+
7
+ var v8Handler = Error.prepareStackTrace;
8
+ Error.prepareStackTrace = function(dummyObject, v8StackTrace) {
9
+ return v8StackTrace;
10
+ };
11
+ Error.captureStackTrace(dummyObject, belowFn || exports.get);
12
+
13
+ var v8StackTrace = dummyObject.stack;
14
+ Error.prepareStackTrace = v8Handler;
15
+ Error.stackTraceLimit = oldLimit;
16
+
17
+ return v8StackTrace;
18
+ };
19
+
20
+ exports.parse = function(err) {
21
+ if (!err.stack) {
22
+ return [];
23
+ }
24
+
25
+ var self = this;
26
+ var lines = err.stack.split('\n').slice(1);
27
+
28
+ return lines
29
+ .map(function(line) {
30
+ if (line.match(/^\s*[-]{4,}$/)) {
31
+ return self._createParsedCallSite({
32
+ fileName: line,
33
+ lineNumber: null,
34
+ functionName: null,
35
+ typeName: null,
36
+ methodName: null,
37
+ columnNumber: null,
38
+ 'native': null,
39
+ });
40
+ }
41
+
42
+ var lineMatch = line.match(/at (?:(.+)\s+)?\(?(?:(.+?):(\d+):(\d+)|([^)]+))\)?/);
43
+ if (!lineMatch) {
44
+ return;
45
+ }
46
+
47
+ var object = null;
48
+ var method = null;
49
+ var functionName = null;
50
+ var typeName = null;
51
+ var methodName = null;
52
+ var isNative = (lineMatch[5] === 'native');
53
+
54
+ if (lineMatch[1]) {
55
+ var methodMatch = lineMatch[1].match(/([^\.]+)(?:\.(.+))?/);
56
+ object = methodMatch[1];
57
+ method = methodMatch[2];
58
+ functionName = lineMatch[1];
59
+ typeName = 'Object';
60
+ }
61
+
62
+ if (method) {
63
+ typeName = object;
64
+ methodName = method;
65
+ }
66
+
67
+ if (method === '<anonymous>') {
68
+ methodName = null;
69
+ functionName = '';
70
+ }
71
+
72
+ var properties = {
73
+ fileName: lineMatch[2] || null,
74
+ lineNumber: parseInt(lineMatch[3], 10) || null,
75
+ functionName: functionName,
76
+ typeName: typeName,
77
+ methodName: methodName,
78
+ columnNumber: parseInt(lineMatch[4], 10) || null,
79
+ 'native': isNative,
80
+ };
81
+
82
+ return self._createParsedCallSite(properties);
83
+ })
84
+ .filter(function(callSite) {
85
+ return !!callSite;
86
+ });
87
+ };
88
+
89
+ exports._createParsedCallSite = function(properties) {
90
+ var methods = {};
91
+ for (var property in properties) {
92
+ var prefix = 'get';
93
+ if (property === 'native') {
94
+ prefix = 'is';
95
+ }
96
+ var method = prefix + property.substr(0, 1).toUpperCase() + property.substr(1);
97
+
98
+ (function(property) {
99
+ methods[method] = function() {
100
+ return properties[property];
101
+ }
102
+ })(property);
103
+ }
104
+
105
+ var callSite = Object.create(methods);
106
+ for (var property in properties) {
107
+ callSite[property] = properties[property];
108
+ }
109
+
110
+ return callSite;
111
+ };
@@ -0,0 +1,33 @@
1
+ {
2
+ "author": {
3
+ "name": "Felix Geisendörfer",
4
+ "email": "felix@debuggable.com",
5
+ "url": "http://debuggable.com/"
6
+ },
7
+ "name": "stack-trace",
8
+ "description": "Get v8 stack traces as an array of CallSite objects.",
9
+ "version": "0.0.9",
10
+ "homepage": "https://github.com/felixge/node-stack-trace",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git://github.com/felixge/node-stack-trace.git"
14
+ },
15
+ "main": "./lib/stack-trace",
16
+ "engines": {
17
+ "node": "*"
18
+ },
19
+ "dependencies": {},
20
+ "devDependencies": {
21
+ "far": "0.0.3",
22
+ "long-stack-traces": "0.1.2"
23
+ },
24
+ "readme": "# stack-trace\n\nGet v8 stack traces as an array of CallSite objects.\n\n## Install\n\n``` bash\nnpm install stack-trace\n```\n\n## Usage\n\nThe stack-trace module makes it easy for you to capture the current stack:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar trace = stackTrace.get();\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nHowever, sometimes you have already popped the stack you are interested in,\nand all you have left is an `Error` object. This module can help:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar err = new Error('something went wrong');\nvar trace = stackTrace.parse(err);\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nPlease note that parsing the `Error#stack` property is not perfect, only\ncertain properties can be retrieved with it as noted in the API docs below.\n\n## Long stack traces\n\nstack-trace works great with [long-stack-traces][], when parsing an `err.stack`\nthat has crossed the event loop boundary, a `CallSite` object returning\n`'----------------------------------------'` for `getFileName()` is created.\nAll other methods of the event loop boundary call site return `null`.\n\n[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces\n\n## API\n\n### stackTrace.get([belowFn])\n\nReturns an array of `CallSite` objects, where element `0` is the current call\nsite.\n\nWhen passing a function on the current stack as the `belowFn` parameter, the\nreturned array will only include `CallSite` objects below this function.\n\n### stackTrace.parse(err)\n\nParses the `err.stack` property of an `Error` object into an array compatible\nwith those returned by `stackTrace.get()`. However, only the following methods\nare implemented on the returned `CallSite` objects.\n\n* getTypeName\n* getFunctionName\n* getMethodName\n* getFileName\n* getLineNumber\n* getColumnNumber\n* isNative\n\nNote: Except `getFunctionName()`, all of the above methods return exactly the\nsame values as you would get from `stackTrace.get()`. `getFunctionName()`\nis sometimes a little different, but still useful.\n\n### CallSite\n\nThe official v8 CallSite object API can be found [here][v8stackapi]. A quick\nexcerpt:\n\n> A CallSite object defines the following methods:\n>\n> * **getThis**: returns the value of this\n> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.\n> * **getFunction**: returns the current function\n> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.\n> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function\n> * **getFileName**: if this function was defined in a script returns the name of the script\n> * **getLineNumber**: if this function was defined in a script returns the current line number\n> * **getColumnNumber**: if this function was defined in a script returns the current column number\n> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called\n> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?\n> * **isEval**: does this call take place in code defined by a call to eval?\n> * **isNative**: is this call in native V8 code?\n> * **isConstructor**: is this a constructor call?\n\n[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n## License\n\nstack-trace is licensed under the MIT license.\n",
25
+ "readmeFilename": "Readme.md",
26
+ "bugs": {
27
+ "url": "https://github.com/felixge/node-stack-trace/issues"
28
+ },
29
+ "_id": "stack-trace@0.0.9",
30
+ "_shasum": "a8f6eaeca90674c333e7c43953f275b451510695",
31
+ "_from": "stack-trace@0.0.x",
32
+ "_resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz"
33
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "winston",
3
+ "description": "A multi-transport async logging library for Node.js",
4
+ "version": "1.1.2",
5
+ "author": {
6
+ "name": "Charlie Robbins",
7
+ "email": "charlie.robbins@gmail.com"
8
+ },
9
+ "maintainers": [
10
+ {
11
+ "name": "indexzero",
12
+ "email": "charlie.robbins@gmail.com"
13
+ },
14
+ {
15
+ "name": "chjj",
16
+ "email": "chjjeffrey@gmail.com"
17
+ },
18
+ {
19
+ "name": "jcrugzz",
20
+ "email": "jcrugzz@gmail.com"
21
+ },
22
+ {
23
+ "name": "pose",
24
+ "email": "albertopose@gmail.com"
25
+ },
26
+ {
27
+ "name": "v1",
28
+ "email": "info@3rd-Eden.com"
29
+ },
30
+ {
31
+ "name": "3rdeden",
32
+ "email": "npm@3rd-Eden.com"
33
+ }
34
+ ],
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/winstonjs/winston.git"
38
+ },
39
+ "keywords": [
40
+ "logging",
41
+ "sysadmin",
42
+ "tools"
43
+ ],
44
+ "dependencies": {
45
+ "async": "~1.0.0",
46
+ "colors": "1.0.x",
47
+ "cycle": "1.0.x",
48
+ "eyes": "0.1.x",
49
+ "isstream": "0.1.x",
50
+ "pkginfo": "0.3.x",
51
+ "stack-trace": "0.0.x"
52
+ },
53
+ "devDependencies": {
54
+ "hock": "1.x.x",
55
+ "std-mocks": "~1.0.0",
56
+ "vows": "0.7.x"
57
+ },
58
+ "main": "./lib/winston",
59
+ "scripts": {
60
+ "test": "vows --spec --isolate"
61
+ },
62
+ "engines": {
63
+ "node": ">= 0.8.0"
64
+ },
65
+ "license": "MIT",
66
+ "gitHead": "2064bfe3b0f3da77c798d248a1609dbc24ff077e",
67
+ "bugs": {
68
+ "url": "https://github.com/winstonjs/winston/issues"
69
+ },
70
+ "homepage": "https://github.com/winstonjs/winston#readme",
71
+ "_id": "winston@1.1.2",
72
+ "_shasum": "68edd769ff79d4f9528cf0e5d80021aade67480c",
73
+ "_from": "winston@^1.1.0",
74
+ "_npmVersion": "2.14.5",
75
+ "_nodeVersion": "0.12.7",
76
+ "_npmUser": {
77
+ "name": "indexzero",
78
+ "email": "charlie.robbins@gmail.com"
79
+ },
80
+ "dist": {
81
+ "shasum": "68edd769ff79d4f9528cf0e5d80021aade67480c",
82
+ "tarball": "http://registry.npmjs.org/winston/-/winston-1.1.2.tgz"
83
+ },
84
+ "directories": {},
85
+ "_resolved": "https://registry.npmjs.org/winston/-/winston-1.1.2.tgz",
86
+ "readme": "ERROR: No README data found!"
87
+ }
@@ -31,7 +31,7 @@ module PhusionPassenger
31
31
 
32
32
  PACKAGE_NAME = 'passenger'
33
33
  # Run 'rake src/cxx_supportlib/Constants.h' after changing this number.
34
- VERSION_STRING = '5.0.21'
34
+ VERSION_STRING = '5.0.22'
35
35
 
36
36
  PREFERRED_NGINX_VERSION = '1.8.0'
37
37
  NGINX_SHA256_CHECKSUM = '23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5'
@@ -212,9 +212,8 @@ module PhusionPassenger
212
212
  ###### Other resource locations ######
213
213
 
214
214
  def self.binaries_sites
215
- return [
216
- { :url => "https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release".freeze,
217
- :cacert => "#{resources_dir}/oss-binaries.phusionpassenger.com.crt".freeze },
215
+ [
216
+ { :url => "https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release".freeze },
218
217
  { :url => "https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release".freeze }
219
218
  ]
220
219
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  # Phusion Passenger - https://www.phusionpassenger.com/
3
- # Copyright (c) 2014 Phusion Holding B.V.
3
+ # Copyright (c) 2014-2015 Phusion Holding B.V.
4
4
  #
5
5
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  # trademarks of Phusion Holding B.V.
@@ -24,6 +24,8 @@
24
24
  # THE SOFTWARE.
25
25
 
26
26
  PhusionPassenger.require_passenger_lib 'constants'
27
+ PhusionPassenger.require_passenger_lib 'platform_info'
28
+ PhusionPassenger.require_passenger_lib 'platform_info/operating_system'
27
29
  PhusionPassenger.require_passenger_lib 'utils/json'
28
30
 
29
31
  module PhusionPassenger
@@ -59,7 +61,7 @@ module PhusionPassenger
59
61
  end
60
62
 
61
63
  def locked?
62
- if defined?(File::LOCK_EX)
64
+ if PlatformInfo.supports_flock?
63
65
  begin
64
66
  !File.open("#{@path}/lock", "r") do |f|
65
67
  f.flock(File::LOCK_EX | File::LOCK_NB)
@@ -109,10 +111,18 @@ module PhusionPassenger
109
111
  return response
110
112
  end
111
113
 
114
+ def watchdog_pid
115
+ properties["watchdog_pid"]
116
+ end
117
+
112
118
  def core_pid
113
119
  @core_pid ||= File.read("#{@path}/core.pid").to_i
114
120
  end
115
121
 
122
+ def web_server_control_process_pid
123
+ File.read("#{@path}/web_server_control_process.pid").to_i
124
+ end
125
+
116
126
  def full_admin_password
117
127
  @full_admin_password ||= File.read("#{@path}/full_admin_password.txt")
118
128
  end
@@ -121,6 +131,13 @@ module PhusionPassenger
121
131
  @read_only_admin_password ||= File.read("#{@path}/read_only_admin_password.txt")
122
132
  end
123
133
 
134
+ def as_json
135
+ json = properties
136
+ json["instance_dir"]["path"] = path
137
+ json["core_pid"] = core_pid
138
+ json
139
+ end
140
+
124
141
  private
125
142
  class CorruptedError < StandardError
126
143
  end
@@ -53,6 +53,8 @@
53
53
  # * function - If nil, a setter function will be automatically generated. If
54
54
  # non-nil, must be the name of the setter function.
55
55
 
56
+ PhusionPassenger.require_passenger_lib 'constants'
57
+
56
58
  APACHE2_DIRECTORY_CONFIGURATION_OPTIONS = [
57
59
  {
58
60
  :name => "PassengerRuby",
@@ -220,6 +222,12 @@ APACHE2_DIRECTORY_CONFIGURATION_OPTIONS = [
220
222
  :type => :string,
221
223
  :desc => "Application process group name."
222
224
  },
225
+ {
226
+ :name => "PassengerForceMaxConcurrentRequestsPerProcess",
227
+ :type => :integer,
228
+ :desc => "Force #{SHORT_PROGRAM_NAME} to believe that an application process " \
229
+ "can handle the given number of concurrent requests per process"
230
+ },
223
231
 
224
232
  ##### Aliases #####
225
233
 
@@ -89,17 +89,13 @@ module PhusionPassenger
89
89
  def print_json(instances)
90
90
  result = []
91
91
  instances.each do |instance|
92
- result << instance.properties
92
+ result << instance.as_json
93
93
  end
94
94
  puts PhusionPassenger::Utils::JSON.generate(result)
95
95
  end
96
96
 
97
97
  def print_instances(instances)
98
- printf "%-25s %s\n", "Name", "Description"
99
- puts "------------------------------------------------------------------"
100
- instances.each do |instance|
101
- printf "%-25s %s\n", instance.name, instance.server_software
102
- end
98
+ list_all_passenger_instances(instances, false)
103
99
  end
104
100
  end
105
101
 
@@ -72,6 +72,9 @@ module PhusionPassenger
72
72
  perform_reopen_logs_on("watchdog", "watchdog_api")
73
73
  perform_reinherit_logs_on("core", "core_api")
74
74
  perform_reinherit_logs_on("UstRouter", "ust_router_api")
75
+ if using_standalone_nginx_engine?
76
+ perform_reopen_logs_on_nginx
77
+ end
75
78
  puts "All done"
76
79
  end
77
80
 
@@ -115,6 +118,16 @@ module PhusionPassenger
115
118
  end
116
119
  end
117
120
 
121
+ def using_standalone_nginx_engine?
122
+ @instance.properties["integration_mode"] == "standalone" &&
123
+ @instance.properties["standalone_engine"] == "nginx"
124
+ end
125
+
126
+ def perform_reopen_logs_on_nginx
127
+ puts "Reopening logs for Nginx engine"
128
+ Process.kill('USR1', @instance.web_server_control_process_pid)
129
+ end
130
+
118
131
  def handle_error(name, response)
119
132
  json = PhusionPassenger::Utils::JSON.parse(response.body)
120
133
  if !should_ignore_error?(json)