cells-rails 0.1.4 → 0.1.6

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: 182b8f5a7de9120c9fef8be60cc72f8f6f29d61497370b8cc2fc38cb7ef1fcac
4
- data.tar.gz: 360a8fcabc5cf26221d513e9b3180afdf32b444addaa7847aa0ba65c69e686bf
3
+ metadata.gz: 32b6bfebfdb4b377ce5808a29d990df218deb2ff12047b4c42548ce2876c1fd1
4
+ data.tar.gz: 7e6f0a3fec7e5a8ed644ac11634345e7fef663d8a11016a2e80001ade7ff54f5
5
5
  SHA512:
6
- metadata.gz: aa7f548b3380379d4c91e95e418140d228275332265e11970fdf5c06145cbd8d030d02c468bae0157da42d320a209d9ede47e931867f3c0dc29eb3038639a673
7
- data.tar.gz: 4ab8a747ec9af5538d1a86a400e85f8a00e46e3bb2c319f8ba9906f230ea9bf8c4631707687e7fe00acec3f4b4519f9c01d5769a07eb4ce8088cd6d134edb8cf
6
+ metadata.gz: 9e8702ffeed72c003f281c00606e61e5b35feff8833f7b7d6a5e6bce96d439b33cddc5c9140b386f4c48c1f9dc92da41633f6ca4fd6733c1b54bb2a5c83d0e94
7
+ data.tar.gz: 33eb42fd51122a0f1aac48f31496a452232bcc157b065780803c9a00e67205389cabb2968d217a5d0c995f3a813f7f705d8d49cbef90cc159c30e365e95d2494
data/.gitignore CHANGED
@@ -11,4 +11,5 @@ tmp
11
11
  .DS_Store
12
12
  log/
13
13
  *.iml
14
- .idea
14
+ .idea
15
+ gemfiles/*.lock
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.7.5
data/Appraisals CHANGED
@@ -1,23 +1,23 @@
1
- appraise "6.0" do
2
- gem "railties", "~> 6.0"
3
- gem "activerecord", "~> 6.0"
4
- gem "my_engine", path: "test/rails6.0/engines/my_engine"
1
+ appraise "8.0" do
2
+ gem "railties", "~> 8.0.0"
5
3
  end
6
4
 
7
- appraise "5.2" do
8
- gem "railties", "~> 5.2"
9
- gem "activerecord", "~> 5.2"
10
- gem "my_engine", path: "test/rails5.2/engines/my_engine"
5
+ appraise "7.2" do
6
+ gem "railties", "~> 7.2.0"
7
+ end
8
+
9
+ appraise "7.1" do
10
+ gem "railties", "~> 7.1.0"
11
11
  end
12
12
 
13
- appraise "5.1" do
14
- gem "railties", "~> 5.1.0"
15
- gem "activerecord", "~> 5.1.0"
16
- gem "my_engine", path: "test/rails5.1/engines/my_engine"
13
+ appraise "6.1" do
14
+ gem "railties", "~> 6.1.0"
17
15
  end
18
16
 
19
- appraise "5.0" do
20
- gem "railties", "~> 5.0.0"
21
- gem "activerecord", "~> 5.0.0"
22
- gem "my_engine", path: "test/rails5.0/engines/my_engine"
17
+ appraise "6.0" do
18
+ gem "railties", "~> 6.0"
19
+ end
20
+
21
+ appraise "5.2" do
22
+ gem "railties", "~> 5.2.0"
23
23
  end
data/CHANGES.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.1.6
2
+
3
+ * Rails 8 is supported.
4
+ * Ruby 3.4.0 is supported.
5
+
6
+ ## 0.1.5
7
+
8
+ * Support for Rails 7.
9
+ * Migrate CI to Github Actions
10
+
1
11
  ## 0.1.4
2
12
 
3
13
  * Support Ruby 3.0.
data/Gemfile CHANGED
@@ -3,13 +3,11 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in cells-rails.gemspec
4
4
  gemspec
5
5
 
6
- # gem "my_engine", path: "engines/my_engine"
7
-
8
- gem 'sass-rails', "~> 6.0.0"
6
+ gem "my_engine", path: "test/dummy/engines/my_engine"
9
7
 
10
8
  group :development, :test do
11
9
  gem "minitest-spec-rails"
12
- gem "capybara_minitest_spec"
10
+ gem "capybara"
13
11
  end
14
12
 
15
13
  gem "simple_form"
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Nick Sutterer
3
+ Copyright (c) 2024 Nick Sutterer
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,5 +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
+ ![CI](https://github.com/trailblazer/cells-rails/actions/workflows/ci.yml/badge.svg)
3
3
 
4
4
  [Cells](https://github.com/apotonick/cells) is a generic view model implementation for Ruby. Cells-rails brings Rails-specific bindings.
5
5
 
data/Rakefile CHANGED
@@ -1,13 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
- require 'rails'
4
-
5
- test_folder = Rails.version[0..2]
6
3
 
7
4
  Rake::TestTask.new(:test) do |t|
8
5
  t.libs << "test"
9
6
  t.libs << "lib"
10
- t.test_files = FileList["test/rails#{test_folder}/**/*_test.rb"]
7
+ t.test_files = FileList["test/dummy/**/*_test.rb"]
11
8
  end
