Skip to content

Commit a379abc

Browse files
committed
Merge remote-tracking branch 'upstream/master' into reinstate-rails-stub-tests
# Conflicts: # src/spec/ruby/jruby/rack/integration_spec.rb
2 parents 2c6b6c9 + a6433e9 commit a379abc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+135
-589
lines changed

History.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66
- Drop unnecessary `jruby.compat.version` and `RackConfig.getCompatVersion()` API
77
- Drop JMS support
88
- Drop deprecated `RackLogger` string (level) constants
9-
- Drop `jruby.rack.jruby.version` and `jruby.rack.rack.release` keys from rack `env` Hhsh
9+
- Drop `jruby.rack.jruby.version` and `jruby.rack.rack.release` keys from rack `env` Hash
10+
- Drop deprecated `Rack::Handler::Servlet::Env` and `Rack::Handler::Servlet::LazyEnv` types (replaced by `DefaultEnv`)
11+
- Drop undocumented and deprecated jruby-rack 1.0 backwards compat properties `jruby.runtime.timeout.sec`, `jruby.runtime.initializer.threads`, `jruby.init.serial`, `jruby.rack.request.size.threshold.bytes`
12+
- Drop deprecated `jruby.rack.ignore.env` property, replaced long ago by `jruby.runtime.env` and optional `jruby.runtime.env.rubyopt`
13+
- Drop deprecated `JRuby::Rack::RailsFileSystemLayout` alias for `JRuby::Rack::FileSystemLayout`
14+
- Drop deprecated `JRuby::Rack::Errors` alias for `JRuby::Rack::ErrorApp`
15+
- Drop deprecated `org.jruby.rack.RackInput` alias for `org.jruby.rack.ext.Input` class
16+
- Drop/rename deprecated `RackConfig` and `ServletRackEnvironment` API methods per their earlier comments
1017
- Change context listener to throw, in case of an exception during initialization, by default
1118
- Change rails context listener to assume a thread-safe application by default
12-
- update (bundled) rack to 2.2.17
13-
- Fix Rails 7.1 CSRF protection when working with `JavaServletStore` sessions
1419

15-
## 1.2.4 (UNRELEASED)
20+
## 1.2.4
1621

