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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa3ea94e1736e966b7e4c6c806a5d365f2b867db223e8983977e7b072ab946cf
4
- data.tar.gz: 8d30523f1e3d94e39ba6e7f232a244e90806ba8f54882a59ac2ebeeba504cbca
3
+ metadata.gz: 58c933bc2bd80b6dd44a21992f6537ee1f25140977c570f4ab28f84af99a2bcc
4
+ data.tar.gz: 9afe72dcd4a5b44b134e35198959b9c89f0f11c423219bd9bb312255ae7429e6
5
5
  SHA512:
6
- metadata.gz: df3193f4b68ffb810f0eb43d49309a76b9f37e194c61e5ea5509834eac38bf5d2378fd353eaf0646abb4edec4dd8adf015ea91ff87229633f5619fce0b5bbfff
7
- data.tar.gz: 9212656c2c365cb2d37bb3b0a4b4c82bde2cce86fa5e0af70d4ff97c11a9fd86c3b57376f894a6971b7c854c5edf69599e7d98101026d695e8fe38d0e36ea664
6
+ metadata.gz: 8929b9360d079e42059d8830c5ab5165a73afb59057efe8f6adf0976513c7106acf33725a1e1725efe09f40b861c8cdaa6201ac34e20567630cb4665ab04e1ec
7
+ data.tar.gz: 621cdc22d14d661bb79c6172d21bab249e3aac585ff6356c17efae794ce5bb4fa76eac29c626ee34ed4f4aaba3355b405c75f298271cbda5231b728eaf332bdb
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
- /.bundle/
1
+ .bundle/
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
4
  /_yardoc/
@@ -6,6 +6,9 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
10
9
  /log
11
- /test/tmp
10
+ tmp
11
+ .DS_Store
12
+ log/
13
+ *.iml
14
+ .idea
@@ -1,20 +1,19 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.5.0
4
- - 2.4.3
5
- - 2.3
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.1.10
18
- env: "RAILS_VERSION=5.0"
19
- - rvm: 2.4.0
20
- env: "RAILS_VERSION=4.2"
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
@@ -1,3 +1,7 @@
1
+ ## 0.1.0
2
+
3
+ * Support for Rails 6.0 Thank to @Szeliga
4
+
1
5
  ## 0.0.9
2
6
 
3
7
  * Prevent Forwardable from printing warnings in Ruby 2.4+
data/Gemfile CHANGED
@@ -5,10 +5,10 @@ gemspec
5
5
 
6
6
  # gem "my_engine", path: "engines/my_engine"
7
7
 
8
- # gem 'sass-rails', "~> 4.0.3"#, " ~> 3.1.0"
8
+ gem 'sass-rails', "~> 6.0.0"
9
9
  # gem "sprockets", "~> 2.12.3"
10
10
 
11
- rails_version = ENV['RAILS_VERSION'] || '5.0'
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
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
 
4
- RAILS_VERSION = ENV['RAILS_VERSION'] || '5.0'
4
+ RAILS_VERSION = ENV.fetch('RAILS_VERSION','5.0')
5
5
 
6
6
  Rake::TestTask.new(:test) do |t|
7
7
  t.libs << "test"
@@ -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", ">= 3.0"
21
+ spec.add_dependency "actionpack", ">= 5.0"
22
22
 
23
23
 
24
24
  spec.add_development_dependency "bundler"
@@ -1,3 +1,4 @@
1
+ require 'active_support/concern'
1
2
  module Cell
2
3
  def self.rails_version
3
4
  Gem::Version.new(ActionPack::VERSION::STRING)
@@ -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
- 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
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
@@ -1 +1,2 @@
1
+ require "cells/rails/version"
1
2
  require "cells/rails"
@@ -1,9 +1,6 @@
1
- require "cells/rails/version"
2
1
  require "cells"
3
-
4
- require "cell/caching/notification"
5
- require "cell/rails"
6
2
  require "cell/railtie"
3
+ require "cell/caching/notification"
7
4
  require "cell/rails/testing"
8
5
 
9
6
  module Cell
@@ -1,5 +1,5 @@
1
1
  module Cells
2
2
  module Rails
3
- VERSION = "0.0.9"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
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.9
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: 2018-04-10 00:00:00.000000000 Z
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: '3.0'
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: '3.0'
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.3
192
+ rubygems_version: 2.7.6.2
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Convenient Rails support for Cells.