File tree Expand file tree Collapse file tree 2 files changed +15
-43
lines changed
Expand file tree Collapse file tree 2 files changed +15
-43
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -30,10 +30,24 @@ def boot!
3030 require 'jruby/rack/rails/environment'
3131 extend RailsEnvironment
3232
33- set_public_root
3433 self
3534 end
3635
36+ # @return [Rails::Application] the (loaded) application instance
37+ def to_app
38+ # backward "compatibility" calling #to_app without a #load_environment
39+ load_environment
40+ ::Rails . application
41+ end
42+
43+ # Loads the Rails environment (*config/environment.rb*).
44+ def load_environment
45+ require expand_path ( 'config/boot.rb' )
46+ require 'jruby/rack/rails/railtie'
47+ require expand_path ( 'config/environment.rb' )
48+ require 'jruby/rack/rails/extensions'
49+ end
50+
3751 protected
3852
3953 def set_relative_url_root
@@ -42,12 +56,6 @@ def set_relative_url_root
4256 end
4357 end
4458
45- # @see JRuby::Rack::RailsBooter::Rails2Environment#set_public_root
46- # @see JRuby::Rack::RailsBooter::Rails3Environment#set_public_root
47- def set_public_root
48- # no-op by default - leave as it is
49- end
50-
5159 # @deprecated no longer used, replaced with {#run_boot_hooks}
5260 def load_extensions
5361 # no-op
You can’t perform that action at this time.
0 commit comments