kaminari 1.1.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +107 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +56 -0
- data/CONTRIBUTING.md +6 -0
- data/Gemfile +1 -0
- data/README.md +39 -9
- data/Rakefile +2 -1
- data/gemfiles/active_record_41.gemfile +9 -7
- data/gemfiles/active_record_42.gemfile +10 -8
- data/gemfiles/active_record_50.gemfile +9 -7
- data/gemfiles/active_record_51.gemfile +8 -6
- 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 +10 -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 +17 -14
- data/.travis.yml +0 -56
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
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
|
|
@@ -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,57 @@
|
|
|
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
|
+
|
|
1
55
|
## 1.1.0
|
|
2
56
|
|
|
3
57
|
### Enhancements:
|
|
@@ -57,6 +111,8 @@
|
|
|
57
111
|
|
|
58
112
|
* Renamed the model class method for configuring `max_pages` from `max_pages_per` to `max_pages`
|
|
59
113
|
|
|
114
|
+
* Raise ZeroPerPageOperation when The number of pages was incalculable of `total_pages`, `current_page` methods
|
|
115
|
+
|
|
60
116
|
### Enhancements:
|
|
61
117
|
|
|
62
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 [](https://github.com/kaminari/kaminari/actions) [](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, 5.2
|
|
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,6 +74,12 @@ 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
|
+
|
|
77
83
|
You can get page numbers or page conditions by using below methods.
|
|
78
84
|
```ruby
|
|
79
85
|
User.count #=> 1000
|
|
@@ -89,14 +95,14 @@ User.page(100).out_of_range? #=> true
|
|
|
89
95
|
|
|
90
96
|
### The `per` Scope
|
|
91
97
|
|
|
92
|
-
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)
|
|
93
99
|
|
|
94
100
|
```ruby
|
|
95
|
-
User.page(7).per(50)
|
|
101
|
+
User.order(:name).page(7).per(50)
|
|
96
102
|
```
|
|
97
103
|
|
|
98
104
|
Note that the `per` scope is not directly defined on the models but is just a method defined on the page scope.
|
|
99
|
-
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.
|
|
100
106
|
|
|
101
107
|
Keep in mind that `per` internally utilizes `limit` and so it will override any `limit` that was set previously.
|
|
102
108
|
And if you want to get the size for all request records you can use `total_count` method:
|
|
@@ -113,11 +119,19 @@ a.page(1).per(20).total_count #=> 1000
|
|
|
113
119
|
Occasionally you need to pad a number of records that is not a multiple of the page size.
|
|
114
120
|
|
|
115
121
|
```ruby
|
|
116
|
-
User.page(7).per(50).padding(3)
|
|
122
|
+
User.order(:name).page(7).per(50).padding(3)
|
|
117
123
|
```
|
|
118
124
|
|
|
119
125
|
Note that the `padding` scope also is not directly defined on the models.
|
|
120
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
|
+
```
|
|
121
135
|
|
|
122
136
|
## Configuring Kaminari
|
|
123
137
|
|
|
@@ -170,6 +184,9 @@ class User < ActiveRecord::Base
|
|
|
170
184
|
end
|
|
171
185
|
```
|
|
172
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`.
|
|
173
190
|
|
|
174
191
|
## Controllers
|
|
175
192
|
|
|
@@ -241,7 +258,7 @@ This would modify the query parameter name on each links.
|
|
|
241
258
|
### Extra Parameters (`:params`) for the Links
|
|
242
259
|
|
|
243
260
|
```erb
|
|
244
|
-
<%= paginate @users, params: {controller: 'foo', action: 'bar'} %>
|
|
261
|
+
<%= paginate @users, params: {controller: 'foo', action: 'bar', format: :turbo_stream} %>
|
|
245
262
|
```
|
|
246
263
|
|
|
247
264
|
This would modify each link's `url_option`. :`controller` and :`action` might be the keys in common.
|
|
@@ -271,6 +288,12 @@ This option makes it easier to do things like A/B testing pagination templates/t
|
|
|
271
288
|
|
|
272
289
|
This simply renders a link to the next page. This would be helpful for creating a Twitter-like pagination feature.
|
|
273
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
|
+
|
|
274
297
|
### The `page_entries_info` Helper Method
|
|
275
298
|
|
|
276
299
|
```erb
|
|
@@ -441,6 +464,13 @@ You can specify the `total_count` value through options Hash. This would be help
|
|
|
441
464
|
@paginatable_array = Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
|
|
442
465
|
```
|
|
443
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
|
+
|
|
444
474
|
|
|
445
475
|
## Creating Friendly URLs and Caching
|
|
446
476
|
|
data/Rakefile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
|
|
4
3
|
require "bundler/gem_tasks"
|
|
@@ -18,6 +17,8 @@ task default: "test:all"
|
|
|
18
17
|
namespace :test do
|
|
19
18
|
mappers = %w(
|
|
20
19
|
active_record_edge
|
|
20
|
+
active_record_60
|
|
21
|
+
active_record_52
|
|
21
22
|
active_record_51
|
|
22
23
|
active_record_50
|
|
23
24
|
active_record_42
|
|
@@ -5,12 +5,12 @@ 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', require: false
|
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
|
9
9
|
else
|
|
10
10
|
gem 'sqlite3', '1.3.8', require: false
|
|
11
11
|
gem 'nokogiri', '~> 1.6.8'
|
|
12
12
|
end
|
|
13
|
-
gem 'pg', require: false
|
|
13
|
+
gem 'pg', '< 1.0.0', require: false
|
|
14
14
|
gem 'mysql2', '< 0.4', require: false
|
|
15
15
|
end
|
|
16
16
|
platforms :jruby do
|
|
@@ -18,11 +18,13 @@ platforms :jruby do
|
|
|
18
18
|
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
|
19
19
|
gem 'activerecord-jdbcmysql-adapter', require: false
|
|
20
20
|
end
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
26
28
|
end
|
|
27
29
|
|
|
28
30
|
gemspec path: '../'
|
|
@@ -5,24 +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', require: false
|
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
|
9
9
|
else
|
|
10
10
|
gem 'sqlite3', '1.3.8', require: false
|
|
11
11
|
gem 'nokogiri', '~> 1.6.8'
|
|
12
12
|
end
|
|
13
|
-
gem 'pg', require: false
|
|
14
|
-
gem 'mysql2', require: false
|
|
13
|
+
gem 'pg', '< 1.0.0', require: false
|
|
14
|
+
gem 'mysql2', '< 0.4', require: false
|
|
15
15
|
end
|
|
16
16
|
platforms :jruby do
|
|
17
17
|
gem 'activerecord-jdbcsqlite3-adapter', require: false
|
|
18
18
|
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
|
19
19
|
gem 'activerecord-jdbcmysql-adapter', require: false
|
|
20
20
|
end
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
26
28
|
end
|
|
27
29
|
|
|
28
30
|
gemspec path: '../'
|
|
@@ -5,8 +5,8 @@ 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', require: false
|
|
9
|
-
gem 'pg', require: false
|
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
|
9
|
+
gem 'pg', '< 1.0.0', require: false
|
|
10
10
|
gem 'mysql2', require: false
|
|
11
11
|
end
|
|
12
12
|
platforms :jruby do
|
|
@@ -14,11 +14,13 @@ platforms :jruby do
|
|
|
14
14
|
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
|
15
15
|
gem 'activerecord-jdbcmysql-adapter', require: false
|
|
16
16
|
end
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
22
24
|
end
|
|
23
25
|
|
|
24
26
|
gemspec path: '../'
|
|
@@ -5,7 +5,7 @@ gem 'activerecord', '~> 5.1.0', require: 'active_record'
|
|
|
5
5
|
gem 'actionview', '~> 5.1.0', require: 'action_view'
|
|
6
6
|
|
|
7
7
|
platforms :ruby do
|
|
8
|
-
gem 'sqlite3', require: false
|
|
8
|
+
gem 'sqlite3', '~> 1.3.13', require: false
|
|
9
9
|
gem 'pg', require: false
|
|
10
10
|
gem 'mysql2', require: false
|
|
11
11
|
end
|
|
@@ -14,11 +14,13 @@ platforms :jruby do
|
|
|
14
14
|
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
|
15
15
|
gem 'activerecord-jdbcmysql-adapter', require: false
|
|
16
16
|
end
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
22
24
|
end
|
|
23
25
|
|
|
24
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,21 +5,16 @@ 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
|
-
gem 'sqlite3', require: false
|
|
20
|
-
else
|
|
21
|
-
gem 'sqlite3', '1.3.8', require: false
|
|
22
|
-
end
|
|
17
|
+
gem 'sqlite3', require: false
|
|
23
18
|
gem 'pg', require: false
|
|
24
19
|
gem 'mysql2', require: false
|
|
25
20
|
end
|
|
@@ -28,11 +23,13 @@ platforms :jruby do
|
|
|
28
23
|
gem 'activerecord-jdbcpostgresql-adapter', require: false
|
|
29
24
|
gem 'activerecord-jdbcmysql-adapter', require: false
|
|
30
25
|
end
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
36
33
|
end
|
|
37
34
|
|
|
38
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
|
|
@@ -149,8 +149,8 @@ extra_rdoc_files: []
|
|
|
149
149
|
files:
|
|
150
150
|
- ".codeclimate.yml"
|
|
151
151
|
- ".document"
|
|
152
|
+
- ".github/workflows/main.yml"
|
|
152
153
|
- ".gitignore"
|
|
153
|
-
- ".travis.yml"
|
|
154
154
|
- CHANGELOG.md
|
|
155
155
|
- CONTRIBUTING.md
|
|
156
156
|
- Gemfile
|
|
@@ -161,6 +161,10 @@ files:
|
|
|
161
161
|
- gemfiles/active_record_42.gemfile
|
|
162
162
|
- gemfiles/active_record_50.gemfile
|
|
163
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
|
|
164
168
|
- gemfiles/active_record_edge.gemfile
|
|
165
169
|
- kaminari.gemspec
|
|
166
170
|
- lib/kaminari.rb
|
|
@@ -170,7 +174,7 @@ homepage: https://github.com/kaminari/kaminari
|
|
|
170
174
|
licenses:
|
|
171
175
|
- MIT
|
|
172
176
|
metadata: {}
|
|
173
|
-
post_install_message:
|
|
177
|
+
post_install_message:
|
|
174
178
|
rdoc_options: []
|
|
175
179
|
require_paths:
|
|
176
180
|
- lib
|
|
@@ -185,9 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
185
189
|
- !ruby/object:Gem::Version
|
|
186
190
|
version: '0'
|
|
187
191
|
requirements: []
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
signing_key:
|
|
192
|
+
rubygems_version: 3.3.0.dev
|
|
193
|
+
signing_key:
|
|
191
194
|
specification_version: 4
|
|
192
195
|
summary: A pagination engine plugin for Rails 4+ and other modern frameworks
|
|
193
196
|
test_files: []
|
data/.travis.yml
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
|
|
3
|
-
rvm:
|
|
4
|
-
- 2.4.2
|
|
5
|
-
- 2.3.5
|
|
6
|
-
- ruby-head
|
|
7
|
-
- jruby-9.1.13.0
|
|
8
|
-
# - rbx-3
|
|
9
|
-
|
|
10
|
-
gemfile:
|
|
11
|
-
- gemfiles/active_record_51.gemfile
|
|
12
|
-
- gemfiles/active_record_50.gemfile
|
|
13
|
-
- gemfiles/active_record_42.gemfile
|
|
14
|
-
- gemfiles/active_record_41.gemfile
|
|
15
|
-
- gemfiles/active_record_edge.gemfile
|
|
16
|
-
|
|
17
|
-
env:
|
|
18
|
-
- DB=sqlite3
|
|
19
|
-
- DB=postgresql
|
|
20
|
-
- DB=mysql
|
|
21
|
-
|
|
22
|
-
sudo: false
|
|
23
|
-
|
|
24
|
-
before_install:
|
|
25
|
-
- gem update --system
|
|
26
|
-
- gem update bundler --no-document
|
|
27
|
-
script: 'bundle exec rake test'
|
|
28
|
-
|
|
29
|
-
cache: bundler
|
|
30
|
-
|
|
31
|
-
matrix:
|
|
32
|
-
exclude:
|
|
33
|
-
- rvm: 2.4.2
|
|
34
|
-
gemfile: gemfiles/active_record_42.gemfile
|
|
35
|
-
- rvm: 2.4.2
|
|
36
|
-
gemfile: gemfiles/active_record_41.gemfile
|
|
37
|
-
- rvm: ruby-head
|
|
38
|
-
gemfile: gemfiles/active_record_42.gemfile
|
|
39
|
-
- rvm: ruby-head
|
|
40
|
-
gemfile: gemfiles/active_record_41.gemfile
|
|
41
|
-
include:
|
|
42
|
-
- rvm: 2.2.8
|
|
43
|
-
gemfile: gemfiles/active_record_51.gemfile
|
|
44
|
-
env: DB=sqlite3
|
|
45
|
-
- rvm: 2.1.10
|
|
46
|
-
gemfile: gemfiles/active_record_42.gemfile
|
|
47
|
-
env: DB=sqlite3
|
|
48
|
-
- rvm: 2.0.0
|
|
49
|
-
gemfile: gemfiles/active_record_42.gemfile
|
|
50
|
-
env: DB=sqlite3
|
|
51
|
-
allow_failures:
|
|
52
|
-
- rvm: ruby-head
|
|
53
|
-
- rvm: jruby-9.1.13.0
|
|
54
|
-
# - rvm: rbx-3
|
|
55
|
-
- gemfile: gemfiles/active_record_edge.gemfile
|
|
56
|
-
fast_finish: true
|