jruby-rack 1.2.4 → 1.2.5

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: 1becdd6815173bccddf1fdb8ca6501876745258aba86eb0d18ceacab82e0482f
4
- data.tar.gz: e55c77bc6c8a10b557380b61a06bc1b4d0f2000593915a2f26733f63f5927c68
3
+ metadata.gz: deb522e122e0c6e6cdb44b3cc48f1998c8faa022b6f9f40155f3443f9b29b8f7
4
+ data.tar.gz: 4575c6ef77f6fab741703a667fa04471d5190bf09736a9655c0ac74c600c8f0f
5
5
  SHA512:
6
- metadata.gz: 9a73d749573c629076cc5d85f43b22c4d6bded7a9048a560dcdc74caa700c07a2df9a450eac890e23e1b096a2ca5fb206989599b34d87cda5feb600e8a036be8
7
- data.tar.gz: d04e67c0b239917dc0d41f50227bf5efe72f1d25ea4862828b7333815ec78f3fe4bb6d39b7c9f8f88b083e86d0cdbf209b6cd62a351c45ebc43d6749f2e9942d
6
+ metadata.gz: e5f36e4650ed62c243e66747fda304a83a8205bc8fab59f5fc53ce6bbb77a7146d033930c13e09d26d86ae9217a661d47c3bf548900727ec54e50e29fa78d270
7
+ data.tar.gz: 04c00aedf47df518653664142bcfa0e7e667d8203bbad4b5cc595ee1ef1cac8f60008594c741463c78660959786875e6f2224f205d250568f38cd49a88aea9f8
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.2.5
2
+
3
+ - Fix use of jruby-rack under Java 8 (#324)
4
+ - Fix deprecated usages of JRuby runtime
5
+ - Fix deprecated usages of Rack API
6
+
1
7
  ## 1.2.4
2
8
 
3
9
  - update (bundled) rack to 2.2.17
data/README.md CHANGED
@@ -1,28 +1,21 @@
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
6
  JRuby-Rack is a lightweight adapter for the Java Servlet environment that allows
4
7
  any (Ruby) Rack-based application to run unmodified in a Java Servlet container.
5
8
  JRuby-Rack supports Rails as well as any Rack-compatible Ruby web framework.
6
9
 
7
10
  For more information on Rack, visit http://rack.github.io/.
8
11
 
9
- **This README (master) targets JRuby-Rack 1.2. Please use the
10
- [1.1-stable](https://github.com/jruby/jruby-rack/tree/1.1-stable) branch for
11
- current stable 1.1.x releases.**
12
-
13
- [![Gem Version](https://badge.fury.io/rb/jruby-rack.png)][8]
14
- [![Build Status](https://github.com/jruby/jruby-rack/actions/workflows/maven.yml/badge.svg)][9]
15
-
16
12
  ## Compatibility
17
13
 
18
- JRuby-Rack 1.2.x
19
- - aims to be compatible with JRuby >= 9.3 and its supported JDK versions
20
- - supports any container compatible with Java Servlet 3.0 API
21
-
22
- JRuby-Rack 1.1.x
23
- - aims to be compatible with JRuby >= 1.6.4 (used successfully through JRuby 9.4.x)
24
- - supports any container compatible with Java Servlet 2.5 API (JEE 5)
25
-
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) | |
26
19
 
27
20
  ## Getting Started
28
21
 
@@ -41,9 +34,6 @@ Otherwise you'll need to download the latest [jar release][2], drop it into the
41
34
  *WEB-INF/lib* directory and configure the `RackFilter` in your application's
42
35
  *web.xml* (see following examples).
43
36
 
44
- Alternatively you can use a server built upon JRuby-Rack such as [Trinidad][3]
45
- with sensible defaults, without the need to configure a deployment descriptor.
46
-
47
37
  ### Rails
48
38
 
49
39
  Here's sample *web.xml* configuration for Rails. Note the environment and
@@ -51,44 +41,46 @@ min/max runtime parameters. For **multi-threaded** (a.k.a. `threadsafe!`)
51
41
  Rails with a single runtime, set min/max both to 1. Otherwise, define the size
52
42
  of the runtime pool as you wish.
53
43
 
54
- <context-param>
55
- <param-name>rails.env</param-name>
56
- <param-value>production</param-value>
57
- </context-param>
58
- <context-param>
59
- <param-name>jruby.min.runtimes</param-name>
60
- <param-value>1</param-value>
61
- </context-param>
62
- <context-param>
63
- <param-name>jruby.max.runtimes</param-name>
64
- <param-value>1</param-value>
65
- </context-param>
66
-
67
- <filter>
68
- <filter-name>RackFilter</filter-name>
69
- <filter-class>org.jruby.rack.RackFilter</filter-class>
70
- <!-- optional filter configuration init-params : -->
71
- <init-param>
72
- <param-name>resetUnhandledResponse</param-name>
73
- <param-value>true</param-value> <!-- true (default), false or buffer -->
74
- </init-param>
75
- <init-param>
76
- <param-name>addsHtmlToPathInfo</param-name>
77
- <param-value>true</param-value> <!-- true (default), false -->
78
- </init-param>
79
- <init-param>
80
- <param-name>verifiesHtmlResource</param-name>
81
- <param-value>false</param-value> <!-- true, false (default) -->
82
- </init-param>
83
- </filter>
84
- <filter-mapping>
85
- <filter-name>RackFilter</filter-name>
86
- <url-pattern>/*</url-pattern>
87
- </filter-mapping>
88
-
89
- <listener>
90
- <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class>
91
- </listener>
44
+ ```xml
45
+ <context-param>
46
+ <param-name>rails.env</param-name>
47
+ <param-value>production</param-value>
48
+ </context-param>
49
+ <context-param>
50
+ <param-name>jruby.min.runtimes</param-name>
51
+ <param-value>1</param-value>
52
+ </context-param>
53
+ <context-param>
54
+ <param-name>jruby.max.runtimes</param-name>
55
+ <param-value>1</param-value>
56
+ </context-param>
57
+
58
+ <filter>
59
+ <filter-name>RackFilter</filter-name>
60
+ <filter-class>org.jruby.rack.RackFilter</filter-class>
61
+ <!-- optional filter configuration init-params : -->
62
+ <init-param>
63
+ <param-name>resetUnhandledResponse</param-name>
64
+ <param-value>true</param-value> <!-- true (default), false or buffer -->
65
+ </init-param>
66
+ <init-param>
67
+ <param-name>addsHtmlToPathInfo</param-name>
68
+ <param-value>true</param-value> <!-- true (default), false -->
69
+ </init-param>
70
+ <init-param>
71
+ <param-name>verifiesHtmlResource</param-name>
72
+ <param-value>false</param-value> <!-- true, false (default) -->
73
+ </init-param>
74
+ </filter>
75
+ <filter-mapping>
76
+ <filter-name>RackFilter</filter-name>
77
+ <url-pattern>/*</url-pattern>
78
+ </filter-mapping>
79
+
80
+ <listener>
81
+ <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class>
82
+ </listener>
83
+ ```
92
84
 
93
85
  ### (Other) Rack Applications
94
86
 
@@ -96,34 +88,38 @@ The main difference when using a non-Rails Rack application is that JRuby-Rack
96
88
  looks for a "rackup" file named **config.ru** in `WEB-INF/config.ru` or
97
89
  `WEB-INF/*/config.ru`. Here's a sample *web.xml* configuration :
98
90
 
99
- <filter>
100
- <filter-name>RackFilter</filter-name>
101
- <filter-class>org.jruby.rack.RackFilter</filter-class>
102
- <!-- optional filter configuration init-params (@see above) -->
103
- </filter>
104
- <filter-mapping>
105
- <filter-name>RackFilter</filter-name>
106
- <url-pattern>/*</url-pattern>
107
- </filter-mapping>
108
-
109
- <listener>
110
- <listener-class>org.jruby.rack.RackServletContextListener</listener-class>
111
- </listener>
91
+ ```xml
92
+ <filter>
93
+ <filter-name>RackFilter</filter-name>
94
+ <filter-class>org.jruby.rack.RackFilter</filter-class>
95
+ <!-- optional filter configuration init-params (@see above) -->
96
+ </filter>
97
+ <filter-mapping>
98
+ <filter-name>RackFilter</filter-name>
99
+ <url-pattern>/*</url-pattern>
100
+ </filter-mapping>
101
+
102
+ <listener>
103
+ <listener-class>org.jruby.rack.RackServletContextListener</listener-class>
104
+ </listener>
105
+ ```
112
106
 
113
107
  If you don't have a *config.ru* or don't want to include it in your web app, you
114
108
  can embed it directly in the *web.xml* as follows (using Sinatra as an example):
115
109
 
116
- <context-param>
117
- <param-name>rackup</param-name>
118
- <param-value>
119
- require 'rubygems'
120
- gem 'sinatra', '~&gt; 1.3'
121
- require './lib/app'
122
- set :run, false
123
- set :environment, :production
124
- run Sinatra::Application
125
- </param-value>
126
- </context-param>
110
+ ```xml
111
+ <context-param>
112
+ <param-name>rackup</param-name>
113
+ <param-value>
114
+ require 'rubygems'
115
+ gem 'sinatra', '~&gt; 1.3'
116
+ require './lib/app'
117
+ set :run, false
118
+ set :environment, :production
119
+ run Sinatra::Application
120
+ </param-value>
121
+ </context-param>
122
+ ```
127
123
 
128
124
  Be sure to escape angle-brackets for XML !
129
125
 
@@ -178,7 +174,7 @@ JRuby runtime management and pooling is done automatically by the framework.
178
174
  In the case of Rails, runtimes are pooled by default (the default will most
179
175
  likely change with the adoption of Rails 4.0). For other Rack applications a
180
176
  single shared runtime is created and shared for every request by default.
181
- As of **1.1.9** if *jruby.min.runtimes* and *jruby.max.runtimes* values are
177
+ If *jruby.min.runtimes* and *jruby.max.runtimes* values are
182
178
  specified pooling is supported for plain Rack applications as well.
183
179
 
184
180
  We do recommend to boot your runtimes up-front to avoid the cost of initializing
@@ -279,13 +275,16 @@ provided *config.ru* the bundled (latest) version of Rack will get loaded.
279
275
 
280
276
  Use **rack.version** to specify the Rack gem version to be loaded before rackup :
281
277
 
282
- # encoding: UTF-8
283
- # rack.version: ~>2.2.10 (before code is loaded gem '~>2.2.10' will be called)
278
+ ```ruby
279
+ # encoding: UTF-8
280
+ # rack.version: ~>2.2.10 (before code is loaded gem '~>2.2.10' will be called)
281
+ ```
284
282
 
285
283
  Or the equivalent of doing `bundle exec rackup ...` if you're using Bundler :
286
284
 
287
- # rack.version: bundler (requires 'bundler/setup' before loading the script)
288
-
285
+ ```ruby
286
+ # rack.version: bundler (requires 'bundler/setup' before loading the script)
287
+ ```
289
288
 
290
289
  ## Logging
291
290
 
@@ -296,12 +295,12 @@ logging system, configure `jruby.rack.logging` as follows:
296
295
  - `servlet_context` (default): Sends log messages to the servlet context.
297
296
  - `stdout`: Sends log messages to the standard output stream `System.out`.
298
297
  - `slf4j`: Sends log messages to SLF4J. SLF4J configuration is left up to you,
299
- please refer to http://www.slf4j.org/docs.html .
300
- - `log4j`: Sends log messages to log4J. Again, Log4J configuration is
301
- left up to you, consult http://logging.apache.org/log4j/ .
298
+ please refer to https://www.slf4j.org/manual.html .
299
+ - `log4j`: Sends log messages through Log4j. Only Log4j 2.x is supported, for
300
+ - configuration please consult https://logging.apache.org/log4j/2.x/index.html .
302
301
  - `commons_logging`: Routes logs to commons-logging. You still need to configure
303
- an underlying logging implementation with JCL. We recommend using the logger
304
- library wrapper directly if possible, see http://commons.apache.org/logging/ .
302
+ an underlying logging implementation with JCL.
303
+ We recommend rather using the logger library wrapper directly when possible.
305
304
  - `jul`: Directs log messages via Java's core logging facilities (util.logging).
306
305
 
307
306
  For those loggers that require a specific named logger, set it with the
@@ -312,21 +311,26 @@ For those loggers that require a specific named logger, set it with the
312
311
 
313
312
  Checkout the JRuby-Rack code using [git](http://git-scm.com/) :
314
313
 
315
- git clone git://github.com/jruby/jruby-rack.git
316
- cd jruby-rack
314
+ ```shell
315
+ git clone git@github.com:jruby/jruby-rack.git
316
+ cd jruby-rack
317
+ ```
317
318
 
318
- Ensure you have [Maven](http://maven.apache.org/) installed.
319
- It is required for downloading jar artifacts that JRuby-Rack depends on.
319
+ Ensure you have a compatible JVM installed. It is required for building and compiling.
320
320
 
321
321
  Build the .jar using Maven :
322
322
 
323
- mvn install
323
+ ```shell
324
+ ./mvnw install
325
+ ```
324
326
 
325
327
  the generated jar should be located at **target/jruby-rack-*.jar**
326
328
 
327
329
  Alternatively use Rake, e.g. to build the gem (skipping specs) :
328
330
 
329
- jruby -S rake clean gem SKIP_SPECS=true
331
+ ```shell
332
+ jruby -S rake clean gem SKIP_SPECS=true
333
+ ```
330
334
 
331
335
  You can **not** use JRuby-Rack with Bundler directly from the git (or http) URL
332
336
  (`gem 'jruby-rack', :github => 'jruby/jruby-rack'`) since the included .jar file
@@ -335,21 +339,34 @@ package and push the .jar every time a commit changes a source file).
335
339
 
336
340
  ## Releasing
337
341
 
338
- * Make sure auth is configured for "central" repository ID in your .m2/settings.xml
339
- * Update the version in src/main/ruby/jruby/rack/version.rb to the release version
340
- * mvn release:prepare
341
- * mvn release:perform (possibly with -DuseReleaseProfile=false due to Javadoc doclint failures for now)
342
- * rake clean gem SKIP_SPECS=true and push the gem
342
+ * 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)
346
+ * `rake clean gem SKIP_SPECS=true` and push the gem
347
+
348
+ ## Adding testing for new Rails versions
349
+
350
+ * Add the new version to `.github/workflows/maven.yml` under the `matrix` section
351
+ * Add a new configuration to the `Appraisals` file, then
352
+ ```bundle exec appraisal generate```
353
+ * Generate a new stub Rails application for the new version
354
+ ```shell
355
+ VERSION=rails72
356
+ cd src/spec/stub
357
+ 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
358
+ ```
359
+ * Manual changes to make to support testing
360
+ * In `config/production.rb` comment out the default `config.logger` value so jruby-rack applies its own `RailsLogger`.
343
361
 
344
362
  ## Support
345
363
 
346
- Please use [github][4] to file bugs, patches and/or pull requests.
347
- More information at the [wiki][5] or ask us at **#jruby**'s IRC channel.
364
+ Please use [github][3] to file bugs, patches and/or pull requests.
365
+ More information at the [wiki][4] or ask us at **#jruby**'s IRC channel.
348
366
 
349
367
  [1]: https://github.com/jruby/warbler#warbler--
350
- [2]: https://oss.sonatype.org/content/repositories/releases/org/jruby/rack/jruby-rack/
351
- [3]: https://github.com/trinidad/trinidad
352
- [4]: https://github.com/jruby/jruby-rack/issues
353
- [5]: https://wiki.github.com/jruby/jruby-rack
354
- [8]: http://badge.fury.io/rb/jruby-rack
355
- [9]: https://github.com/jruby/jruby-rack/actions/workflows/maven.yml
368
+ [2]: https://central.sonatype.com/artifact/org.jruby.rack/jruby-rack
369
+ [3]: https://github.com/jruby/jruby-rack/issues
370
+ [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.4'
11
+ VERSION = '1.2.5'
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.4.jar", __FILE__)
4
+ File.expand_path("../jruby-rack-1.2.5.jar", __FILE__)
5
5
  end
6
6
  require jruby_rack_jar_path if defined?(JRUBY_VERSION)
7
7
  end
metadata CHANGED
@@ -1,13 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
8
+ - Karol Bucek
9
+ - JRuby contributors
10
+ autorequire:
8
11
  bindir: bin
9
12
  cert_chain: []
10
- date: 2025-08-08 00:00:00.000000000 Z
13
+ date: 2025-09-08 00:00:00.000000000 Z
11
14
  dependencies: []
12
15
  description: JRuby-Rack is a combined Java and Ruby library that adapts the Java Servlet
13
16
  API to Rack. For JRuby only.
@@ -20,13 +23,14 @@ files:
20
23
  - History.md
21
24
  - LICENSE.txt
22
25
  - README.md
23
- - lib/jruby-rack-1.2.4.jar
26
+ - lib/jruby-rack-1.2.5.jar
24
27
  - lib/jruby-rack.rb
25
28
  - lib/jruby/rack/version.rb
26
29
  homepage: http://jruby.org
27
30
  licenses:
28
31
  - MIT
29
32
  metadata: {}
33
+ post_install_message:
30
34
  rdoc_options: []
31
35
  require_paths:
32
36
  - lib
@@ -34,14 +38,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
34
38
  requirements:
35
39
  - - ">="
36
40
  - !ruby/object:Gem::Version
37
- version: '0'
41
+ version: 2.6.0
38
42
  required_rubygems_version: !ruby/object:Gem::Requirement
39
43
  requirements:
40
44
  - - ">="
41
45
  - !ruby/object:Gem::Version
42
46
  version: '0'
43
47
  requirements: []
44
- rubygems_version: 3.6.3
48
+ rubygems_version: 3.2.33
49
+ signing_key:
45
50
  specification_version: 4
46
51
  summary: Rack adapter for JRuby and Servlet Containers
47
52
  test_files: []
Binary file