passenger 6.1.4 → 6.1.5

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.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +6 -1
  3. data/Rakefile +1 -1
  4. data/build/agent.rb +15 -15
  5. data/build/apache2.rb +18 -18
  6. data/build/basics.rb +1 -1
  7. data/build/common_library.rb +21 -20
  8. data/build/cxx_tests.rb +19 -19
  9. data/build/integration_tests.rb +3 -3
  10. data/build/misc.rb +10 -9
  11. data/build/nginx.rb +12 -12
  12. data/build/oxt_tests.rb +7 -7
  13. data/build/packaging.rb +11 -11
  14. data/build/ruby_extension.rb +3 -3
  15. data/build/ruby_tests.rb +1 -1
  16. data/build/schema_printer.rb +13 -13
  17. data/build/support/cplusplus.rb +8 -8
  18. data/build/support/cxx_dependency_map.rb +622 -622
  19. data/build/support/general.rb +0 -1
  20. data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +4 -4
  21. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
  22. data/build/test_basics.rb +4 -4
  23. data/dev/colorize-logs +6 -6
  24. data/dev/copy_boost_headers +8 -8
  25. data/dev/index_cxx_dependencies.rb +6 -6
  26. data/dev/install_scripts_bootstrap_code.rb +4 -4
  27. data/dev/list_tests +2 -2
  28. data/dev/nginx_version_sha256 +2 -2
  29. data/dev/parse_file_descriptor_log +1 -1
  30. data/passenger.gemspec +4 -4
  31. data/src/agent/Core/Config.h +1 -1
  32. data/src/agent/Core/Controller/Config.h +1 -1
  33. data/src/agent/Watchdog/Config.h +1 -1
  34. data/src/cxx_supportlib/Constants.h +1 -1
  35. data/src/helper-scripts/backtrace-sanitizer.rb +2 -2
  36. data/src/helper-scripts/download_binaries/extconf.rb +8 -8
  37. data/src/helper-scripts/meteor-loader.rb +39 -39
  38. data/src/helper-scripts/rack-loader.rb +1 -0
  39. data/src/helper-scripts/rack-preloader.rb +2 -1
  40. data/src/ruby_native_extension/extconf.rb +27 -28
  41. data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +27 -27
  42. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +5 -4
  43. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +9 -8
  44. data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +24 -24
  45. data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +5 -5
  46. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +526 -526
  47. data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +1 -1
  48. data/src/ruby_supportlib/phusion_passenger/common_library.rb +105 -105
  49. data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +5 -5
  50. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +7 -6
  51. data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
  52. data/src/ruby_supportlib/phusion_passenger/config/command.rb +1 -1
  53. data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +1 -1
  54. data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +5 -5
  55. data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +1 -1
  56. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +17 -17
  57. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +18 -18
  58. data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +10 -10
  59. data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +12 -12
  60. data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +24 -23
  61. data/src/ruby_supportlib/phusion_passenger/config/main.rb +26 -26
  62. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +5 -4
  63. data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +1 -1
  64. data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +4 -4
  65. data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +14 -13
  66. data/src/ruby_supportlib/phusion_passenger/config/utils.rb +1 -1
  67. data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +34 -33
  68. data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +3 -2
  69. data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +2 -2
  70. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +35 -36
  71. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +17 -16
  72. data/src/ruby_supportlib/phusion_passenger/message_client.rb +5 -4
  73. data/src/ruby_supportlib/phusion_passenger/native_support.rb +42 -42
  74. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +548 -548
  75. data/src/ruby_supportlib/phusion_passenger/packaging.rb +6 -6
  76. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +85 -84
  77. data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +13 -13
  78. data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +5 -5
  79. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +65 -65
  80. data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +6 -6
  81. data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +5 -5
  82. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +10 -10
  83. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck.rb +6 -5
  84. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +7 -7
  85. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/libs.rb +1 -1
  86. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/ruby.rb +7 -7
  87. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/utilities.rb +1 -1
  88. data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +14 -13
  89. data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +27 -26
  90. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +16 -16
  91. data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +1 -1
  92. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +29 -28
  93. data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +2 -2
  94. data/src/ruby_supportlib/phusion_passenger/platform_info.rb +37 -36
  95. data/src/ruby_supportlib/phusion_passenger/plugin.rb +3 -3
  96. data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +16 -15
  97. data/src/ruby_supportlib/phusion_passenger/public_api.rb +1 -1
  98. data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +1 -1
  99. data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +5 -4
  100. data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +8 -7
  101. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +9 -11
  102. data/src/ruby_supportlib/phusion_passenger/request_handler.rb +27 -26
  103. data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +6 -5
  104. data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +7 -6
  105. data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +13 -13
  106. data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +1 -1
  107. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +351 -351
  108. data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +11 -11
  109. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +13 -14
  110. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +21 -23
  111. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +4 -4
  112. data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +5 -5
  113. data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +6 -6
  114. data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +1 -1
  115. data/src/ruby_supportlib/phusion_passenger/utils/download.rb +12 -11
  116. data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +9 -9
  117. data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +8 -7
  118. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +7 -6
  119. data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +4 -4
  120. data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +1 -1
  121. data/src/ruby_supportlib/phusion_passenger/utils/shellwords.rb +1 -1
  122. data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +1 -0
  123. data/src/ruby_supportlib/phusion_passenger/utils/tee_input.rb +1 -0
  124. data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +13 -12
  125. data/src/ruby_supportlib/phusion_passenger/utils/tmpio.rb +2 -3
  126. data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +7 -7
  127. data/src/ruby_supportlib/phusion_passenger/utils.rb +17 -16
  128. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +1 -0
  129. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +3 -2
  130. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +2 -1
  131. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +3 -2
  132. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +13 -13
  133. data/src/ruby_supportlib/phusion_passenger.rb +23 -22
  134. metadata +2 -2
