jruby-rack 1.2.5 → 1.2.7

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: deb522e122e0c6e6cdb44b3cc48f1998c8faa022b6f9f40155f3443f9b29b8f7
4
- data.tar.gz: 4575c6ef77f6fab741703a667fa04471d5190bf09736a9655c0ac74c600c8f0f
3
+ metadata.gz: 24de58d357962944b8e2dd77cf34c3af33e5e5f93a68ebf4f75c86666795a9a1
4
+ data.tar.gz: 3e19c76e147b46be50552f6df538588e023ea1fb2556c964633c16320493e84b
5
5
  SHA512:
6
- metadata.gz: e5f36e4650ed62c243e66747fda304a83a8205bc8fab59f5fc53ce6bbb77a7146d033930c13e09d26d86ae9217a661d47c3bf548900727ec54e50e29fa78d270
7
- data.tar.gz: 04c00aedf47df518653664142bcfa0e7e667d8203bbad4b5cc595ee1ef1cac8f60008594c741463c78660959786875e6f2224f205d250568f38cd49a88aea9f8
6
+ metadata.gz: 78c1c3a405e8858a390963ab7311a81ce31e3265936949b4900cd5d91b35f6b11f79b214ed46a7ce0951f9ae4f0492bfeef2379e1dedd48077038e943c70c2ba
7
+ data.tar.gz: e0462a4181218c7cbec0ffbb9d4dae3d0bf0fc0de80b8e971fa991056c281976afaa33a6ec873583d582b585a7dcfce8a7c79f2095d2cb445cf5598c13dbac8a
@@ -1,3 +1,18 @@
1
+ ## 1.2.7 (UNRELEASED)
2
+
3
+ - Ensure compatibility with JRuby 10.0 and 10.1 (#419, #423)
4
+ - Ensure compatibility with Rails 8.0 (#419)
5
+ - Fix ability to include and forward to JSPs under Rails (#370)
6
+ - Update (bundled) rack to 2.2.23 (#417)
7
+
8
+ ## 1.2.6
9
+
10
+ - Add missing block-only signature for debug logging
11
+ - update (bundled) rack to 2.2.20
12
+ - Ensure rack boot process leaves ENV['GEM_PATH'] and Gem.paths in a consistent state
13
+ - Remove undocumented and unsafe jruby.rack.env.gem_path = false option (unusable on Bundler 1.6+)
14
+ - Fix unintended Rubygems initialization too early in boot process with JRuby 9.4+
15
+
1
16
  ## 1.2.5
2
17
 
3
18
  - Fix use of jruby-rack under Java 8 (#324)
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # JRuby-Rack
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/jruby-rack.png)][5]
4
- [![Build Status](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml/badge.svg)][6]
5
-
3
+ [![Gem Version](https://img.shields.io/gem/v/jruby-rack)](https://rubygems.org/gems/jruby-rack)
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
+ [![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.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
+
6
8
  JRuby-Rack is a lightweight adapter for the Java Servlet environment that allows
7
9
  any (Ruby) Rack-based application to run unmodified in a Java Servlet container.
8
10
  JRuby-Rack supports Rails as well as any Rack-compatible Ruby web framework.
@@ -11,11 +13,11 @@ For more information on Rack, visit http://rack.github.io/.
11
13
 
12
14
  ## Compatibility
13
15
 
14
- | JRuby-Rack Series | Status | Rack | JRuby | Java | Rails | Target Servlet API | Notes |
15
- |------------------------------------------------------------|------------|-----------|------------|------|-----------|---------------------|--------------------------------------------|
16
- | [1.2](https://github.com/jruby/jruby-rack/tree/1.2-stable) | Maintained | 2.2 | 9.3 → 9.4 | 8+ | 5.0 → 7.2 | 3.0 (Java EE 6) | Servlet 3.1 → 4.0 OK with some containers. |
17
- | [1.1](https://github.com/jruby/jruby-rack/tree/1.1-stable) | EOL | 1.x → 2.2 | 1.6 → 9.4 | 6+ | 2.1 → 5.2 | 2.5 (Java EE 5) | Servlet 3.0 → 4.0 OK with some containers. |
18
- | 1.0 | EOL | 0.9 → 1.x | 1.1 → 1.9 | 5+ | 2.1 → 3.x | 2.5 (Java EE 5) | |
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.6 → 9.4 | 6+ | 2.1 → 5.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.9 → 1.x | 1.1 → 1.9 | 5+ | 2.1 → 3.x | 2.5 (Java EE 5) | |
19
21
 
20
22
  ## Getting Started
21
23
 
@@ -27,16 +29,18 @@ in your WAR file when it gets built.
27
29
  If you're assembling your own WAR using other means, you can install the
28
30
  **jruby-rack** gem. It provides a method to locate the jar file:
29
31
 
30
- require 'jruby-rack'
31
- FileUtils.cp JRubyJars.jruby_rack_jar_path, '.'
32
+ ```ruby
33
+ require 'jruby-rack'
34
+ FileUtils.cp JRubyJars.jruby_rack_jar_path, '.'
35
+ ```
32
36
 
33
37
  Otherwise you'll need to download the latest [jar release][2], drop it into the
34
- *WEB-INF/lib* directory and configure the `RackFilter` in your application's
35
- *web.xml* (see following examples).
38
+ `WEB-INF/lib` directory and configure the `RackFilter` in your application's
39
+ `web.xml` (see following examples).
36
40
 
37
41
  ### Rails
38
42
 
39
- Here's sample *web.xml* configuration for Rails. Note the environment and
43
+ Here's sample `web.xml` configuration for Rails. Note the environment and
40
44
  min/max runtime parameters. For **multi-threaded** (a.k.a. `threadsafe!`)
41
45
  Rails with a single runtime, set min/max both to 1. Otherwise, define the size
42
46
  of the runtime pool as you wish.
@@ -85,8 +89,8 @@ of the runtime pool as you wish.
85
89
  ### (Other) Rack Applications
86
90
 
87
91
  The main difference when using a non-Rails Rack application is that JRuby-Rack
88
- looks for a "rackup" file named **config.ru** in `WEB-INF/config.ru` or
89
- `WEB-INF/*/config.ru`. Here's a sample *web.xml* configuration :
92
+ looks for a "rackup" file named `config.ru` in `WEB-INF/config.ru` or
93
+ `WEB-INF/*/config.ru`. Here's a sample `web.xml` configuration :
90
94
 
91
95
  ```xml
92
96
  <filter>
@@ -104,8 +108,8 @@ looks for a "rackup" file named **config.ru** in `WEB-INF/config.ru` or
104
108
  </listener>
105
109
  ```
106
110
 
107
- If you don't have a *config.ru* or don't want to include it in your web app, you
108
- can embed it directly in the *web.xml* as follows (using Sinatra as an example):
111
+ If you don't have a `config.ru` or don't want to include it in your web app, you
112
+ can embed it directly in the `web.xml` as follows (using Sinatra as an example):
109
113
 
110
114
  ```xml
111
115
  <context-param>
@@ -121,7 +125,7 @@ can embed it directly in the *web.xml* as follows (using Sinatra as an example):
121
125
  </context-param>
122
126
  ```
123
127
 
124
- Be sure to escape angle-brackets for XML !
128
+ Be sure to escape angle-brackets for XML!
125
129
 
126
130
 
127
131
  ## Servlet Filter
@@ -140,7 +144,11 @@ using is `org.jruby.rack.RackFilter`, the filter supports the following
140
144
  gets reset (accepts values "true", "false" and "buffer" to reset the buffer
141
145
  only), by default "true"
142
146
  - **addsHtmlToPathInfo** controls whether the .html suffix is added to the URI
143
- when checking if the request is for a static page
147
+ when checking if the request is for a static page. The default behavior for
148
+ Rails and many other Ruby applications is to add an `.html` extension to the
149
+ resource and attempt to handle it before serving a dynamic request on the
150
+ original URI. However, this behavior may confuse other servlets in your
151
+ application that have a wildcard mapping. Defaults to true.
144
152
  - **verifiesHtmlResource** used with the previous parameter to make sure the
145
153
  requested static resource exists before adding the .html request URI suffix
146
154
 
@@ -150,9 +158,9 @@ a filter, the servlet class name is `org.jruby.rack.RackServlet`.
150
158
  ## Servlet Environment Integration
151
159
 
152
160
  - servlet context is accessible to any application through the Rack environment
153
- variable *java.servlet_context* (as well as the `$servlet_context` global).
161
+ variable `java.servlet_context` (as well as the `$servlet_context` global).
154
162
  - the (native) servlet request and response objects could be obtained via the
155
- *java.servlet_request* and *java.servlet_response* keys
163
+ `java.servlet_request` and `java.servlet_response` keys
156
164
  - all servlet request attributes are passed through to the Rack environment (and
157
165
  thus might override request headers or Rack environment variables)
158
166
  - servlet sessions can be used as a (java) session store for Rails, session
@@ -171,16 +179,15 @@ Several aspects of Rails are automatically set up for you.
171
179
  ## JRuby Runtime Management
172
180
 
173
181
  JRuby runtime management and pooling is done automatically by the framework.
174
- In the case of Rails, runtimes are pooled by default (the default will most
175
- likely change with the adoption of Rails 4.0). For other Rack applications a
182
+ In the case of Rails, runtimes are pooled by default. For other Rack applications a
176
183
  single shared runtime is created and shared for every request by default.
177
- If *jruby.min.runtimes* and *jruby.max.runtimes* values are
184
+ If `jruby.min.runtimes` and `jruby.max.runtimes` values are
178
185
  specified pooling is supported for plain Rack applications as well.
179
186
 
180
187
  We do recommend to boot your runtimes up-front to avoid the cost of initializing
181
188
  one while a request kicks in and find the pool empty, this can be easily avoided
182
- by setting *jruby.min.runtimes* equal to *jruby.max.runtimes*. You might also
183
- want to consider tuning the *jruby.runtime.acquire.timeout* parameter to not
189
+ by setting `jruby.min.runtimes` equal to `jruby.max.runtimes`. You might also
190
+ want to consider tuning the `jruby.runtime.acquire.timeout` parameter to not
184
191
  wait too long when all (max) runtimes from the pool are busy.
185
192
 
186
193
  ## JRuby-Rack Configuration
@@ -190,20 +197,18 @@ as context init parameters in web.xml or as VM-wide system properties.
190
197
 
191
198
  - `rackup`: Rackup script for configuring how the Rack application is mounted.
192
199
  Required for Rack-based applications other than Rails. Can be omitted if a
193
- *config.ru* is included in the application root.
200
+ `config.ru` is included in the application root.
194
201
  - `public.root`: Relative path to the location of your application's static
195
- assets. Defaults to */*.
202
+ assets. Defaults to `*/*`.
196
203
  - `rails.root`: Root path to the location of the Rails application files.
197
- Defaults to */WEB-INF*.
204
+ Defaults to `*/WEB-INF*`.
198
205
  - `rails.env`: Specify the Rails environment to run. Defaults to 'production'.
199
206
  - `rails.relative_url_append`: Specify a path to be appended to the
200
207
  `ActionController::Base.relative_url_root` after the context path. Useful
201
208
  for running a rails app from the same war as an existing app, under a
202
209
  sub-path of the main servlet context root.
203
210
  - `gem.path`: Relative path to the bundled gem repository. Defaults to
204
- */WEB-INF/gems*.
205
- - `jruby.compat.version`: Set to "1.8" or "1.9" to make JRuby run a specific
206
- version of Ruby (same as the --1.8 / --1.9 command line flags).
211
+ `/WEB-INF/gems`.
207
212
  - `jruby.min.runtimes`: For non-threadsafe Rails applications using a runtime
208
213
  pool, specify an integer minimum number of runtimes to hold in the pool.
209
214
  - `jruby.max.runtimes`: For non-threadsafe Rails applications, an integer
@@ -226,6 +231,12 @@ as context init parameters in web.xml or as VM-wide system properties.
226
231
  - `jruby.runtime.env.rubyopt`: This option is used for compatibility with the
227
232
  (deprecated) `jruby.rack.ignore.env` option since it cleared out the ENV after
228
233
  RUBYOPT has been processed, by setting it to true ENV['RUBYOPT'] will be kept.
234
+ - `jruby.rack.env.gem_path`: If set to `true` (the default) jruby-rack will
235
+ ensure ENV['GEM_PATH'] is altered to include the `gem.path` above. If you set it to a
236
+ value, this value will be used as GEM_PATH, overriding the environment and
237
+ ignoring `gem.path` etc. By setting this option to en empty string the ENV['GEM_PATH'] will
238
+ not be modified by jruby-rack at all and will retain its original values implied by
239
+ the process environment and `jruby.runtime.env` setting.
229
240
  - `jruby.rack.logging`: Specify the logging device to use. Defaults to
230
241
  `servlet_context`. See below.
231
242
  - `jruby.rack.request.size.initial.bytes`: Initial size for request body memory
@@ -263,17 +274,17 @@ as context init parameters in web.xml or as VM-wide system properties.
263
274
 
264
275
  There are often cases where you need to perform custom initialization of the
265
276
  Ruby environment before booting the application. You can create a file called
266
- *META-INF/init.rb* or *WEB-INF/init.rb* inside the war file for this purpose.
277
+ `META-INF/init.rb` or `WEB-INF/init.rb` inside the war file for this purpose.
267
278
  These files, if found, will be evaluated before booting the Rack environment,
268
279
  allowing you to set environment variables, load scripts, etc.
269
280
 
270
281
  For plain Rack applications, JRuby-Rack also supports a magic comment to solve
271
282
  the "rackup" chicken-egg problem (you need Rack's builder loaded before loading
272
- the *config.ru*, yet you may want to setup the gem version from within the rackup
283
+ the `config.ru`, yet you may want to setup the gem version from within the rackup
273
284
  file). As we ship with the Rack gem bundled, otherwise when executing the
274
- provided *config.ru* the bundled (latest) version of Rack will get loaded.
285
+ provided `config.ru` the bundled (latest) version of Rack will get loaded.
275
286
 
276
- Use **rack.version** to specify the Rack gem version to be loaded before rackup :
287
+ Use `rack.version` to specify the Rack gem version to be loaded before rackup :
277
288
 
278
289
  ```ruby
279
290
  # encoding: UTF-8
@@ -306,6 +317,9 @@ logging system, configure `jruby.rack.logging` as follows:
306
317
  For those loggers that require a specific named logger, set it with the
307
318
  `jruby.rack.logging.name` option, by default "jruby.rack" name will be used.
308
319
 
320
+ ## Examples
321
+
322
+ Some example demo applications are available at [./examples](./examples).
309
323
 
310
324
  ## Building
311
325
 
@@ -324,7 +338,7 @@ Build the .jar using Maven :
324
338
  ./mvnw install
325
339
  ```
326
340
 
327
- the generated jar should be located at **target/jruby-rack-*.jar**
341
+ the generated jar should be located at `target/jruby-rack-*.jar`
328
342
 
329
343
  Alternatively use Rake, e.g. to build the gem (skipping specs) :
330
344
 
@@ -339,11 +353,17 @@ package and push the .jar every time a commit changes a source file).
339
353
 
340
354
  ## Releasing
341
355
 
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.
357
+
342
358
  * Make sure auth is configured for "central" repository ID in your `.m2/settings.xml`
343
- * Update the version in `src/main/ruby/jruby/rack/version.rb` to the release version
344
- * `./mvnw release:prepare`
345
- * `./mvnw release:perform` (possibly with `-DuseReleaseProfile=false` due to Javadoc doclint failures for now)
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`
346
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
347
367
 
348
368
  ## Adding testing for new Rails versions
349
369
 
@@ -364,9 +384,7 @@ package and push the .jar every time a commit changes a source file).
364
384
  Please use [github][3] to file bugs, patches and/or pull requests.
365
385
  More information at the [wiki][4] or ask us at **#jruby**'s IRC channel.
366
386
 
367
- [1]: https://github.com/jruby/warbler#warbler--
387
+ [1]: https://github.com/jruby/warbler
368
388
  [2]: https://central.sonatype.com/artifact/org.jruby.rack/jruby-rack
369
389
  [3]: https://github.com/jruby/jruby-rack/issues
370
390
  [4]: https://github.com/jruby/jruby-rack/wiki
371
- [5]: http://badge.fury.io/rb/jruby-rack
372
- [6]: https://github.com/jruby/jruby-rack/actions/workflows/maven.yml
@@ -8,6 +8,6 @@
8
8
 
9
9
  module JRuby
10
10
  module Rack
11
- VERSION = '1.2.5'
11
+ VERSION = '1.2.7'
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.5.jar", __FILE__)
4
+ File.expand_path("../jruby-rack-1.2.7.jar", __FILE__)
5
5
  end
6
6
  require jruby_rack_jar_path if defined?(JRUBY_VERSION)
7
7
  end
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
8
8
  - Karol Bucek
9
9
  - JRuby contributors
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2025-09-08 00:00:00.000000000 Z
12
+ date: 2026-05-19 00:00:00.000000000 Z
14
13
  dependencies: []
15
14
  description: JRuby-Rack is a combined Java and Ruby library that adapts the Java Servlet
16
15
  API to Rack. For JRuby only.
@@ -20,17 +19,16 @@ executables: []
20
19
  extensions: []
21
20
  extra_rdoc_files: []
22
21
  files:
23
- - History.md
22
+ - CHANGELOG.md
24
23
  - LICENSE.txt
25
24
  - README.md
26
- - lib/jruby-rack-1.2.5.jar
25
+ - lib/jruby-rack-1.2.7.jar
27
26
  - lib/jruby-rack.rb
28
27
  - lib/jruby/rack/version.rb
29
28
  homepage: http://jruby.org
30
29
  licenses:
31
30
  - MIT
32
31
  metadata: {}
33
- post_install_message:
34
32
  rdoc_options: []
35
33
  require_paths:
36
34
  - lib
@@ -45,8 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
43
  - !ruby/object:Gem::Version
46
44
  version: '0'
47
45
  requirements: []
48
- rubygems_version: 3.2.33
49
- signing_key:
46
+ rubygems_version: 4.0.3
50
47
  specification_version: 4
51
48
  summary: Rack adapter for JRuby and Servlet Containers
52
49
  test_files: []
Binary file