colouringcode-passenger 0.1 → 0.2

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 (170) hide show
  1. data/NEWS +129 -0
  2. data/Rakefile +2 -2
  3. data/bin/passenger-install-apache2-module +1 -0
  4. data/bin/passenger-install-nginx-module +4 -2
  5. data/ext/apache2/Hooks.cpp +4 -2
  6. data/ext/common/ApplicationPoolServer.h +1 -1
  7. data/ext/common/ApplicationPoolServerExecutable.cpp +1 -1
  8. data/ext/common/MessageChannel.h +48 -4
  9. data/ext/common/StandardApplicationPool.h +4 -2
  10. data/ext/common/Version.h +1 -1
  11. data/ext/nginx/Configuration.c +1 -1
  12. data/ext/nginx/HttpStatusExtractor.h +1 -0
  13. data/ext/nginx/ScgiRequestParser.h +1 -0
  14. data/ext/oxt/system_calls.cpp +11 -0
  15. data/ext/oxt/system_calls.hpp +2 -1
  16. data/ext/oxt/thread.hpp +97 -1
  17. data/ext/phusion_passenger/native_support.c +30 -1
  18. data/lib/phusion_passenger/constants.rb +1 -1
  19. data/lib/phusion_passenger/dependencies.rb +32 -0
  20. data/lib/phusion_passenger/message_channel.rb +45 -3
  21. data/lib/phusion_passenger/platform_info.rb +1 -1
  22. data/lib/phusion_passenger/rack/application_spawner.rb +10 -4
  23. data/lib/phusion_passenger/rack/request_handler.rb +2 -5
  24. data/lib/phusion_passenger/railz/application_spawner.rb +59 -7
  25. data/lib/phusion_passenger/utils.rb +70 -16
  26. data/{vendor/rack-1.0.0-git/lib/rack → lib/phusion_passenger/utils}/rewindable_input.rb +34 -9
  27. data/test/ApplicationPoolTest.cpp +1 -1
  28. data/test/MessageChannelTest.cpp +9 -1
  29. data/test/stub/message_channel.rb +1 -1
  30. data/test/stub/message_channel_2.rb +1 -1
  31. data/test/stub/message_channel_3.rb +2 -2
  32. metadata +43 -155
  33. data/doc/Architectural overview.html +0 -1
  34. data/doc/rdoc/classes/ConditionVariable.html +0 -194
  35. data/doc/rdoc/classes/Exception.html +0 -120
  36. data/doc/rdoc/classes/GC.html +0 -113
  37. data/doc/rdoc/classes/IO.html +0 -169
  38. data/doc/rdoc/classes/PhusionPassenger.html +0 -238
  39. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +0 -153
  40. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +0 -517
  41. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +0 -719
  42. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +0 -97
  43. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +0 -96
  44. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +0 -97
  45. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +0 -96
  46. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +0 -598
  47. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +0 -140
  48. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +0 -317
  49. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +0 -138
  50. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +0 -154
  51. data/doc/rdoc/classes/PhusionPassenger/Application.html +0 -283
  52. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +0 -172
  53. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +0 -145
  54. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +0 -181
  55. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +0 -141
  56. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +0 -92
  57. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +0 -489
  58. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +0 -350
  59. data/doc/rdoc/classes/PhusionPassenger/Rack.html +0 -91
  60. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +0 -188
  61. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +0 -199
  62. data/doc/rdoc/classes/PhusionPassenger/Railz.html +0 -95
  63. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +0 -438
  64. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +0 -98
  65. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +0 -200
  66. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +0 -436
  67. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +0 -98
  68. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +0 -155
  69. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +0 -402
  70. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +0 -125
  71. data/doc/rdoc/classes/PhusionPassenger/Utils.html +0 -803
  72. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +0 -169
  73. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +0 -140
  74. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +0 -89
  75. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +0 -188
  76. data/doc/rdoc/classes/PlatformInfo.html +0 -866
  77. data/doc/rdoc/classes/RakeExtensions.html +0 -197
  78. data/doc/rdoc/classes/Signal.html +0 -131
  79. data/doc/rdoc/created.rid +0 -1
  80. data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -255
  81. data/doc/rdoc/files/README.html +0 -175
  82. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +0 -92
  83. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +0 -129
  84. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +0 -129
  85. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +0 -126
  86. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +0 -128
  87. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +0 -130
  88. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +0 -122
  89. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +0 -127
  90. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +0 -126
  91. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +0 -122
  92. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +0 -134
  93. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +0 -122
  94. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +0 -122
  95. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +0 -126
  96. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +0 -120
  97. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +0 -122
  98. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +0 -127
  99. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +0 -133
  100. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +0 -125
  101. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +0 -140
  102. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +0 -126
  103. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +0 -145
  104. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +0 -125
  105. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +0 -122
  106. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +0 -159
  107. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +0 -174
  108. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +0 -129
  109. data/doc/rdoc/files/misc/rake/extensions_rb.html +0 -130
  110. data/doc/rdoc/fr_class_index.html +0 -91
  111. data/doc/rdoc/fr_file_index.html +0 -76
  112. data/doc/rdoc/fr_method_index.html +0 -205
  113. data/doc/rdoc/index.html +0 -26
  114. data/doc/rdoc/rdoc-style.css +0 -187
  115. data/vendor/README +0 -13
  116. data/vendor/README_FOR_PACKAGERS +0 -1
  117. data/vendor/rack-1.0.0-git/COPYING +0 -18
  118. data/vendor/rack-1.0.0-git/KNOWN-ISSUES +0 -18
  119. data/vendor/rack-1.0.0-git/README +0 -353
  120. data/vendor/rack-1.0.0-git/Rakefile +0 -164
  121. data/vendor/rack-1.0.0-git/lib/rack.rb +0 -90
  122. data/vendor/rack-1.0.0-git/lib/rack/adapter/camping.rb +0 -22
  123. data/vendor/rack-1.0.0-git/lib/rack/auth/abstract/handler.rb +0 -37
  124. data/vendor/rack-1.0.0-git/lib/rack/auth/abstract/request.rb +0 -37
  125. data/vendor/rack-1.0.0-git/lib/rack/auth/basic.rb +0 -58
  126. data/vendor/rack-1.0.0-git/lib/rack/auth/digest/md5.rb +0 -124
  127. data/vendor/rack-1.0.0-git/lib/rack/auth/digest/nonce.rb +0 -51
  128. data/vendor/rack-1.0.0-git/lib/rack/auth/digest/params.rb +0 -55
  129. data/vendor/rack-1.0.0-git/lib/rack/auth/digest/request.rb +0 -40
  130. data/vendor/rack-1.0.0-git/lib/rack/auth/openid.rb +0 -487
  131. data/vendor/rack-1.0.0-git/lib/rack/builder.rb +0 -63
  132. data/vendor/rack-1.0.0-git/lib/rack/cascade.rb +0 -41
  133. data/vendor/rack-1.0.0-git/lib/rack/chunked.rb +0 -49
  134. data/vendor/rack-1.0.0-git/lib/rack/commonlogger.rb +0 -52
  135. data/vendor/rack-1.0.0-git/lib/rack/conditionalget.rb +0 -47
  136. data/vendor/rack-1.0.0-git/lib/rack/content_length.rb +0 -29
  137. data/vendor/rack-1.0.0-git/lib/rack/content_type.rb +0 -23
  138. data/vendor/rack-1.0.0-git/lib/rack/deflater.rb +0 -96
  139. data/vendor/rack-1.0.0-git/lib/rack/directory.rb +0 -153
  140. data/vendor/rack-1.0.0-git/lib/rack/file.rb +0 -88
  141. data/vendor/rack-1.0.0-git/lib/rack/handler.rb +0 -69
  142. data/vendor/rack-1.0.0-git/lib/rack/handler/cgi.rb +0 -61
  143. data/vendor/rack-1.0.0-git/lib/rack/handler/evented_mongrel.rb +0 -8
  144. data/vendor/rack-1.0.0-git/lib/rack/handler/fastcgi.rb +0 -88
  145. data/vendor/rack-1.0.0-git/lib/rack/handler/lsws.rb +0 -55
  146. data/vendor/rack-1.0.0-git/lib/rack/handler/mongrel.rb +0 -84
  147. data/vendor/rack-1.0.0-git/lib/rack/handler/scgi.rb +0 -59
  148. data/vendor/rack-1.0.0-git/lib/rack/handler/swiftiplied_mongrel.rb +0 -8
  149. data/vendor/rack-1.0.0-git/lib/rack/handler/thin.rb +0 -18
  150. data/vendor/rack-1.0.0-git/lib/rack/handler/webrick.rb +0 -67
  151. data/vendor/rack-1.0.0-git/lib/rack/head.rb +0 -19
  152. data/vendor/rack-1.0.0-git/lib/rack/lint.rb +0 -537
  153. data/vendor/rack-1.0.0-git/lib/rack/lobster.rb +0 -65
  154. data/vendor/rack-1.0.0-git/lib/rack/lock.rb +0 -16
  155. data/vendor/rack-1.0.0-git/lib/rack/methodoverride.rb +0 -27
  156. data/vendor/rack-1.0.0-git/lib/rack/mime.rb +0 -204
  157. data/vendor/rack-1.0.0-git/lib/rack/mock.rb +0 -184
  158. data/vendor/rack-1.0.0-git/lib/rack/recursive.rb +0 -57
  159. data/vendor/rack-1.0.0-git/lib/rack/reloader.rb +0 -106
  160. data/vendor/rack-1.0.0-git/lib/rack/request.rb +0 -248
  161. data/vendor/rack-1.0.0-git/lib/rack/response.rb +0 -183
  162. data/vendor/rack-1.0.0-git/lib/rack/session/abstract/id.rb +0 -142
  163. data/vendor/rack-1.0.0-git/lib/rack/session/cookie.rb +0 -91
  164. data/vendor/rack-1.0.0-git/lib/rack/session/memcache.rb +0 -109
  165. data/vendor/rack-1.0.0-git/lib/rack/session/pool.rb +0 -100
  166. data/vendor/rack-1.0.0-git/lib/rack/showexceptions.rb +0 -349
  167. data/vendor/rack-1.0.0-git/lib/rack/showstatus.rb +0 -106
  168. data/vendor/rack-1.0.0-git/lib/rack/static.rb +0 -38
  169. data/vendor/rack-1.0.0-git/lib/rack/urlmap.rb +0 -55
  170. data/vendor/rack-1.0.0-git/lib/rack/utils.rb +0 -522
