File tree Expand file tree Collapse file tree 2 files changed +14
-46
lines changed
Expand file tree Collapse file tree 2 files changed +14
-46
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,12 +26,22 @@ def boot!
2626 super
2727 ENV [ 'RAILS_ROOT' ] = app_path
2828 ENV [ 'RAILS_ENV' ] = rails_env
29+ self
30+ end
2931
30- require 'jruby/rack/rails/environment'
31- extend RailsEnvironment
32+ # @return [Rails::Application] the (loaded) application instance
33+ def to_app
34+ # backward "compatibility" calling #to_app without a #load_environment
35+ load_environment
36+ ::Rails . application
37+ end
3238
33- set_public_root
34- self
39+ # Loads the Rails environment (*config/environment.rb*).
40+ def load_environment
41+ require expand_path ( 'config/boot.rb' )
42+ require 'jruby/rack/rails/railtie'
43+ require expand_path ( 'config/environment.rb' )
44+ require 'jruby/rack/rails/extensions'
3545 end
3646
3747 protected
@@ -42,12 +52,6 @@ def set_relative_url_root
4252 end
4353 end
4454
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-
5155 # @deprecated no longer used, replaced with {#run_boot_hooks}
5256 def load_extensions
5357 # no-op
You can’t perform that action at this time.
0 commit comments