cells-rails 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -3
- data/.travis.yml +12 -13
- data/CHANGES.md +4 -0
- data/Gemfile +2 -2
- data/README.md +2 -1
- data/Rakefile +1 -1
- data/cells-rails.gemspec +1 -1
- data/lib/cell/rails.rb +1 -0
- data/lib/cell/rails/testing.rb +11 -7
- data/lib/cells-rails.rb +1 -0
- data/lib/cells/rails.rb +1 -4
- data/lib/cells/rails/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58c933bc2bd80b6dd44a21992f6537ee1f25140977c570f4ab28f84af99a2bcc
|
4
|
+
data.tar.gz: 9afe72dcd4a5b44b134e35198959b9c89f0f11c423219bd9bb312255ae7429e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8929b9360d079e42059d8830c5ab5165a73afb59057efe8f6adf0976513c7106acf33725a1e1725efe09f40b861c8cdaa6201ac34e20567630cb4665ab04e1ec
|
7
|
+
data.tar.gz: 621cdc22d14d661bb79c6172d21bab249e3aac585ff6356c17efae794ce5bb4fa76eac29c626ee34ed4f4aaba3355b405c75f298271cbda5231b728eaf332bdb
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
- 2.2
|
7
|
-
- 2.1
|
8
|
-
- 2.0.0
|
9
|
-
- 1.9.3
|
10
|
-
- jruby-19mode
|
3
|
+
- 2.4.7
|
4
|
+
- 2.5.6
|
5
|
+
- 2.6.4
|
11
6
|
env:
|
12
|
-
- "RAILS_VERSION=4.2"
|
13
7
|
- "RAILS_VERSION=5.0"
|
8
|
+
- "RAILS_VERSION=5.1"
|
9
|
+
- "RAILS_VERSION=5.2"
|
10
|
+
- "RAILS_VERSION=6.0"
|
14
11
|
matrix:
|
15
12
|
fast_finish: true
|
16
13
|
exclude:
|
17
|
-
- rvm: 2.
|
18
|
-
env:
|
19
|
-
- rvm: 2.4.
|
20
|
-
env:
|
14
|
+
- rvm: 2.3.8
|
15
|
+
env: RAILS_VERSION=6.0
|
16
|
+
- rvm: 2.4.7
|
17
|
+
env: RAILS_VERSION=6.0
|
18
|
+
|
19
|
+
cache: bundler
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
@@ -5,10 +5,10 @@ gemspec
|
|
5
5
|
|
6
6
|
# gem "my_engine", path: "engines/my_engine"
|
7
7
|
|
8
|
-
|
8
|
+
gem 'sass-rails', "~> 6.0.0"
|
9
9
|
# gem "sprockets", "~> 2.12.3"
|
10
10
|
|
11
|
-
rails_version = ENV
|
11
|
+
rails_version = ENV.fetch('RAILS_VERSION','5.0')
|
12
12
|
gem "railties", "~> #{rails_version}"
|
13
13
|
gem "activerecord", "~> #{rails_version}"
|
14
14
|
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Cells::Rails
|
2
|
+
[![Build Status](https://travis-ci.org/trailblazer/cells-rails.svg?branch=master)](https://travis-ci.org/trailblazer/cells-rails)
|
2
3
|
|
3
4
|
[Cells](https://github.com/apotonick/cells) is a generic view model implementation for Ruby. Cells-rails brings Rails-specific bindings.
|
4
5
|
|
@@ -21,4 +22,4 @@ gem 'cells-rails'
|
|
21
22
|
|
22
23
|
## License
|
23
24
|
|
24
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
25
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
data/cells-rails.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "cells", ">= 4.1.6", "< 5.0.0"
|
21
|
-
spec.add_dependency "actionpack", ">=
|
21
|
+
spec.add_dependency "actionpack", ">= 5.0"
|
22
22
|
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler"
|
data/lib/cell/rails.rb
CHANGED
data/lib/cell/rails/testing.rb
CHANGED
@@ -2,6 +2,10 @@ module Cell
|
|
2
2
|
module RailsExtensions
|
3
3
|
# This modules overrides Cell::Testing#controller_for and provides Rails-specific logic.
|
4
4
|
module Testing
|
5
|
+
RAILS_7_0 = Gem::Version.new("7.0.0")
|
6
|
+
RAILS_5_1 = Gem::Version.new("5.1.0")
|
7
|
+
RAILS_5_0 = Gem::Version.new("5.0.0")
|
8
|
+
|
5
9
|
def controller_for(controller_class)
|
6
10
|
return unless controller_class
|
7
11
|
|
@@ -12,13 +16,13 @@ module Cell
|
|
12
16
|
end
|
13
17
|
|
14
18
|
def action_controller_test_request(controller_class)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
else
|
19
|
+
version = ::Rails.gem_version
|
20
|
+
|
21
|
+
if version >= RAILS_5_1 && version < RAILS_7_0
|
22
|
+
::ActionController::TestRequest.create(controller_class)
|
23
|
+
elsif version >= RAILS_5_0 && version < RAILS_5_1
|
24
|
+
::ActionController::TestRequest.create
|
25
|
+
else
|
22
26
|
::ActionController::TestRequest.new
|
23
27
|
end
|
24
28
|
end
|
data/lib/cells-rails.rb
CHANGED
data/lib/cells/rails.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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cells
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '5.0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '5.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
191
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.7.
|
192
|
+
rubygems_version: 2.7.6.2
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: Convenient Rails support for Cells.
|