@@ -85,256 +85,256 @@ module PhusionPassenger
85
85
  # Server configuration options
86
86
  SERVER_CONFIG_SPEC = [
87
87
  {
88
- :name => :address,
89
- :type => :hostname,
90
- :type_desc => 'HOST',
91
- :short_cli => '-a',
92
- :default => '0.0.0.0',
93
- :desc => "Bind to the given address.\n" \
94
- "Default: %DEFAULT%"
88
+ name: :address,
89
+ type: :hostname,
90
+ type_desc: 'HOST',
91
+ short_cli: '-a',
92
+ default: '0.0.0.0',
93
+ desc: "Bind to the given address.\n" \
94
+ "Default: %DEFAULT%",
95
95
  },
96
96
  {
97
- :name => :port,
98
- :type => :integer,
99
- :short_cli => '-p',
100
- :default => 3000,
101
- :desc => 'Use the given port number. Default: %DEFAULT%'
97
+ name: :port,
98
+ type: :integer,
99
+ short_cli: '-p',
100
+ default: 3000,
101
+ desc: 'Use the given port number. Default: %DEFAULT%',
102
102
  },
103
103
  {
104
- :name => :socket_file,
105
- :type => :path,
106
- :type_desc => 'FILE',
107
- :cli => '--socket',
108
- :short_cli => '-S',
109
- :desc => "Bind to Unix domain socket instead of TCP\n" \
110
- 'socket'
104
+ name: :socket_file,
105
+ type: :path,
106
+ type_desc: 'FILE',
107
+ cli: '--socket',
108
+ short_cli: '-S',
109
+ desc: "Bind to Unix domain socket instead of TCP\n" \
110
+ 'socket',
111
111
  },
112
112
  {
113
- :name => :socket_backlog,
114
- :type => :integer,
115
- :cli => '--socket-backlog',
116
- :desc => "Override size of the socket backlog.\n" \
117
- "Default: #{DEFAULT_SOCKET_BACKLOG}"
113
+ name: :socket_backlog,
114
+ type: :integer,
115
+ cli: '--socket-backlog',
116
+ desc: "Override size of the socket backlog.\n" \
117
+ "Default: #{DEFAULT_SOCKET_BACKLOG}",
118
118
  },
119
119
  {
120
- :name => :ssl,
121
- :type => :boolean,
122
- :desc => "Enable SSL support (Nginx\n" \
123
- 'engine only)'
120
+ name: :ssl,
121
+ type: :boolean,
122
+ desc: "Enable SSL support (Nginx\n" \
123
+ 'engine only)',
124
124
  },
125
125
  {
126
- :name => :ssl_certificate,
127
- :type => :path,
128
- :desc => "Specify the SSL certificate path\n" \
129
- '(Nginx engine only)'
126
+ name: :ssl_certificate,
127
+ type: :path,
128
+ desc: "Specify the SSL certificate path\n" \
129
+ '(Nginx engine only)',
130
130
  },
131
131
  {
132
- :name => :ssl_certificate_key,
133
- :type => :path,
134
- :desc => "Specify the SSL key path (Nginx\n" \
135
- 'engine only)'
132
+ name: :ssl_certificate_key,
133
+ type: :path,
134
+ desc: "Specify the SSL key path (Nginx\n" \
135
+ 'engine only)',
136
136
  },
137
137
  {
138
- :name => :ssl_port,
139
- :type => :integer,
140
- :type_desc => 'PORT',
141
- :desc => "Listen for SSL on this port, while\n" \
138
+ name: :ssl_port,
139
+ type: :integer,
140
+ type_desc: 'PORT',
141
+ desc: "Listen for SSL on this port, while\n" \
142
142
  "listening for HTTP on the normal port\n" \
143
- '(Nginx engine only)'
143
+ '(Nginx engine only)',
144
144
  },
145
145
  {
146
- :name => :daemonize,
147
- :type => :boolean,
148
- :short_cli => '-d',
149
- :desc => 'Daemonize into the background'
146
+ name: :daemonize,
147
+ type: :boolean,
148
+ short_cli: '-d',
149
+ desc: 'Daemonize into the background',
150
150
  },
151
151
  {
152
- :name => :user,
153
- :type_desc => 'USERNAME',
154
- :desc => "User to run as. Ignored unless\n" \
155
- 'running as root'
152
+ name: :user,
153
+ type_desc: 'USERNAME',
154
+ desc: "User to run as. Ignored unless\n" \
155
+ 'running as root',
156
156
  },
157
157
  {
158
- :name => :log_file,
159
- :type => :path,
160
- :desc => "Where to write log messages. Default:\n" \
161
- 'console, or /dev/null when daemonized'
158
+ name: :log_file,
159
+ type: :path,
160
+ desc: "Where to write log messages. Default:\n" \
161
+ 'console, or /dev/null when daemonized',
162
162
  },
163
163
  {
164
- :name => :pid_file,
165
- :type => :path,
166
- :desc => 'Where to store the PID file'
164
+ name: :pid_file,
165
+ type: :path,
166
+ desc: 'Where to store the PID file',
167
167
  },
168
168
  {
169
- :name => :stop_timeout,
170
- :type => :integer,
171
- :default => 60,
172
- :desc => "How long in seconds to wait for the HTTP engine to gracefully shutdown,\nbefore killing it.\nDefault: %DEFAULT%"
169
+ name: :stop_timeout,
170
+ type: :integer,
171
+ default: 60,
172
+ desc: "How long in seconds to wait for the HTTP engine to gracefully shutdown,\nbefore killing it.\nDefault: %DEFAULT%",
173
173
  },
174
174
  {
175
- :name => :instance_registry_dir,
176
- :type => :path,
177
- :desc => 'Use the given instance registry directory'
175
+ name: :instance_registry_dir,
176
+ type: :path,
177
+ desc: 'Use the given instance registry directory',
178
178
  },
179
179
  {
180
- :name => :data_buffer_dir,
181
- :type => :path,
182
- :desc => 'Use the given data buffer directory'
180
+ name: :data_buffer_dir,
181
+ type: :path,
182
+ desc: 'Use the given data buffer directory',
183
183
  },
184
184
  {
185
- :name => :core_file_descriptor_ulimit,
186
- :type => :integer,
187
- :desc => "Set custom file descriptor ulimit for the\n" \
188
- "#{SHORT_PROGRAM_NAME} core"
189
- }
185
+ name: :core_file_descriptor_ulimit,
186
+ type: :integer,
187
+ desc: "Set custom file descriptor ulimit for the\n" \
188
+ "#{SHORT_PROGRAM_NAME} core",
189
+ },
190
190
  ]