12
9
 
13
10
  task :default => :test
data/cells-rails.gemspec CHANGED
@@ -1,32 +1,37 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'cells/rails/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- spec.name = "cells-rails"
7
- spec.version = Cells::Rails::VERSION
8
- spec.authors = ["Nick Sutterer"]
9
- spec.email = ["apotonick@gmail.com"]
10
- spec.license = "MIT"
8
+ spec.name = 'cells-rails'
9
+ spec.version = Cells::Rails::VERSION
10
+ spec.authors = ['Nick Sutterer']
11
+ spec.email = ['apotonick@gmail.com']
12
+ spec.license = 'MIT'
11
13
 
12
- spec.summary = %q{Convenient Rails support for Cells.}
13
- spec.homepage = "http://trailblazer.to"
14
+ spec.summary = 'Convenient Rails support for Cells.'
15
+ spec.homepage = 'https://trailblazer.to'
14
16
 
15
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
- spec.bindir = "exe"
17
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
- spec.require_paths = ["lib"]
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = 'https://github.com/trailblazer/cells-rails'
19
+ spec.metadata['bug_tracker_uri'] = "#{spec.metadata['source_code_uri']}/issues"
20
+ spec.metadata['changelog_uri'] = "#{spec.metadata['source_code_uri']}/blob/HEAD/CHANGES.md"
21
+ spec.metadata['documentation_uri'] = 'https://trailblazer.to/2.1/docs/cells#cells-rails'
19
22
 
20
- spec.add_dependency "cells", ">= 4.1.6", "< 5.0.0"
21
- spec.add_dependency "actionpack", ">= 5.0"
23
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|\.github)/}) }
24
+ spec.require_paths = ['lib']
22
25
 
26
+ spec.add_dependency 'actionpack', '>= 5.0'
27
+ spec.add_dependency 'cells', '>= 4.1.6', '< 5.0.0'
23
28
 
24
- spec.add_development_dependency "bundler"
25
- spec.add_development_dependency "rake"
26
- spec.add_development_dependency "minitest"
27
- spec.add_development_dependency "rails"
28
- spec.add_development_dependency "cells-erb"
29
- spec.add_development_dependency "sass-rails"
30
- spec.add_development_dependency "appraisal"
31
- spec.add_development_dependency "pry-byebug"
29
+ spec.add_development_dependency 'appraisal'
30
+ spec.add_development_dependency 'bundler'
31
+ spec.add_development_dependency 'cells-erb'
32
+ spec.add_development_dependency 'minitest'
33
+ spec.add_development_dependency 'rails'
34
+ spec.add_development_dependency 'rake'
35
+ spec.add_development_dependency 'sass-rails'
36
+ spec.add_development_dependency 'debug'
32
37
  end
data/gemfiles/5.2.gemfile CHANGED
@@ -2,16 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "sass-rails", "~> 6.0.0"
5
+ gem "my_engine", path: "../test/dummy/engines/my_engine"
6
6
  gem "simple_form"
7
7
  gem "formtastic"
8
- gem "railties", "~> 5.2"
9
- gem "activerecord", "~> 5.2"
10
- gem "my_engine", path: "../test/rails5.2/engines/my_engine"
8
+ gem "railties", "~> 5.2.0"
11
9
 
12
10
  group :development, :test do
13
11
  gem "minitest-spec-rails"
14
- gem "capybara_minitest_spec"
12
+ gem "capybara"
15
13
  end
16
14
 
17
15
  gemspec path: "../"
data/gemfiles/6.0.gemfile CHANGED
@@ -2,16 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "sass-rails", "~> 6.0.0"
5
+ gem "my_engine", path: "../test/dummy/engines/my_engine"
6
6
  gem "simple_form"
