File tree Expand file tree Collapse file tree 3 files changed +4
-27
lines changed
lib/rails/commands/server Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Original file line number Diff line number Diff line change 1+ * Remove deprecated support to old ` config.ru ` that use the application class as argument of ` run ` .
2+
3+ * Rafael Mendonça França*
4+
15* Remove deprecated ` environment ` argument from the rails commands.
26
37 * Rafael Mendonça França*
Original file line number Diff line number Diff line change @@ -21,19 +21,6 @@ def initialize(options = nil)
2121 set_environment
2222 end
2323
24- def app
25- @app ||= begin
26- app = super
27- if app . is_a? ( Class )
28- ActiveSupport ::Deprecation . warn ( <<-MSG . squish )
29- Using `Rails::Application` subclass to start the server is deprecated and will be removed in Rails 6.0.
30- Please change `run #{ app } ` to `run Rails.application` in config.ru.
31- MSG
32- end
33- app . respond_to? ( :to_app ) ? app . to_app : app
34- end
35- end
36-
3724 def opt_parser
3825 Options . new
3926 end
Original file line number Diff line number Diff line change @@ -18,20 +18,6 @@ def teardown
1818 teardown_app
1919 end
2020
21- test "deprecate support of older `config.ru`" do
22- remove_file "config.ru"
23- app_file "config.ru" , <<-RUBY
24- require_relative 'config/environment'
25- run AppTemplate::Application
26- RUBY
27-
28- server = Rails ::Server . new ( config : "#{ app_path } /config.ru" )
29- server . app
30-
31- log = File . read ( Rails . application . config . paths [ "log" ] . first )
32- assert_match ( /DEPRECATION WARNING: Using `Rails::Application` subclass to start the server is deprecated/ , log )
33- end
34-
3521 test "restart rails server with custom pid file path" do
3622 skip "PTY unavailable" unless available_pty?
3723
You can’t perform that action at this time.
0 commit comments