191
191
 
192
192
  # Application loading configuration options
193
193
  APPLICATION_LOADING_CONFIG_SPECS = [
194
194
  {
195
- :name => :environment,
196
- :type_desc => 'NAME',
197
- :short_cli => '-e',
198
- :default => ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['NODE_ENV'] ||
195
+ name: :environment,
196
+ type_desc: 'NAME',
197
+ short_cli: '-e',
198
+ default: ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['NODE_ENV'] ||
199
199
  ENV['PASSENGER_APP_ENV'] || 'development',
200
- :desc => "Web framework environment. Default:\n" \
201
- "%DEFAULT%"
200
+ desc: "Web framework environment. Default:\n" \
201
+ "%DEFAULT%",
202
202
  },
203
203
  {
204
- :name => :ruby,
205
- :type_desc => 'FILENAME',
206
- :desc => "Executable to use for Ruby apps.\n" \
204
+ name: :ruby,
205
+ type_desc: 'FILENAME',
206
+ desc: "Executable to use for Ruby apps.\n" \
207
207
  "Default: #{PlatformInfo.ruby_command}\n" \
208
- "(current context)"
208
+ "(current context)",
209
209
  },
210
210
  {
211
- :name => :python,
212
- :type_desc => 'FILENAME',
213
- :desc => 'Executable to use for Python apps'
211
+ name: :python,
212
+ type_desc: 'FILENAME',
213
+ desc: 'Executable to use for Python apps',
214
214
  },
215
215
  {
216
- :name => :nodejs,
217
- :type_desc => 'FILENAME',
218
- :desc => 'Executable to use for Node.js apps'
216
+ name: :nodejs,
217
+ type_desc: 'FILENAME',
218
+ desc: 'Executable to use for Node.js apps',
219
219
  },
220
220
  {
221
- :name => :meteor_app_settings,
222
- :type => :path,
223
- :type_desc => 'FILENAME',
224
- :desc => "Settings file to use for (development mode)\n" \
225
- 'Meteor apps'
221
+ name: :meteor_app_settings,
222
+ type: :path,
223
+ type_desc: 'FILENAME',
224
+ desc: "Settings file to use for (development mode)\n" \
225
+ 'Meteor apps',
226
226
  },
227
227
  {
228
- :type => :path,
229
- :type_desc => 'FILENAME',
230
- :cli => '--rackup',
231
- :short_cli => '-R',
232
- :cli_parser => lambda do |options, value|
228
+ type: :path,
229
+ type_desc: 'FILENAME',
230
+ cli: '--rackup',
231
+ short_cli: '-R',
232
+ cli_parser: lambda do |options, value|
233
233
  options[:app_type] = 'rack'
234
234
  options[:startup_file] = File.absolute_logical_path(value,
235
235
  Dir.logical_pwd)
236
236
  end,
237
- :desc => "Consider application a Ruby app, and use\n" \
238
- 'the given rackup file'
237
+ desc: "Consider application a Ruby app, and use\n" \
238
+ 'the given rackup file',
239
239
  },
240
240
  {
241
- :name => :app_type,
242
- :type_desc => 'NAME',
243
- :desc => 'Force app to be detected as the given type'
241
+ name: :app_type,
242
+ type_desc: 'NAME',
243
+ desc: 'Force app to be detected as the given type',
244
244
  },
245
245
  {
246
- :name => :startup_file,
247
- :type => :path,
248
- :type_desc => 'FILENAME',
249
- :desc => 'Force given startup file to be used'
246
+ name: :startup_file,
247
+ type: :path,
248
+ type_desc: 'FILENAME',
249
+ desc: 'Force given startup file to be used',
250
250
  },
251
251
  {
252
- :name => :app_start_command,
253
- :type_desc => 'COMMAND',
254
- :desc => 'Force the app to be started through this command'
252
+ name: :app_start_command,
253
+ type_desc: 'COMMAND',
254
+ desc: 'Force the app to be started through this command',
255
255
  },
256
256
  {
257
- :name => :app_support_kuria_protocol,
258
- :type => :boolean,
259
- :desc => 'Force the app to be recognized as a Kuria app',
257
+ name: :app_support_kuria_protocol,
258
+ type: :boolean,
259
+ desc: 'Force the app to be recognized as a Kuria app',
260
260
  },
261
261
  {
262
- :name => :spawn_method,
263
- :type_desc => 'NAME',
264
- :default => PlatformInfo.ruby_supports_fork? ? DEFAULT_SPAWN_METHOD : 'direct',
265
- :desc => 'The spawn method to use. Default: see docs'
262
+ name: :spawn_method,
263
+ type_desc: 'NAME',
264
+ default: PlatformInfo.ruby_supports_fork? ? DEFAULT_SPAWN_METHOD : 'direct',
265
+ desc: 'The spawn method to use. Default: see docs',
266
266
  },
267
267
  {
268
- :name => :direct_instance_request_address,
269
- :type => :hostname,
270
- :type_desc => 'HOST',
271
- :default => '127.0.0.1',
272
- :desc => "The address that Passenger binds to in order to allow sending\nHTTP requests to individual application processes.\nDefault: %DEFAULT%"
268
+ name: :direct_instance_request_address,
269
+ type: :hostname,
270
+ type_desc: 'HOST',
271
+ default: '127.0.0.1',
272
+ desc: "The address that Passenger binds to in order to allow sending\nHTTP requests to individual application processes.\nDefault: %DEFAULT%",
273
273
  },
274
274
  {
275
- :name => :static_files_dir,
276
- :type => :path,
277
- :desc => "Specify the static files dir (Nginx engine\n" \
278
- 'only)'
275
+ name: :static_files_dir,
276
+ type: :path,
277
+ desc: "Specify the static files dir (Nginx engine\n" \
278
+ 'only)',
279
279
  },
280
280
  {
281
- :name => :restart_dir,
282
- :type => :path,
283
- :desc => 'Specify the restart dir'
281
+ name: :restart_dir,
282
+ type: :path,
283
+ desc: 'Specify the restart dir',
284
284
  },
285
285
  {
286
- :name => :friendly_error_pages,
287
- :type => :boolean,
288
- :desc => 'Turn on friendly error pages'
286
+ name: :friendly_error_pages,
287
+ type: :boolean,
288
+ desc: 'Turn on friendly error pages',
289
289
  },
290
290
  {
291
- :name => :custom_error_page,
292
- :type => :path,
293
- :desc => 'Path to html file to use for Passenger generated error pages'
291
+ name: :custom_error_page,
292
+ type: :path,
293
+ desc: 'Path to html file to use for Passenger generated error pages',
294
294
  },
295
295
  {
296
- :type => :boolean,
297
- :cli => '--no-friendly-error-pages',
298
- :cli_parser => lambda do |options, value|
296
+ type: :boolean,
297
+ cli: '--no-friendly-error-pages',
298
+ cli_parser: lambda do |options, value|
299
299
  options[:friendly_error_pages] = false
300
300
  end,
301
- :desc => 'Turn off friendly error pages'
301
+ desc: 'Turn off friendly error pages',
302
302
  },
303
303
  {
304
- :name => :load_shell_envvars,
305
- :type => :boolean,
304
+ name: :load_shell_envvars,
305
+ type: :boolean,
306
306
  # The Standalone mode is primarily used for serving a single app (except
307
307
  # when in mass deployment mode), so load_shell_envvars is disabled by
308
308
  # default. However, it's enabled by default in the Core, so we need to
309
309
  # explicitly set it to disabled here.
310
- :default => false,
311
- :desc => "Load shell startup files before loading\n" \
312
- 'application'
310
+ default: false,
311
+ desc: "Load shell startup files before loading\n" \
312
+ 'application',
313
313
  },
314
314
  {
315
- :name => :preload_bundler,
316
- :type => :boolean,
317
- :default => false,
318
- :desc => "Tell Ruby to load the bundler gem before loading the application"
315
+ name: :preload_bundler,
316
+ type: :boolean,
317
+ default: false,
318
+ desc: "Tell Ruby to load the bundler gem before loading the application",
319
319
  },
320
320
  {
321
- :name => :app_file_descriptor_ulimit,
322
- :type => :integer,
323
- :desc => "Set custom file descriptor ulimit for the\n" \
324
- "application"
321
+ name: :app_file_descriptor_ulimit,
322
+ type: :integer,
323
+ desc: "Set custom file descriptor ulimit for the\n" \
324
+ "application",
325
325
  },
326
326
  {
327
- :name => :debugger,
328
- :type => :boolean,
329
- :desc => 'Enable debugger support'
327
+ name: :debugger,
328
+ type: :boolean,
329
+ desc: 'Enable debugger support',
330
330
  },
331
331
  {
332
- :name => :envvars,
333
- :type => :map,
334
- :type_desc => 'NAME=VALUE',
335
- :default => {},
336
- :cli => '--envvar',
337
- :cli_parser => lambda do |options, value|
332
+ name: :envvars,
333
+ type: :map,
334
+ type_desc: 'NAME=VALUE',
335
+ default: {},
336
+ cli: '--envvar',
337
+ cli_parser: lambda do |options, value|
338
338
  if value !~ /=.+/
339
339
  abort "*** ERROR: invalid --envvar format: #{value}"
340
340
  end
@@ -342,315 +342,315 @@ module PhusionPassenger
342
342
  options[:envvars] ||= {}
343
343
  options[:envvars][key] = real_value
344
344
  end,
345
- :desc => 'Pass environment variable to application'
346
- }
345
+ desc: 'Pass environment variable to application',
346
+ },
347
347
  ]
