kaminari 1.0.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codeclimate.yml +19 -0
- data/.github/workflows/main.yml +107 -0
- data/.gitignore +2 -0
- data/CHANGELOG.md +71 -0
- data/CONTRIBUTING.md +6 -0
- data/Gemfile +1 -0
- data/README.md +53 -10
- data/Rakefile +4 -1
- data/gemfiles/active_record_41.gemfile +14 -8
- data/gemfiles/active_record_42.gemfile +14 -8
- data/gemfiles/active_record_50.gemfile +13 -7
- data/gemfiles/active_record_51.gemfile +26 -0
- data/gemfiles/active_record_52.gemfile +26 -0
- data/gemfiles/active_record_60.gemfile +28 -0
- data/gemfiles/active_record_61.gemfile +28 -0
- data/gemfiles/active_record_70.gemfile +28 -0
- data/gemfiles/active_record_edge.gemfile +14 -13
- data/kaminari.gemspec +1 -1
- data/lib/kaminari/version.rb +2 -1
- data/lib/kaminari.rb +1 -0
- data/misc/bug_report_template.rb +2 -2
- metadata +19 -14
- data/.travis.yml +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '08c52fc3c09bad4785b0cc6e32330d42874d8aaa6b49439ffe9745f692a7db2e'
|
4
|
+
data.tar.gz: bc9e10bc8d54825aa4be3524cfa91698f0f386b5645ca949d1c1b8c9249678b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 718f128c6cfbf4aa312e7af22a111e3647b49af9045cc12741690f2f9f0a76b745c491e175523ea11218f3545d37a6094c08a9ab10262895c440409ba5a50028
|
7
|
+
data.tar.gz: 8b1368ed6cf41faa93a0ceda3680061abf7ee83ee647684c9d18e7f8dbe3d821ace49eb82637da71e6bf4601484fb15facfd4a0e70ded89b62e4fce8b122c156
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
engines:
|
3
|
+
duplication:
|
4
|
+
enabled: true
|
5
|
+
config:
|
6
|
+
languages:
|
7
|
+
- ruby
|
8
|
+
fixme:
|
9
|
+
enabled: true
|
10
|
+
rubocop:
|
11
|
+
enabled: true
|
12
|
+
ratings:
|
13
|
+
paths:
|
14
|
+
- "**.rb"
|
15
|
+
exclude_paths:
|
16
|
+
- test/
|
17
|
+
- "*/test/"
|
18
|
+
- "**/*.gemspec"
|
19
|
+
- "**/*.md"
|
@@ -0,0 +1,107 @@
|
|
1
|
+
name: build
|
2
|
+
|
3
|
+
on:
|
4
|
+
- push
|
5
|
+
- pull_request
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
services:
|
10
|
+
postgresql:
|
11
|
+
image: postgres:9.6
|
12
|
+
ports:
|
13
|
+
- 5432:5432
|
14
|
+
env:
|
15
|
+
POSTGRES_PASSWORD: postgres
|
16
|
+
strategy:
|
17
|
+
fail-fast: true
|
18
|
+
matrix:
|
19
|
+
ruby_version:
|
20
|
+
- '3.0'
|
21
|
+
- '2.7'
|
22
|
+
- '2.6'
|
23
|
+
- '2.5'
|
24
|
+
- 'jruby-9.3.2.0'
|
25
|
+
gemfile:
|
26
|
+
- gemfiles/active_record_70.gemfile
|
27
|
+
- gemfiles/active_record_61.gemfile
|
28
|
+
- gemfiles/active_record_60.gemfile
|
29
|
+
- gemfiles/active_record_52.gemfile
|
30
|
+
- gemfiles/active_record_51.gemfile
|
31
|
+
- gemfiles/active_record_50.gemfile
|
32
|
+
- gemfiles/active_record_edge.gemfile
|
33
|
+
db:
|
34
|
+
- sqlite3
|
35
|
+
- postgresql
|
36
|
+
- mysql
|
37
|
+
exclude:
|
38
|
+
- ruby_version: '3.0'
|
39
|
+
gemfile: gemfiles/active_record_52.gemfile
|
40
|
+
- ruby_version: '3.0'
|
41
|
+
gemfile: gemfiles/active_record_51.gemfile
|
42
|
+
- ruby_version: '3.0'
|
43
|
+
gemfile: gemfiles/active_record_50.gemfile
|
44
|
+
- ruby_version: '2.7'
|
45
|
+
gemfile: gemfiles/active_record_52.gemfile
|
46
|
+
- ruby_version: '2.7'
|
47
|
+
gemfile: gemfiles/active_record_51.gemfile
|
48
|
+
- ruby_version: '2.7'
|
49
|
+
gemfile: gemfiles/active_record_50.gemfile
|
50
|
+
- ruby_version: '2.6'
|
51
|
+
gemfile: gemfiles/active_record_edge.gemfile
|
52
|
+
- ruby_version: '2.6'
|
53
|
+
gemfile: gemfiles/active_record_70.gemfile
|
54
|
+
- ruby_version: '2.5'
|
55
|
+
gemfile: gemfiles/active_record_edge.gemfile
|
56
|
+
- ruby_version: '2.5'
|
57
|
+
gemfile: gemfiles/active_record_70.gemfile
|
58
|
+
- ruby_version: 'jruby-9.3.2.0'
|
59
|
+
gemfile: gemfiles/active_record_edge.gemfile
|
60
|
+
include:
|
61
|
+
- ruby_version: 'ruby-head'
|
62
|
+
gemfile: gemfiles/active_record_edge.gemfile
|
63
|
+
db: sqlite3
|
64
|
+
- ruby_version: 'ruby-head'
|
65
|
+
gemfile: gemfiles/active_record_edge.gemfile
|
66
|
+
db: postgresql
|
67
|
+
- ruby_version: 'ruby-head'
|
68
|
+
gemfile: gemfiles/active_record_edge.gemfile
|
69
|
+
db: mysql
|
70
|
+
- ruby_version: '2.4'
|
71
|
+
gemfile: gemfiles/active_record_52.gemfile
|
72
|
+
db: sqlite3
|
73
|
+
- ruby_version: '2.3'
|
74
|
+
gemfile: gemfiles/active_record_52.gemfile
|
75
|
+
db: sqlite3
|
76
|
+
- ruby_version: '2.3'
|
77
|
+
gemfile: gemfiles/active_record_42.gemfile
|
78
|
+
db: sqlite3
|
79
|
+
- ruby_version: '2.3'
|
80
|
+
gemfile: gemfiles/active_record_41.gemfile
|
81
|
+
db: sqlite3
|
82
|
+
- ruby_version: '2.2'
|
83
|
+
gemfile: gemfiles/active_record_52.gemfile
|
84
|
+
db: sqlite3
|
85
|
+
- ruby_version: '2.1'
|
86
|
+
gemfile: gemfiles/active_record_42.gemfile
|
87
|
+
db: sqlite3
|
88
|
+
runs-on: ubuntu-18.04
|
89
|
+
env:
|
90
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
91
|
+
DB: ${{ matrix.db }}
|
92
|
+
POSTGRES_PASSWORD: postgres # for passing the password to the Rails process
|
93
|
+
MYSQL_PASSWORD: root # for passing the password to the Rails process
|
94
|
+
steps:
|
95
|
+
- uses: actions/checkout@v2
|
96
|
+
- name: Install libmysqld-dev
|
97
|
+
run: sudo apt-get install libmysqld-dev
|
98
|
+
- name: Start local MySQL
|
99
|
+
run: sudo /etc/init.d/mysql start
|
100
|
+
- name: Set up Ruby
|
101
|
+
uses: ruby/setup-ruby@v1
|
102
|
+
with:
|
103
|
+
ruby-version: ${{ matrix.ruby_version }}
|
104
|
+
bundler-cache: true
|
105
|
+
continue-on-error: ${{ matrix.ruby_version == 'ruby-head' || matrix.ruby_version == 'jruby-9.3.2.0' || matrix.gemfile == 'gemfiles/active_record_edge.gemfile' }}
|
106
|
+
- run: bundle exec rake test
|
107
|
+
continue-on-error: ${{ matrix.ruby_version == 'ruby-head' || matrix.ruby_version == 'jruby-9.3.2.0' || matrix.gemfile == 'gemfiles/active_record_edge.gemfile' }}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,72 @@
|
|
1
|
+
## 1.2.2
|
2
|
+
|
3
|
+
### Enhancements:
|
4
|
+
|
5
|
+
* Rails 7 support via [dbac7d4](https://github.com/kaminari/kaminari/commit/dbac7d476f39f8a17a35aba7e528aec7c589b3e5) and [07fafc0](https://github.com/kaminari/kaminari/commit/07fafc0561b307b6fbf40e9ec6ab52a6ec5102b4)
|
6
|
+
|
7
|
+
### Bug Fixes:
|
8
|
+
|
9
|
+
* Restored `path_to_next_url` helper that was accidentally deleted in v1.2.0 #1027 [@ryym]
|
10
|
+
* Fixed invalid link tag HTML output from `rel_next_prev_link_tags` helper #1045 [@dlackty]
|
11
|
+
* Fixed Errno::ENOENT error for views generator on Ruby 3 #1050 [@ar31an]
|
12
|
+
* Suppress warnings about keyword args on Ruby 2.7 #1053 [@mishina]
|
13
|
+
|
14
|
+
|
15
|
+
## 1.2.1
|
16
|
+
|
17
|
+
### Security Fixes:
|
18
|
+
|
19
|
+
* Added `original_script_name` parameter to the ignore list: #1020 [@viseztrance]
|
20
|
+
See CVE-2020-11082 for full details.
|
21
|
+
|
22
|
+
### Bug Fixes:
|
23
|
+
|
24
|
+
* Fixed a couple of grouped `total_count` regressions by reverting #979
|
25
|
+
|
26
|
+
|
27
|
+
## 1.2.0
|
28
|
+
|
29
|
+
### Deprecations:
|
30
|
+
|
31
|
+
* Deprecated `current_per_page` in favor of `limit_value`
|
32
|
+
|
33
|
+
### Enhancements:
|
34
|
+
|
35
|
+
* Added `#url_to_next_page` and `#url_to_prev_page` helper methods: [38e95a2](https://github.com/kaminari/kaminari/commit/38e95a262a210548c4f892aaa69d09ca8ecdce7f)
|
36
|
+
* Extracted url helper methods and packed them in `Kaminari::Helpers::UrlHelper`: [ff38bee](https://github.com/kaminari/kaminari/commit/ff38bee54b5be1a948f1118c0bfd829a72a1a502)
|
37
|
+
* Improved performance of `total_count` for grouped queries by explicitly giving SQL `select` clause #979 [@MmKolodziej]
|
38
|
+
* Added `LIMIT` to `total_count` query when `max_pages` presents #981 [@rymai]
|
39
|
+
|
40
|
+
### Bug Fixes:
|
41
|
+
|
42
|
+
* Fixed a bug where the `kaminari-mongoid` gem was not loaded properly: kaminari/kaminari-mongoid#9 [@DenniJensen]
|
43
|
+
* Fixed a bug where the `#total_count` method incorrectly calculates the total count: #932 [@tumayun]
|
44
|
+
* Fixed a bug where `empty?` breaks subsequent `last_page?` in without_count mode #1009 [@montdidier]
|
45
|
+
* Fixed kwargs warnings on Ruby 2.7 #1010 [@connorshea]
|
46
|
+
|
47
|
+
|
48
|
+
## 1.1.1
|
49
|
+
|
50
|
+
### Bug Fixes:
|
51
|
+
|
52
|
+
* Fixed a bug where `paginate ..., params: { controller: ..., action: ... }` didn't override the `params[:controller]` and `params[:action]` #919 [@chao-mu]
|
53
|
+
|
54
|
+
|
55
|
+
## 1.1.0
|
56
|
+
|
57
|
+
### Enhancements:
|
58
|
+
|
59
|
+
* Now the `page_entries_info` method respects the `I18n.locale` value when pluralizing the `entry_name` option #899 [@hundred]
|
60
|
+
* `require 'kaminari/core'` is no longer necessary when using `require 'kaminari/activerecord'` #896 [@yhara]
|
61
|
+
* Added the `#current_per_page` method to inspect current value of `per_page` #875 [#bfad]
|
62
|
+
* Better accesibility support by adding accessibility roles to pagination nav #848 [@frrrances]
|
63
|
+
|
64
|
+
### Bug Fixes:
|
65
|
+
|
66
|
+
* Fixed an issue where the command `rails g kaminari:views ...` stopped working due to a missing require #912 [@jvsoares]
|
67
|
+
* Fixed a bug where passing in `params` to the `link_to_next_page` or `link_to_previous_page` method raises an exception #874 [@5t111111]
|
68
|
+
|
69
|
+
|
1
70
|
## 1.0.1
|
2
71
|
|
3
72
|
### Bug Fixes:
|
@@ -42,6 +111,8 @@
|
|
42
111
|
|
43
112
|
* Renamed the model class method for configuring `max_pages` from `max_pages_per` to `max_pages`
|
44
113
|
|
114
|
+
* Raise ZeroPerPageOperation when The number of pages was incalculable of `total_pages`, `current_page` methods
|
115
|
+
|
45
116
|
### Enhancements:
|
46
117
|
|
47
118
|
* Exposed `path_to_prev_page`, `path_to_next_page` helpers as public API #683 [@neilang]
|
data/CONTRIBUTING.md
CHANGED
@@ -11,6 +11,12 @@ __*We only accept bug reports and pull requests in GitHub*__. Join the team!
|
|
11
11
|
* Feature requests should be accompanied by a patch, that includes tests.
|
12
12
|
* We won't accept any feature requests that come without a patch.
|
13
13
|
|
14
|
+
In addition, we generally don't accept requests that fall within one or more of the following categories:
|
15
|
+
|
16
|
+
* Requests without any legitimate use cases
|
17
|
+
* Requests for which the primary goal is to make a certain piece of code consistent
|
18
|
+
* [Cosmetic changes](https://github.com/rails/rails/pull/13771#issuecomment-32746700)
|
19
|
+
|
14
20
|
Thanks! :heart: :heart: :heart:
|
15
21
|
|
16
22
|
Kaminari Team
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Kaminari [![Build Status](https://
|
1
|
+
# Kaminari [![Build Status](https://github.com/kaminari/kaminari/actions/workflows/main.yml/badge.svg)](https://github.com/kaminari/kaminari/actions) [![Code Climate](https://codeclimate.com/github/kaminari/kaminari/badges/gpa.svg)](https://codeclimate.com/github/kaminari/kaminari)
|
2
2
|
|
3
3
|
A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs
|
4
4
|
|
@@ -30,11 +30,11 @@ The pagination helper outputs the HTML5 `<nav>` tag by default. Plus, the helper
|
|
30
30
|
|
31
31
|
## Supported Versions
|
32
32
|
|
33
|
-
* Ruby 2.
|
33
|
+
* Ruby 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1
|
34
34
|
|
35
|
-
* Rails 4.1, 4.2, 5.0, 5.1
|
35
|
+
* Rails 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, 7.0, 7.1
|
36
36
|
|
37
|
-
* Sinatra 1.4
|
37
|
+
* Sinatra 1.4, 2.0
|
38
38
|
|
39
39
|
* Haml 3+
|
40
40
|
|
@@ -74,16 +74,35 @@ User.page(7)
|
|
74
74
|
|
75
75
|
Note: pagination starts at page 1, not at page 0 (page(0) will return the same results as page(1)).
|
76
76
|
|
77
|
+
Kaminari does not add an `order` to queries. To avoid surprises, you should generally include an order in paginated queries. For example:
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
User.order(:name).page(7)
|
81
|
+
```
|
82
|
+
|
83
|
+
You can get page numbers or page conditions by using below methods.
|
84
|
+
```ruby
|
85
|
+
User.count #=> 1000
|
86
|
+
User.page(1).limit_value #=> 20
|
87
|
+
User.page(1).total_pages #=> 50
|
88
|
+
User.page(1).current_page #=> 1
|
89
|
+
User.page(1).next_page #=> 2
|
90
|
+
User.page(2).prev_page #=> 1
|
91
|
+
User.page(1).first_page? #=> true
|
92
|
+
User.page(50).last_page? #=> true
|
93
|
+
User.page(100).out_of_range? #=> true
|
94
|
+
```
|
95
|
+
|
77
96
|
### The `per` Scope
|
78
97
|
|
79
|
-
To show a lot more users per each page (change the `
|
98
|
+
To show a lot more users per each page (change the `per` value)
|
80
99
|
|
81
100
|
```ruby
|
82
|
-
User.page(7).per(50)
|
101
|
+
User.order(:name).page(7).per(50)
|
83
102
|
```
|
84
103
|
|
85
104
|
Note that the `per` scope is not directly defined on the models but is just a method defined on the page scope.
|
86
|
-
This is absolutely reasonable because you will never actually use `
|
105
|
+
This is absolutely reasonable because you will never actually use `per` without specifying the `page` number.
|
87
106
|
|
88
107
|
Keep in mind that `per` internally utilizes `limit` and so it will override any `limit` that was set previously.
|
89
108
|
And if you want to get the size for all request records you can use `total_count` method:
|
@@ -100,11 +119,19 @@ a.page(1).per(20).total_count #=> 1000
|
|
100
119
|
Occasionally you need to pad a number of records that is not a multiple of the page size.
|
101
120
|
|
102
121
|
```ruby
|
103
|
-
User.page(7).per(50).padding(3)
|
122
|
+
User.order(:name).page(7).per(50).padding(3)
|
104
123
|
```
|
105
124
|
|
106
125
|
Note that the `padding` scope also is not directly defined on the models.
|
107
126
|
|
127
|
+
### Unscoping
|
128
|
+
|
129
|
+
If for some reason you need to unscope `page` and `per` methods you can call `except(:limit, :offset)`
|
130
|
+
|
131
|
+
```ruby
|
132
|
+
users = User.order(:name).page(7).per(50)
|
133
|
+
unpaged_users = users.except(:limit, :offset) # unpaged_users will not use the kaminari scopes
|
134
|
+
```
|
108
135
|
|
109
136
|
## Configuring Kaminari
|
110
137
|
|
@@ -157,6 +184,9 @@ class User < ActiveRecord::Base
|
|
157
184
|
end
|
158
185
|
```
|
159
186
|
|
187
|
+
### Configuring params_on_first_page when using ransack_memory
|
188
|
+
|
189
|
+
If you are using [the `ransack_memory` gem](https://github.com/richardrails/ransack_memory) and experience problems navigating back to the previous or first page, set the `params_on_first_page` setting to `true`.
|
160
190
|
|
161
191
|
## Controllers
|
162
192
|
|
@@ -207,7 +237,7 @@ page.
|
|
207
237
|
<%= paginate @users, outer_window: 3 %>
|
208
238
|
```
|
209
239
|
|
210
|
-
This would output something like `1 2 3
|
240
|
+
This would output something like `1 2 3 ...(snip)... 18 19 20` while having 20 pages in total.
|
211
241
|
|
212
242
|
### Outer Window Can Be Separately Specified by left, right (0 by default)
|
213
243
|
|
@@ -228,7 +258,7 @@ This would modify the query parameter name on each links.
|
|
228
258
|
### Extra Parameters (`:params`) for the Links
|
229
259
|
|
230
260
|
```erb
|
231
|
-
<%= paginate @users, params: {controller: 'foo', action: 'bar'} %>
|
261
|
+
<%= paginate @users, params: {controller: 'foo', action: 'bar', format: :turbo_stream} %>
|
232
262
|
```
|
233
263
|
|
234
264
|
This would modify each link's `url_option`. :`controller` and :`action` might be the keys in common.
|
@@ -258,6 +288,12 @@ This option makes it easier to do things like A/B testing pagination templates/t
|
|
258
288
|
|
259
289
|
This simply renders a link to the next page. This would be helpful for creating a Twitter-like pagination feature.
|
260
290
|
|
291
|
+
The helper methods support a `params` option to further specify the link. If `format` needs to be set, inlude it in the `params` hash.
|
292
|
+
|
293
|
+
```erb
|
294
|
+
<%= link_to_next_page @items, 'Next Page', params: {controller: 'foo', action: 'bar', format: :turbo_stream} %>
|
295
|
+
```
|
296
|
+
|
261
297
|
### The `page_entries_info` Helper Method
|
262
298
|
|
263
299
|
```erb
|
@@ -428,6 +464,13 @@ You can specify the `total_count` value through options Hash. This would be help
|
|
428
464
|
@paginatable_array = Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
|
429
465
|
```
|
430
466
|
|
467
|
+
or, in the case of using an external API to source the page of data:
|
468
|
+
```ruby
|
469
|
+
page_size = 10
|
470
|
+
one_page = get_page_of_data params[:page], page_size
|
471
|
+
@paginatable_array = Kaminari.paginate_array(one_page.data, total_count: one_page.total_count).page(params[:page]).per(page_size)
|
472
|
+
```
|
473
|
+
|
431
474
|
|
432
475
|
## Creating Friendly URLs and Caching
|
433
476
|
|
data/Rakefile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
3
|
require "bundler/gem_tasks"
|
5
4
|
|
6
5
|
require 'rake/testtask'
|
6
|
+
require 'kaminari'
|
7
7
|
|
8
8
|
Rake::TestTask.new do |t|
|
9
9
|
t.libs << 'test'
|
@@ -17,6 +17,9 @@ task default: "test:all"
|
|
17
17
|
namespace :test do
|
18
18
|
mappers = %w(
|
19
19
|
active_record_edge
|
20
|
+
active_record_60
|
21
|
+
active_record_52
|
22
|
+
active_record_51
|
20
23
|
active_record_50
|
21
24
|
active_record_42
|
22
25
|
active_record_41
|
@@ -5,20 +5,26 @@ gem 'activerecord', '~> 4.1.0', require: 'active_record'
|
|
5
5
|
|
6
6
|
platforms :ruby do
|
7
7
|
if RUBY_VERSION > "2.1.0"
|
8
|
-
gem 'sqlite3'
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
9
9
|
else
|
10
|
-
gem 'sqlite3', '1.3.8'
|
10
|
+
gem 'sqlite3', '1.3.8', require: false
|
11
11
|
gem 'nokogiri', '~> 1.6.8'
|
12
12
|
end
|
13
|
+
gem 'pg', '< 1.0.0', require: false
|
14
|
+
gem 'mysql2', '< 0.4', require: false
|
13
15
|
end
|
14
16
|
platforms :jruby do
|
15
|
-
gem 'activerecord-jdbcsqlite3-adapter',
|
17
|
+
gem 'activerecord-jdbcsqlite3-adapter', require: false
|
18
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
19
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
16
20
|
end
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
if RUBY_ENGINE == 'rbx'
|
22
|
+
platforms :rbx do
|
23
|
+
gem 'rubysl', '~> 2.0'
|
24
|
+
gem 'racc'
|
25
|
+
gem 'minitest'
|
26
|
+
gem 'rubinius-developer_tools'
|
27
|
+
end
|
22
28
|
end
|
23
29
|
|
24
30
|
gemspec path: '../'
|
@@ -5,20 +5,26 @@ gem 'activerecord', '~> 4.2.0', require: 'active_record'
|
|
5
5
|
|
6
6
|
platforms :ruby do
|
7
7
|
if RUBY_VERSION > "2.1.0"
|
8
|
-
gem 'sqlite3'
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
9
9
|
else
|
10
|
-
gem 'sqlite3', '1.3.8'
|
10
|
+
gem 'sqlite3', '1.3.8', require: false
|
11
11
|
gem 'nokogiri', '~> 1.6.8'
|
12
12
|
end
|
13
|
+
gem 'pg', '< 1.0.0', require: false
|
14
|
+
gem 'mysql2', '< 0.4', require: false
|
13
15
|
end
|
14
16
|
platforms :jruby do
|
15
|
-
gem 'activerecord-jdbcsqlite3-adapter',
|
17
|
+
gem 'activerecord-jdbcsqlite3-adapter', require: false
|
18
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
19
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
16
20
|
end
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
if RUBY_ENGINE == 'rbx'
|
22
|
+
platforms :rbx do
|
23
|
+
gem 'rubysl', '~> 2.0'
|
24
|
+
gem 'racc'
|
25
|
+
gem 'minitest'
|
26
|
+
gem 'rubinius-developer_tools'
|
27
|
+
end
|
22
28
|
end
|
23
29
|
|
24
30
|
gemspec path: '../'
|
@@ -5,16 +5,22 @@ gem 'activerecord', '~> 5.0.0', require: 'active_record'
|
|
5
5
|
gem 'actionview', '~> 5.0.0', require: 'action_view'
|
6
6
|
|
7
7
|
platforms :ruby do
|
8
|
-
gem 'sqlite3'
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
9
|
+
gem 'pg', '< 1.0.0', require: false
|
10
|
+
gem 'mysql2', require: false
|
9
11
|
end
|
10
12
|
platforms :jruby do
|
11
|
-
gem 'activerecord-jdbcsqlite3-adapter',
|
13
|
+
gem 'activerecord-jdbcsqlite3-adapter', require: false
|
14
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
15
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
12
16
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
if RUBY_ENGINE == 'rbx'
|
18
|
+
platforms :rbx do
|
19
|
+
gem 'rubysl', '~> 2.0'
|
20
|
+
gem 'racc'
|
21
|
+
gem 'minitest'
|
22
|
+
gem 'rubinius-developer_tools'
|
23
|
+
end
|
18
24
|
end
|
19
25
|
|
20
26
|
gemspec path: '../'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 5.1.0'
|
4
|
+
gem 'activerecord', '~> 5.1.0', require: 'active_record'
|
5
|
+
gem 'actionview', '~> 5.1.0', require: 'action_view'
|
6
|
+
|
7
|
+
platforms :ruby do
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
9
|
+
gem 'pg', require: false
|
10
|
+
gem 'mysql2', require: false
|
11
|
+
end
|
12
|
+
platforms :jruby do
|
13
|
+
gem 'activerecord-jdbcsqlite3-adapter', require: false
|
14
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
15
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
16
|
+
end
|
17
|
+
if RUBY_ENGINE == 'rbx'
|
18
|
+
platforms :rbx do
|
19
|
+
gem 'rubysl', '~> 2.0'
|
20
|
+
gem 'racc'
|
21
|
+
gem 'minitest'
|
22
|
+
gem 'rubinius-developer_tools'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
gemspec path: '../'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 5.2.0'
|
4
|
+
gem 'activerecord', '~> 5.2.0', require: 'active_record'
|
5
|
+
gem 'actionview', '~> 5.2.0', require: 'action_view'
|
6
|
+
|
7
|
+
platforms :ruby do
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
9
|
+
gem 'pg', require: false
|
10
|
+
gem 'mysql2', require: false
|
11
|
+
end
|
12
|
+
platforms :jruby do
|
13
|
+
gem 'activerecord-jdbcsqlite3-adapter', require: false
|
14
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
15
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
16
|
+
end
|
17
|
+
if RUBY_ENGINE == 'rbx'
|
18
|
+
platforms :rbx do
|
19
|
+
gem 'rubysl', '~> 2.0'
|
20
|
+
gem 'racc'
|
21
|
+
gem 'minitest'
|
22
|
+
gem 'rubinius-developer_tools'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
gemspec path: '../'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 6.0.0'
|
4
|
+
gem 'activerecord', '~> 6.0.0', require: 'active_record'
|
5
|
+
gem 'actionview', '~> 6.0.0', require: 'action_view'
|
6
|
+
|
7
|
+
gem 'selenium-webdriver'
|
8
|
+
|
9
|
+
platforms :ruby do
|
10
|
+
gem 'sqlite3', require: false
|
11
|
+
gem 'pg', require: false
|
12
|
+
gem 'mysql2', require: false
|
13
|
+
end
|
14
|
+
platforms :jruby do
|
15
|
+
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
|
16
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
17
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
18
|
+
end
|
19
|
+
if RUBY_ENGINE == 'rbx'
|
20
|
+
platforms :rbx do
|
21
|
+
gem 'rubysl', '~> 2.0'
|
22
|
+
gem 'racc'
|
23
|
+
gem 'minitest'
|
24
|
+
gem 'rubinius-developer_tools'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
gemspec path: '../'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 6.1.0'
|
4
|
+
gem 'activerecord', '~> 6.1.0', require: 'active_record'
|
5
|
+
gem 'actionview', '~> 6.1.0', require: 'action_view'
|
6
|
+
|
7
|
+
gem 'selenium-webdriver'
|
8
|
+
|
9
|
+
platforms :ruby do
|
10
|
+
gem 'sqlite3', require: false
|
11
|
+
gem 'pg', require: false
|
12
|
+
gem 'mysql2', require: false
|
13
|
+
end
|
14
|
+
platforms :jruby do
|
15
|
+
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
|
16
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
17
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
18
|
+
end
|
19
|
+
if RUBY_ENGINE == 'rbx'
|
20
|
+
platforms :rbx do
|
21
|
+
gem 'rubysl', '~> 2.0'
|
22
|
+
gem 'racc'
|
23
|
+
gem 'minitest'
|
24
|
+
gem 'rubinius-developer_tools'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
gemspec path: '../'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 7.0.0'
|
4
|
+
gem 'activerecord', '~> 7.0.0', require: 'active_record'
|
5
|
+
gem 'actionview', '~> 7.0.0', require: 'action_view'
|
6
|
+
|
7
|
+
gem 'selenium-webdriver'
|
8
|
+
|
9
|
+
platforms :ruby do
|
10
|
+
gem 'sqlite3', require: false
|
11
|
+
gem 'pg', require: false
|
12
|
+
gem 'mysql2', require: false
|
13
|
+
end
|
14
|
+
platforms :jruby do
|
15
|
+
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
|
16
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
17
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
18
|
+
end
|
19
|
+
if RUBY_ENGINE == 'rbx'
|
20
|
+
platforms :rbx do
|
21
|
+
gem 'rubysl', '~> 2.0'
|
22
|
+
gem 'racc'
|
23
|
+
gem 'minitest'
|
24
|
+
gem 'rubinius-developer_tools'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
gemspec path: '../'
|
@@ -5,30 +5,31 @@ git_source(:github) do |repo_name|
|
|
5
5
|
"https://github.com/#{repo_name}.git"
|
6
6
|
end
|
7
7
|
|
8
|
-
github 'rails/rails' do
|
8
|
+
github 'rails/rails', branch: 'main' do
|
9
9
|
gem 'railties'
|
10
10
|
gem 'activerecord', require: 'active_record'
|
11
11
|
gem 'actionview', require: 'action_view'
|
12
12
|
end
|
13
13
|
|
14
|
-
gem '
|
15
|
-
gem 'arel', github: 'rails/arel'
|
14
|
+
gem 'selenium-webdriver'
|
16
15
|
|
17
16
|
platforms :ruby do
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
gem 'sqlite3', '1.3.8'
|
22
|
-
end
|
17
|
+
gem 'sqlite3', require: false
|
18
|
+
gem 'pg', require: false
|
19
|
+
gem 'mysql2', require: false
|
23
20
|
end
|
24
21
|
platforms :jruby do
|
25
22
|
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
|
23
|
+
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
24
|
+
gem 'activerecord-jdbcmysql-adapter', require: false
|
26
25
|
end
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
if RUBY_ENGINE == 'rbx'
|
27
|
+
platforms :rbx do
|
28
|
+
gem 'rubysl', '~> 2.0'
|
29
|
+
gem 'racc'
|
30
|
+
gem 'minitest'
|
31
|
+
gem 'rubinius-developer_tools'
|
32
|
+
end
|
32
33
|
end
|
33
34
|
|
34
35
|
gemspec path: '../'
|
data/kaminari.gemspec
CHANGED
data/lib/kaminari/version.rb
CHANGED
data/lib/kaminari.rb
CHANGED
data/misc/bug_report_template.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaminari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
- Yuki Nishijima
|
9
9
|
- Zachary Scott
|
10
10
|
- Hiroshi Shibata
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-12-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -33,42 +33,42 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.
|
36
|
+
version: 1.2.2
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
43
|
+
version: 1.2.2
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: kaminari-actionview
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 1.
|
50
|
+
version: 1.2.2
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 1.
|
57
|
+
version: 1.2.2
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: kaminari-activerecord
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - '='
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 1.
|
64
|
+
version: 1.2.2
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - '='
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 1.
|
71
|
+
version: 1.2.2
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: test-unit-rails
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,9 +147,10 @@ executables: []
|
|
147
147
|
extensions: []
|
148
148
|
extra_rdoc_files: []
|
149
149
|
files:
|
150
|
+
- ".codeclimate.yml"
|
150
151
|
- ".document"
|
152
|
+
- ".github/workflows/main.yml"
|
151
153
|
- ".gitignore"
|
152
|
-
- ".travis.yml"
|
153
154
|
- CHANGELOG.md
|
154
155
|
- CONTRIBUTING.md
|
155
156
|
- Gemfile
|
@@ -159,6 +160,11 @@ files:
|
|
159
160
|
- gemfiles/active_record_41.gemfile
|
160
161
|
- gemfiles/active_record_42.gemfile
|
161
162
|
- gemfiles/active_record_50.gemfile
|
163
|
+
- gemfiles/active_record_51.gemfile
|
164
|
+
- gemfiles/active_record_52.gemfile
|
165
|
+
- gemfiles/active_record_60.gemfile
|
166
|
+
- gemfiles/active_record_61.gemfile
|
167
|
+
- gemfiles/active_record_70.gemfile
|
162
168
|
- gemfiles/active_record_edge.gemfile
|
163
169
|
- kaminari.gemspec
|
164
170
|
- lib/kaminari.rb
|
@@ -168,7 +174,7 @@ homepage: https://github.com/kaminari/kaminari
|
|
168
174
|
licenses:
|
169
175
|
- MIT
|
170
176
|
metadata: {}
|
171
|
-
post_install_message:
|
177
|
+
post_install_message:
|
172
178
|
rdoc_options: []
|
173
179
|
require_paths:
|
174
180
|
- lib
|
@@ -183,9 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
189
|
- !ruby/object:Gem::Version
|
184
190
|
version: '0'
|
185
191
|
requirements: []
|
186
|
-
|
187
|
-
|
188
|
-
signing_key:
|
192
|
+
rubygems_version: 3.3.0.dev
|
193
|
+
signing_key:
|
189
194
|
specification_version: 4
|
190
195
|
summary: A pagination engine plugin for Rails 4+ and other modern frameworks
|
191
196
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
dist: trusty
|
3
|
-
|
4
|
-
rvm:
|
5
|
-
- 2.4.0
|
6
|
-
- 2.3.3
|
7
|
-
- 2.2.6
|
8
|
-
- 2.1.10
|
9
|
-
- 2.0.0
|
10
|
-
- ruby-head
|
11
|
-
- jruby-9.1.7.0
|
12
|
-
- rbx-3
|
13
|
-
|
14
|
-
gemfile:
|
15
|
-
- gemfiles/active_record_50.gemfile
|
16
|
-
- gemfiles/active_record_42.gemfile
|
17
|
-
- gemfiles/active_record_41.gemfile
|
18
|
-
- gemfiles/active_record_edge.gemfile
|
19
|
-
|
20
|
-
sudo: false
|
21
|
-
|
22
|
-
before_install: gem update bundler --no-document
|
23
|
-
script: 'bundle exec rake test'
|
24
|
-
|
25
|
-
cache: bundler
|
26
|
-
|
27
|
-
matrix:
|
28
|
-
exclude:
|
29
|
-
- rvm: 2.0.0
|
30
|
-
gemfile: gemfiles/active_record_50.gemfile
|
31
|
-
- rvm: 2.1.10
|
32
|
-
gemfile: gemfiles/active_record_50.gemfile
|
33
|
-
- rvm: 2.0.0
|
34
|
-
gemfile: gemfiles/active_record_edge.gemfile
|
35
|
-
- rvm: 2.1.10
|
36
|
-
gemfile: gemfiles/active_record_edge.gemfile
|
37
|
-
- rvm: 2.4.0
|
38
|
-
gemfile: gemfiles/active_record_41.gemfile
|
39
|
-
- rvm: 2.4.0
|
40
|
-
gemfile: gemfiles/active_record_42.gemfile
|
41
|
-
- rvm: ruby-head
|
42
|
-
gemfile: gemfiles/active_record_41.gemfile
|
43
|
-
allow_failures:
|
44
|
-
- rvm: ruby-head
|
45
|
-
- rvm: jruby-9.1.7.0
|
46
|
-
- rvm: rbx-3
|
47
|
-
- gemfile: gemfiles/active_record_edge.gemfile
|
48
|
-
fast_finish: true
|