jruby-rack 1.0.6.rc1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,38 @@
1
1
  == 1.0.6 (01/20/11)
2
2
 
3
- - Related to JRUBY-5281 and spaces in the path. Copy jruby.home fix
4
- here also. Fixes "no such file to load" LoadErrors for lots of
3
+ - GH#4: Related to JRUBY-5281 and spaces in the path. Copy jruby.home
4
+ fix here also. Fixes "no such file to load" LoadErrors for lots of
5
5
  cases.
6
6
  - NOTE: Next release will remove this code from JRuby-Rack completely,
7
7
  relying on JRuby to properly determine jruby.home.
8
8
  - GH#8: Allow DefaultRackApplicationFactory to use an existing, single
9
9
  runtime. (David Calavera)
10
+ - GH#9: Support chunked Transfer-Encoding, allowing for early flush of
11
+ the output (Alejandro Crosa)
12
+ - Add some new options for handling the Rack body.
13
+ - If the body object responds to `#call`, then the servlet output
14
+ stream will be yielded to it.
15
+ - If the body object responds to `#to_channel`, then JRuby-Rack will
16
+ copy the channel to the output stream for you. The same happens if
17
+ the body responds to `#to_inputstream`.
18
+ - Otherwise, JRuby-Rack follows the standard Rack behavior of
19
+ calling `#each` on the body and copying the contents to the output
20
+ stream.
21
+ - GH#7: JavaServletStore: Add missing #exists? and #destroy
22
+ implementations
23
+ - JRUBY_RACK-38: Don't needlessly raise errors because of client abort
24
+ exceptions
25
+ - GH#5: Experimental background spooling enabled by
26
+ `jruby.rack.background.spool` context parameter
27
+ - JRUBY_RACK-39: Proper routing of / => /index.html (if it exists).
28
+ New config properties `jruby.rack.filter.adds.html` and
29
+ `jruby.rack.filter.verify.resource.exists` to tweak this behavior.
30
+ - Improved error and environment capture when something goes wrong,
31
+ e.g., `no such file to load` errors. Now a status dump will be put
32
+ in the server log. In the future, we may hook up a remote bug
33
+ submission capture process.
34
+ - Add env['SERVER_SOFTWARE'] to Rack environment.
35
+ - Hack around Bundler bug #1033
10
36
 
11
37
  == 1.0.5 (01/11/11)
12
38
 
data/README.md CHANGED
@@ -14,7 +14,7 @@ depends on the latest version of JRuby-Rack and ensures it gets placed in
14
14
  your WAR file when it gets built.
15
15
 
16
16
  If you're assembling your own WAR using other means, you can install the
17
- `jruby-rack` gem. It provides a method to located the jruby-rack jar file:
17
+ `jruby-rack` gem. It provides a method to locate the jruby-rack jar file:
18
18
 
19
19
  require 'fileutils'
20
20
  require 'jruby-rack'
@@ -61,22 +61,9 @@ runtime pool as you wish.
61
61
 
62
62
  ## For Other Rack Applications
63
63
 
64
- Here's a sample web.xml configuration for a Sinatra application. The
65
- main difference is to place the rackup script for assembling the
66
- Rack-based application in the 'rackup' parameter. Be sure to escape
67
- angle-brackets for XML.
68
-
69
- <context-param>
70
- <param-name>rackup</param-name>
71
- <param-value>
72
- require 'rubygems'
73
- gem 'sinatra', '~&gt; 0.9'
74
- require './lib/demo'
75
- set :run, false
76
- set :environment, :production
77
- run Sinatra::Application
78
- </param-value>
79
- </context-param>
64
+ Here's a sample web.xml configuration for a Rack application. The main
65
+ difference is that JRuby-Rack looks for a "rackup" file named
66
+ `config.ru` in `WEB-INF/config.ru` or `WEB-INF/*/config.ru`.
80
67
 
81
68
  <filter>
82
69
  <filter-name>RackFilter</filter-name>
@@ -91,6 +78,23 @@ angle-brackets for XML.
91
78
  <listener-class>org.jruby.rack.RackServletContextListener</listener-class>
92
79
  </listener>
93
80
 
81
+ If you don't have a config.ru or don't want to include it in your web
82
+ app, you can embed it in web.xml as follows (using Sinatra as an
83
+ example). Be sure to escape angle-brackets for XML!
84
+
85
+ <context-param>
86
+ <param-name>rackup</param-name>
87
+ <param-value>
88
+ require 'rubygems'
89
+ gem 'sinatra', '~&gt; 1.0'
90
+ require './lib/demo'
91
+ set :run, false
92
+ set :environment, :production
93
+ run Sinatra::Application
94
+ </param-value>
95
+ </context-param>
96
+
97
+
94
98
  # Features
95
99
 
96
100
  ## Servlet Filter
@@ -135,10 +139,10 @@ framework. In the case of Rails, runtimes are pooled. For Merb and
135
139
  other Rack applications, a single runtime is created and shared for
136
140
  every request.
137
141
 
138
- ## Servlet Context Init Parameters
142
+ ## JRuby-Rack Configuration
139
143
 
140
- JRuby-Rack can be configured by setting context init parameters in
141
- web.xml.
144
+ JRuby-Rack can be configured by setting these key value pairs either
145
+ as context init parameters in web.xml or as VM-wide system properties.
142
146
 
143
147
  - `rackup`: Rackup script for configuring how the Rack application is
144
148
  mounted. Required for Rack-based applications other than Rails or
@@ -171,17 +175,26 @@ web.xml.
171
175
  `production`.
172
176
  - `jruby.rack.logging`: Specify the logging device to use. Defaults to