348
348
 
349
349
  # Process management configuration options
350
350
  PROCESS_MANAGEMENT_CONFIG_SPECS = [
351
351
  {
352
- :name => :max_pool_size,
353
- :type => :integer,
354
- :min => 1,
355
- :desc => "Maximum number of application processes.\n" \
356
- "Default: #{DEFAULT_MAX_POOL_SIZE}"
352
+ name: :max_pool_size,
353
+ type: :integer,
354
+ min: 1,
355
+ desc: "Maximum number of application processes.\n" \
356
+ "Default: #{DEFAULT_MAX_POOL_SIZE}",
357
357
  },
358
358
  {
359
- :name => :min_instances,
360
- :type => :integer,
361
- :min => 0,
362
- :desc => "Minimum number of processes per\n" \
363
- 'application. Default: 1'
359
+ name: :min_instances,
360
+ type: :integer,
361
+ min: 0,
362
+ desc: "Minimum number of processes per\n" \
363
+ 'application. Default: 1',
364
364
  },
365
365
  {
366
- :name => :pool_idle_time,
367
- :type => :integer,
368
- :type_desc => 'SECONDS',
369
- :desc => "Maximum time that processes may be idle.\n" \
370
- "Default: #{DEFAULT_POOL_IDLE_TIME}"
366
+ name: :pool_idle_time,
367
+ type: :integer,
368
+ type_desc: 'SECONDS',
369
+ desc: "Maximum time that processes may be idle.\n" \
370
+ "Default: #{DEFAULT_POOL_IDLE_TIME}",
371
371
  },
372
372
  {
373
- :name => :max_preloader_idle_time,
374
- :type => :integer,
375
- :type_desc => 'SECONDS',
376
- :desc => "Maximum time that preloader processes may\n" \
373
+ name: :max_preloader_idle_time,
374
+ type: :integer,
375
+ type_desc: 'SECONDS',
376
+ desc: "Maximum time that preloader processes may\n" \
377
377
  "be idle. A value of 0 means that preloader\n" \
378
- "processes never timeout. Default: #{DEFAULT_MAX_PRELOADER_IDLE_TIME}"
378
+ "processes never timeout. Default: #{DEFAULT_MAX_PRELOADER_IDLE_TIME}",
379
379
  },
380
380
  {
381
- :name => :force_max_concurrent_requests_per_process,
382
- :type => :integer,
383
- :desc => "Force #{SHORT_PROGRAM_NAME} to believe that an\n" \
381
+ name: :force_max_concurrent_requests_per_process,
382
+ type: :integer,
383
+ desc: "Force #{SHORT_PROGRAM_NAME} to believe that an\n" \
384
384
  "application process can handle the given\n" \
385
- "number of concurrent requests per process"
385
+ "number of concurrent requests per process",
386
386
  },
387
387
  {
388
- :name => :start_timeout,
389
- :type => :integer,
390
- :type_desc => 'SECONDS',
391
- :desc => "The maximum time an application process may\n" \
388
+ name: :start_timeout,
389
+ type: :integer,
390
+ type_desc: 'SECONDS',
391
+ desc: "The maximum time an application process may\n" \
392
392
  "take to start up, after which it will be killed\n" \
393
- "with SIGKILL, and logged with an error.\nDefault: #{DEFAULT_START_TIMEOUT / 1000}"
393
+ "with SIGKILL, and logged with an error.\nDefault: #{DEFAULT_START_TIMEOUT / 1000}",
394
394
  },
395
395
  {
396
- :name => :app_connect_timeout,
397
- :type => :integer,
398
- :type_desc => 'SECONDS',
399
- :desc => "The maximum time an application process may\n" \
396
+ name: :app_connect_timeout,
397
+ type: :integer,
398
+ type_desc: 'SECONDS',
399
+ desc: "The maximum time an application process may\n" \
400
400
  "take to accept a socket connection\n" \
401
- "Default: #{DEFAULT_CONNECT_TIMEOUT}"
401
+ "Default: #{DEFAULT_CONNECT_TIMEOUT}",
402
402
  },
403
403
  {
404
- :name => :concurrency_model,
405
- :type_desc => 'NAME',
406
- :desc => "The concurrency model to use, either\n" \
404
+ name: :concurrency_model,
405
+ type_desc: 'NAME',
406
+ desc: "The concurrency model to use, either\n" \
407
407
  "'process' or 'thread' (Enterprise only).\n" \
408
- "Default: #{DEFAULT_CONCURRENCY_MODEL}"
408
+ "Default: #{DEFAULT_CONCURRENCY_MODEL}",
409
409
  },
410
410
  {
411
- :name => :thread_count,
412
- :type => :integer,
413
- :desc => "The number of threads to use when using\n" \
411
+ name: :thread_count,
412
+ type: :integer,
413
+ desc: "The number of threads to use when using\n" \
414
414
  "the 'thread' concurrency model (Enterprise\n" \
415
- "only). Default: #{DEFAULT_APP_THREAD_COUNT}"
415
+ "only). Default: #{DEFAULT_APP_THREAD_COUNT}",
416
416
  },
417
417
  {
418
- :name => :memory_limit,
419
- :type => :integer,
420
- :type_desc => 'MB',
421
- :desc => "Restart application processes that go over\n" \
422
- "the given memory limit (Enterprise only)"
418
+ name: :memory_limit,
419
+ type: :integer,
420
+ type_desc: 'MB',
421
+ desc: "Restart application processes that go over\n" \
422
+ "the given memory limit (Enterprise only)",
423
423
  },
424
424
  {
425
- :name => :rolling_restarts,
426
- :type => :boolean,
427
- :desc => "Enable rolling restarts (Enterprise only)"
425
+ name: :rolling_restarts,
426
+ type: :boolean,
427
+ desc: "Enable rolling restarts (Enterprise only)",
428
428
  },
429
429
  {
430
- :name => :resist_deployment_errors,
431
- :type => :boolean,
432
- :desc => "Enable deployment error resistance\n" \
433
- '(Enterprise only)'
434
- }
430
+ name: :resist_deployment_errors,
431
+ type: :boolean,
432
+ desc: "Enable deployment error resistance\n" \
433
+ '(Enterprise only)',
434
+ },
435
435
  ]
