cells-rails 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGES.md +4 -0
- data/lib/cell/helper/asset_helper.rb +1 -0
- data/lib/cell/rails/testing.rb +9 -5
- data/lib/cell/railtie.rb +1 -1
- data/lib/cells/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c14edde2815318b76d6600a5d9990d01453450aa
|
4
|
+
data.tar.gz: f9ab15d2448aea4ddc811e5a8df2b4394cbf8368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc631beedab021077e9989779e8d7db92e411863521ead73daea5adb2f0dde685fdae628df903bc6dedc030de70e7835f4467f17f4ae82079cf1abac44f71d8e
|
7
|
+
data.tar.gz: 02213c556a58b2f3e8ba7d2a5a41d3425ba9192ef92c779f54001e8e603f9b9d79bd15d94add724bcf3b6bb9913ba412e5f95d3d63c6e61c1d0899f5f2231618
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
data/lib/cell/rails/testing.rb
CHANGED
@@ -6,15 +6,19 @@ module Cell
|
|
6
6
|
return unless controller_class
|
7
7
|
|
8
8
|
controller_class.new.tap do |ctl|
|
9
|
-
ctl.request = action_controller_test_request
|
9
|
+
ctl.request = action_controller_test_request(controller_class)
|
10
10
|
ctl.instance_variable_set :@routes, ::Rails.application.routes.url_helpers
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
def action_controller_test_request
|
15
|
-
if ::Rails
|
16
|
-
::
|
17
|
-
|
14
|
+
def action_controller_test_request(controller_class)
|
15
|
+
if ::Rails::VERSION::MAJOR >= 5
|
16
|
+
if ::Rails::VERSION::MINOR >= 1 # ~> 5.1
|
17
|
+
::ActionController::TestRequest.create(controller_class)
|
18
|
+
else # 5.0
|
19
|
+
::ActionController::TestRequest.create
|
20
|
+
end
|
21
|
+
else #< 5
|
18
22
|
::ActionController::TestRequest.new
|
19
23
|
end
|
20
24
|
end
|
data/lib/cell/railtie.rb
CHANGED
data/lib/cells/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cells-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cells
|