kaminari-cells 0.0.4 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +3 -3
- data/CHANGES.md +12 -1
- data/Gemfile +0 -2
- data/README.md +1 -8
- data/kaminari-cells.gemspec +5 -4
- data/lib/kaminari/cells/version.rb +1 -1
- data/lib/kaminari-cells.rb +14 -13
- data/test/cells_test.rb +2 -2
- data/test/fake_app/cells.rb +2 -2
- data/test/fake_app/rails_app.rb +16 -9
- metadata +33 -24
- data/test/fake_app/config.rb +0 -3
- data/test/fake_app/models.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6e1de52baf3f4136f8de0bf664b79d14206a225c0f87ccc6fe4785139a6bf229
|
4
|
+
data.tar.gz: 5b031405a187e2bcc2b938f2e29df82ceb3c63d0a7e922abcfec730c5cf56173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0043854ab708f0d73523a3741629f5dfbda0be09f19a5f7f6ab440aa37967a3be991374b87a40f10d4843b176eeeb23a4e2dbc640b6954a85448e096199f72d
|
7
|
+
data.tar.gz: 0732246e5263e1ec74edf38246cd8668e0168884f257a1ed9e7923178728e58e08e8f4f8de4bbe4a50309a6c08fbca2ac74774a4ea6d5b9ca95f9586d3c3ebab
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
rvm:
|
2
|
-
-
|
3
|
-
- 2.
|
4
|
-
- 2.1
|
2
|
+
- 2.2.7
|
3
|
+
- 2.3.4
|
4
|
+
- 2.4.1
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# 1.0.1
|
2
|
+
|
3
|
+
Add support for Rails 7 and Ruby 3.
|
4
|
+
Bump kaminari dependency to `kaminari ~> 1.2.0`.
|
5
|
+
|
6
|
+
# 0.1.0
|
7
|
+
|
8
|
+
Tighten dependency to `kaminari ~> 0.16.0` (previously was `kaminari >= 0.16.0`.
|
9
|
+
This version doesn't work with Kaminari 1.0.0+, and the gemspec should reflect this.
|
10
|
+
Once the gem has been made compatible with Kaminari 1.0.0+, it will be released as another version.
|
11
|
+
|
1
12
|
# 0.0.4
|
2
13
|
|
3
14
|
Require cell-4.0.0, cause we can.
|
@@ -12,4 +23,4 @@ First officially working version, with kaminari 0.16.x and above!
|
|
12
23
|
|
13
24
|
# 0.0.1
|
14
25
|
|
15
|
-
* First release in an unsuspecting world.
|
26
|
+
* First release in an unsuspecting world.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -12,14 +12,7 @@ Add this line to your application's Gemfile:
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
-
To use the wonderful [Kaminari](https://github.com/amatsuda/kaminari) gem in your Cells, just do
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
class CommentsCell < Cell::Rails
|
19
|
-
include Kaminari::Cells
|
20
|
-
```
|
21
|
-
|
22
|
-
The same works with Cells [view models](https://github.com/apotonick/cells#view-models).
|
15
|
+
To use the wonderful [Kaminari](https://github.com/amatsuda/kaminari) gem in your Cells view models, just do
|
23
16
|
|
24
17
|
```ruby
|
25
18
|
class CommentsCell < Cell::ViewModel
|
data/kaminari-cells.gemspec
CHANGED
@@ -18,12 +18,13 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "kaminari", "
|
21
|
+
spec.add_dependency "kaminari", "~> 1.2.0"
|
22
22
|
spec.add_dependency "cells", ">= 4.0.0", "<= 5.0.0"
|
23
|
-
spec.add_development_dependency "cells-erb"
|
24
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
25
|
-
spec.add_development_dependency "
|
24
|
+
spec.add_development_dependency "cells-erb"
|
25
|
+
spec.add_development_dependency "cells-rails"
|
26
26
|
spec.add_development_dependency "minitest"
|
27
|
-
spec.add_development_dependency "
|
27
|
+
spec.add_development_dependency "rails", "5.1.1"
|
28
|
+
spec.add_development_dependency "rake"
|
28
29
|
spec.add_development_dependency "sqlite3"
|
29
30
|
end
|
data/lib/kaminari-cells.rb
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
require "cells"
|
2
|
-
require "kaminari"
|
2
|
+
require "kaminari/helpers/helper_methods"
|
3
3
|
require "kaminari/cells/version"
|
4
4
|
require "cell/partial"
|
5
5
|
|
6
|
-
|
7
|
-
module
|
8
|
-
module
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
ActiveSupport.on_load :action_view do
|
7
|
+
module Kaminari
|
8
|
+
module Helpers
|
9
|
+
module CellsHelper
|
10
|
+
include Kaminari::Helpers::HelperMethods
|
11
|
+
include ActionView::Helpers::OutputSafetyHelper
|
12
|
+
include ActionView::Helpers::TranslationHelper
|
13
|
+
include Cell::ViewModel::Partial
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
def paginate(scope, **options, &block)
|
16
|
+
options = options.reverse_merge(:views_prefix => "../views/")
|
17
|
+
super
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
22
|
+
require 'kaminari/cells'
|
20
23
|
end
|
21
|
-
|
22
|
-
require 'kaminari/cells'
|
data/test/cells_test.rb
CHANGED
data/test/fake_app/cells.rb
CHANGED
data/test/fake_app/rails_app.rb
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
require "cells"
|
2
2
|
require "cells-erb"
|
3
|
+
require "cells-rails"
|
3
4
|
require 'kaminari-cells'
|
4
|
-
require 'fake_app/cells'
|
5
5
|
|
6
6
|
require 'action_controller/railtie'
|
7
|
-
require 'action_view/
|
7
|
+
require 'action_view/base'
|
8
8
|
require 'active_record'
|
9
9
|
|
10
|
-
require 'fake_app/config'
|
11
|
-
|
12
|
-
|
13
|
-
|
14
10
|
# config
|
15
11
|
app = Class.new(Rails::Application)
|
16
12
|
app.config.secret_token = '3b7cd727ee24e8444053437c36cc66c4'
|
@@ -21,13 +17,25 @@ app.config.root = File.dirname(__FILE__)
|
|
21
17
|
Rails.backtrace_cleaner.remove_silencers!
|
22
18
|
app.initialize!
|
23
19
|
|
20
|
+
require 'fake_app/cells'
|
21
|
+
|
24
22
|
# routes
|
25
23
|
app.routes.draw do
|
26
24
|
resources :users
|
27
25
|
end
|
28
26
|
|
29
|
-
|
30
|
-
|
27
|
+
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
|
28
|
+
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
29
|
+
|
30
|
+
ActiveRecord::Schema.define do
|
31
|
+
create_table(:users) do |t|
|
32
|
+
t.string :name
|
33
|
+
t.integer :age
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class User < ActiveRecord::Base
|
38
|
+
end
|
31
39
|
|
32
40
|
ActionView::Base.class_eval do
|
33
41
|
include ::Cell::RailsExtensions::ActionView
|
@@ -49,4 +57,3 @@ end
|
|
49
57
|
|
50
58
|
# helpers
|
51
59
|
Object.const_set(:ApplicationHelper, Module.new)
|
52
|
-
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaminari-cells
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kaminari
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cells
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,35 +45,35 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 5.0.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '1.6'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '1.6'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: cells-erb
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
76
|
+
name: cells-rails
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - ">="
|
@@ -101,7 +101,21 @@ dependencies:
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
104
|
+
name: rails
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - '='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 5.1.1
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - '='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 5.1.1
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rake
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
106
120
|
requirements:
|
107
121
|
- - ">="
|
@@ -148,8 +162,6 @@ files:
|
|
148
162
|
- lib/kaminari/cells/version.rb
|
149
163
|
- test/cells_test.rb
|
150
164
|
- test/fake_app/cells.rb
|
151
|
-
- test/fake_app/config.rb
|
152
|
-
- test/fake_app/models.rb
|
153
165
|
- test/fake_app/rails_app.rb
|
154
166
|
- test/fake_app/views/kaminari/_paginator.html.erb
|
155
167
|
- test/test_helper.rb
|
@@ -172,16 +184,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
184
|
- !ruby/object:Gem::Version
|
173
185
|
version: '0'
|
174
186
|
requirements: []
|
175
|
-
|
176
|
-
rubygems_version: 2.2.2
|
187
|
+
rubygems_version: 3.1.2
|
177
188
|
signing_key:
|
178
189
|
specification_version: 4
|
179
190
|
summary: Kaminari pagination in Cells.
|
180
191
|
test_files:
|
181
192
|
- test/cells_test.rb
|
182
193
|
- test/fake_app/cells.rb
|
183
|
-
- test/fake_app/config.rb
|
184
|
-
- test/fake_app/models.rb
|
185
194
|
- test/fake_app/rails_app.rb
|
186
195
|
- test/fake_app/views/kaminari/_paginator.html.erb
|
187
196
|
- test/test_helper.rb
|
data/test/fake_app/config.rb
DELETED
data/test/fake_app/models.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# models
|
2
|
-
class User < ActiveRecord::Base
|
3
|
-
end
|
4
|
-
|
5
|
-
|
6
|
-
#migrations
|
7
|
-
class CreateAllTables < ActiveRecord::Migration
|
8
|
-
def self.up
|
9
|
-
create_table(:users) {|t| t.string :name; t.integer :age}
|
10
|
-
end
|
11
|
-
end
|
12
|
-
ActiveRecord::Migration.verbose = false
|
13
|
-
CreateAllTables.up
|