1722
- update (bundled) rack to 2.2.17
1823
- Fix Rails 7.1 CSRF protection when working with `JavaServletStore` sessions
@@ -173,9 +178,9 @@ Changes from 1.1.15 apply since the previous release got yanked due a regression
173178
to handle custom lazy-bound keys but can not use a default proc (#132)
174179
- support the renew (and skip) session option with servlet store (#131)
175180
- improve ENV isolation with booted Ruby runtimes
176-
* jruby.rack.env replaces jruby.rack.ignore.env (now deprecated)
181+
* jruby.runtime.env replaces jruby.rack.ignore.env (now deprecated)
177182
* make sure RUBYOPT is ignored (with backwards compat)
178-
* jruby.rack.env.rubyopt for finer RUBYOPT behavior control
183+
* jruby.runtime.env.rubyopt for finer RUBYOPT behavior control
179184
* allow env value to be specified from config
180185
- solve the rackup "chicken - egg" problem with a plain Rack app
181186
* with a magic comment in config.ru # rack.version: ~>1.3.6

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,9 @@ as context init parameters in web.xml or as VM-wide system properties.
224224
- `jruby.runtime.env`: Allows to set a custom ENV hash for your Ruby environment
225225
and thus insulate the application from the environment it is running. By setting
226226
this option to en empty string (or 'false') it acts as if the ENV hash was
227-
cleared out (similar to the now deprecated `jruby.rack.ignore.env` option).
228-
- `jruby.runtime.env.rubyopt`: This option is used for compatibility with the
229-
(deprecated) `jruby.rack.ignore.env` option since it cleared out the ENV after
230-
RUBYOPT has been processed, by setting it to true ENV['RUBYOPT'] will be kept.
227+
cleared out (similar to the now removed `jruby.rack.ignore.env` option).
228+
- `jruby.runtime.env.rubyopt`: Set to true to cause ENV['RUBYOPT']
229+
to be retained even when using `jruby.runtime.env` to override environemnt (similar to how the removed `jruby.rack.ignore.env` option behaved by default).
231230
- `jruby.rack.logging`: Specify the logging device to use. Defaults to
232231
`servlet_context`. See below.
233232
- `jruby.rack.request.size.initial.bytes`: Initial size for request body memory

Rakefile

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,12 @@ end
5151
desc "Unpack the rack gem"
5252
task :unpack_gem => "target" do |t|
5353
target = File.expand_path(t.prerequisites.first)
54-
spec = Gem.loaded_specs['rack']
55-
# JRuby <= 1.7.20 does not handle respond_to? with method_missing right
56-
# ... issue with Bundler::StubSpecification wrapping (in bundler 1.10.x)
57-
unless ( gem_file = spec.cache_file rescue nil )
58-
#if defined?(::Bundler) && ::Bundler.const_defined?(:StubSpecification) # since Bundler 1.10.1
59-
# spec = spec.to_spec if spec.is_a?(::Bundler::StubSpecification)
60-
#else
61-
# spec = spec.to_spec if spec.respond_to?(:to_spec)
62-
#end
63-
gem_file = File.join(spec.base_dir, 'cache', spec.file_name)
64-
end
65-
unless uptodate?("#{target}/vendor/rack.rb", [__FILE__, gem_file])
54+
rack_gemfile = Gem.loaded_specs['rack'].cache_file
55+
unless uptodate?("#{target}/vendor/rack.rb", [__FILE__, rack_gemfile])
6656
mkdir_p "target/vendor"
6757
require 'rubygems/installer'
68-
rack_dir = File.basename(gem_file).sub(/\.gem$/, '')
69-
Gem::Package.new(gem_file).extract_files("#{target}/#{rack_dir}")
58+
rack_dir = File.basename(rack_gemfile).sub(/\.gem$/, '')
59+
Gem::Package.new(rack_gemfile).extract_files("#{target}/#{rack_dir}")
7060
File.open("#{target}/vendor/rack.rb", "w") do |f|
7161
f << "dir = File.dirname(__FILE__)\n"
7262
f << "if dir =~ /.jar!/ && dir !~ /^file:/\n"
@@ -187,9 +177,9 @@ task :gem => [target_jar, target_jruby_rack, target_jruby_rack_version] do
187177
gem.homepage = %q{http://jruby.org}
188178
gem.required_ruby_version = '>= 3.1.0' # JRuby >= 9.4
189179
end
190-
defined?(Gem::Builder) ? Gem::Builder.new(gemspec).build : begin
191-
require 'rubygems/package'; Gem::Package.build(gemspec)
192-
end
180+
181+
require 'rubygems/package'
182+
Gem::Package.build(gemspec)
193183
File.open('jruby-rack.gemspec', 'w') { |f| f << gemspec.to_ruby }
194184
mv FileList['*.gem'], '..'
195185
end

examples/servers/Apache-Tomcat-6-0-14.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jruby.home: file:/Users/nicksieger/Projects/java/apache-tomcat-6.0.14/webapps/si
77
--- Context Init Parameters:
88
ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
10-
jruby.rack.ignore.env = true
10+
jruby.runtime.env = false
1111
public.root = /
1212
rack.env = production
1313

@@ -33,8 +33,7 @@ Settings:
3333
compat_version =
3434
filter_adds_html = true
3535
filter_verifies_resource = false
36-
ignore_environment = true
37-
initial_runtimes =
36+
initial_runtimes =
3837
logger = org.jruby.rack.logging.ServletContextLogger@7a14b43d
3938
logger_class_name = servlet_context
4039
logger_name = jruby.rack

examples/servers/Apache-Tomcat-7-0-2.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ jruby.home: file:/Users/nicksieger/Projects/java/apache-tomcat-7.0.2/webapps/sin
77
--- Context Init Parameters:
88
ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
10-
jruby.rack.ignore.env = true
1110
public.root = /
1211
rack.env = production
1312

@@ -33,8 +32,7 @@ Settings:
3332
compat_version =
3433
filter_adds_html = true
3534
filter_verifies_resource = false
36-
ignore_environment = true
37-
initial_runtimes =
35+
initial_runtimes =
3836
logger = org.jruby.rack.logging.ServletContextLogger@398a3257
3937
logger_class_name = servlet_context
4038
logger_name = jruby.rack

examples/servers/GlassFish-v3.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
1010
com.sun.faces.forceLoadConfiguration = true
1111
com.sun.faces.validateXml = true
12-
jruby.rack.ignore.env = true
12+
jruby.runtime.env = false
1313
public.root = /
1414
rack.env = production
1515

@@ -35,8 +35,7 @@ Settings:
3535
compat_version =
3636
filter_adds_html = true
3737
filter_verifies_resource = false
38-
ignore_environment = true
39-
initial_runtimes =
38+
initial_runtimes =
4039
logger = org.jruby.rack.logging.ServletContextLogger@46ee45a5
4140
logger_class_name = servlet_context
4241
logger_name = jruby.rack

examples/servers/JBoss-Web-2-1-3-GA.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
1010
com.sun.faces.duplicateJARPattern = ^tmp\d+(\S*\.jar)
1111
com.sun.faces.injectionProvider = org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider
12-
jruby.rack.ignore.env = true
1312
public.root = /
1413
rack.env = production
1514

@@ -35,8 +34,7 @@ Settings:
3534
compat_version =
3635
filter_adds_html = true
3736
filter_verifies_resource = false
38-
ignore_environment = true
39-
initial_runtimes =
37+
initial_runtimes =
4038
logger = org.jruby.rack.logging.ServletContextLogger@1a20433b
4139
logger_class_name = servlet_context
4240
logger_name = jruby.rack

examples/servers/JBoss-Web-3-0-0-CR1.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jruby.home: classpath:/META-INF/jruby.home
77
--- Context Init Parameters:
88
ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
10-
jruby.rack.ignore.env = true
10+
jruby.runtime.env = false
1111
public.root = /
1212
rack.env = production
1313
resteasy.unwrapped.exceptions = javax.ejb.EJBException
@@ -34,8 +34,7 @@ Settings:
3434
compat_version =
3535
filter_adds_html = true
3636
filter_verifies_resource = false
37-
ignore_environment = true
38-
initial_runtimes =
37+
initial_runtimes =
3938
logger = org.jruby.rack.logging.ServletContextLogger@7ee18d93
4039
logger_class_name = servlet_context
4140
logger_name = jruby.rack

examples/servers/Resin-4-0-13.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jruby.home: file:/Users/nicksieger/Projects/java/resin-4.0.13/webapps/sinatra/WE
77
--- Context Init Parameters:
88
ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
10-
jruby.rack.ignore.env = true
10+
jruby.runtime.env = false
1111
public.root = /
1212
rack.env = production
1313

@@ -33,8 +33,7 @@ Settings:
3333
compat_version =
3434
filter_adds_html = true
3535
filter_verifies_resource = false
36-
ignore_environment = true
37-
initial_runtimes =
36+
initial_runtimes =
3837
logger = org.jruby.rack.logging.ServletContextLogger@6c538793
3938
logger_class_name = servlet_context
4039
logger_name = jruby.rack

examples/servers/Winstone-Servlet-Engine-v0-9-10.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jruby.home: file:/private/var/folders/1j/pj33xy610ms4jxbv3g0zh9400000gn/T/winsto
77
--- Context Init Parameters:
88
ENV_HOST = Vanguard.local
99
ENV_OUTPUT = /Users/nicksieger/Projects/ruby/jruby-rack/examples/servers
10-
jruby.rack.ignore.env = true
10+
jruby.runtime.env = false
1111
public.root = /
1212
rack.env = production
1313

@@ -34,8 +34,7 @@ Settings:
3434
compat_version =
3535
filter_adds_html = true
3636
filter_verifies_resource = false
37-
ignore_environment = true
38-
initial_runtimes =
37+
initial_runtimes =
3938
logger = org.jruby.rack.logging.ServletContextLogger@397af435
4039
logger_class_name = servlet_context
4140
logger_name = jruby.rack

0 commit comments

Comments
 (0)