Skip to content

Commit 7e07ae9

Browse files
Илья БондаренкоiNecas
authored andcommitted
Fix reloader deprecation
1 parent 52852e0 commit 7e07ae9

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ gemfile:
99
- Gemfile.rails41
1010
- Gemfile.rails42
1111
- Gemfile.rails50 # Min ruby 2.2.2
12+
- Gemfile.rails51 # Min ruby 2.2.2
1213
matrix:
1314
exclude:
1415
- rvm: 2.0.0
1516
gemfile: Gemfile.rails50
17+
- rvm: 2.0.0
18+
gemfile: Gemfile.rails51
1619
- rvm: 2.1.7
1720
gemfile: Gemfile.rails50
21+
- rvm: 2.1.7
22+
gemfile: Gemfile.rails51

Gemfile.rails51

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source "https://rubygems.org"
2+
3+
gemspec
4+
5+
gem 'rails', '~> 5.1.0.rc1'
6+
gem 'mime-types', '~> 2.99.3'
7+
gem 'rails-controller-testing'

lib/apipie/application.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,10 @@ def ignored?(controller, method = nil)
424424
# as this would break loading of the controllers.
425425
def rails_mark_classes_for_reload
426426
unless Rails.application.config.cache_classes
427-
ActionDispatch::Reloader.cleanup!
427+
Rails.application.reloader.reload!
428428
init_env
429429
reload_examples
430-
ActionDispatch::Reloader.prepare!
430+
Rails.application.reloader.prepare!
431431
end
432432
end
433433

0 commit comments

Comments
 (0)