passenger 2.2.2 → 2.2.3

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 (254) hide show
  1. data/DEVELOPERS.TXT +13 -3
  2. data/Rakefile +42 -33
  3. data/bin/passenger-install-apache2-module +1 -2
  4. data/bin/passenger-install-nginx-module +7 -19
  5. data/bin/passenger-status +64 -15
  6. data/bin/passenger-stress-test +2 -2
  7. data/doc/ApplicationPool algorithm.txt +26 -22
  8. data/doc/Users guide Apache.html +374 -149
  9. data/doc/Users guide Apache.txt +318 -51
  10. data/doc/Users guide Nginx.html +13 -13
  11. data/doc/Users guide Nginx.txt +7 -2
  12. data/doc/cxxapi/Bucket_8h-source.html +62 -25
  13. data/doc/cxxapi/Configuration_8h-source.html +343 -326
  14. data/doc/cxxapi/DirectoryMapper_8h-source.html +12 -12
  15. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  16. data/doc/cxxapi/annotated.html +1 -1
  17. data/doc/cxxapi/classHooks-members.html +1 -1
  18. data/doc/cxxapi/classHooks.html +1 -1
  19. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +2 -2
  20. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +9 -9
  21. data/doc/cxxapi/classes.html +1 -1
  22. data/doc/cxxapi/definitions_8h-source.html +1 -1
  23. data/doc/cxxapi/files.html +1 -1
  24. data/doc/cxxapi/functions.html +2 -2
  25. data/doc/cxxapi/functions_func.html +2 -2
  26. data/doc/cxxapi/graph_legend.html +1 -1
  27. data/doc/cxxapi/group__Configuration.html +1 -1
  28. data/doc/cxxapi/group__Core.html +1 -1
  29. data/doc/cxxapi/group__Hooks.html +1 -1
  30. data/doc/cxxapi/group__Support.html +1 -1
  31. data/doc/cxxapi/main.html +1 -1
  32. data/doc/cxxapi/modules.html +1 -1
  33. data/doc/rdoc/classes/ConditionVariable.html +194 -0
  34. data/doc/rdoc/classes/Exception.html +120 -0
  35. data/doc/rdoc/classes/GC.html +113 -0
  36. data/doc/rdoc/classes/IO.html +169 -0
  37. data/doc/rdoc/classes/PhusionPassenger.html +238 -0
  38. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
  39. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +517 -0
  40. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +719 -0
  41. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
  42. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
  43. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
  44. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
  45. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +598 -0
  46. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +140 -0
  47. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +317 -0
  48. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +138 -0
  49. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +154 -0
  50. data/doc/rdoc/classes/PhusionPassenger/Application.html +283 -0
  51. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
  52. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
  53. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +175 -0
  54. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
  55. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
  56. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +489 -0
  57. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +350 -0
  58. data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
  59. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +188 -0
  60. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +194 -0
  61. data/doc/rdoc/classes/PhusionPassenger/Railz.html +95 -0
  62. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +442 -0
  63. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +98 -0
  64. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +200 -0
  65. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +436 -0
  66. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +98 -0
  67. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +155 -0
  68. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +402 -0
  69. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
  70. data/doc/rdoc/classes/PhusionPassenger/Utils.html +805 -0
  71. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
  72. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
  73. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +188 -0
  74. data/doc/rdoc/classes/PlatformInfo.html +831 -0
  75. data/doc/rdoc/classes/RakeExtensions.html +197 -0
  76. data/doc/rdoc/classes/Signal.html +131 -0
  77. data/doc/rdoc/created.rid +1 -0
  78. data/doc/rdoc/files/DEVELOPERS_TXT.html +255 -0
  79. data/doc/rdoc/files/README.html +157 -0
  80. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +92 -0
  81. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
  82. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +131 -0
  83. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
  84. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +130 -0
  85. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +130 -0
  86. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
  87. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +127 -0
  88. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
  89. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
  90. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +134 -0
  91. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +122 -0
  92. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
  93. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +126 -0
  94. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +122 -0
  95. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
  96. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +127 -0
  97. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +133 -0
  98. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +127 -0
  99. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +143 -0
  100. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +126 -0
  101. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +145 -0
  102. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +127 -0
  103. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
  104. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +161 -0
  105. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +175 -0
  106. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +129 -0
  107. data/doc/rdoc/files/misc/rake/extensions_rb.html +130 -0
  108. data/doc/rdoc/fr_class_index.html +90 -0
  109. data/doc/rdoc/fr_file_index.html +76 -0
  110. data/doc/rdoc/fr_method_index.html +200 -0
  111. data/doc/rdoc/index.html +26 -0
  112. data/doc/rdoc/rdoc-style.css +187 -0
  113. data/doc/users_guide_snippets/rackup_specifications.txt +2 -8
  114. data/ext/apache2/Bucket.cpp +71 -38
  115. data/ext/apache2/Bucket.h +53 -16
  116. data/ext/apache2/Configuration.cpp +15 -0
  117. data/ext/apache2/Configuration.h +19 -2
  118. data/ext/apache2/DirectoryMapper.h +10 -10
  119. data/ext/apache2/Hooks.cpp +334 -74
  120. data/ext/boost/mpl/apply.hpp +5 -1
  121. data/ext/boost/mpl/apply_wrap.hpp +5 -2
  122. data/ext/boost/mpl/aux_/full_lambda.hpp +5 -1
  123. data/ext/boost/mpl/bind.hpp +5 -1
  124. data/ext/common/Application.h +11 -31
  125. data/ext/common/ApplicationPool.h +2 -1
  126. data/ext/common/ApplicationPoolServer.h +61 -20
  127. data/ext/common/ApplicationPoolServerExecutable.cpp +132 -4
  128. data/ext/common/ApplicationPoolStatusReporter.h +189 -65
  129. data/ext/common/Base64.cpp +143 -0
  130. data/ext/common/Base64.h +57 -0
  131. data/ext/common/CachedFileStat.cpp +25 -82
  132. data/ext/common/CachedFileStat.h +11 -125
  133. data/ext/common/CachedFileStat.hpp +243 -0
  134. data/ext/common/Exceptions.h +13 -0
  135. data/ext/common/FileChangeChecker.h +209 -0
  136. data/ext/common/Logging.h +3 -2
  137. data/ext/common/MessageChannel.h +10 -10
  138. data/ext/common/PoolOptions.h +72 -5
  139. data/ext/common/SpawnManager.h +11 -8
  140. data/ext/common/StandardApplicationPool.h +38 -39
  141. data/ext/common/StaticString.h +1 -0
  142. data/ext/common/StringListCreator.h +83 -0
  143. data/ext/common/SystemTime.h +3 -2
  144. data/ext/common/Timer.h +88 -0
  145. data/ext/common/Utils.cpp +161 -42
  146. data/ext/common/Utils.h +62 -31
  147. data/ext/common/Version.h +1 -1
  148. data/ext/nginx/Configuration.c +0 -4
  149. data/ext/nginx/ContentHandler.c +8 -6
  150. data/ext/nginx/HelperServer.cpp +45 -55
  151. data/ext/nginx/HttpStatusExtractor.h +4 -0
  152. data/ext/nginx/StaticContentHandler.c +25 -5
  153. data/ext/nginx/config +3 -0
  154. data/ext/nginx/ngx_http_passenger_module.c +72 -17
  155. data/ext/nginx/ngx_http_passenger_module.h +2 -2
  156. data/lib/phusion_passenger/abstract_request_handler.rb +15 -7
  157. data/lib/phusion_passenger/abstract_server.rb +16 -2
  158. data/lib/phusion_passenger/admin_tools/control_process.rb +36 -25
  159. data/lib/phusion_passenger/constants.rb +1 -1
  160. data/lib/phusion_passenger/dependencies.rb +10 -0
  161. data/lib/phusion_passenger/platform_info.rb +1 -1
  162. data/lib/phusion_passenger/rack/application_spawner.rb +21 -2
  163. data/lib/phusion_passenger/rack/request_handler.rb +10 -0
  164. data/lib/phusion_passenger/railz/application_spawner.rb +38 -2
  165. data/lib/phusion_passenger/railz/framework_spawner.rb +26 -28
  166. data/lib/phusion_passenger/railz/request_handler.rb +5 -1
  167. data/lib/phusion_passenger/spawn_manager.rb +6 -2
  168. data/lib/phusion_passenger/utils.rb +79 -27
  169. data/misc/rake/cplusplus.rb +5 -5
  170. data/test/ApplicationPoolServerTest.cpp +42 -0
  171. data/test/ApplicationPoolTest.cpp +255 -267
  172. data/test/Base64Test.cpp +48 -0
  173. data/test/CachedFileStatTest.cpp +243 -103
  174. data/test/FileChangeCheckerTest.cpp +331 -0
  175. data/test/PoolOptionsTest.cpp +80 -0
  176. data/test/UtilsTest.cpp +5 -17
  177. data/test/integration_tests/apache2_tests.rb +15 -4
  178. data/test/integration_tests/mycook_spec.rb +3 -4
  179. data/test/oxt/syscall_interruption_test.cpp +2 -14
  180. data/test/ruby/abstract_server_collection_spec.rb +1 -1
  181. data/test/ruby/abstract_server_spec.rb +35 -1
  182. data/test/ruby/rack/application_spawner_spec.rb +23 -6
  183. data/test/ruby/rails/application_spawner_spec.rb +6 -6
  184. data/test/ruby/rails/framework_spawner_spec.rb +6 -5
  185. data/test/ruby/rails/minimal_spawner_spec.rb +19 -0
  186. data/test/ruby/rails/spawner_error_handling_spec.rb +62 -7
  187. data/test/ruby/spawn_manager_spec.rb +10 -7
  188. data/test/ruby/spawn_server_spec.rb +1 -1
  189. data/test/ruby/utils_spec.rb +193 -20
  190. data/test/ruby/wsgi/application_spawner_spec.rb +3 -1
  191. data/test/stub/apache2/httpd.conf.erb +3 -0
  192. data/test/stub/rack/config.ru +1 -1
  193. data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
  194. data/test/support/Support.cpp +84 -0
  195. data/test/support/Support.h +66 -8
  196. data/test/support/config.rb +14 -2
  197. data/test/support/test_helper.rb +5 -0
  198. data/vendor/rack-1.0.0-git/lib/rack/auth/openid.rb +123 -116
  199. data/vendor/rack-1.0.0-git/lib/rack/cascade.rb +17 -12
  200. data/vendor/rack-1.0.0-git/lib/rack/commonlogger.rb +34 -43
  201. data/vendor/rack-1.0.0-git/lib/rack/handler/cgi.rb +1 -1
  202. data/vendor/rack-1.0.0-git/lib/rack/handler/fastcgi.rb +1 -1
  203. data/vendor/rack-1.0.0-git/lib/rack/handler/lsws.rb +1 -1
  204. data/vendor/rack-1.0.0-git/lib/rack/handler/mongrel.rb +1 -1
  205. data/vendor/rack-1.0.0-git/lib/rack/handler/scgi.rb +1 -1
  206. data/vendor/rack-1.0.0-git/lib/rack/handler/webrick.rb +1 -1
  207. data/vendor/rack-1.0.0-git/lib/rack/mock.rb +4 -17
  208. data/vendor/rack-1.0.0-git/lib/rack/request.rb +3 -9
  209. data/vendor/rack-1.0.0-git/lib/rack/rewindable_input.rb +2 -0
  210. data/vendor/rack-1.0.0-git/lib/rack/utils.rb +38 -12
  211. metadata +231 -186
  212. data/ext/common/FileChecker.h +0 -112
  213. data/test/FileCheckerTest.cpp +0 -79
  214. data/test/stub/minimal-railsapp/README +0 -3
  215. data/test/stub/minimal-railsapp/config/application.rb +0 -0
  216. data/test/stub/minimal-railsapp/config/environment.rb +0 -3
  217. data/test/stub/minimal-railsapp/vendor/rails/actionmailer/lib/action_mailer.rb +0 -0
  218. data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_controller.rb +0 -10
  219. data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_pack.rb +0 -0
  220. data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_view.rb +0 -0
  221. data/test/stub/minimal-railsapp/vendor/rails/activerecord/lib/active_record.rb +0 -7
  222. data/test/stub/minimal-railsapp/vendor/rails/activeresource/lib/active_resource.rb +0 -0
  223. data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support.rb +0 -17
  224. data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -0
  225. data/test/stub/minimal-railsapp/vendor/rails/railties/lib/dispatcher.rb +0 -0
  226. data/test/stub/minimal-railsapp/vendor/rails/railties/lib/initializer.rb +0 -8
  227. data/test/stub/minimal-railsapp/vendor/rails/railties/lib/ruby_version_check.rb +0 -1
  228. data/test/stub/railsapp/app/controllers/application.rb +0 -12
  229. data/test/stub/railsapp/app/controllers/bar_controller.rb +0 -5
  230. data/test/stub/railsapp/app/controllers/bar_controller_1.txt +0 -5
  231. data/test/stub/railsapp/app/controllers/bar_controller_2.txt +0 -5
  232. data/test/stub/railsapp/app/controllers/foo_controller.rb +0 -9
  233. data/test/stub/railsapp/app/helpers/application_helper.rb +0 -3
  234. data/test/stub/railsapp/config/boot.rb +0 -108
  235. data/test/stub/railsapp/config/database.yml +0 -19
  236. data/test/stub/railsapp/config/environment.rb +0 -59
  237. data/test/stub/railsapp/config/environments/development.rb +0 -18
  238. data/test/stub/railsapp/config/environments/production.rb +0 -19
  239. data/test/stub/railsapp/config/initializers/inflections.rb +0 -10
  240. data/test/stub/railsapp/config/initializers/mime_types.rb +0 -5
  241. data/test/stub/railsapp/config/routes.rb +0 -35
  242. data/test/stub/railsapp/public/useless.txt +0 -1
  243. data/test/stub/railsapp2/app/controllers/application.rb +0 -12
  244. data/test/stub/railsapp2/app/controllers/foo_controller.rb +0 -5
  245. data/test/stub/railsapp2/app/helpers/application_helper.rb +0 -3
  246. data/test/stub/railsapp2/config/boot.rb +0 -108
  247. data/test/stub/railsapp2/config/database.yml +0 -19
  248. data/test/stub/railsapp2/config/environment.rb +0 -59
  249. data/test/stub/railsapp2/config/environments/development.rb +0 -18
  250. data/test/stub/railsapp2/config/environments/production.rb +0 -19
  251. data/test/stub/railsapp2/config/initializers/inflections.rb +0 -10
  252. data/test/stub/railsapp2/config/initializers/mime_types.rb +0 -5
  253. data/test/stub/railsapp2/config/routes.rb +0 -35
  254. data/test/stub/railsapp2/public/useless.txt +0 -1