436
436
 
437
437
  # Request handling configuration options
438
438
  REQUEST_HANDLING_CONFIG_SPECS = [
439
439
  {
440
- :name => :max_requests,
441
- :type => :integer,
442
- :min => 0,
443
- :desc => "Restart application processes that have handled\n" \
444
- "the specified maximum number of requests"
440
+ name: :max_requests,
441
+ type: :integer,
442
+ min: 0,
443
+ desc: "Restart application processes that have handled\n" \
444
+ "the specified maximum number of requests",
445
445
  },
446
446
  {
447
- :name => :max_request_time,
448
- :type => :integer,
449
- :type_desc => 'SECONDS',
450
- :min => 0,
451
- :desc => "Abort requests that take too much time\n" \
452
- '(Enterprise only)'
447
+ name: :max_request_time,
448
+ type: :integer,
449
+ type_desc: 'SECONDS',
450
+ min: 0,
451
+ desc: "Abort requests that take too much time\n" \
452
+ '(Enterprise only)',
453
453
  },
454
454
  {
455
- :name => :max_request_queue_size,
456
- :type => :integer,
457
- :min => 0,
458
- :desc => "Specify request queue size. Default: #{DEFAULT_MAX_REQUEST_QUEUE_SIZE}"
455
+ name: :max_request_queue_size,
456
+ type: :integer,
457
+ min: 0,
458
+ desc: "Specify request queue size. Default: #{DEFAULT_MAX_REQUEST_QUEUE_SIZE}",
459
459
  },
460
460
  {
461
- :name => :sticky_sessions,
462
- :type => :boolean,
463
- :desc => 'Enable sticky sessions'
461
+ name: :sticky_sessions,
462
+ type: :boolean,
463
+ desc: 'Enable sticky sessions',
464
464
  },
465
465
  {
466
- :name => :sticky_sessions_cookie_name,
467
- :type_desc => 'NAME',
468
- :desc => "Cookie name to use for sticky sessions.\n" \
469
- "Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_NAME}"
466
+ name: :sticky_sessions_cookie_name,
467
+ type_desc: 'NAME',
468
+ desc: "Cookie name to use for sticky sessions.\n" \
469
+ "Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_NAME}",
470
470
  },
471
471
  {
472
- :name => :sticky_sessions_cookie_attributes,
473
- :type_desc => "'NAME1=VALUE1; NAME2'",
474
- :desc => "The attributes to use for the sticky session cookie.\n" \
475
- "Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES}"
472
+ name: :sticky_sessions_cookie_attributes,
473
+ type_desc: "'NAME1=VALUE1; NAME2'",
474
+ desc: "The attributes to use for the sticky session cookie.\n" \
475
+ "Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES}",
476
476
  },
477
477
  {
478
- :name => :vary_turbocache_by_cookie,
479
- :type_desc => 'NAME',
480
- :desc => "Vary the turbocache by the cookie of the\n" \
481
- 'given name'
478
+ name: :vary_turbocache_by_cookie,
479
+ type_desc: 'NAME',
480
+ desc: "Vary the turbocache by the cookie of the\n" \
481
+ 'given name',
482
482
  },
483
483
  {
484
- :name => :turbocaching,
485
- :type => :boolean,
486
- :cli => nil
484
+ name: :turbocaching,
485
+ type: :boolean,
486
+ cli: nil,
487
487
  },
488
488
  {
489
- :type => :boolean,
490
- :cli => '--disable-turbocaching',
491
- :desc => 'Disable turbocaching',
492
- :cli_parser => lambda do |options, value|
489
+ type: :boolean,
490
+ cli: '--disable-turbocaching',
491
+ desc: 'Disable turbocaching',
492
+ cli_parser: lambda do |options, value|
493
493
  options[:turbocaching] = false
494
- end
494
+ end,
495
495
  },
496
496
  {
497
- :name => :old_routing,
498
- :type => :boolean,
499
- :desc => 'Revert to old routing algorithm'
497
+ name: :old_routing,
498
+ type: :boolean,
499
+ desc: 'Revert to old routing algorithm',
500
500
  },
501
501
  {
502
- :name => :unlimited_concurrency_paths,
503
- :type => :array,
504
- :type_desc => 'URI-PATH',
505
- :cli => '--unlimited-concurrency-path',
506
- :desc => "Specify URI path which supports unlimited\n" \
502
+ name: :unlimited_concurrency_paths,
503
+ type: :array,
504
+ type_desc: 'URI-PATH',
505
+ cli: '--unlimited-concurrency-path',
506
+ desc: "Specify URI path which supports unlimited\n" \
507
507
  "concurrency. Specify multiple times for\n" \
508
508
  "multiple paths",
509
- :default => [],
510
- :cli_parser => lambda do |options, value|
509
+ default: [],
510
+ cli_parser: lambda do |options, value|
511
511
  options[:unlimited_concurrency_paths] ||= []
512
512
  options[:unlimited_concurrency_paths] << value
513
- end
513
+ end,
514
514
  },
515
515
  {
516
- :name => :abort_websockets_on_process_shutdown,
517
- :type => :boolean,
518
- :cli => nil
516
+ name: :abort_websockets_on_process_shutdown,
517
+ type: :boolean,
518
+ cli: nil,
519
519
  },
520
520
  {
521
- :type => :boolean,
522
- :cli => '--no-abort-websockets-on-process-shutdown',
523
- :desc => "Do not abort WebSocket connections on\n" \
521
+ type: :boolean,
522
+ cli: '--no-abort-websockets-on-process-shutdown',
523
+ desc: "Do not abort WebSocket connections on\n" \
524
524
  'process restart',
525
- :cli_parser => lambda do |options, value|
525
+ cli_parser: lambda do |options, value|
526
526
  options[:abort_websockets_on_process_shutdown] = false
527
- end
528
- }
527
+ end,
528
+ },
529
529
  ]
