File tree Expand file tree Collapse file tree 8 files changed +23
-11
lines changed Expand file tree Collapse file tree 8 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ gemfile:
21
21
- gemfiles/rails_4.2_sprockets_2.gemfile
22
22
- gemfiles/rails_4.2_sprockets_3.gemfile
23
23
- gemfiles/rails_5_no_sprockets.gemfile
24
- - gemfiles/rails_5_sprockets_4 .gemfile
24
+ - gemfiles/rails_5.1_sprockets_4 .gemfile
25
25
26
26
matrix :
27
27
fast_finish : true
@@ -43,7 +43,7 @@ matrix:
43
43
- rvm : 2.1
44
44
gemfile : gemfiles/rails_5_no_sprockets.gemfile
45
45
- rvm : 2.1
46
- gemfile : gemfiles/rails_5_sprockets_4 .gemfile
46
+ gemfile : gemfiles/rails_5.1_sprockets_4 .gemfile
47
47
- rvm : jruby-9.0.1.0
48
48
gemfile : gemfiles/rails_4.0.gemfile
49
49
- rvm : jruby-9.0.1.0
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ appraise "rails-5-no_sprockets" do
65
65
gem 'rails' , '~> 5.0.0'
66
66
end
67
67
68
- appraise "rails-5-sprockets_4" do
69
- gem "rails" , "~> 5.0.0 "
68
+ appraise "rails-5.1 -sprockets_4" do
69
+ gem "rails" , "5.1.0.rc1 "
70
70
gem "sprockets" , "~> 4.0.x"
71
71
gem "turbolinks" , "~> 5.0.0"
72
72
end
Original file line number Diff line number Diff line change 3
3
source "http://rubygems.org"
4
4
5
5
gem "turbolinks", "~> 5.0.0"
6
- gem "rails", "~> 5.0.0 "
6
+ gem "rails", "5.1.0.rc1 "
7
7
gem "sprockets", "~> 4.0.x"
8
8
9
9
gemspec :path => "../"
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class Railtie < ::Rails::Railtie
33
33
end
34
34
35
35
# Rails checks these objects for changes:
36
- app . reloaders << app . config . file_watcher . new ( [ ] , reload_paths )
36
+ app . reloaders << app . config . file_watcher . new ( [ ] , reload_paths ) { }
37
37
# Reload renderers in dev when files change
38
38
config . to_prepare { React ::ServerRendering . reset_pool }
39
39
end
Original file line number Diff line number Diff line change 21
21
"rails-erb-loader" : " ^4.0.0" ,
22
22
"react" : " ^15.4.2" ,
23
23
"react-dom" : " ^15.4.2" ,
24
- "react_ujs" : " ^1 .0.0 " ,
24
+ "react_ujs" : " ^2 .0.2 " ,
25
25
"sass-loader" : " ^6.0.3" ,
26
26
"style-loader" : " ^0.16.1" ,
27
27
"webpack" : " ^2.3.3" ,
Original file line number Diff line number Diff line change @@ -3450,9 +3450,9 @@ react@^15.4.2:
3450
3450
loose-envify "^1.1.0"
3451
3451
object-assign "^4.1.0"
3452
3452
3453
- react_ujs@^1 .0.0 :
3454
- version "1 .0.0 "
3455
- resolved "https://registry.yarnpkg.com/react_ujs/-/react_ujs-1 .0.0 .tgz#33fbae8cd949fbdd28914d7a0b69bf3c078aa4be "
3453
+ react_ujs@^2 .0.2 :
3454
+ version "2 .0.2 "
3455
+ resolved "https://registry.yarnpkg.com/react_ujs/-/react_ujs-2 .0.2 .tgz#0020f38fa2e47a04c03faa080325324bfa6d1f0b "
3456
3456
3457
3457
read-cache@^1.0.0 :
3458
3458
version "1.0.0"
Original file line number Diff line number Diff line change 1
1
require 'test_helper'
2
2
3
3
class PagesControllerTest < ActionController ::TestCase
4
+ include ParamsHelper
4
5
setup do
5
6
WebpackerHelpers . compile_if_missing
6
7
end
7
8
8
9
test 'renders successfully' do
9
- get :show , id : 1
10
+ get :show , query_params ( id : 1 )
10
11
assert_equal ( 200 , response . status )
11
12
end
12
13
Original file line number Diff line number Diff line change @@ -101,3 +101,14 @@ def when_stateful_js_context_available
101
101
yield
102
102
end
103
103
end
104
+
105
+ module ParamsHelper
106
+ # Normalize params for Rails 5.1+
107
+ def query_params ( params )
108
+ if Rails ::VERSION ::MAJOR > 4
109
+ { params : params }
110
+ else
111
+ params
112
+ end
113
+ end
114
+ end
You can’t perform that action at this time.
0 commit comments