File tree Expand file tree Collapse file tree 3 files changed +1
-11
lines changed
main/java/org/jruby/rack/embed Expand file tree Collapse file tree 3 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Breaking Ruby API changes
2222- Drop deprecated ` JRuby::Rack::RailsFileSystemLayout ` alias for ` JRuby::Rack::FileSystemLayout `
2323- Drop deprecated ` JRuby::Rack::Errors ` alias for ` JRuby::Rack::ErrorApp `
2424- Drop deprecated ` Rack::Handler::Servlet::Env ` and ` Rack::Handler::Servlet::LazyEnv ` types (replaced by ` DefaultEnv ` )
25+ - Drop deprecated setting of global ` $servlet_context ` variable during embedded usage (replaced by ` JRuby::Rack.context ` )
2526
2627Breaking configuration capability changes
2728- Drop ` jruby.rack.jruby.version ` and ` jruby.rack.rack.release ` keys from rack ` env ` Hash
Original file line number Diff line number Diff line change @@ -44,9 +44,6 @@ private void initialize() {
4444 IRubyObject rackModule = runtime .getModule ("JRuby" ).getConstantAt ("Rack" );
4545 // `JRuby::Rack.context = context`
4646 rackModule .callMethod (runtime .getCurrentContext (), "context=" , rubyContext );
47- // TODO @deprecated only doing this due backwards compatibility :
48- // user code should use JRuby::Rack.context instead of $servlet_context
49- runtime .getGlobalVariables ().set ("$servlet_context" , rubyContext );
5047 }
5148
5249 @ Override
@@ -68,7 +65,6 @@ public void destroy() {
6865 protected void afterException (
6966 RackEnvironment env , Exception re ,
7067 RackResponseEnvironment response ) throws IOException {
71- // TODO a fast draft (probably should use rack.errors) :
7268 context .log ("Error:" , re );
7369 response .sendError (500 );
7470 }
Original file line number Diff line number Diff line change 55 let ( :application ) { double "application" }
66 let ( :context ) { org . jruby . rack . embed . Context . new "test" }
77
8- before { $servlet_context = nil } ; after { $servlet_context = nil }
9-
10- it "initializes $servlet_context" , :deprecated => true do
11- org . jruby . rack . embed . Dispatcher . new context , application
12- expect ( $servlet_context) . to be ( context )
13- end
14-
158 it "initializes JRuby::Rack.context" do
169 prev_context = JRuby ::Rack . context
1710 JRuby ::Rack . context = nil
You can’t perform that action at this time.
0 commit comments