530
530
 
531
531
  # Nginx engine configuration options
532
532
  NGINX_ENGINE_CONFIG_SPECS = [
533
533
  {
534
- :name => :nginx_bin,
535
- :type => :path,
536
- :type_desc => 'FILENAME',
537
- :desc => 'Nginx binary to use as core'
534
+ name: :nginx_bin,
535
+ type: :path,
536
+ type_desc: 'FILENAME',
537
+ desc: 'Nginx binary to use as core',
538
538
  },
539
539
  {
540
- :name => :nginx_version,
541
- :type_desc => 'VERSION',
542
- :default => PREFERRED_NGINX_VERSION,
543
- :desc => "Nginx version to use as core.\n" \
544
- "Default: #{PREFERRED_NGINX_VERSION}"
540
+ name: :nginx_version,
541
+ type_desc: 'VERSION',
542
+ default: PREFERRED_NGINX_VERSION,
543
+ desc: "Nginx version to use as core.\n" \
544
+ "Default: #{PREFERRED_NGINX_VERSION}",
545
545
  },
546
546
  {
547
- :name => :nginx_tarball,
548
- :type => :path,
549
- :type_desc => 'FILENAME',
550
- :desc => "If Nginx needs to be installed, then the\n" \
547
+ name: :nginx_tarball,
548
+ type: :path,
549
+ type_desc: 'FILENAME',
550
+ desc: "If Nginx needs to be installed, then the\n" \
551
551
  "given tarball will be used instead of\n" \
552
- "downloading from the Internet"
552
+ "downloading from the Internet",
553
553
  },
554
554
  {
555
- :name => :nginx_config_template,
556
- :type => :path,
557
- :type_desc => 'FILENAME',
558
- :desc => "The template to use for generating the\n" \
559
- 'Nginx config file'
555
+ name: :nginx_config_template,
556
+ type: :path,
557
+ type_desc: 'FILENAME',
558
+ desc: "The template to use for generating the\n" \
559
+ 'Nginx config file',
560
560
  },
561
561
  {
562
- :name => :debug_nginx_config,
563
- :type => :boolean,
564
- :desc => 'Print Nginx config template and exit'
565
- }
562
+ name: :debug_nginx_config,
563
+ type: :boolean,
564
+ desc: 'Print Nginx config template and exit',
565
+ },
566
566
  ]
