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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bcf16ccfae94d36851adb3d1ccf9f0cec2784e69a67a4f3dfa5212488213084
4
- data.tar.gz: 98fde912b9f55b168def3daf36f740a2ea353c6deb7e3a10ad36bcc0b368144b
3
+ metadata.gz: 128ad4a9ac4dafc4462d26122ef11fc05719c08a11b8c89d3c075ab1a1c81654
4
+ data.tar.gz: 10499c46a1b321505ff7734b1afaa843a45b67a32897f9c0bd08be84805095d3
5
5
  SHA512:
6
- metadata.gz: aa91dc347011e4cb54163655e3a9ef7b5c9924f0d9eb0c76d1204f0cfc01b71b4211422b529b6bbd370f4198298ef42a1e2668d7cb12542ce37aacd7fff87fc3
7
- data.tar.gz: cc968a1cd0ab939e0d63a8ada0e87baab643087a93727127306b80939f3817505800769395077c6ba1120ea19d5f98b78db0d855959cc1aa330484656046d869
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.rack.env replaces jruby.rack.ignore.env (now deprecated)
234
+ * jruby.runtime.env replaces jruby.rack.ignore.env (now deprecated)
191
235
  * make sure RUBYOPT is ignored (with backwards compat)
192
- * jruby.rack.env.rubyopt for finer RUBYOPT behavior control
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
  [![Gem Version](https://img.shields.io/gem/v/jruby-rack)](https://rubygems.org/gems/jruby-rack)
4
4
  [![Jar Version](https://img.shields.io/maven-central/v/org.jruby.rack/jruby-rack)](https://central.sonatype.com/artifact/org.jruby.rack/jruby-rack)
5
5
  [![master Build Status](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml/badge.svg)](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml?query=branch%3Amaster) (master)
6
+ [![1.3.x Build Status](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml/badge.svg?branch=1.3-stable)](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml?query=branch%3A1.3-stable) (1.3.x)
6
7
  [![1.2.x Build Status](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml/badge.svg?branch=1.2-stable)](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 | Status | Rack | JRuby | Java | Rails | Servlet API (min → mostly supported) | Notes |
17
- |----------------------------------------------------------------|---------------|-----------|------------|------|-----------|--------------------------------------|-------|
18
- | [**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 67) | |
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 → 4.0 (Java EE 5 → 7) | |
20
- | [**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.13.x | 2.5 (Java EE 5) | |
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 911) | ❌ 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.010.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.310.1 | 8+ | 5.08.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
- 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.
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 is supported for plain Rack applications as well.
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 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.
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
- 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 (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
- `javax.servlet.ServletContext#log` by default. If you wish to use a different
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
@@ -8,6 +8,6 @@
8
8
 
9
9
  module JRuby
10
10
  module Rack
11
- VERSION = '1.2.8'
11
+ VERSION = '2.0.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.8.jar", __FILE__)
4
+ File.expand_path("../jruby-rack-2.0.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.8
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-1.2.8.jar
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: 2.6.0
53
+ version: 3.4.0
40
54
  required_rubygems_version: !ruby/object:Gem::Requirement
41
55
  requirements:
42
56
  - - ">="
Binary file