7
7
  gem "formtastic"
8
8
  gem "railties", "~> 6.0"
9
- gem "activerecord", "~> 6.0"
10
- gem "my_engine", path: "../test/rails6.0/engines/my_engine"
11
9
 
12
10
  group :development, :test do
13
11
  gem "minitest-spec-rails"
14
- gem "capybara_minitest_spec"
12
+ gem "capybara"
15
13
  end
16
14
 
17
15
  gemspec path: "../"
@@ -2,16 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "sass-rails", "~> 6.0.0"
5
+ gem "my_engine", path: "../test/dummy/engines/my_engine"
6
6
  gem "simple_form"
7
7
  gem "formtastic"
8
- gem "railties", "~> 5.0.0"
9
- gem "activerecord", "~> 5.0.0"
10
- gem "my_engine", path: "../test/rails5.0/engines/my_engine"
8
+ gem "railties", "~> 6.1.0"
11
9
 
12
10
  group :development, :test do
13
11
  gem "minitest-spec-rails"
14
- gem "capybara_minitest_spec"
12
+ gem "capybara"
15
13
  end
16
14
 
17
15
  gemspec path: "../"
@@ -2,16 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "sass-rails", "~> 6.0.0"
5
+ gem "my_engine", path: "../test/dummy/engines/my_engine"
6
6
  gem "simple_form"
7
7
  gem "formtastic"
8
- gem "railties", "~> 5.1.0"
9
- gem "activerecord", "~> 5.1.0"
10
- gem "my_engine", path: "../test/rails5.1/engines/my_engine"
8
+ gem "railties", "~> 7.1.0"
11
9
 
12
10
  group :development, :test do
13
11
  gem "minitest-spec-rails"
14
- gem "capybara_minitest_spec"
12
+ gem "capybara"
15
13
  end
16
14
 
17
15
  gemspec path: "../"
@@ -0,0 +1,15 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "my_engine", path: "../test/dummy/engines/my_engine"
6
+ gem "simple_form"
7
+ gem "formtastic"
8
+ gem "railties", "~> 7.2.0"
9
+
10
+ group :development, :test do
11
+ gem "minitest-spec-rails"
12
+ gem "capybara"
13
+ end
14
+
15
+ gemspec path: "../"
@@ -0,0 +1,15 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "my_engine", path: "../test/dummy/engines/my_engine"
6
+ gem "simple_form"
7
+ gem "formtastic"
8
+ gem "railties", "~> 8.0.0"
9
+
10
+ group :development, :test do
11
+ gem "minitest-spec-rails"
12
+ gem "capybara"
13
+ end
14
+
15
+ gemspec path: "../"
@@ -2,7 +2,7 @@ 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")
5
+ RAILS_9_0 = Gem::Version.new("9.0.0")
6
6
  RAILS_5_1 = Gem::Version.new("5.1.0")
7
7
  RAILS_5_0 = Gem::Version.new("5.0.0")
8
8
 
@@ -18,7 +18,7 @@ module Cell
18
18
  def action_controller_test_request(controller_class)
19
19
  version = ::Rails.gem_version
20
20
 
21
- if version >= RAILS_5_1 && version < RAILS_7_0
21
+ if version >= RAILS_5_1 && version < RAILS_9_0
22
22
  ::ActionController::TestRequest.create(controller_class)
23
23
  elsif version >= RAILS_5_0 && version < RAILS_5_1
24
24
  ::ActionController::TestRequest.create
data/lib/cell/rails.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/concern'
2
3
  module Cell
3
4
  def self.rails_version
data/lib/cell/railtie.rb CHANGED
@@ -12,13 +12,13 @@ module Cell
12
12
  end
13
13
  end
14
14
 
15
- # ruthlessly stolen from the zurb-foundation gem.
16
- initializer "cells.update_asset_paths" do |app|
15
+ initializer "cells.update_view_paths" do |app|
17
16
  # Add Rails.root to view_paths
18
17
  Cell::ViewModel.view_paths = [Rails.root.join("app", "cells")]
18
+ end
19
19
 
20
+ config.after_initialize do |app|
20
21
  Array(app.config.cells.with_assets).each do |cell_class|
21
- # puts "@@@@@ #{cell_class.camelize.constantize.prefixes}"
22
22
  app.config.assets.paths += cell_class.camelize.constantize.prefixes # Song::Cell.prefixes
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module Cells
2
2
  module Rails
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,51 +1,51 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cells-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-03 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: cells
14
+ name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.6
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 5.0.0
19
+ version: '5.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 4.1.6
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 5.0.0
26
+ version: '5.0'
33
27
  - !ruby/object:Gem::Dependency