173
177
  `servlet_context`. See below.
174
- - `jruby.rack.slash.index`: Force rewriting of requests that end in
175
- '/' to be passed through to the container as '/index.html'. Default
176
- is false, but is turned on for Jetty by default to avoid triggering
177
- directory index pages.
178
+ - `jruby.rack.background.spool`: (EXPERIMENTAL) Enable large request
179
+ bodies to be spooled to a tempfile in the background.
180
+ - `jruby.rack.filter.adds.html`: The default behavior for Rails and
181
+ many other Ruby applications is to add an .html extension to the
182
+ resource and attempt to handle it before serving a dynamic request
183
+ on the original URI. However, this behavior may confuse other
184
+ servlets in your application that have a wildcard mapping. Defaults to true.
185
+ - `jruby.rack.filter.verify.resource.exists`: If
186
+ `jruby.rack.filter.adds.html` is true, then this setting, when true,
187
+ adds an additional check using `ServletContext#getResource` to
188
+ verify that the .html resource exists. Default is false. (Note that
189
+ apparently some servers may not implement `getResource` in the way
190
+ that is expected here, so in that case this setting won't matter.)
178
191
 
179
192
  ## Logging
180
193
 
181
194
  JRuby-Rack sets up a delegate logger for Rails that sends logging
182
195
  output to `javax.servlet.ServletContext#log` by default. If you wish
183
- to use a different logging system, set the `jruby.rack.logging`
184
- context parameter as follows:
196
+ to use a different logging system, configure `jruby.rack.logging` as
197
+ follows:
185
198
 
186
199
  - `servlet_context` (default): Sends log messages to the servlet
187
200
  context.
@@ -193,13 +206,13 @@ context parameter as follows:
193
206
  left up to you.
194
207
 
195
208
  For those loggers that require a specific named logger, set it in the
196
- `jruby.rack.logging.name` context parameter.
209
+ `jruby.rack.logging.name` option.
197
210
 
198
211
  # Building
199
212
 
200
213
  Checkout the JRuby Rack code and cd to that directory.
201
214
 
202
- git clone git://kenai.com/jruby-rack~main jruby-rack
215
+ git clone git://github.com/nicksieger/jruby-rack.git
203
216
  cd jruby-rack
204
217
 
205
218
  You can choose to build with either Maven or Rake. Either of the
@@ -214,9 +227,6 @@ The generated jar should be located here: target/jruby-rack-*.jar.
214
227
 
215
228
  This example shows how to create and deploy a simple Rails app using
216
229
  the embedded Java database H2 to a WAR using Warble and JRuby Rack.
217
- JRuby Rack is now included in the latest release of Warbler (0.9.9),
218
- but you can build your own jar from source and substitute it if you
219
- like.
220
230
 
221
231
  Install Rails and the driver and ActiveRecord adapters for the H2
222
232
  database:
@@ -229,7 +239,7 @@ Install Warbler:
229
239
 
230
240
  Make the "Blog" application
231
241
 
232
- jruby -S rails blog
242
+ jruby -S rails new blog
233
243
  cd blog
234
244
 
235
245
  Copy this configuration into config/database.yml:
@@ -248,16 +258,16 @@ Copy this configuration into config/database.yml:
248
258
 
249
259
  Generate a scaffold for a simple model of blog comments.
250
260
 
251
- jruby script/generate scaffold comment name:string body:text
261
+ jruby script/rails generate scaffold comment name:string body:text
252
262
 
253
263
  Run the database migration that was just created as part of the scaffold.
254
264
 
255
265
  jruby -S rake db:migrate
256
266
 
257
- Start your application on the Rails default port 3000 using Mongrel/
267
+ Start your application on the Rails default port 3000 using WEBrick
258
268
  and make sure it works:
259
269
 
260
- jruby script/server
270
+ jruby script/rails server
261
271
 
262
272
  Generate a custom Warbler WAR configuration for the blog application
263
273
 
@@ -310,6 +320,7 @@ The war should be ready to deploy to your Java application server.
310
320
  project, Goldspike
311
321
  - Chris Neukirchen, for Rack
312
322
  - Sun Microsystems, for early project support
323
+ - Engine Yard, for more recent support
313
324
 
314
325
  [1]: http://caldersphere.rubyforge.org/warbler
315
326
  [2]: http://repository.codehaus.org/org/jruby/rack/jruby-rack/
Binary file
@@ -7,6 +7,6 @@
7
7
 
8
8
  module JRuby
9
9
  module Rack
10
- VERSION = "1.0.6.rc1"
10
+ VERSION = "1.0.6"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-rack
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 1.0.6.rc1
4
+ prerelease:
5
+ version: 1.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nick Sieger
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-01-25 00:00:00 -06:00
13
+ date: 2011-02-11 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -27,7 +27,7 @@ files:
27
27
  - History.txt
28
28
  - LICENSE.txt
29
29
  - README.md
30
- - lib/jruby-rack-1.0.6.rc1.jar
30
+ - lib/jruby-rack-1.0.6.jar
31
31
  - lib/jruby-rack.rb
32
32
  - lib/jruby/rack/version.rb
33
33
  has_rdoc: true
@@ -48,13 +48,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
48
  required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - ">"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 1.3.1
53
+ version: "0"
54
54
  requirements: []
55
55
 
56
56
  rubyforge_project: jruby-extras
57
- rubygems_version: 1.4.2
57
+ rubygems_version: 1.5.1
58
58
  signing_key:
59
59
  specification_version: 3
60
60
  summary: Rack adapter for JRuby and Servlet Containers
Binary file