jruby-rack 1.2.8 → 2.0.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 +4 -4
- data/CHANGELOG.md +46 -2
- data/README.md +22 -47
- data/lib/jruby/rack/version.rb +1 -1
- data/lib/jruby-rack-2.0.0.jar +0 -0
- data/lib/jruby-rack.rb +1 -1
- metadata +18 -4
- data/lib/jruby-rack-1.2.8.jar +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 128ad4a9ac4dafc4462d26122ef11fc05719c08a11b8c89d3c075ab1a1c81654
|
|
4
|
+
data.tar.gz: 10499c46a1b321505ff7734b1afaa843a45b67a32897f9c0bd08be84805095d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 767d49b2208954736f3f91fb92df9a75c9da81fe522d2fad18c997762330771cf944f19ab6ad5350f62e31777d869f29068c124b43b58727416e1c806be640a1
|
|
7
|
+
data.tar.gz: de1e507e776c5adbef120a9c28a175c0fb3a45b525a9a77a5481193cec04b542e49e96ec208fcfb1e3d0d3a4c0569df74b098505129fe17f856d22a9e13b3b69
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
## 2.0.0 (UNRELEASED)
|
|
2
|
+
|
|
3
|
+
- Support Jakarta Servlet API 5.0 → 6.1 (Jakarta EE 9 → 11)
|
|
4
|
+
|
|
5
|
+
## 1.3.0 (UNRELEASED)
|
|
6
|
+
|
|
7
|
+
- Officially support Javax Servlet API 4.0 (JEE 8)
|
|
8
|
+
- Refactor logging for more sane defaults and improved performance
|
|
9
|
+
- Remove long-deprecated configuration and API functionality
|
|
10
|
+
|
|
11
|
+
For most users this should be a minor upgrade; as long as you do not depend on functionality deprecated within
|
|
12
|
+
JRuby-Rack 1.2.x, EOL JRuby or EOL Rails versions.
|
|
13
|
+
|
|
14
|
+
Breaking compatibility changes
|
|
15
|
+
- Drop support for JRuby 9.x (and thus Java < 21)
|
|
16
|
+
- Drop support for Rails < 7.2
|
|
17
|
+
- Drop JMS support
|
|
18
|
+
|
|
19
|
+
Breaking behavioral changes
|
|
20
|
+
- Change context listener to throw by default in case of an exception during initialization
|
|
21
|
+
- Change rails context listener to assume a thread-safe application by default
|
|
22
|
+
- Rack is no longer vendored inside the jar, so applications must ensure rack is provided via bundler or GEM_PATH
|
|
23
|
+
|
|
24
|
+
Breaking configuration capability changes
|
|
25
|
+
- Drop `jruby.rack.jruby.version` and `jruby.rack.rack.release` keys from rack `env` Hash
|
|
26
|
+
- 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`
|
|
27
|
+
- Drop deprecated `jruby.rack.ignore.env` property, replaced long ago by `jruby.runtime.env` and optional `jruby.runtime.env.rubyopt`
|
|
28
|
+
- Drop deprecated `jruby.rack.filter.*` properties, replaced long ago by init parameters `addsHtmlToPathInfo` and `verifiesHtmlResource`
|
|
29
|
+
- Drop handling of `# rack.version` magic comments inside `config.ru` files, replaced by bundler or user-managed `GEM_PATH`
|
|
30
|
+
|
|
31
|
+
Breaking Java API changes (only relevant for users extending the Java API)
|
|
32
|
+
- Drop unnecessary `jruby.compat.version` and `RackConfig.getCompatVersion()` API
|
|
33
|
+
- Drop deprecated `org.jruby.rack.RackInput` alias for `org.jruby.rack.ext.Input` class
|
|
34
|
+
- Drop/rename deprecated `RackConfig` and `ServletRackEnvironment` API methods per their earlier comments
|
|
35
|
+
- Drop deprecated `RackLogger` string (`level`) constants
|
|
36
|
+
- Custom `RackLogger` implementations must accept `CharSequence` rather than `String` to allow `RubyString` passthrough
|
|
37
|
+
- Rename deprecated `JRuby::Rack::ServletLog` to `JRuby::Rack::ErrorLog` for clarity, despite usage only in servlet contexts.
|
|
38
|
+
|
|
39
|
+
Breaking Ruby API changes (only relevant for users extending the Ruby API)
|
|
40
|
+
- Drop deprecated `JRuby::Rack::RailsFileSystemLayout` alias for `JRuby::Rack::FileSystemLayout`
|
|
41
|
+
- Drop deprecated `JRuby::Rack::Errors` alias for `JRuby::Rack::ErrorApp`
|
|
42
|
+
- Drop deprecated `Rack::Handler::Servlet::Env` and `Rack::Handler::Servlet::LazyEnv` types (replaced by `DefaultEnv`)
|
|
43
|
+
- Drop deprecated setting of global `$servlet_context` variable during embedded usage (replaced by `JRuby::Rack.context`)
|
|
44
|
+
|
|
1
45
|
## 1.2.8
|
|
2
46
|
|
|
3
47
|
- Improve isolation and bundler version/CLI boot issues with more opinionated boot process (#461)
|
|
@@ -187,9 +231,9 @@ Changes from 1.1.15 apply since the previous release got yanked due a regression
|
|
|
187
231
|
to handle custom lazy-bound keys but can not use a default proc (#132)
|
|
188
232
|
- support the renew (and skip) session option with servlet store (#131)
|
|
189
233
|
- improve ENV isolation with booted Ruby runtimes
|
|
190
|
-
* jruby.
|
|
234
|
+
* jruby.runtime.env replaces jruby.rack.ignore.env (now deprecated)
|
|
191
235
|
* make sure RUBYOPT is ignored (with backwards compat)
|
|
192
|
-
* jruby.
|
|
236
|
+
* jruby.runtime.env.rubyopt for finer RUBYOPT behavior control
|
|
193
237
|
* allow env value to be specified from config
|
|
194
238
|
- solve the rackup "chicken - egg" problem with a plain Rack app
|
|
195
239
|
* with a magic comment in config.ru # rack.version: ~>1.3.6
|
data/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://rubygems.org/gems/jruby-rack)
|
|
4
4
|
[](https://central.sonatype.com/artifact/org.jruby.rack/jruby-rack)
|
|
5
5
|
[](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml?query=branch%3Amaster) (master)
|
|
6
|
+
[](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml?query=branch%3A1.3-stable) (1.3.x)
|
|
6
7
|
[](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml?query=branch%3A1.2-stable) (1.2.x)
|
|
7
8
|
|
|
8
9
|
JRuby-Rack is a lightweight adapter for the Java Servlet environment that allows
|
|
@@ -13,11 +14,13 @@ For more information on Rack, visit http://rack.github.io/.
|
|
|
13
14
|
|
|
14
15
|
## Compatibility
|
|
15
16
|
|
|
16
|
-
| JRuby-Rack Series
|
|
17
|
-
|
|
18
|
-
|
|
|
19
|
-
| [**1.
|
|
20
|
-
| [**1.
|
|
17
|
+
| JRuby-Rack Series | Status | Rack | JRuby | Java | Rails | Servlet API (min → mostly supported) | Notes |
|
|
18
|
+
|------------------------------------------------------------------------------------------|---------------|-----------|-------------|------|-----------|--------------------------------------|-----------------------------------------------------------|
|
|
19
|
+
| **2.0 (_master_, _unreleased_)** | Maintained | 2.2 | 10.0 → 10.1 | 21+ | 7.2 → 8.0 | 5.0 → 6.1 (Jakarta EE 9 → 11) | ❌ Servlet < 5.0 containers will not work |
|
|
20
|
+
| [**1.3**](https://github.com/jruby/jruby-rack/tree/1.3-stable) (_planned_, _unreleased_) | 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. |
|
|
21
|
+
| [**1.2**](https://github.com/jruby/jruby-rack/tree/1.2-stable) | EOL @ 2026-09 | 2.2 | 9.3 → 10.1 | 8+ | 5.0 → 8.0 | 3.0 → 4.0 (Java EE 6 → 7) | |
|
|
22
|
+
| [**1.1**](https://github.com/jruby/jruby-rack/tree/1.1-stable) | EOL @ 2024-05 | 1.x → 2.2 | 1.6 → 9.4 | 6+ | 2.1 → 5.2 | 2.5 → 4.0 (Java EE 5 → 7) | |
|
|
23
|
+
| [**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
24
|
|
|
22
25
|
## Getting Started
|
|
23
26
|
|
|
@@ -150,7 +153,8 @@ using is `org.jruby.rack.RackFilter`, the filter supports the following
|
|
|
150
153
|
original URI. However, this behavior may confuse other servlets in your
|
|
151
154
|
application that have a wildcard mapping. Defaults to true.
|
|
152
155
|
- **verifiesHtmlResource** used with the previous parameter to make sure the
|
|
153
|
-
requested static resource exists before adding the .html request URI suffix
|
|
156
|
+
requested static resource exists before adding the .html request URI suffix.
|
|
157
|
+
Defaults to false.
|
|
154
158
|
|
|
155
159
|
The application can also be configured to dispatch through a servlet instead of
|
|
156
160
|
a filter, the servlet class name is `org.jruby.rack.RackServlet`.
|
|
@@ -179,10 +183,11 @@ Several aspects of Rails are automatically set up for you.
|
|
|
179
183
|
## JRuby Runtime Management
|
|
180
184
|
|
|
181
185
|
JRuby runtime management and pooling is done automatically by the framework.
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
For Rack-only applications (and Rails ones from jruby-rack >= 1.3), a single
|
|
187
|
+
shared runtime is created and shared for every request by default.
|
|
188
|
+
|
|
184
189
|
If `jruby.min.runtimes` and `jruby.max.runtimes` values are
|
|
185
|
-
specified pooling
|
|
190
|
+
specified pooling of runtimes can be enabled for both types of applications.
|
|
186
191
|
|
|
187
192
|
We do recommend to boot your runtimes up-front to avoid the cost of initializing
|
|
188
193
|
one while a request kicks in and find the pool empty, this can be easily avoided
|
|
@@ -227,10 +232,9 @@ as context init parameters in web.xml or as VM-wide system properties.
|
|
|
227
232
|
- `jruby.runtime.env`: Allows to set a custom ENV hash for your Ruby environment
|
|
228
233
|
and thus insulate the application from the environment it is running. By setting
|
|
229
234
|
this option to en empty string (or 'false') it acts as if the ENV hash was
|
|
230
|
-
cleared out (similar to the now
|
|
231
|
-
- `jruby.runtime.env.rubyopt`:
|
|
232
|
-
|
|
233
|
-
RUBYOPT has been processed, by setting it to true ENV['RUBYOPT'] will be kept.
|
|
235
|
+
cleared out (similar to the now removed `jruby.rack.ignore.env` option).
|
|
236
|
+
- `jruby.runtime.env.rubyopt`: Set to true to cause ENV['RUBYOPT']
|
|
237
|
+
to be retained even when using `jruby.runtime.env` to override the environment.
|
|
234
238
|
- `jruby.rack.env.gem_path`: If set to `true` (the default) jruby-rack will
|
|
235
239
|
ensure ENV['GEM_PATH'] is altered to include the `gem.path` above. If you set it to a
|
|
236
240
|
value, this value will be used as GEM_PATH, overriding the environment and
|
|
@@ -255,20 +259,6 @@ as context init parameters in web.xml or as VM-wide system properties.
|
|
|
255
259
|
been previously read this leads to a limitation (Rack won't see the POST paras).
|
|
256
260
|
Thus an alternate pure 'servlet' env "conversion" is provided that maps servlet
|
|
257
261
|
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
262
|
|
|
273
263
|
## Initialization
|
|
274
264
|
|
|
@@ -278,29 +268,15 @@ Ruby environment before booting the application. You can create a file called
|
|
|
278
268
|
These files, if found, will be evaluated before booting the Rack environment,
|
|
279
269
|
allowing you to set environment variables, load scripts, etc.
|
|
280
270
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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 (require 'bundler'; Bundler.setup; before loading the script)
|
|
298
|
-
```
|
|
271
|
+
JRuby-Rack does not vendor Rack - the application is expected to provide it, just like
|
|
272
|
+
with other Ruby web servers. For applications depending on `jruby-rack` via jar (rather than gem),
|
|
273
|
+
this means having `rack` in the `Gemfile` (usually implied by the web framework);
|
|
274
|
+
or available on the application's gem path.
|
|
299
275
|
|
|
300
276
|
## Logging
|
|
301
277
|
|
|
302
278
|
JRuby-Rack sets up a delegate logger for Rails that sends logging output to
|
|
303
|
-
`
|
|
279
|
+
`jakarta.servlet.ServletContext#log` by default. If you wish to use a different
|
|
304
280
|
logging system, configure `jruby.rack.logging` as follows:
|
|
305
281
|
|
|
306
282
|
- `servlet_context` (default): Sends log messages to the servlet context.
|
|
@@ -409,7 +385,6 @@ Releasing must be done by users authorized to push to the `org.jruby` group ID o
|
|
|
409
385
|
* Update the versions in `pom.xml` and `src/main/ruby/jruby/rack/version.rb` to the release version
|
|
410
386
|
* Commit the version update locally
|
|
411
387
|
* Run `./mvnw deploy -Prelease` to build, sign, and push all artifacts to Maven Central staging
|
|
412
|
-
* NOTE: the release will automatically publish once validated by Maven Central
|
|
413
388
|
* Confirm the release completes publishing at `https://central.sonatype.org`
|
|
414
389
|
* `rake clean gem SKIP_SPECS=true` and push the gem
|
|
415
390
|
* Tag the release version in git
|
data/lib/jruby/rack/version.rb
CHANGED
|
Binary file
|
data/lib/jruby-rack.rb
CHANGED
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:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Sieger
|
|
@@ -10,7 +10,21 @@ authors:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
date: 2026-08-31 00:00:00.000000000 Z
|
|
13
|
-
dependencies:
|
|
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-
|
|
39
|
+
- lib/jruby-rack-2.0.0.jar
|
|
26
40
|
- lib/jruby-rack.rb
|
|
27
41
|
- lib/jruby/rack/version.rb
|
|
28
42
|
homepage: http://jruby.org
|
|
@@ -36,7 +50,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
36
50
|
requirements:
|
|
37
51
|
- - ">="
|
|
38
52
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
53
|
+
version: 3.4.0
|
|
40
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
55
|
requirements:
|
|
42
56
|
- - ">="
|
data/lib/jruby-rack-1.2.8.jar
DELETED
|
Binary file
|