@@ -1,26 +0,0 @@
1
-
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
- <head>
7
- <title>Passenger Ruby API</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- </head>
10
-
11
- <frameset cols="20%,*">
12
- <frameset rows="15%,55%,30%">
13
- <frame src="fr_file_index.html" title="Files" name="Files" />
14
- <frame src="fr_class_index.html" name="Classes" />
15
- <frame src="fr_method_index.html" name="Methods" />
16
- </frameset>
17
- <frame src="files/README.html" name="docwin" />
18
- <noframes>
19
- <body bgcolor="white">
20
- Click <a href="html/index.html">here</a> for a non-frames
21
- version of this page.
22
- </body>
23
- </noframes>
24
- </frameset>
25
-
26
- </html>
@@ -1,187 +0,0 @@
1
- a {
2
- color: #00F;
3
- text-decoration: none;
4
- }
5
-
6
- a:hover {
7
- color: #77F;
8
- text-decoration: underline;
9
- }
10
-
11
- body, td, p {
12
- font-family: "Bitstream Vera Sans", Verdana, Arial, Helvetica, sans-serif;
13
- background: #FFF;
14
- color: #000;
15
- margin: 0px;
16
- font-size: small;
17
- }
18
-
19
- p {
20
- margin-top: 0.5em;
21
- margin-bottom: 0.5em;
22
- }
23
-
24
- #content {
25
- margin: 2em;
26
- margin-left: 3.5em;
27
- margin-right: 3.5em;
28
- }
29
-
30
- #description p {
31
- margin-bottom: 0.5em;
32
- }
33
-
34
- .sectiontitle {
35
- margin-top: 1em;
36
- margin-bottom: 1em;
37
- padding: 0.5em;
38
- padding-left: 2em;
39
- background: #005;
40
- color: #FFF;
41
- font-weight: bold;
42
- }
43
-
44
- .attr-rw {
45
- padding-left: 1em;
46
- padding-right: 1em;
47
- text-align: center;
48
- color: #055;
49
- }
50
-
51
- .attr-name {
52
- font-weight: bold;
53
- }
54
-
55
- .attr-desc {
56
- }
57
-
58
- .attr-value {
59
- font-family: monospace;
60
- }
61
-
62
- .file-title-prefix {
63
- font-size: large;
64
- }
65
-
66
- .file-title {
67
- font-size: large;
68
- font-weight: bold;
69
- background: #005;
70
- color: #FFF;
71
- }
72
-
73
- .banner {
74
- background: #005;
75
- color: #FFF;
76
- border: 1px solid black;
77
- padding: 1em;
78
- }
79
-
80
- .banner td {
81
- background: transparent;
82
- color: #FFF;
83
- }
84
-
85
- h1 a, h2 a, .sectiontitle a, .banner a {
86
- color: #FF0;
87
- }
88
-
89
- h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
90
- color: #FF7;
91
- }
92
-
93
- .dyn-source {
94
- display: none;
95
- background: #fffde8;
96
- color: #000;
97
- border: #ffe0bb dotted 1px;
98
- margin: 0.5em 2em 0.5em 2em;
99
- padding: 0.5em;
100
- }
101
-
102
- .dyn-source .cmt {
103
- color: #00F;
104
- font-style: italic;
105
- }
106
-
107
- .dyn-source .kw {
108
- color: #070;
109
- font-weight: bold;
110
- }
111
-
112
- .method {
113
- margin-left: 1em;
114
- margin-right: 1em;
115
- margin-bottom: 1em;
116
- }
117
-
118
- .description pre {
119
- padding: 0.5em;
120
- border: #ffe0bb dotted 1px;
121
- background: #fffde8;
122
- }
123
-
124
- .method .title {
125
- font-family: monospace;
126
- font-size: large;
127
- border-bottom: 1px dashed black;
128
- margin-bottom: 0.3em;
129
- padding-bottom: 0.1em;
130
- }
131
-
132
- .method .description, .method .sourcecode {
133
- margin-left: 1em;
134
- }
135
-
136
- .description p, .sourcecode p {
137
- margin-bottom: 0.5em;
138
- }
139
-
140
- .method .sourcecode p.source-link {
141
- text-indent: 0em;
142
- margin-top: 0.5em;
143
- }
144
-
145
- .method .aka {
146
- margin-top: 0.3em;
147
- margin-left: 1em;
148
- font-style: italic;
149
- text-indent: 2em;
150
- }
151
-
152
- h1 {
153
- padding: 1em;
154
- margin-left: -1.5em;
155
- font-size: x-large;
156
- font-weight: bold;
157
- color: #FFF;
158
- background: #007;
159
- }
160
-
161
- h2 {
162
- padding: 0.5em 1em 0.5em 1em;
163
- margin-left: -1.5em;
164
- font-size: large;
165
- font-weight: bold;
166
- color: #FFF;
167
- background: #009;
168
- }
169
-
170
- h3, h4, h5, h6 {
171
- color: #220088;
172
- border-bottom: #5522bb solid 1px;
173
- }
174
-
175
- .sourcecode > pre {
176
- padding: 0.5em;
177
- border: 1px dotted black;
178
- background: #FFE;
179
- }
180
-
181
- dt {
182
- font-weight: bold
183
- }
184
-
185
- dd {
186
- margin-bottom: 0.7em;
187
- }
@@ -1,13 +0,0 @@
1
- You might be wondering why the Rack library is vendored, and why we don't
2
- just depend on the Rack gem. The reason for this is because there are broken
3
- applications out there that have a hard dependency on rack == 0.4.0 (the
4
- latest version of Rack is 1.0.0 at the time of writing). If Passenger
5
- depends on the Rack gem, then the application will crash with a gem version
6
- conflict error upon executing 'gem "rack", "=0.4.0"'.
7
-
8
- To fix this conflict, we vendor Rack. When we load our vendored Rack library,
9
- it won't be registered as a gem, so no RubyGems version conflict exception
10
- will be raised. This vendored version is commit 884770528a3, slightly older
11
- than the 1.0.0 release.
12
-
13
- Rack is mostly backwards-compatible so there shouldn't be any problems.
@@ -1 +0,0 @@
1
- Rack is vendored for a reason, don't try to remove it. See README.
@@ -1,18 +0,0 @@
1
- Copyright (c) 2007, 2008, 2009 Christian Neukirchen <purl.org/net/chneukirchen>
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
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell 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
16
- THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,18 +0,0 @@
1
- = Known issues with Rack and Web servers
2
-
3
- * Lighttpd sets wrong SCRIPT_NAME and PATH_INFO if you mount your
4
- FastCGI app at "/". This can be fixed by using this middleware:
5
-
6
- class LighttpdScriptNameFix
7
- def initialize(app)
8
- @app = app
9
- end
10
-
11
- def call(env)
12
- env["PATH_INFO"] = env["SCRIPT_NAME"].to_s + env["PATH_INFO"].to_s
13
- env["SCRIPT_NAME"] = ""
14
- @app.call(env)
15
- end
16
- end
17
-
18
- Of course, use this only when your app runs at "/".
@@ -1,353 +0,0 @@
1
- = Rack, a modular Ruby webserver interface
2
-
3
- Rack provides a minimal, modular and adaptable interface for developing
4
- web applications in Ruby. By wrapping HTTP requests and responses in
5
- the simplest way possible, it unifies and distills the API for web
6
- servers, web frameworks, and software in between (the so-called
7
- middleware) into a single method call.
8
-
9
- The exact details of this are described in the Rack specification,
10
- which all Rack applications should conform to.
11
-
12
- == Specification changes in this release
13
-
14
- With Rack 1.0, the Rack specification (found in SPEC) changed in the
15
- following backward-incompatible ways. This was done to properly
16
- support Ruby 1.9 and to deprecate some problematic techniques:
17
-
18
- * Rack::VERSION has been pushed to [1,0].
19
- * Header values must be Strings now, split on "\n".
20
- * rack.input must be rewindable and support reading into a buffer,
21
- wrap with Rack::RewindableInput if it isn't.
22
- * Content-Length can be missing, in this case chunked transfer
23
- encoding is used.
24
- * Bodies can now additionally respond to #to_path with a filename to
25
- be served.
26
- * String bodies are deprecated and will not work with Ruby 1.9, use an
27
- Array with a single String instead.
28
- * rack.session is now specified.
29
-
30
- == Supported web servers
31
-
32
- The included *handlers* connect all kinds of web servers to Rack:
33
- * Mongrel
34
- * EventedMongrel
35
- * SwiftipliedMongrel
36
- * WEBrick
37
- * FCGI
38
- * CGI
39
- * SCGI
40
- * LiteSpeed
41
- * Thin
42
-
43
- These web servers include Rack handlers in their distributions:
44
- * Ebb
45
- * Fuzed
46
- * Phusion Passenger (which is mod_rack for Apache and for nginx)
47
- * Unicorn
48
-
49
- Any valid Rack app will run the same on all these handlers, without
50
- changing anything.
51
-
52
- == Supported web frameworks
53
-
54
- The included *adapters* connect Rack with existing Ruby web frameworks:
55
- * Camping
56
-
57
- These frameworks include Rack adapters in their distributions:
58
- * Camping
59
- * Coset
60
- * Halcyon
61
- * Mack
62
- * Maveric
63
- * Merb
64
- * Racktools::SimpleApplication
65
- * Ramaze
66
- * Ruby on Rails
67
- * Rum
68
- * Sinatra
69
- * Sin
70
- * Vintage
71
- * Waves
72
- * Wee
73
-
74
- Current links to these projects can be found at
75
- http://wiki.ramaze.net/Home#other-frameworks
76
-
77
- == Available middleware
78
-
79
- Between the server and the framework, Rack can be customized to your
80
- applications needs using middleware, for example:
81
- * Rack::URLMap, to route to multiple applications inside the same process.
82
- * Rack::CommonLogger, for creating Apache-style logfiles.
83
- * Rack::ShowException, for catching unhandled exceptions and
84
- presenting them in a nice and helpful way with clickable backtrace.
85
- * Rack::File, for serving static files.
86
- * ...many others!
87
-
88
- All these components use the same interface, which is described in
89
- detail in the Rack specification. These optional components can be
90
- used in any way you wish.
91
-
92
- == Convenience
93
-
94
- If you want to develop outside of existing frameworks, implement your
95
- own ones, or develop middleware, Rack provides many helpers to create
96
- Rack applications quickly and without doing the same web stuff all
97
- over:
98
- * Rack::Request, which also provides query string parsing and
99
- multipart handling.
100
- * Rack::Response, for convenient generation of HTTP replies and
101
- cookie handling.
102
- * Rack::MockRequest and Rack::MockResponse for efficient and quick
103
- testing of Rack application without real HTTP round-trips.
104
-
105
- == rack-contrib
106
-
107
- The plethora of useful middleware created the need for a project that
108
- collects fresh Rack middleware. rack-contrib includes a variety of
109
- add-on components for Rack and it is easy to contribute new modules.
110
-
111
- * http://github.com/rack/rack-contrib
112
-
113
- == rackup
114
-
115
- rackup is a useful tool for running Rack applications, which uses the
116
- Rack::Builder DSL to configure middleware and build up applications
117
- easily.
118
-
119
- rackup automatically figures out the environment it is run in, and
120
- runs your application as FastCGI, CGI, or standalone with Mongrel or
121
- WEBrick---all from the same configuration.
122
-
123
- == Quick start
124
-
125
- Try the lobster!
126
-
127
- Either with the embedded WEBrick starter:
128
-
129
- ruby -Ilib lib/rack/lobster.rb
130
-
131
- Or with rackup:
132
-
133
- bin/rackup -Ilib example/lobster.ru
134
-
135
- By default, the lobster is found at http://localhost:9292.
136
-
137
- == Installing with RubyGems
138
-
139
- A Gem of Rack is available. You can install it with:
140
-
141
- gem install rack
142
-
143
- I also provide a local mirror of the gems (and development snapshots)
144
- at my site:
145
-
146
- gem install rack --source http://chneukirchen.org/releases/gems/
147
-
148
- == Running the tests
149
-
150
- Testing Rack requires the test/spec testing framework:
151
-
152
- gem install test-spec
153
-
154
- There are two rake-based test tasks:
155
-
156
- rake test tests all the fast tests (no Handlers or Adapters)
157
- rake fulltest runs all the tests
158
-
159
- The fast testsuite has no dependencies outside of the core Ruby
160
- installation and test-spec.
161
-
162
- To run the test suite completely, you need:
163
-
164
- * camping
165
- * fcgi
166
- * memcache-client
167
- * mongrel
168
- * ruby-openid
169
- * thin
170
-
171
- The full set of tests test FCGI access with lighttpd (on port
172
- 9203) so you will need lighttpd installed as well as the FCGI
173
- libraries and the fcgi gem:
174
-
175
- Download and install lighttpd:
176
-
177
- http://www.lighttpd.net/download
178
-
179
- Installing the FCGI libraries:
180
-
181
- curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
182
- tar xzvf fcgi-2.4.0.tar.gz
183
- cd fcgi-2.4.0
184
- ./configure --prefix=/usr/local
185
- make
186
- sudo make install
187
- cd ..
188
-
189
- Installing the Ruby fcgi gem:
190
-
191
- gem install fcgi
192
-
193
- Furthermore, to test Memcache sessions, you need memcached (will be
194
- run on port 11211) and memcache-client installed.
195
-
196
- == History
197
-
198
- * March 3rd, 2007: First public release 0.1.
199
-
200
- * May 16th, 2007: Second public release 0.2.
201
- * HTTP Basic authentication.
202
- * Cookie Sessions.
203
- * Static file handler.
204
- * Improved Rack::Request.
205
- * Improved Rack::Response.
206
- * Added Rack::ShowStatus, for better default error messages.
207
- * Bug fixes in the Camping adapter.
208
- * Removed Rails adapter, was too alpha.
209
-
210
- * February 26th, 2008: Third public release 0.3.
211
- * LiteSpeed handler, by Adrian Madrid.
212
- * SCGI handler, by Jeremy Evans.
213
- * Pool sessions, by blink.
214
- * OpenID authentication, by blink.
215
- * :Port and :File options for opening FastCGI sockets, by blink.
216
- * Last-Modified HTTP header for Rack::File, by blink.
217
- * Rack::Builder#use now accepts blocks, by Corey Jewett.
218
- (See example/protectedlobster.ru)
219
- * HTTP status 201 can contain a Content-Type and a body now.
220
- * Many bugfixes, especially related to Cookie handling.
221
-
222
- * August 21st, 2008: Fourth public release 0.4.
223
- * New middleware, Rack::Deflater, by Christoffer Sawicki.
224
- * OpenID authentication now needs ruby-openid 2.
225
- * New Memcache sessions, by blink.
226
- * Explicit EventedMongrel handler, by Joshua Peek <josh@joshpeek.com>
227
- * Rack::Reloader is not loaded in rackup development mode.
228
- * rackup can daemonize with -D.
229
- * Many bugfixes, especially for pool sessions, URLMap, thread safety
230
- and tempfile handling.
231
- * Improved tests.
232
- * Rack moved to Git.
233
-
234
- * January 6th, 2009: Fifth public release 0.9.
235
- * Rack is now managed by the Rack Core Team.
236
- * Rack::Lint is stricter and follows the HTTP RFCs more closely.
237
- * Added ConditionalGet middleware.
238
- * Added ContentLength middleware.
239
- * Added Deflater middleware.
240
- * Added Head middleware.
241
- * Added MethodOverride middleware.
242
- * Rack::Mime now provides popular MIME-types and their extension.
243
- * Mongrel Header now streams.
244
- * Added Thin handler.
245
- * Official support for swiftiplied Mongrel.
246
- * Secure cookies.
247
- * Made HeaderHash case-preserving.
248
- * Many bugfixes and small improvements.
249
-
250
- * January 9th, 2009: Sixth public release 0.9.1.
251
- * Fix directory traversal exploits in Rack::File and Rack::Directory.
252
-
253
- * April 25th, 2009: Seventh public release 1.0.0.
254
- * SPEC change: Rack::VERSION has been pushed to [1,0].
255
- * SPEC change: header values must be Strings now, split on "\n".
256
- * SPEC change: Content-Length can be missing, in this case chunked transfer
257
- encoding is used.
258
- * SPEC change: rack.input must be rewindable and support reading into
259
- a buffer, wrap with Rack::RewindableInput if it isn't.
260
- * SPEC change: rack.session is now specified.
261
- * SPEC change: Bodies can now additionally respond to #to_path with
262
- a filename to be served.
263
- * NOTE: String bodies break in 1.9, use an Array consisting of a
264
- single String instead.
265
- * New middleware Rack::Lock.
266
- * New middleware Rack::ContentType.
267
- * Rack::Reloader has been rewritten.
268
- * Major update to Rack::Auth::OpenID.
269
- * Support for nested parameter parsing in Rack::Response.
270
- * Support for redirects in Rack::Response.
271
- * HttpOnly cookie support in Rack::Response.
272
- * The Rakefile has been rewritten.
273
- * Many bugfixes and small improvements.
274
-
275
- == Contact
276
-
277
- Please mail bugs, suggestions and patches to
278
- <mailto:rack-devel@googlegroups.com>.
279
-
280
- Mailing list archives are available at
281
- <http://groups.google.com/group/rack-devel>.
282
-
283
- There is a bug tracker at <http://rack.lighthouseapp.com/>.
284
-
285
- Git repository (send Git patches to the mailing list):
286
- * http://github.com/rack/rack
287
- * http://git.vuxu.org/cgi-bin/gitweb.cgi?p=rack.git
288
-
289
- You are also welcome to join the #rack channel on irc.freenode.net.
290
-
291
- == Thanks
292
-
293
- The Rack Core Team, consisting of
294
-
295
- * Christian Neukirchen (chneukirchen)
296
- * James Tucker (raggi)
297
- * Josh Peek (josh)
298
- * Michael Fellinger (manveru)
299
- * Ryan Tomayko (rtomayko)
300
- * Scytrin dai Kinthra (scytrin)
301
-
302
- would like to thank:
303
-
304
- * Adrian Madrid, for the LiteSpeed handler.
305
- * Christoffer Sawicki, for the first Rails adapter and Rack::Deflater.
306
- * Tim Fletcher, for the HTTP authentication code.
307
- * Luc Heinrich for the Cookie sessions, the static file handler and bugfixes.
308
- * Armin Ronacher, for the logo and racktools.
309
- * Aredridel, Ben Alpert, Dan Kubb, Daniel Roethlisberger, Matt Todd,
310
- Tom Robinson, Phil Hagelberg, and S. Brent Faulkner for bug fixing
311
- and other improvements.
312
- * Brian Candler, for Rack::ContentType.
313
- * Graham Batty, for improved handler loading.
314
- * Stephen Bannasch, for bug reports and documentation.
315
- * Gary Wright, for proposing a better Rack::Response interface.
316
- * Jonathan Buch, for improvements regarding Rack::Response.
317
- * Armin Röhrl, for tracking down bugs in the Cookie generator.
318
- * Alexander Kellett for testing the Gem and reviewing the announcement.
319
- * Marcus Rückert, for help with configuring and debugging lighttpd.
320
- * The WSGI team for the well-done and documented work they've done and
321
- Rack builds up on.
322
- * All bug reporters and patch contributers not mentioned above.
323
-
324
- == Copyright
325
-
326
- Copyright (C) 2007, 2008, 2009 Christian Neukirchen <http://purl.org/net/chneukirchen>
327
-
328
- Permission is hereby granted, free of charge, to any person obtaining a copy
329
- of this software and associated documentation files (the "Software"), to
330
- deal in the Software without restriction, including without limitation the
331
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
332
- sell copies of the Software, and to permit persons to whom the Software is
333
- furnished to do so, subject to the following conditions:
334
-
335
- The above copyright notice and this permission notice shall be included in
336
- all copies or substantial portions of the Software.
337
-
338
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
339
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
340
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
341
- THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
342
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
343
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
344
-
345
- == Links
346
-
347
- Rack:: <http://rack.rubyforge.org/>
348
- Rack's Rubyforge project:: <http://rubyforge.org/projects/rack>
349
- Official Rack repositories:: <http://github.com/rack>
350
- rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
351
-
352
- Christian Neukirchen:: <http://chneukirchen.org/>
353
-