Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Breaking Ruby API changes
- Drop deprecated `JRuby::Rack::RailsFileSystemLayout` alias for `JRuby::Rack::FileSystemLayout`
- Drop deprecated `JRuby::Rack::Errors` alias for `JRuby::Rack::ErrorApp`
- Drop deprecated `Rack::Handler::Servlet::Env` and `Rack::Handler::Servlet::LazyEnv` types (replaced by `DefaultEnv`)
- Drop deprecated setting of global `$servlet_context` variable during embedded usage (replaced by `JRuby::Rack.context`)

Breaking configuration capability changes
- Drop `jruby.rack.jruby.version` and `jruby.rack.rack.release` keys from rack `env` Hash
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/jruby/rack/embed/Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ private void initialize() {
IRubyObject rackModule = runtime.getModule("JRuby").getConstantAt("Rack");
// `JRuby::Rack.context = context`
rackModule.callMethod(runtime.getCurrentContext(), "context=", rubyContext);
// TODO @deprecated only doing this due backwards compatibility :
// user code should use JRuby::Rack.context instead of $servlet_context
runtime.getGlobalVariables().set("$servlet_context", rubyContext);
}

@Override
Expand All @@ -68,7 +65,6 @@ public void destroy() {
protected void afterException(
RackEnvironment env, Exception re,
RackResponseEnvironment response) throws IOException {
// TODO a fast draft (probably should use rack.errors) :
context.log("Error:", re);
response.sendError(500);
}
Expand Down
7 changes: 0 additions & 7 deletions src/spec/ruby/rack/embed/dispatcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
let(:application) { double "application" }
let(:context) { org.jruby.rack.embed.Context.new "test" }

before { $servlet_context = nil }; after { $servlet_context = nil }

it "initializes $servlet_context", :deprecated => true do
org.jruby.rack.embed.Dispatcher.new context, application
expect($servlet_context).to be(context)
end

it "initializes JRuby::Rack.context" do
prev_context = JRuby::Rack.context
JRuby::Rack.context = nil
Expand Down