@@ -0,0 +1,197 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html>
6
+ <head>
7
+ <title>Module: RakeExtensions</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
+ <td class="file-title"><span class="file-title-prefix">Module</span><br />RakeExtensions</td>
55
+ <td align="right">
56
+ <table cellspacing="0" cellpadding="2">
57
+ <tr valign="top">
58
+ <td>In:</td>
59
+ <td>
60
+ <a href="../files/misc/rake/extensions_rb.html">misc/rake/extensions.rb</a>
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ </td>
65
+ </tr>
66
+ </table>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+ <div id="content">
71
+
72
+ <div class="description"><p>
73
+ Provides useful extensions for Rake.
74
+ </p>
75
+ </div>
76
+
77
+
78
+
79
+ <div class="sectiontitle">Methods</div>
80
+ <ul>
81
+ <li><a href="#M000009">subdir</a></li>
82
+ </ul>
83
+
84
+
85
+
86
+
87
+
88
+
89
+ <div class="sectiontitle">Public Instance methods</div>
90
+ <div class="method">
91
+ <div class="title">
92
+ <a name="M000009"></a><b>subdir</b>(dir, &amp;block)
93
+ </div>
94
+ <div class="description">
95
+ <p>
96
+ Allows one to define Rake rules in the context of the given subdirectory.
97
+ For example,
98
+ </p>
99
+ <pre>
100
+ subdir 'foo' do
101
+ file 'libfoo.so' =&gt; ['foo.c'] do
102
+ sh 'gcc foo.c -shared -fPIC -o libfoo.so'
103
+ end
104
+ end
105
+
106
+ subdir 'bar' do
107
+ file 'bar' =&gt; ['bar.c', '../foo/libfoo.so'] do
108
+ sh 'gcc bar.c -o bar -L../foo -lfoo'
109
+ end
110
+ end
111
+ </pre>
112
+ <p>
113
+ is equivalent to:
114
+ </p>
115
+ <pre>
116
+ file 'foo/libfoo.so' =&gt; ['foo/foo.c'] do
117
+ Dir.chdir('foo') do
118
+ sh 'gcc foo.c -shared -fPIC -o libfoo.so'
119
+ end
120
+ end
121
+
122
+ file 'bar/bar' =&gt; ['bar/bar.c', 'foo/libfoo.so'] do
123
+ Dir.chdir('bar') do
124
+ sh 'gcc bar.c -o bar -L../foo -lfoo'
125
+ end
126
+ end
127
+ </pre>
128
+ <h3>String dependencies are assumed to be filenames</h3>
129
+ <p>
130
+ But be careful with string dependencies. They are assumed to be filenames,
131
+ and will be automatically converted. For example:
132
+ </p>
133
+ <pre>
134
+ subdir 'foo' do
135
+ task 'super_app' =&gt; ['super_app:compile', 'super_app:unit_test']
136
+
137
+ task 'super_app:compile' do
138
+ ...
139
+ end
140
+
141
+ task 'super_app:unit_test' do
142
+ ...
143
+ end
144
+ end
145
+ </pre>
146
+ <p>
147
+ will be treated like:
148
+ </p>
149
+ <pre>
150
+ subdir 'foo' do
151
+ # !!!!!!!
152
+ task 'super_app' =&gt; ['foo/super_app:compile', 'foo/super_app:unit_test']
153
+
154
+ task 'super_app:compile' do
155
+ ...
156
+ end
157
+
158
+ task 'super_app:unit_test' do
159
+ ...
160
+ end
161
+ end
162
+ </pre>
163
+ <p>
164
+ To solve this, declare your dependencies as symbols:
165
+ </p>
166
+ <pre>
167
+ task 'super_app' =&gt; [:'super_app:compile', :'super_app:unit_test']
168
+ </pre>
169
+ <p>
170
+ (note the leading &#8217;:&#8217; character)
171
+ </p>
172
+ <h3>Supported Rake commands</h3>
173
+ <p>
174
+ Only the <tt>file</tt> and <tt>target</tt> Rake commands are supported.
175
+ </p>
176
+ </div>
177
+ <div class="sourcecode">
178
+ <p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p>
179
+ <div id="M000009_source" class="dyn-source">
180
+ <pre>
181
+ <span class="ruby-comment cmt"># File misc/rake/extensions.rb, line 99</span>
182
+ 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subdir</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
183
+ 100: <span class="ruby-identifier">subdir</span> = <span class="ruby-constant">Subdir</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>)
184
+ 101: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">dir</span>) <span class="ruby-keyword kw">do</span>
185
+ 102: <span class="ruby-identifier">subdir</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
186
+ 103: <span class="ruby-keyword kw">end</span>
187
+ 104: <span class="ruby-keyword kw">end</span>
188
+ </pre>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ </div>
193
+
194
+ </div>
195
+
196
+ </body>
197
+ </html>
@@ -0,0 +1,131 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html>
6
+ <head>
7
+ <title>Module: Signal</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
+ <td class="file-title"><span class="file-title-prefix">Module</span><br />Signal</td>
55
+ <td align="right">
56
+ <table cellspacing="0" cellpadding="2">
57
+ <tr valign="top">
58
+ <td>In:</td>
59
+ <td>
60
+ <a href="../files/lib/phusion_passenger/utils_rb.html">lib/phusion_passenger/utils.rb</a>
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ </td>
65
+ </tr>
66
+ </table>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+ <div id="content">
71
+
72
+
73
+
74
+
75
+ <div class="sectiontitle">Methods</div>
76
+ <ul>
77
+ <li><a href="#M000010">list_trappable</a></li>
78
+ </ul>
79
+
80
+
81
+
82
+
83
+
84
+
85
+ <div class="sectiontitle">Public Class methods</div>
86
+ <div class="method">
87
+ <div class="title">
88
+ <a name="M000010"></a><b>list_trappable</b>()
89
+ </div>
90
+ <div class="description">
91
+ <p>
92
+ Like Signal.list, but only returns signals that we can actually trap.
93
+ </p>
94
+ </div>
95
+ <div class="sourcecode">
96
+ <p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p>
97
+ <div id="M000010_source" class="dyn-source">
98
+ <pre>
99
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 536</span>
100
+ 536: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">list_trappable</span>
101
+ 537: <span class="ruby-identifier">ruby_engine</span> = <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;ruby&quot;</span>
102
+ 538: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">ruby_engine</span>
103
+ 539: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;ruby&quot;</span>
104
+ 540: <span class="ruby-identifier">result</span> = <span class="ruby-constant">Signal</span>.<span class="ruby-identifier">list</span>
105
+ 541: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;ALRM&quot;</span>)
106
+ 542: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;VTALRM&quot;</span>)
107
+ 543: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
108
+ 544: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;jruby&quot;</span>
109
+ 545: <span class="ruby-identifier">result</span> = <span class="ruby-constant">Signal</span>.<span class="ruby-identifier">list</span>
110
+ 546: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;QUIT&quot;</span>)
111
+ 547: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;ILL&quot;</span>)
112
+ 548: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;FPE&quot;</span>)
113
+ 549: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;KILL&quot;</span>)
114
+ 550: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;SEGV&quot;</span>)
115
+ 551: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;STOP&quot;</span>)
116
+ 552: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;USR1&quot;</span>)
117
+ 553: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
118
+ 554: <span class="ruby-keyword kw">else</span>
119
+ 555: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Signal</span>.<span class="ruby-identifier">list</span>
120
+ 556: <span class="ruby-keyword kw">end</span>
121
+ 557: <span class="ruby-keyword kw">end</span>
122
+ </pre>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+
128
+ </div>
129
+
130
+ </body>
131
+ </html>
@@ -0,0 +1 @@
1
+ Wed, 17 Jun 2009 13:19:26 +0200
@@ -0,0 +1,255 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html>
6
+ <head>
7
+ <title>File: DEVELOPERS.TXT</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
54
+ <tr><td>
55
+ <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
56
+ <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />DEVELOPERS.TXT</td>
57
+ <td align="right">
58
+ <table border='0' cellspacing="0" cellpadding="2">
59
+ <tr>
60
+ <td>Path:</td>
61
+ <td>DEVELOPERS.TXT
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <td>Modified:</td>
66
+ <td>Thu Jun 04 21:13:25 +0200 2009</td>
67
+ </tr>
68
+ </table>
69
+ </td></tr>
70
+ </table>
71
+ </td></tr>
72
+ </table><br />
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+ <div id="content">
77
+
78
+ <div class="description"><h1>Developers information</h1>
79
+ <h2>Required software</h2>
80
+ <p>
81
+ The tests need the following software installed:
82
+ </p>
83
+ <ul>
84
+ <li>All the usual Phusion Passenger dependencies.
85
+
86
+ </li>
87
+ <li>Ruby on Rails 2.0.1 (<b>exactly</b> 2.0.1)
88
+
89
+ </li>
90
+ <li>rspec &gt;= 1.1.2
91
+
92
+ </li>
93
+ <li>mime-types &gt;= 1.15
94
+
95
+ </li>
96
+ <li>daemon_controller (only for running the Nginx integration test). Install
97
+ with: gem install FooBarWidget-daemon_controller -s <a
98
+ href="http://gems.github.com">gems.github.com</a>
99
+
100
+ </li>
101
+ </ul>
102
+ <p>
103
+ The following software is optional:
104
+ </p>
105
+ <ul>
106
+ <li>RCov, for code coverage
107
+
108
+ </li>
109
+ <li>RDoc, for generating HTML Ruby API documentation
110
+
111
+ </li>
112
+ <li>Doxygen, for generating HTML C++ API documentation
113
+
114
+ </li>
115
+ <li>dot (part of Graphviz), for generating diagrams in HTML API documentation
116
+
117
+ </li>
118
+ <li>The font &quot;Bitstream Vera Sans&quot;, used in the class diagrams. See
119
+ <a href="http://www.gnome.org/fonts">www.gnome.org/fonts</a>
120
+
121
+ </li>
122
+ <li>AsciiDoc &gt;= 8.2.5, for converting various doc/*.txt documents to HTML
123
+
124
+ </li>
125
+ </ul>
126
+ <h2>Compiling Phusion Passenger</h2>
127
+ <p>
128
+ Run the following command to compile everything:
129
+ </p>
130
+ <pre>
131
+ rake
132
+ </pre>
133
+ <h2>Directory structure</h2>
134
+ <p>
135
+ The most important directories are:
136
+ </p>
137
+ <dl>
138
+ <dt> lib/phusion_passenger </dt><dd>The source code for the spawn server, which is written in Ruby.
139
+
140
+ </dd>
141
+ <dt> ext/phusion_passenger </dt><dd>Native extensions for Ruby, used by the spawn server.
142
+
143
+ </dd>
144
+ <dt> ext/apache2 </dt><dd>Apache 2-specific source code.
145
+
146
+ </dd>
147
+ <dt> ext/nginx </dt><dd>Nginx-specific source code.
148
+
149
+ </dd>
150
+ <dt> ext/common </dt><dd>Source code shared by the Apache and Nginx modules.
151
+
152
+ </dd>
153
+ <dt> bin </dt><dd>Executables.
154
+
155
+ </dd>
156
+ <dt> doc </dt><dd>Various documentation.
157
+
158
+ </dd>
159
+ <dt> test </dt><dd>Unit tests and integration tests.
160
+
161
+ </dd>
162
+ <dt> test/support </dt><dd>Support/utility code, used in the tests.
163
+
164
+ </dd>
165
+ <dt> test/stub </dt><dd>Stub code, used in the tests.
166
+
167
+ </dd>
168
+ </dl>
169
+ <p>
170
+ Less important directories:
171
+ </p>
172
+ <dl>
173
+ <dt> ext/boost </dt><dd>A stripped-down and customized version of the Boost C++ library (<a
174
+ href="http://www.boost.org">www.boost.org</a>).
175
+
176
+ </dd>
177
+ <dt> ext/oxt </dt><dd>The &quot;OS eXtensions for boosT&quot; library, which provides various
178
+ important functionality necessary for writing robust server software. It
179
+ provides things like support for interruptable system calls and portable
180
+ backtraces for C++. Boost was modified to make use of the functionality
181
+ provided by OXT.
182
+
183
+ </dd>
184
+ <dt> benchmark </dt><dd>Benchmark tools.
185
+
186
+ </dd>
187
+ <dt> debian </dt><dd>Debian packaging files.
188
+
189
+ </dd>
190
+ <dt> man </dt><dd>Man pages.
191
+
192
+ </dd>
193
+ <dt> misc </dt><dd>Miscellaneous tools.
194
+
195
+ </dd>
196
+ <dt> misc/rake </dt><dd>Rake tasks.
197
+
198
+ </dd>
199
+ <dt> vendor </dt><dd>Various vendored libraries.
200
+
201
+ </dd>
202
+ </dl>
203
+ <h2>Tests</h2>
204
+ <p>
205
+ Run all tests:
206
+ </p>
207
+ <pre>
208
+ rake
209
+ </pre>
210
+ <p>
211
+ Run just the tests for the Apache 2 module:
212
+ </p>
213
+ <pre>
214
+ rake test:apache2
215
+ </pre>
216
+ <p>
217
+ Run just the unit tests for the Ruby spawn server:
218
+ </p>
219
+ <pre>
220
+ rake test:ruby
221
+ </pre>
222
+ <p>
223
+ Run just the integration tests:
224
+ </p>
225
+ <pre>
226
+ rake test:integration
227
+ </pre>
228
+ <p>
229
+ <b>Note</b>: some tests, such as the ones that test privilege lowering,
230
+ require root privileges. Those will only be run if Rake is run as root.
231
+ </p>
232
+ <h2>Documentation</h2>
233
+ <p>
234
+ Various developer documents can be found in &#8216;doc/*.html&#8217;.
235
+ </p>
236
+ <p>
237
+ The Ruby part&#8216;s API reference is located in &#8216;doc/rdoc/&#8217;.
238
+ The C++ part&#8216;s API reference is located in &#8216;doc/cxxapi/&#8217;.
239
+ </p>
240
+ </div>
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ </div>
251
+
252
+ </div>
253
+
254
+ </body>
255
+ </html>