567
567
 
568
568
  # Advanced configuration options
569
569
  ADVANCED_CONFIG_SPECS = [
570
570
  {
571
- :name => :disable_security_update_check,
572
- :type => :boolean,
573
- :desc => "Disable check for security updates"
571
+ name: :disable_security_update_check,
572
+ type: :boolean,
573
+ desc: "Disable check for security updates",
574
574
  },
575
575
  {
576
- :name => :security_update_check_proxy,
577
- :type_desc => 'NAME',
578
- :desc => "Use HTTP/SOCKS proxy for the security update check"
576
+ name: :security_update_check_proxy,
577
+ type_desc: 'NAME',
578
+ desc: "Use HTTP/SOCKS proxy for the security update check",
579
579
  },
580
580
  {
581
- :name => :disable_anonymous_telemetry,
582
- :type => :boolean,
583
- :desc => "Disable anonymous telemetry collection"
581
+ name: :disable_anonymous_telemetry,
582
+ type: :boolean,
583
+ desc: "Disable anonymous telemetry collection",
584
584
  },
585
585
  {
586
- :name => :anonymous_telemetry_proxy,
587
- :type_desc => 'NAME',
588
- :desc => "Use HTTP/SOCKS proxy for anonymous telemetry collection"
586
+ name: :anonymous_telemetry_proxy,
587
+ type_desc: 'NAME',
588
+ desc: "Use HTTP/SOCKS proxy for anonymous telemetry collection",
589
589
  },
590
590
  {
591
- :name => :engine,
592
- :type_desc => 'NAME',
593
- :default => 'nginx',
594
- :desc => "Underlying HTTP engine to use. Available\n" \
595
- "options: nginx (default), builtin"
591
+ name: :engine,
592
+ type_desc: 'NAME',
593
+ default: 'nginx',
594
+ desc: "Underlying HTTP engine to use. Available\n" \
595
+ "options: nginx (default), builtin",
596
596
  },
597
597
  {
598
- :name => :log_level,
599
- :type => :integer,
600
- :default => DEFAULT_LOG_LEVEL,
601
- :desc => "Log level to use. Default: #{DEFAULT_LOG_LEVEL}"
598
+ name: :log_level,
599
+ type: :integer,
600
+ default: DEFAULT_LOG_LEVEL,
601
+ desc: "Log level to use. Default: #{DEFAULT_LOG_LEVEL}",
602
602
  },
603
603
  {
604
- :name => :disable_log_prefix,
605
- :type => :boolean,
606
- :desc => "Disable prefixing log statements with PID and channel."
604
+ name: :disable_log_prefix,
605
+ type: :boolean,
606
+ desc: "Disable prefixing log statements with PID and channel.",
607
607
  },
608
608
  {
609
- :name => :auto,
610
- :type => :boolean,
611
- :default => !STDIN.tty? || !STDOUT.tty?,
612
- :desc => "Run in non-interactive mode. Default when\n" \
613
- 'stdin or stdout is not a TTY'
609
+ name: :auto,
610
+ type: :boolean,
611
+ default: !STDIN.tty? || !STDOUT.tty?,
612
+ desc: "Run in non-interactive mode. Default when\n" \
613
+ 'stdin or stdout is not a TTY',
614
614
  },
615
615
  {
616
- :name => :ctls,
617
- :type => :array,
618
- :type_desc => 'NAME=VALUE',
619
- :default => [],
620
- :cli_parser => lambda do |options, value|
616
+ name: :ctls,
617
+ type: :array,
618
+ type_desc: 'NAME=VALUE',
619
+ default: [],
620
+ cli_parser: lambda do |options, value|
621
621
  if value !~ /=.+/
622
622
  abort "*** ERROR: invalid --ctl format: #{value}"
623
623
  end
624
624
  options[:ctls] ||= []
625
625
  options[:ctls] << value
626
- end
626
+ end,
627
627
  },
628
628
  {
629
- :name => :binaries_url_root,
630
- :type_desc => 'URL',
631
- :desc => "If Nginx needs to be installed, then the\n" \
629
+ name: :binaries_url_root,
630
+ type_desc: 'URL',
631
+ desc: "If Nginx needs to be installed, then the\n" \
632
632
  "specified URL will be checked for binaries\n" \
633
- 'prior to a local build'
633
+ 'prior to a local build',
634
634
  },
635
635
  {
636
- :name => :runtime_check_only,
637
- :type => :boolean,
638
- :desc => "Quit after checking whether the\n" \
636
+ name: :runtime_check_only,
637
+ type: :boolean,
638
+ desc: "Quit after checking whether the\n" \
639
639
  "#{PROGRAM_NAME} Standalone runtime files\n" \
640
- 'are installed'
640
+ 'are installed',
641
641
  },
642
642
  {
643
- :name => :dont_install_runtime,
644
- :type => :boolean,
645
- :cli => '--no-install-runtime',
646
- :desc => 'Abort if runtime must be installed'
643
+ name: :dont_install_runtime,
644
+ type: :boolean,
645
+ cli: '--no-install-runtime',
646
+ desc: 'Abort if runtime must be installed',
647
647
  },
648
648
  {
649
- :name => :dont_compile_runtime,
650
- :type => :boolean,
651
- :cli => '--no-compile-runtime',
652
- :desc => 'Abort if runtime must be compiled'
653
- }
649
+ name: :dont_compile_runtime,
650
+ type: :boolean,
651
+ cli: '--no-compile-runtime',
652
+ desc: 'Abort if runtime must be compiled',
653
+ },
654
654
  ]
655
655
 
656
656
  CONFIG_SPECS = [
@@ -659,7 +659,7 @@ module PhusionPassenger
659
659
  PROCESS_MANAGEMENT_CONFIG_SPECS,
660
660
  REQUEST_HANDLING_CONFIG_SPECS,
661
661
  NGINX_ENGINE_CONFIG_SPECS,
662
- ADVANCED_CONFIG_SPECS
662
+ ADVANCED_CONFIG_SPECS,
663
663
  ]
664
664
 
665
665
  # Maps configuration options to their default value. Automatically