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!
26
26
super
27
27
ENV [ 'RAILS_ROOT' ] = app_path
28
28
ENV [ 'RAILS_ENV' ] = rails_env
29
+ self
30
+ end
29
31
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
32
38
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'
35
45
end
36
46
37
47
protected
@@ -42,12 +52,6 @@ def set_relative_url_root
42
52
end
43
53
end
44
54
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
-
51
55
# @deprecated no longer used, replaced with {#run_boot_hooks}
52
56
def load_extensions
53
57
# no-op
You can’t perform that action at this time.
0 commit comments