34
- name: actionpack
28
+ name: cells
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - ">="
38
32
  - !ruby/object:Gem::Version
39
- version: '5.0'
33
+ version: 4.1.6
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: 5.0.0
40
37
  type: :runtime
41
38
  prerelease: false
42
39
  version_requirements: !ruby/object:Gem::Requirement
43
40
  requirements:
44
41
  - - ">="
45
42
  - !ruby/object:Gem::Version
46
- version: '5.0'
43
+ version: 4.1.6
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: 5.0.0
47
47
  - !ruby/object:Gem::Dependency
48
- name: bundler
48
+ name: appraisal
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
@@ -59,7 +59,7 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
- name: rake
62
+ name: bundler
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
@@ -73,7 +73,7 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: minitest
76
+ name: cells-erb
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
@@ -87,7 +87,7 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: rails
90
+ name: minitest
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
@@ -101,7 +101,7 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
- name: cells-erb
104
+ name: rails
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - ">="
@@ -115,7 +115,7 @@ dependencies:
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
- name: sass-rails
118
+ name: rake
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - ">="
@@ -129,7 +129,7 @@ dependencies:
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
- name: appraisal
132
+ name: sass-rails
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
@@ -143,7 +143,7 @@ dependencies:
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  - !ruby/object:Gem::Dependency
146
- name: pry-byebug
146
+ name: debug
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - ">="
@@ -164,7 +164,7 @@ extensions: []
164
164
  extra_rdoc_files: []
165
165
  files:
166
166
  - ".gitignore"
167
- - ".travis.yml"
167
+ - ".tool-versions"
168
168
  - Appraisals
169
169
  - CHANGES.md
170
170
  - Gemfile
@@ -172,14 +172,12 @@ files:
172
172
  - README.md
173
173
  - Rakefile
174
174
  - cells-rails.gemspec
175
- - gemfiles/5.0.gemfile
176
- - gemfiles/5.0.gemfile.lock
177
- - gemfiles/5.1.gemfile
178
- - gemfiles/5.1.gemfile.lock
179
175
  - gemfiles/5.2.gemfile
180
- - gemfiles/5.2.gemfile.lock
181
176
  - gemfiles/6.0.gemfile
182
- - gemfiles/6.0.gemfile.lock
177
+ - gemfiles/6.1.gemfile
178
+ - gemfiles/7.1.gemfile
179
+ - gemfiles/7.2.gemfile
180
+ - gemfiles/8.0.gemfile
183
181
  - lib/cell/caching/notification.rb
184
182
  - lib/cell/helper/asset_helper.rb
185
183
  - lib/cell/rails.rb
@@ -206,10 +204,15 @@ files:
206
204
  - lib/rails/generators/test_unit/cell/templates/unit_test.rb.erb
207
205
  - lib/rails/generators/test_unit/concept/concept_generator.rb
208
206
  - lib/rails/generators/test_unit/concept/templates/unit_test.rb.erb
209
- homepage: http://trailblazer.to
207
+ homepage: https://trailblazer.to
210
208
  licenses:
211
209
  - MIT
212
- metadata: {}
210
+ metadata:
211
+ homepage_uri: https://trailblazer.to
212
+ source_code_uri: https://github.com/trailblazer/cells-rails
213
+ bug_tracker_uri: https://github.com/trailblazer/cells-rails/issues
214
+ changelog_uri: https://github.com/trailblazer/cells-rails/blob/HEAD/CHANGES.md
215
+ documentation_uri: https://trailblazer.to/2.1/docs/cells#cells-rails
213
216
  post_install_message:
214
217
  rdoc_options: []
215
218
  require_paths:
@@ -225,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
228
  - !ruby/object:Gem::Version
226
229
  version: '0'
227
230
  requirements: []
228
- rubygems_version: 3.0.8
231
+ rubygems_version: 3.2.3
229
232
  signing_key:
230
233
  specification_version: 4
231
234
  summary: Convenient Rails support for Cells.
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- language: ruby
2
- before_install: gem install bundler
3
- rvm:
4
- - 2.7
5
- - 2.6
6
- - 2.5
7
- gemfile:
8
- - gemfiles/6.0.gemfile
9
- - gemfiles/5.2.gemfile
10
- - gemfiles/5.1.gemfile
11
- - gemfiles/5.0.gemfile
12
-
13
- cache: bundler