jruby-rack 1.2.7 → 1.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24de58d357962944b8e2dd77cf34c3af33e5e5f93a68ebf4f75c86666795a9a1
4
- data.tar.gz: 3e19c76e147b46be50552f6df538588e023ea1fb2556c964633c16320493e84b
3
+ metadata.gz: 480bad7f58a728015d2d14bbf86ec8296dc3620cdd6d10a4e5d0ee7cf747d0e6
4
+ data.tar.gz: fc3591afbf787931dd71a41422f156b508dcd161c487672009aada3ae183caf5
5
5
  SHA512:
6
- metadata.gz: 78c1c3a405e8858a390963ab7311a81ce31e3265936949b4900cd5d91b35f6b11f79b214ed46a7ce0951f9ae4f0492bfeef2379e1dedd48077038e943c70c2ba
7
- data.tar.gz: e0462a4181218c7cbec0ffbb9d4dae3d0bf0fc0de80b8e971fa991056c281976afaa33a6ec873583d582b585a7dcfce8a7c79f2095d2cb445cf5598c13dbac8a
6
+ metadata.gz: f4d4ba89f604deebbd80d7213c69e964f18d33373c25bf80a431338d659844e62e02311300c6c3c6262cdf38c335bf290797e8f8432aeffbfbb478a1aa274c9e
7
+ data.tar.gz: aa83558ba91a6a38e13801a78b3d0f7540727a8673036a85aca355908010afcb10a2a168ae21449b7cc8be885e5a40862ee5bcfd2c16199fd48eafca174e9887
data/CHANGELOG.md CHANGED
@@ -1,4 +1,51 @@
1
- ## 1.2.7 (UNRELEASED)
1
+ ## 1.3.0 (UNRELEASED)
2
+
3
+ - Officially support Javax Servlet API 4.0 (JEE 8)
4
+ - Refactor logging for more sane defaults
5
+ - Remove long-deprecated configuration and API functionality
6
+
7
+ For most users this should be a minor upgrade; as long as you do not depend on functionality deprecated within
8
+ JRuby-Rack 1.2.x, EOL JRuby or EOL Rails versions.
9
+
10
+ Breaking compatibility changes
11
+ - Drop support for JRuby 9.x (and thus Java < 21)
12
+ - Drop support for Rails < 7.2
13
+ - Drop JMS support
14
+
15
+ Breaking behavioral changes
16
+ - Change context listener to throw by default in case of an exception during initialization
17
+ - Change rails context listener to assume a thread-safe application by default
18
+ - Rack is no longer vendored inside the jar, so applications must ensure rack is provided via bundler or GEM_PATH
19
+
20
+ Breaking configuration capability changes
21
+ - Drop `jruby.rack.jruby.version` and `jruby.rack.rack.release` keys from rack `env` Hash
22
+ - Drop deprecated and undocumented jruby-rack 1.0 backwards compat properties `jruby.runtime.timeout.sec`, `jruby.runtime.initializer.threads`, `jruby.init.serial`, `jruby.rack.request.size.threshold.bytes`
23
+ - Drop deprecated `jruby.rack.ignore.env` property, replaced long ago by `jruby.runtime.env` and optional `jruby.runtime.env.rubyopt`
24
+ - Drop deprecated `jruby.rack.filter.*` properties, replaced long ago by init parameters `addsHtmlToPathInfo` and `verifiesHtmlResource`
25
+ - Drop handling of `# rack.version` magic comments inside `config.ru` files, replaced by bundler or user-managed `GEM_PATH`
26
+
27
+ Breaking Java API changes (only relevant for users extending the Java API)
28
+ - Drop unnecessary `jruby.compat.version` and `RackConfig.getCompatVersion()` API
29
+ - Drop deprecated `org.jruby.rack.RackInput` alias for `org.jruby.rack.ext.Input` class
30
+ - Drop/rename deprecated `RackConfig` and `ServletRackEnvironment` API methods per their earlier comments
31
+ - Drop deprecated `RackLogger` string (`level`) constants
32
+ - Custom `RackLogger` implementations must accept `CharSequence` rather than `String` to allow `RubyString` passthrough
33
+ - Rename deprecated `JRuby::Rack::ServletLog` to `JRuby::Rack::ErrorLog` for clarity, despite usage only in servlet contexts.
34
+
35
+ Breaking Ruby API changes (only relevant for users extending the Ruby API)
36
+ - Drop deprecated `JRuby::Rack::RailsFileSystemLayout` alias for `JRuby::Rack::FileSystemLayout`
37
+ - Drop deprecated `JRuby::Rack::Errors` alias for `JRuby::Rack::ErrorApp`
38
+ - Drop deprecated `Rack::Handler::Servlet::Env` and `Rack::Handler::Servlet::LazyEnv` types (replaced by `DefaultEnv`)
39
+ - Drop deprecated setting of global `$servlet_context` variable during embedded usage (replaced by `JRuby::Rack.context`)
40
+
41
+ ## 1.2.8
42
+
43
+ - Improve isolation and bundler version/CLI boot issues with more opinionated boot process (#461)
44
+ - Fix possible infinite loop in Response#isClientAbortException (#449, #450)
45
+ - Fix startup logging of captured errors when config properties cannot be dumped
46
+ - Update (bundled) rack to 2.2.24
47
+
48
+ ## 1.2.7
2
49
 
3
50
  - Ensure compatibility with JRuby 10.0 and 10.1 (#419, #423)
4
51
  - Ensure compatibility with Rails 8.0 (#419)
@@ -180,9 +227,9 @@ Changes from 1.1.15 apply since the previous release got yanked due a regression
180
227
  to handle custom lazy-bound keys but can not use a default proc (#132)
181
228
  - support the renew (and skip) session option with servlet store (#131)
182
229
  - improve ENV isolation with booted Ruby runtimes
183
- * jruby.rack.env replaces jruby.rack.ignore.env (now deprecated)
230
+ * jruby.runtime.env replaces jruby.rack.ignore.env (now deprecated)
184
231
  * make sure RUBYOPT is ignored (with backwards compat)
185
- * jruby.rack.env.rubyopt for finer RUBYOPT behavior control
232
+ * jruby.runtime.env.rubyopt for finer RUBYOPT behavior control
186
233
  * allow env value to be specified from config
187
234
  - solve the rackup "chicken - egg" problem with a plain Rack app
188
235
  * with a magic comment in config.ru # rack.version: ~>1.3.6
data/README.md CHANGED
@@ -13,11 +13,12 @@ For more information on Rack, visit http://rack.github.io/.
13
13
 
14
14
  ## Compatibility
15
15
 
16
- | JRuby-Rack Series | Status | Rack | JRuby | Java | Rails | Target Servlet API | Notes |
17
- |----------------------------------------------------------------|---------------|-----------|------------|------|-----------|--------------------|----------------------------------------------------------------|
18
- | [**1.2**](https://github.com/jruby/jruby-rack/tree/1.2-stable) | Maintained | 2.2 | 9.3 → 10.1 | 8+ | 5.0 → 8.0 | 3.0 (Java EE 6) | ✅ _Unofficial_: Servlet 3.1 → 4.0 also OK with most containers |
19
- | [**1.1**](https://github.com/jruby/jruby-rack/tree/1.1-stable) | EOL @ 2024-05 | 1.x → 2.2 | 1.69.4 | 6+ | 2.15.2 | 2.5 (Java EE 5) | ✅ _Unofficial_: Servlet 3.0 → 4.0 also OK with most containers |
20
- | [**1.0**](https://github.com/jruby/jruby-rack/tree/1.0.10) | EOL @ 2011-11 | 0.91.x | 1.11.9 | 5+ | 2.1 → 3.x | 2.5 (Java EE 5) | |
16
+ | JRuby-Rack Series | Status | Rack | JRuby | Java | Rails | Servlet API (min → mostly supported) | Notes |
17
+ |----------------------------------------------------------------|---------------|-----------|-------------|------|-----------|--------------------------------------|-----------------------------------------------------------|
18
+ | [**1.3**](https://github.com/jruby/jruby-rack/tree/1.3-stable) | Maintained | 2.2 | 10.0 → 10.1 | 21+ | 7.2 → 8.0 | 4.0 (Java EE 8) | ✅ _Unofficial_: Rails 6.1 → 7.1 untested, but likely OK. |
19
+ | [**1.2**](https://github.com/jruby/jruby-rack/tree/1.2-stable) | EOL @ 2026-09 | 2.2 | 9.310.1 | 8+ | 5.08.0 | 3.0 → 4.0 (Java EE 6 7) | |
20
+ | [**1.1**](https://github.com/jruby/jruby-rack/tree/1.1-stable) | EOL @ 2024-05 | 1.x2.2 | 1.69.4 | 6+ | 2.1 → 5.2 | 2.5 → 4.0 (Java EE 5 → 7) | |
21
+ | [**1.0**](https://github.com/jruby/jruby-rack/tree/1.0.10) | EOL @ 2011-11 | 0.9 → 1.x | 1.1 → 1.9 | 5+ | 2.1 → 3.x | 2.5 (Java EE 5) | |
21
22
 
22
23
  ## Getting Started
23
24
 
@@ -150,7 +151,8 @@ using is `org.jruby.rack.RackFilter`, the filter supports the following
150
151
  original URI. However, this behavior may confuse other servlets in your
151
152
  application that have a wildcard mapping. Defaults to true.
152
153
  - **verifiesHtmlResource** used with the previous parameter to make sure the
153
- requested static resource exists before adding the .html request URI suffix
154
+ requested static resource exists before adding the .html request URI suffix.
155
+ Defaults to false.
154
156
 
155
157
  The application can also be configured to dispatch through a servlet instead of
156
158
  a filter, the servlet class name is `org.jruby.rack.RackServlet`.
@@ -179,10 +181,11 @@ Several aspects of Rails are automatically set up for you.
179
181
  ## JRuby Runtime Management
180
182
 
181
183
  JRuby runtime management and pooling is done automatically by the framework.
182
- In the case of Rails, runtimes are pooled by default. For other Rack applications a
183
- single shared runtime is created and shared for every request by default.
184
+ For Rack-only applications (and Rails ones from jruby-rack >= 1.3), a single
185
+ shared runtime is created and shared for every request by default.
186
+
184
187
  If `jruby.min.runtimes` and `jruby.max.runtimes` values are
185
- specified pooling is supported for plain Rack applications as well.
188
+ specified pooling of runtimes can be enabled for both types of applications.
186
189
 
187
190
  We do recommend to boot your runtimes up-front to avoid the cost of initializing
188
191
  one while a request kicks in and find the pool empty, this can be easily avoided
@@ -227,10 +230,9 @@ as context init parameters in web.xml or as VM-wide system properties.
227
230
  - `jruby.runtime.env`: Allows to set a custom ENV hash for your Ruby environment
228
231
  and thus insulate the application from the environment it is running. By setting
229
232
  this option to en empty string (or 'false') it acts as if the ENV hash was
230
- cleared out (similar to the now deprecated `jruby.rack.ignore.env` option).
231
- - `jruby.runtime.env.rubyopt`: This option is used for compatibility with the
232
- (deprecated) `jruby.rack.ignore.env` option since it cleared out the ENV after
233
- RUBYOPT has been processed, by setting it to true ENV['RUBYOPT'] will be kept.
233
+ cleared out (similar to the now removed `jruby.rack.ignore.env` option).
234
+ - `jruby.runtime.env.rubyopt`: Set to true to cause ENV['RUBYOPT']
235
+ to be retained even when using `jruby.runtime.env` to override the environment.
234
236
  - `jruby.rack.env.gem_path`: If set to `true` (the default) jruby-rack will
235
237
  ensure ENV['GEM_PATH'] is altered to include the `gem.path` above. If you set it to a
236
238
  value, this value will be used as GEM_PATH, overriding the environment and
@@ -255,20 +257,6 @@ as context init parameters in web.xml or as VM-wide system properties.
255
257
  been previously read this leads to a limitation (Rack won't see the POST paras).
256
258
  Thus an alternate pure 'servlet' env "conversion" is provided that maps servlet
257
259
  parameters (and cookies) directly to Rack params, avoiding Rack's input parsing.
258
- - `jruby.rack.filter.adds.html`:
259
- **deprecated** use `addsHtmlToPathInfo` filter config init parameter.
260
- The default behavior for Rails and many other Ruby applications is to add an
261
- *.html* extension to the resource and attempt to handle it before serving a
262
- dynamic request on the original URI.
263
- However, this behavior may confuse other servlets in your application that
264
- have a wildcard mapping. Defaults to true.
265
- - `jruby.rack.filter.verify.resource.exists`:
266
- **deprecated** use `verifiesHtmlResource` filter config init parameter.
267
- If `jruby.rack.filter.adds.html` is true, then this setting, when true, adds
268
- an additional check using `ServletContext#getResource` to verify that the
269
- *.html* resource exists. Default is false.
270
- (Note that apparently some servers may not implement `getResource` in the way
271
- that is expected here, so in that case this setting won't matter.)
272
260
 
273
261
  ## Initialization
274
262
 
@@ -278,24 +266,10 @@ Ruby environment before booting the application. You can create a file called
278
266
  These files, if found, will be evaluated before booting the Rack environment,
279
267
  allowing you to set environment variables, load scripts, etc.
280
268
 
281
- For plain Rack applications, JRuby-Rack also supports a magic comment to solve
282
- the "rackup" chicken-egg problem (you need Rack's builder loaded before loading
283
- the `config.ru`, yet you may want to setup the gem version from within the rackup
284
- file). As we ship with the Rack gem bundled, otherwise when executing the
285
- provided `config.ru` the bundled (latest) version of Rack will get loaded.
286
-
287
- Use `rack.version` to specify the Rack gem version to be loaded before rackup :
288
-
289
- ```ruby
290
- # encoding: UTF-8
291
- # rack.version: ~>2.2.10 (before code is loaded gem '~>2.2.10' will be called)
292
- ```
293
-
294
- Or the equivalent of doing `bundle exec rackup ...` if you're using Bundler :
295
-
296
- ```ruby
297
- # rack.version: bundler (requires 'bundler/setup' before loading the script)
298
- ```
269
+ JRuby-Rack does not vendor Rack - the application is expected to provide it, just like
270
+ with other Ruby web servers. For applications depending on `jruby-rack` via jar (rather than gem),
271
+ this means having `rack` in the `Gemfile` (usually implied by the web framework);
272
+ or available on the application's gem path.
299
273
 
300
274
  ## Logging
301
275
 
@@ -343,7 +317,7 @@ the generated jar should be located at `target/jruby-rack-*.jar`
343
317
  Alternatively use Rake, e.g. to build the gem (skipping specs) :
344
318
 
345
319
  ```shell
346
- jruby -S rake clean gem SKIP_SPECS=true
320
+ rake clean gem SKIP_SPECS=true
347
321
  ```
348
322
 
349
323
  You can **not** use JRuby-Rack with Bundler directly from the git (or http) URL
@@ -351,25 +325,47 @@ You can **not** use JRuby-Rack with Bundler directly from the git (or http) URL
351
325
  is compiled and generated on-demand during the build (it would require us to
352
326
  package and push the .jar every time a commit changes a source file).
353
327
 
354
- ## Releasing
328
+ ## Testing
355
329
 
356
- Releasing must be done by users authorized to push to the `org.jruby` group ID on https://central.sonatype.org and to push the `jruby-rack` gem to https://rubygems.org.
330
+ JRuby-Rack is always compiled against the version defined by `jruby.compat.version` in `pom.xml`. By default, tests
331
+ will be run with this default version.
357
332
 
358
- * Make sure auth is configured for "central" repository ID in your `.m2/settings.xml`
359
- * Update the versions in `pom.xml` and `src/main/ruby/jruby/rack/version.rb` to the release version
360
- * Commit the version update locally
361
- * Run `./mvnw deploy -Prelease` to build, sign, and push all artifacts to Maven Central staging
362
- * Confirm the release completes publishing at `https://central.sonatype.org`
363
- * `rake clean gem SKIP_SPECS=true` and push the gem
364
- * Tag the release version in git
365
- * Update the versions again to the next dev version (`-SNAPSHOT` for the Maven artifact in `pom.xml` and `.SNAPSHOT` for the gem in `version.rb`)
366
- * Push all commits and tags to GitHub
333
+ Run tests against a specific JRuby version:
334
+
335
+ ```shell
336
+ ./mvnw test -Djruby.test.version=10.1.1.0
337
+ ```
367
338
 
368
- ## Adding testing for new Rails versions
339
+ Or via JRuby/Rake with the local JRuby version implied by your path:
340
+ ```shell
341
+ bundle install
342
+ rake spec
343
+ ```
344
+
345
+ Filter for specific specs:
346
+
347
+ ```shell
348
+ SPEC=src/spec/ruby/rack/application_spec.rb ./mvnw test
349
+ # or
350
+ SPEC=src/spec/ruby/rack/application_spec.rb rake spec
351
+ ```
352
+
353
+ ### Run appraisals alongside different real Rails/Rack versions
354
+
355
+ JRuby-Rack defaults to run specs with a Rails stub. You can run the specs against a real Rails version using the Gemfiles
356
+ managed by the `Appraisals` gem.
357
+
358
+ ```shell
359
+ export BUNDLE_GEMFILE=gemfiles/rails72_rack22.gemfile
360
+ bundle install
361
+ bundle exec rake spec
362
+ ```
363
+
364
+ ### Adding testing for new Rails versions
369
365
 
370
366
  * Add the new version to `.github/workflows/maven.yml` under the `matrix` section
371
367
  * Add a new configuration to the `Appraisals` file, then
372
- ```bundle exec appraisal generate```
368
+ ```bundle exec appraisal generate```
373
369
  * Generate a new stub Rails application for the new version
374
370
  ```shell
375
371
  VERSION=rails72
@@ -377,12 +373,26 @@ Releasing must be done by users authorized to push to the `org.jruby` group ID o
377
373
  rm -rf $VERSION && BUNDLE_GEMFILE=~/Projects/community/jruby-rack/gemfiles/${VERSION}_rack22.gemfile bundle exec rails new $VERSION --minimal --skip-git --skip-docker --skip-active-model --skip-active-record --skip-test --skip-system-test --skip-dev-gems --skip-bundle --skip-keeps --skip-asset-pipeline --skip-ci --skip-brakeman --skip-rubocop
378
374
  ```
379
375
  * Manual changes to make to support testing
380
- * In `config/production.rb` comment out the default `config.logger` value so jruby-rack applies its own `RailsLogger`.
376
+ * In `config/production.rb` comment out the default `config.logger` value so jruby-rack applies its own `RailsLogger`.
377
+
378
+ ## Releasing
379
+
380
+ Releasing must be done by users authorized to push to the `org.jruby` group ID on https://central.sonatype.org and to push the `jruby-rack` gem to https://rubygems.org.
381
+
382
+ * Make sure auth is configured for "central" repository ID in your `.m2/settings.xml`
383
+ * Update the versions in `pom.xml` and `src/main/ruby/jruby/rack/version.rb` to the release version
384
+ * Commit the version update locally
385
+ * Run `./mvnw deploy -Prelease` to build, sign, and push all artifacts to Maven Central staging
386
+ * Confirm the release completes publishing at `https://central.sonatype.org`
387
+ * `rake clean gem SKIP_SPECS=true` and push the gem
388
+ * Tag the release version in git
389
+ * Update the versions again to the next dev version (`-SNAPSHOT` for the Maven artifact in `pom.xml` and `.SNAPSHOT` for the gem in `version.rb`)
390
+ * Push all commits and tags to GitHub
381
391
 
382
392
  ## Support
383
393
 
384
394
  Please use [github][3] to file bugs, patches and/or pull requests.
385
- More information at the [wiki][4] or ask us at **#jruby**'s IRC channel.
395
+ More information at the [wiki][4] or ask us on our Matrix room at **#jruby:matrix.org**.
386
396
 
387
397
  [1]: https://github.com/jruby/warbler
388
398
  [2]: https://central.sonatype.com/artifact/org.jruby.rack/jruby-rack
@@ -8,6 +8,6 @@
8
8
 
9
9
  module JRuby
10
10
  module Rack
11
- VERSION = '1.2.7'
11
+ VERSION = '1.3.0'
12
12
  end
13
13
  end
Binary file
data/lib/jruby-rack.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  module JRubyJars
3
3
  def self.jruby_rack_jar_path
4
- File.expand_path("../jruby-rack-1.2.7.jar", __FILE__)
4
+ File.expand_path("../jruby-rack-1.3.0.jar", __FILE__)
5
5
  end
6
6
  require jruby_rack_jar_path if defined?(JRUBY_VERSION)
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
@@ -9,8 +9,22 @@ authors:
9
9
  - JRuby contributors
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-05-19 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2026-08-31 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rack
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 2.2.0
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 2.2.0
14
28
  description: JRuby-Rack is a combined Java and Ruby library that adapts the Java Servlet
15
29
  API to Rack. For JRuby only.
16
30
  email:
@@ -22,7 +36,7 @@ files:
22
36
  - CHANGELOG.md
23
37
  - LICENSE.txt
24
38
  - README.md
25
- - lib/jruby-rack-1.2.7.jar
39
+ - lib/jruby-rack-1.3.0.jar
26
40
  - lib/jruby-rack.rb
27
41
  - lib/jruby/rack/version.rb
28
42
  homepage: http://jruby.org
@@ -36,14 +50,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
36
50
  requirements:
37
51
  - - ">="
38
52
  - !ruby/object:Gem::Version
39
- version: 2.6.0
53
+ version: 3.4.0
40
54
  required_rubygems_version: !ruby/object:Gem::Requirement
41
55
  requirements:
42
56
  - - ">="
43
57
  - !ruby/object:Gem::Version
44
58
  version: '0'
45
59
  requirements: []
46
- rubygems_version: 4.0.3
60
+ rubygems_version: 3.7.2
47
61
  specification_version: 4
48
62
  summary: Rack adapter for JRuby and Servlet Containers
49
63
  test_files: []
Binary file