kaminari 0.17.0 → 1.2.1
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/.gitignore +1 -1
- data/.travis.yml +79 -45
- data/CHANGELOG.md +636 -0
- data/CONTRIBUTING.md +22 -0
- data/Gemfile +2 -0
- data/README.md +573 -0
- data/Rakefile +25 -25
- data/gemfiles/active_record_41.gemfile +10 -7
- data/gemfiles/active_record_42.gemfile +10 -7
- data/gemfiles/active_record_50.gemfile +24 -0
- data/gemfiles/active_record_51.gemfile +24 -0
- data/gemfiles/active_record_52.gemfile +24 -0
- data/gemfiles/active_record_60.gemfile +26 -0
- data/gemfiles/active_record_edge.gemfile +15 -12
- data/kaminari.gemspec +23 -27
- data/lib/kaminari/version.rb +3 -1
- data/lib/kaminari.rb +4 -38
- data/misc/bug_report_template.rb +57 -0
- metadata +48 -186
- data/.gemtest +0 -0
- data/.rspec +0 -2
- data/CHANGELOG.rdoc +0 -480
- data/README.rdoc +0 -336
- data/app/views/kaminari/_first_page.html.erb +0 -11
- data/app/views/kaminari/_first_page.html.haml +0 -9
- data/app/views/kaminari/_first_page.html.slim +0 -10
- data/app/views/kaminari/_gap.html.erb +0 -8
- data/app/views/kaminari/_gap.html.haml +0 -8
- data/app/views/kaminari/_gap.html.slim +0 -9
- data/app/views/kaminari/_last_page.html.erb +0 -11
- data/app/views/kaminari/_last_page.html.haml +0 -9
- data/app/views/kaminari/_last_page.html.slim +0 -10
- data/app/views/kaminari/_next_page.html.erb +0 -11
- data/app/views/kaminari/_next_page.html.haml +0 -9
- data/app/views/kaminari/_next_page.html.slim +0 -10
- data/app/views/kaminari/_page.html.erb +0 -12
- data/app/views/kaminari/_page.html.haml +0 -10
- data/app/views/kaminari/_page.html.slim +0 -11
- data/app/views/kaminari/_paginator.html.erb +0 -23
- data/app/views/kaminari/_paginator.html.haml +0 -18
- data/app/views/kaminari/_paginator.html.slim +0 -19
- data/app/views/kaminari/_prev_page.html.erb +0 -11
- data/app/views/kaminari/_prev_page.html.haml +0 -9
- data/app/views/kaminari/_prev_page.html.slim +0 -10
- data/config/locales/kaminari.yml +0 -19
- data/gemfiles/active_record_30.gemfile +0 -28
- data/gemfiles/active_record_31.gemfile +0 -26
- data/gemfiles/active_record_32.gemfile +0 -25
- data/gemfiles/active_record_40.gemfile +0 -26
- data/gemfiles/data_mapper_12.gemfile +0 -32
- data/gemfiles/mongo_mapper.gemfile +0 -25
- data/gemfiles/mongoid_30.gemfile +0 -22
- data/gemfiles/mongoid_31.gemfile +0 -21
- data/gemfiles/mongoid_40.gemfile +0 -19
- data/gemfiles/mongoid_50.gemfile +0 -23
- data/gemfiles/sinatra_13.gemfile +0 -36
- data/gemfiles/sinatra_14.gemfile +0 -33
- data/lib/generators/kaminari/config_generator.rb +0 -16
- data/lib/generators/kaminari/templates/kaminari_config.rb +0 -10
- data/lib/generators/kaminari/views_generator.rb +0 -119
- data/lib/kaminari/config.rb +0 -51
- data/lib/kaminari/engine.rb +0 -4
- data/lib/kaminari/grape.rb +0 -4
- data/lib/kaminari/helpers/action_view_extension.rb +0 -132
- data/lib/kaminari/helpers/paginator.rb +0 -195
- data/lib/kaminari/helpers/sinatra_helpers.rb +0 -176
- data/lib/kaminari/helpers/tags.rb +0 -108
- data/lib/kaminari/hooks.rb +0 -53
- data/lib/kaminari/models/active_record_extension.rb +0 -22
- data/lib/kaminari/models/active_record_model_extension.rb +0 -22
- data/lib/kaminari/models/active_record_relation_methods.rb +0 -42
- data/lib/kaminari/models/array_extension.rb +0 -66
- data/lib/kaminari/models/configuration_methods.rb +0 -48
- data/lib/kaminari/models/data_mapper_collection_methods.rb +0 -19
- data/lib/kaminari/models/data_mapper_extension.rb +0 -51
- data/lib/kaminari/models/mongo_mapper_extension.rb +0 -18
- data/lib/kaminari/models/mongoid_criteria_methods.rb +0 -40
- data/lib/kaminari/models/mongoid_extension.rb +0 -26
- data/lib/kaminari/models/page_scope_methods.rb +0 -73
- data/lib/kaminari/models/plucky_criteria_methods.rb +0 -23
- data/lib/kaminari/railtie.rb +0 -7
- data/lib/kaminari/sinatra.rb +0 -7
- data/spec/config/config_spec.rb +0 -91
- data/spec/fake_app/active_record/config.rb +0 -3
- data/spec/fake_app/active_record/models.rb +0 -65
- data/spec/fake_app/data_mapper/config.rb +0 -1
- data/spec/fake_app/data_mapper/models.rb +0 -27
- data/spec/fake_app/mongo_mapper/config.rb +0 -2
- data/spec/fake_app/mongo_mapper/models.rb +0 -9
- data/spec/fake_app/mongoid/config.rb +0 -20
- data/spec/fake_app/mongoid/models.rb +0 -38
- data/spec/fake_app/rails_app.rb +0 -56
- data/spec/fake_app/sinatra_app.rb +0 -22
- data/spec/fake_app/views/alternative/kaminari/_first_page.html.erb +0 -1
- data/spec/fake_app/views/alternative/kaminari/_paginator.html.erb +0 -3
- data/spec/fake_app/views/kaminari/bootstrap/_page.html.erb +0 -1
- data/spec/fake_app/views/kaminari/bootstrap/_paginator.html.erb +0 -7
- data/spec/fake_gem.rb +0 -20
- data/spec/generators/views_generator_spec.rb +0 -18
- data/spec/helpers/action_view_extension_spec.rb +0 -318
- data/spec/helpers/helpers_spec.rb +0 -144
- data/spec/helpers/sinatra_helpers_spec.rb +0 -223
- data/spec/helpers/tags_spec.rb +0 -140
- data/spec/models/active_record/active_record_relation_methods_spec.rb +0 -77
- data/spec/models/active_record/inherited_spec.rb +0 -9
- data/spec/models/active_record/scopes_spec.rb +0 -265
- data/spec/models/array_spec.rb +0 -172
- data/spec/models/configuration_methods_spec.rb +0 -125
- data/spec/models/data_mapper/data_mapper_spec.rb +0 -205
- data/spec/models/mongo_mapper/mongo_mapper_spec.rb +0 -84
- data/spec/models/mongoid/mongoid_spec.rb +0 -228
- data/spec/requests/users_spec.rb +0 -53
- data/spec/spec_helper.rb +0 -34
- data/spec/spec_helper_for_sinatra.rb +0 -34
- data/spec/support/database_cleaner.rb +0 -19
- data/spec/support/matchers.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 62a37b3deee187d19c0346edd24a455460fcbd9aa22a1759d72a6df40faf2285
|
4
|
+
data.tar.gz: e4094f7511aa1e57a3abab885f6c071685f31d0e6f04b7827a218ad2d23df8d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 163a7121c51a8a653ea4e29f6fd11375eebd4f24a38cf2f7022d8abe077d774993e2c2651e729ef868c8eb43e9517760210474d6568428193f170d6e708b3445
|
7
|
+
data.tar.gz: d9e0d3e3d9647da5d1791117d05c6543c5a59bf0a92d6e6f4c585cc1f23f3f8f13e27c07eaeb1c4e90d3e1c23a6452ae2fa03bf0e0027976f8d4161e7b91e42f
|
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"
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,64 +1,98 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
|
+
dist: xenial
|
4
|
+
|
5
|
+
services:
|
6
|
+
- postgresql
|
7
|
+
- mysql
|
8
|
+
|
3
9
|
rvm:
|
4
|
-
-
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- 2.3.
|
9
|
-
- jruby-
|
10
|
-
-
|
11
|
-
- rbx-2
|
10
|
+
- 2.7.0
|
11
|
+
- 2.6.3
|
12
|
+
- 2.5.5
|
13
|
+
- 2.4.5
|
14
|
+
- 2.3.8
|
15
|
+
- jruby-9.2.9.0
|
16
|
+
# - rbx-3
|
12
17
|
|
13
18
|
gemfile:
|
14
|
-
- gemfiles/
|
15
|
-
- gemfiles/
|
16
|
-
- gemfiles/
|
17
|
-
- gemfiles/
|
18
|
-
- gemfiles/active_record_41.gemfile
|
19
|
+
- gemfiles/active_record_60.gemfile
|
20
|
+
- gemfiles/active_record_52.gemfile
|
21
|
+
- gemfiles/active_record_51.gemfile
|
22
|
+
- gemfiles/active_record_50.gemfile
|
19
23
|
- gemfiles/active_record_42.gemfile
|
24
|
+
- gemfiles/active_record_41.gemfile
|
20
25
|
- gemfiles/active_record_edge.gemfile
|
21
|
-
- gemfiles/data_mapper_12.gemfile
|
22
|
-
- gemfiles/mongo_mapper.gemfile
|
23
|
-
- gemfiles/mongoid_30.gemfile
|
24
|
-
- gemfiles/mongoid_31.gemfile
|
25
|
-
- gemfiles/mongoid_40.gemfile
|
26
|
-
- gemfiles/mongoid_50.gemfile
|
27
|
-
- gemfiles/sinatra_13.gemfile
|
28
|
-
- gemfiles/sinatra_14.gemfile
|
29
|
-
|
30
|
-
sudo: false
|
31
26
|
|
32
|
-
|
27
|
+
env:
|
28
|
+
- DB=sqlite3
|
29
|
+
- DB=postgresql
|
30
|
+
- DB=mysql
|
33
31
|
|
34
|
-
|
32
|
+
before_install:
|
33
|
+
# install older versions of rubygems and bundler only on Ruby < 2.7
|
34
|
+
- if [ `echo "${TRAVIS_RUBY_VERSION:0:3} < 2.7" | bc` == 1 ]; then gem i rubygems-update -v '<3' && update_rubygems; fi;
|
35
|
+
- if [ `echo "${TRAVIS_RUBY_VERSION:0:3} < 2.7" | bc` == 1 ]; then gem i bundler -v '<2'; fi;
|
36
|
+
script: 'bundle exec rake test'
|
35
37
|
|
36
38
|
cache: bundler
|
37
39
|
|
38
40
|
matrix:
|
39
41
|
exclude:
|
40
|
-
- rvm:
|
42
|
+
- rvm: 2.7.0
|
43
|
+
gemfile: gemfiles/active_record_52.gemfile
|
44
|
+
- rvm: 2.7.0
|
45
|
+
gemfile: gemfiles/active_record_51.gemfile
|
46
|
+
- rvm: 2.7.0
|
47
|
+
gemfile: gemfiles/active_record_50.gemfile
|
48
|
+
- rvm: 2.7.0
|
49
|
+
gemfile: gemfiles/active_record_42.gemfile
|
50
|
+
- rvm: 2.7.0
|
51
|
+
gemfile: gemfiles/active_record_41.gemfile
|
52
|
+
- rvm: 2.6.3
|
53
|
+
gemfile: gemfiles/active_record_42.gemfile
|
54
|
+
- rvm: 2.6.3
|
55
|
+
gemfile: gemfiles/active_record_41.gemfile
|
56
|
+
- rvm: 2.5.5
|
57
|
+
gemfile: gemfiles/active_record_42.gemfile
|
58
|
+
- rvm: 2.5.5
|
59
|
+
gemfile: gemfiles/active_record_41.gemfile
|
60
|
+
- rvm: 2.4.5
|
41
61
|
gemfile: gemfiles/active_record_edge.gemfile
|
42
|
-
- rvm: 2.
|
43
|
-
gemfile: gemfiles/
|
44
|
-
- rvm: 2.
|
62
|
+
- rvm: 2.4.5
|
63
|
+
gemfile: gemfiles/active_record_60.gemfile
|
64
|
+
- rvm: 2.4.5
|
65
|
+
gemfile: gemfiles/active_record_42.gemfile
|
66
|
+
- rvm: 2.4.5
|
67
|
+
gemfile: gemfiles/active_record_41.gemfile
|
68
|
+
- rvm: 2.3.8
|
45
69
|
gemfile: gemfiles/active_record_edge.gemfile
|
46
|
-
- rvm: 2.
|
47
|
-
gemfile: gemfiles/
|
48
|
-
- rvm:
|
49
|
-
gemfile: gemfiles/
|
50
|
-
- rvm:
|
51
|
-
gemfile: gemfiles/
|
52
|
-
- rvm: 2.
|
53
|
-
gemfile: gemfiles/
|
54
|
-
- rvm: 2.
|
55
|
-
gemfile: gemfiles/
|
56
|
-
|
57
|
-
|
58
|
-
- rvm: jruby-1.7.25
|
70
|
+
- rvm: 2.3.8
|
71
|
+
gemfile: gemfiles/active_record_60.gemfile
|
72
|
+
- rvm: ruby-head
|
73
|
+
gemfile: gemfiles/active_record_42.gemfile
|
74
|
+
- rvm: ruby-head
|
75
|
+
gemfile: gemfiles/active_record_41.gemfile
|
76
|
+
- rvm: jruby-9.2.9.0
|
77
|
+
gemfile: gemfiles/active_record_42.gemfile
|
78
|
+
- rvm: jruby-9.2.9.0
|
79
|
+
gemfile: gemfiles/active_record_41.gemfile
|
80
|
+
include:
|
81
|
+
- rvm: ruby-head
|
59
82
|
gemfile: gemfiles/active_record_edge.gemfile
|
83
|
+
env: DB=sqlite3
|
84
|
+
- rvm: 2.2.10
|
85
|
+
gemfile: gemfiles/active_record_51.gemfile
|
86
|
+
env: DB=sqlite3
|
87
|
+
- rvm: 2.1.10
|
88
|
+
gemfile: gemfiles/active_record_42.gemfile
|
89
|
+
env: DB=sqlite3
|
90
|
+
- rvm: 2.0.0
|
91
|
+
gemfile: gemfiles/active_record_42.gemfile
|
92
|
+
env: DB=sqlite3
|
60
93
|
allow_failures:
|
61
|
-
- rvm:
|
62
|
-
- rvm: jruby-9.
|
63
|
-
- rvm: rbx-
|
94
|
+
- rvm: ruby-head
|
95
|
+
- rvm: jruby-9.2.9.0
|
96
|
+
# - rvm: rbx-3
|
97
|
+
- gemfile: gemfiles/active_record_edge.gemfile
|
64
98
|
fast_finish: true
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,636 @@
|
|
1
|
+
## 1.2.1
|
2
|
+
|
3
|
+
### Security Fixes:
|
4
|
+
|
5
|
+
* Added `original_script_name` parameter to the ignore list: #1020 [@viseztrance]
|
6
|
+
See CVE-2020-11082 for full details.
|
7
|
+
|
8
|
+
### Bug Fixes:
|
9
|
+
|
10
|
+
* Fixed a couple of grouped `total_count` regressions by reverting #979
|
11
|
+
|
12
|
+
|
13
|
+
## 1.2.0
|
14
|
+
|
15
|
+
### Deprecations:
|
16
|
+
|
17
|
+
* Deprecated `current_per_page` in favor of `limit_value`
|
18
|
+
|
19
|
+
### Enhancements:
|
20
|
+
|
21
|
+
* Added `#url_to_next_page` and `#url_to_prev_page` helper methods: [38e95a2](https://github.com/kaminari/kaminari/commit/38e95a262a210548c4f892aaa69d09ca8ecdce7f)
|
22
|
+
* Extracted url helper methods and packed them in `Kaminari::Helpers::UrlHelper`: [ff38bee](https://github.com/kaminari/kaminari/commit/ff38bee54b5be1a948f1118c0bfd829a72a1a502)
|
23
|
+
* Improved performance of `total_count` for grouped queries by explicitly giving SQL `select` clause #979 [@MmKolodziej]
|
24
|
+
* Added `LIMIT` to `total_count` query when `max_pages` presents #981 [@rymai]
|
25
|
+
|
26
|
+
### Bug Fixes:
|
27
|
+
|
28
|
+
* Fixed a bug where the `kaminari-mongoid` gem was not loaded properly: kaminari/kaminari-mongoid#9 [@DenniJensen]
|
29
|
+
* Fixed a bug where the `#total_count` method incorrectly calculates the total count: #932 [@tumayun]
|
30
|
+
* Fixed a bug where `empty?` breaks subsequent `last_page?` in without_count mode #1009 [@montdidier]
|
31
|
+
* Fixed kwargs warnings on Ruby 2.7 #1010 [@connorshea]
|
32
|
+
|
33
|
+
|
34
|
+
## 1.1.1
|
35
|
+
|
36
|
+
### Bug Fixes:
|
37
|
+
|
38
|
+
* Fixed a bug where `paginate ..., params: { controller: ..., action: ... }` didn't override the `params[:controller]` and `params[:action]` #919 [@chao-mu]
|
39
|
+
|
40
|
+
|
41
|
+
## 1.1.0
|
42
|
+
|
43
|
+
### Enhancements:
|
44
|
+
|
45
|
+
* Now the `page_entries_info` method respects the `I18n.locale` value when pluralizing the `entry_name` option #899 [@hundred]
|
46
|
+
* `require 'kaminari/core'` is no longer necessary when using `require 'kaminari/activerecord'` #896 [@yhara]
|
47
|
+
* Added the `#current_per_page` method to inspect current value of `per_page` #875 [#bfad]
|
48
|
+
* Better accesibility support by adding accessibility roles to pagination nav #848 [@frrrances]
|
49
|
+
|
50
|
+
### Bug Fixes:
|
51
|
+
|
52
|
+
* Fixed an issue where the command `rails g kaminari:views ...` stopped working due to a missing require #912 [@jvsoares]
|
53
|
+
* Fixed a bug where passing in `params` to the `link_to_next_page` or `link_to_previous_page` method raises an exception #874 [@5t111111]
|
54
|
+
|
55
|
+
|
56
|
+
## 1.0.1
|
57
|
+
|
58
|
+
### Bug Fixes:
|
59
|
+
|
60
|
+
* Added `required_ruby_version` to the gemspec #847 [@timoschilling]
|
61
|
+
|
62
|
+
* Fixed a regression where `per(nil)` uses `max_per_page` instead of `default_per_page` #813 [@merqlove]
|
63
|
+
|
64
|
+
* Fixed a regression where passing a String to `per()` aborts with ArgumentError #849 [@rafaelgonzalez]
|
65
|
+
|
66
|
+
* Fixed a bug where calling deprecated `max_pages_per` caused an Error on Rails 4 #852 [@tsuwatch]
|
67
|
+
|
68
|
+
|
69
|
+
## 1.0.0
|
70
|
+
|
71
|
+
### Breaking Changes:
|
72
|
+
|
73
|
+
* Dropped Ruby 1.9 support
|
74
|
+
|
75
|
+
* Dropped Rails 3.2 support
|
76
|
+
|
77
|
+
* Dropped Rails 4.0 support
|
78
|
+
|
79
|
+
* Removed Sinatra support that has been extracted to kaminari-sinatra gem
|
80
|
+
|
81
|
+
* Removed Mongoid support that has been extracted to kaminari-mongoid gem
|
82
|
+
|
83
|
+
* Removed MongoMapper support that has been extracted to kaminari-mongo_mapper gem
|
84
|
+
|
85
|
+
* Removed DataMapper support that has been extracted to kaminari-data_mapper gem
|
86
|
+
|
87
|
+
* Extracted Grape support to kaminari-grape gem and removed it from the core
|
88
|
+
|
89
|
+
* Splitted the gem into 3 internal gems:
|
90
|
+
* The core pagination logic (kaminari-core)
|
91
|
+
* Active Record adapter (kaminari-activerecord)
|
92
|
+
* Action View adapter (kaminari-actionview)
|
93
|
+
|
94
|
+
* Removed deprecated `num_pages` API in favor of `total_pages`
|
95
|
+
|
96
|
+
* Deprecated `-e haml` and `-e slim` options for the views generator
|
97
|
+
|
98
|
+
* Renamed the model class method for configuring `max_pages` from `max_pages_per` to `max_pages`
|
99
|
+
|
100
|
+
* Raise ZeroPerPageOperation when The number of pages was incalculable of `total_pages`, `current_page` methods
|
101
|
+
|
102
|
+
### Enhancements:
|
103
|
+
|
104
|
+
* Exposed `path_to_prev_page`, `path_to_next_page` helpers as public API #683 [@neilang]
|
105
|
+
|
106
|
+
* Added `--views_prefix` option for the views generator #668 [@antstorm]
|
107
|
+
|
108
|
+
* Added `max_paginates_per` scope method to overwrite model `max_paginates_per` config #754 [@rubyonme]
|
109
|
+
|
110
|
+
* Added `:paginator_class` option to specify a custom Paginator for `paginate` #740 [@watsonbox]
|
111
|
+
|
112
|
+
* Use I18n to pluralize entries in `page_entries_info` #694 [@Linuus]
|
113
|
+
|
114
|
+
* Added `without_count` #681 [@bryanrite]
|
115
|
+
|
116
|
+
* Omit select count query for `total_count` if it's calculable in Ruby level from loaded records
|
117
|
+
|
118
|
+
### Bug Fixes:
|
119
|
+
|
120
|
+
* Fixed a bug that a single page gap was displayed as "…"
|
121
|
+
|
122
|
+
```
|
123
|
+
before: ‹ 1 2 … 4 5 [6] 7 8 … 15 16 ›
|
124
|
+
after: ‹ 1 2 3 4 5 [6] 7 8 … 15 16 ›
|
125
|
+
```
|
126
|
+
|
127
|
+
* Fixed a bug where `paginate` changes request.format #540 [@jasonkim]
|
128
|
+
|
129
|
+
* Fixed a bug where `per(nil)` didn't respect `max_per_page` configuration #800 [@jonathanhefner]
|
130
|
+
|
131
|
+
* Fixed a bug that model class' `max_paginates_per` was ignored when it's smaller than the default `per_page`
|
132
|
+
|
133
|
+
* Preserve source location of the pagination method #812 [@ka8725]
|
134
|
+
|
135
|
+
* Preserve source location of the tag helpers
|
136
|
+
|
137
|
+
* Hide Next & Last buttons if page is out of range #712 [@igorkasyanchuk]
|
138
|
+
|
139
|
+
* Always buffer with `ActionView::OutputBuffer` if Action View is loaded #804 [@onemanstartup]
|
140
|
+
|
141
|
+
* Fixed `padding()` not to accept negative value #839 [@yo-gen]
|
142
|
+
|
143
|
+
* Fixed a bug where `total_count` used to return a wrong value with larger page value than total pages in `without_count` mode #845 [@denislins]
|
144
|
+
|
145
|
+
* Coerce `padding()` argument to Integer #840 [@pablocrivella]
|
146
|
+
|
147
|
+
|
148
|
+
## 0.17.0
|
149
|
+
|
150
|
+
* Rails 5 ready!
|
151
|
+
|
152
|
+
* Mongoid 5.0 support
|
153
|
+
|
154
|
+
* Dropped Ruby 1.8 support
|
155
|
+
|
156
|
+
* Dropped Mongoid 2.x support
|
157
|
+
|
158
|
+
* Extracted Sinatra support to kaminari-sinatra gem
|
159
|
+
|
160
|
+
* Extracted DataMapper support to kaminari-data_mapper gem
|
161
|
+
|
162
|
+
* Extracted Mongoid support to kaminari-mongoid gem
|
163
|
+
|
164
|
+
* Extracted MongoMapper support to kaminari-mongo_mapper gem
|
165
|
+
|
166
|
+
* Deprecated `Kaminari::PageScopeMethods#num_pages` in favor of `total_pages`
|
167
|
+
|
168
|
+
* Deprecated `:num_pages` option for `paginate` in favor of `:total_pages`
|
169
|
+
|
170
|
+
* Fixed mangled params in pagination links on Rails 5 #766 [@audionerd]
|
171
|
+
|
172
|
+
* Fixed a bug where the range of the records displayed on the last page doesn't match #718 [@danzanzini]
|
173
|
+
|
174
|
+
|
175
|
+
## 0.16.3
|
176
|
+
|
177
|
+
* Fixed a "stack level too deep" bug in mongoid #642 [@bartes]
|
178
|
+
|
179
|
+
* Fixed a bug that Kaminari possibly crashes when combined with other gems that define `inherited` method on model classes, such as aasm. #651 [@zeitnot]
|
180
|
+
|
181
|
+
|
182
|
+
## 0.16.2
|
183
|
+
|
184
|
+
* Fixed a bug where cloned Relations remember previous relations' `@total_count` value #565 [@inkstak]
|
185
|
+
|
186
|
+
* Fixed a bug where `paginate_array()` with `total_count` option returns whole array for every page #516 [@abhichvn]
|
187
|
+
|
188
|
+
* Fixed a bug where `:num_pages` option was backwards-incompatible #605 [@klebershimabuku]
|
189
|
+
|
190
|
+
* Fixed a bug where themed views generator attempts to overwrite README.md #623 [@swrobel]
|
191
|
+
|
192
|
+
* Fixed a bug that ruby raises a NameError when theme was not found #622 [@maxprokopiev]
|
193
|
+
|
194
|
+
* Fixed a bug that `paginates_per` does not work with subclasses on mongoid #634 [@kouyaf77]
|
195
|
+
|
196
|
+
* Show an error message if a proper template was not found for the generator theme #600 [@meltedice]
|
197
|
+
|
198
|
+
|
199
|
+
## 0.16.1
|
200
|
+
|
201
|
+
* Fix a bug where `:theme` option for #paginate method doesn't work properly #566 [@commstratdev]
|
202
|
+
|
203
|
+
|
204
|
+
## 0.16.0
|
205
|
+
|
206
|
+
* Add support for mongoid `max_scan` option #500 [@aptx4869]
|
207
|
+
|
208
|
+
* Add `link_to_previous_page` helper for Sinatra #504 [@ikeay]
|
209
|
+
|
210
|
+
* Add `:views_prefix` option to `#paginate` for alternative views directory #552 [@apotonick]
|
211
|
+
|
212
|
+
* Simplify `page_entries_info` by adding `entry_name` interface to each ORM
|
213
|
+
|
214
|
+
* Refer ActiveRecord::Base from top level namespace for more safety when inherited class's namespace has `ActiveRecord` constant #522 [@yuroyoro]
|
215
|
+
|
216
|
+
* Fix a bug where runtime persistence not taken into account with mongoid/kaminari #326 [@nubeod]
|
217
|
+
|
218
|
+
* Fix a bug where helper methods were not available from inside `paginator.render do ... end` block #239 [@damien-roche]
|
219
|
+
|
220
|
+
* Fix a bug where theme generator didn't work on Rails 4.1 #526 [@jimryan]
|
221
|
+
|
222
|
+
* Fix a bug that paginatable arrays with `total_count` option always returns whole array #516 [@abhichvn]
|
223
|
+
|
224
|
+
|
225
|
+
## 0.15.1
|
226
|
+
|
227
|
+
* `page_method_name` option was not working in 0.15.0 #481 [@mauriciopasquier]
|
228
|
+
|
229
|
+
* Use the mongoid criteria #length method to cache the count of the collection per criteria #484 [@camallen]
|
230
|
+
|
231
|
+
* Don't inherit `host`, `port`, and `protocol` from the given params
|
232
|
+
|
233
|
+
|
234
|
+
## 0.15.0
|
235
|
+
|
236
|
+
* Allow `count`, `total_count` to pass parameters to super #193 [@bsimpson]
|
237
|
+
|
238
|
+
* Add `max_pages` and `max_pages_per` methods to limit displayed pages per model or globally #301 [@zpieslak]
|
239
|
+
|
240
|
+
* Add support for Sinatra views overrides (add app views paths) #332 [@j15e]
|
241
|
+
|
242
|
+
* Fix wrong pagination when used with `padding` #359 [@vladimir-vg, @negipo]
|
243
|
+
|
244
|
+
* check for Hash in addition to OrderedHash, which seems to break in Rails 4, for total_count #369 [@aew]
|
245
|
+
|
246
|
+
* Make `to_s` in paginator threadsafe #374 [@bf4]
|
247
|
+
|
248
|
+
* Fix Missing partial Error when `paginate` called from different format template #381 [@joker1007]
|
249
|
+
|
250
|
+
* Add `PageScopeMethods#next_page`, `prev_page`, and `out_of_range?` [@yuki24]
|
251
|
+
|
252
|
+
* Use `html_safe` in view partials instead of `raw` fixed #73 [@zzak]
|
253
|
+
|
254
|
+
* Fix a bug that `PaginatableArray#total_pages` returns the wrong value #416 [@yuki24]
|
255
|
+
|
256
|
+
* Make `num_pages` to return the same value as `total_pages` for backward compat [@yuki24, @eitoball]
|
257
|
+
|
258
|
+
* Change `#page_entries_info` to use model name #340, #348 [@znz, @eitoball]
|
259
|
+
|
260
|
+
* Change scope to class method #433 [@kolodovskyy]
|
261
|
+
|
262
|
+
* Fix arity problem with Rails 4.1.0 #449 [@bricker]
|
263
|
+
|
264
|
+
|
265
|
+
## 0.14.1
|
266
|
+
|
267
|
+
* Changed the default "truncation" String from "..." to "…" #264 [@pjaspers]
|
268
|
+
|
269
|
+
* The theme generator is Github API v3 compatible now! #279 [@eitoball]
|
270
|
+
|
271
|
+
* Made `Kaminari.config.default_per_page` changeable again #280 [@yuki24]
|
272
|
+
|
273
|
+
|
274
|
+
## 0.14.0
|
275
|
+
|
276
|
+
* Grape framework support! #218 [@mrplum]
|
277
|
+
|
278
|
+
* Mongoid 3 ready! #238 [@shingara]
|
279
|
+
|
280
|
+
* Added `link_to_previous_page` helper #191 [@timgremore]
|
281
|
+
|
282
|
+
* Added helper to generate rel="next" and rel="prev" link tags for SEO #200 [@joe1chen]
|
283
|
+
|
284
|
+
* Added `max_per_page` configuration option #274 [@keiko0713]
|
285
|
+
|
286
|
+
This would be useful for the case when you are using user input `per_page` value but want to impose the upper bound.
|
287
|
+
|
288
|
+
* Added I18n to `page_entries_info` #207 [@plribeiro3000]
|
289
|
+
|
290
|
+
* Changed method name `num_pages` to `total_pages`
|
291
|
+
|
292
|
+
`num_pages` is still available as an alias of `total_pages`, but will be deprecated or removed in some future version.
|
293
|
+
|
294
|
+
* Changed the way `page_entries_info` behave so it can show appropriate names for models with namespace #207 [@plribeiro3000]
|
295
|
+
|
296
|
+
* Added `html_safe` to `page_entries_info` helper #190 [@lucapette]
|
297
|
+
|
298
|
+
* Fixed displayed number of items on each page w/ Mongoid 2.4.x and MongoMapper #194 [@dblock]
|
299
|
+
|
300
|
+
* Removed a unused local variable from templates from default tamplate #245 [@juno]
|
301
|
+
|
302
|
+
* Fixed `page_entry_info` to use the value of `entry_name` option when given collection is empty or a PaginatableArray #265, #277 [@eitoball]
|
303
|
+
|
304
|
+
* Added require 'dm-aggregates' in DataMapper hook #259 [@shingara]
|
305
|
+
|
306
|
+
|
307
|
+
## 0.13.0
|
308
|
+
|
309
|
+
* Rails 3.2 ready! #180 [@slbug]
|
310
|
+
|
311
|
+
* DataMapper support! #149 [@NoICE, @Ragmaanir]
|
312
|
+
|
313
|
+
* Sinatra & Padrino support! #179 [@udzura, @mlightner, @aereal]
|
314
|
+
|
315
|
+
* Added mongoid embedded documents support! #155 [@yuki24]
|
316
|
+
|
317
|
+
* Added `each_relevant_page` that only visits pages in the inner or outer windows. Performance improved, particularly with very large number of pages. #154 [@cbeer]
|
318
|
+
|
319
|
+
* Memoize count for AR when calling `total_count`. Increases performance for large datasets. #138 [@sarmiena]
|
320
|
+
|
321
|
+
* Added `page_entries_info` view helper #140 [@jeffreyiacono]
|
322
|
+
```
|
323
|
+
<%= page_entries_info @posts %>
|
324
|
+
#=> Displaying posts 6 - 10 of 26 in total
|
325
|
+
```
|
326
|
+
|
327
|
+
* Added `link_to_next_page` helper method that simply links to the next page
|
328
|
+
```
|
329
|
+
<%= link_to_next_page @posts, 'More' %>
|
330
|
+
#=> <a href="/posts?page=7" rel="next">More</a>
|
331
|
+
```
|
332
|
+
|
333
|
+
* Let one override the `rel` attribute for `link_to_next_page` helper #177 [@webmat]
|
334
|
+
|
335
|
+
* Added `total_count` param for PaginatableArray. Useful for when working with RSolr #141 [@samdalton]
|
336
|
+
|
337
|
+
* Changed `Kaminari.paginate_array` API to take a Hash `options` And specifying :limit & :offset immediately builds a pagination ready object
|
338
|
+
```ruby
|
339
|
+
# the following two are equivalent. Use whichever you like
|
340
|
+
Kaminari.paginate_array((1..100).to_a, limit: 10, offset: 10)
|
341
|
+
Kaminari.paginate_array((1..100).to_a).page(2).per(10)
|
342
|
+
```
|
343
|
+
|
344
|
+
* Added `padding` method to skip an arbitrary record count #60 [@aaronjensen]
|
345
|
+
```ruby
|
346
|
+
User.page(2).per(10).padding(3) # this will return users 14..23
|
347
|
+
```
|
348
|
+
|
349
|
+
* Made the pagination method name (defaulted to `page`) configurable #57, #162
|
350
|
+
```ruby
|
351
|
+
# you can use the config file and its generator for this
|
352
|
+
Kaminari.config.page_method_name = :paging
|
353
|
+
Article.paging(3).per(30)
|
354
|
+
```
|
355
|
+
|
356
|
+
* Only add extensions to direct descendents of ActiveRecord::Base #108 [@seejohnrun]
|
357
|
+
|
358
|
+
* AR models that were subclassed before Kaminari::ActiveRecordExtension is included pick up the extensions #119 [@pivotal-casebook]
|
359
|
+
|
360
|
+
* Avoid overwriting AR::Base inherited method #165 [@briandmcnabb]
|
361
|
+
|
362
|
+
* Stopped depending on Rails gem #159 [@alsemyonov]
|
363
|
+
|
364
|
+
* introduced Travis CI #181 [@hsbt]
|
365
|
+
|
366
|
+
|
367
|
+
## 0.12.4
|
368
|
+
|
369
|
+
* Support for `config.param_name` as lambda #102 [@ajrkerr]
|
370
|
+
|
371
|
+
* Stop duplicating `order_values` #65 [@zettabyte]
|
372
|
+
|
373
|
+
* Preserve select value (e.g. "distinct") when counting #77, #104 [@tbeauvais, @beatlevic]
|
374
|
+
|
375
|
+
|
376
|
+
## 0.12.3
|
377
|
+
|
378
|
+
* Haml 3.1 Support #96 [@FlyboyArt, @sonic921]
|
379
|
+
|
380
|
+
|
381
|
+
## 0.12.2
|
382
|
+
|
383
|
+
* Added MongoMapper Support #101 [@hamin]
|
384
|
+
|
385
|
+
* Add `first_page?` and `last_page?` to `page_scope_methods` #51 [@holinnn]
|
386
|
+
|
387
|
+
* Make sure that the paginate helper always returns a String #99 [@Draiken]
|
388
|
+
|
389
|
+
* Don't remove includes scopes from count if they are needed #100 [@flop]
|
390
|
+
|
391
|
+
|
392
|
+
## 0.12.1
|
393
|
+
|
394
|
+
* Slim template support #93 [@detrain]
|
395
|
+
|
396
|
+
* Use Kaminari.config to specify default value for `param_name` #94 [@avsej]
|
397
|
+
|
398
|
+
* Fixed "super called outside of method" error happened in particular versions of Ruby 1.8.7 #91 [@Skulli]
|
399
|
+
|
400
|
+
* `_paginate.html.erb` isn't rendered with custom theme #97 [@danlunde]
|
401
|
+
|
402
|
+
|
403
|
+
## 0.12.0
|
404
|
+
|
405
|
+
* General configuration options #41 #62 [@javierv, @iain]
|
406
|
+
|
407
|
+
You can now globally override some default values such as `default_per_page`, `window`, etc. via configuration file.
|
408
|
+
Also, here comes a generator command that generates the default configuration file into your app's config/initilizers directory.
|
409
|
+
|
410
|
+
* Generic pagination support for Array object #47 #68 #74 [@lda, @ened, @jianlin]
|
411
|
+
|
412
|
+
You can now paginate through any kind of Arrayish object in this way:
|
413
|
+
```ruby
|
414
|
+
Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)
|
415
|
+
```
|
416
|
+
|
417
|
+
* Fixed a serious performance regression on #count method in 0.11.0 [@ankane]
|
418
|
+
|
419
|
+
* Bugfix: Pass the real @params to `url_for` #90 [@utkarshkukreti]
|
420
|
+
|
421
|
+
* Fixed a gem packaging problem (circular dependency)
|
422
|
+
|
423
|
+
There was a packaging problem with Kaminari 0.11.0 that the gem depends on Kaminari gem. Maybe Jeweler + "gemspec" method didn't work well...
|
424
|
+
|
425
|
+
|
426
|
+
## 0.11.0
|
427
|
+
|
428
|
+
This release contains several backward incompatibilities on template API. You probably need to update your existing templates if you're already using your own custom theme.
|
429
|
+
|
430
|
+
* Merge `_current_page`, `_first_page_link`, `_last_page_link` and `_page_link` into one `_page` partial #28 [@GarthSnyder]
|
431
|
+
|
432
|
+
* Add real first/last page links, and use them by default instead of outer window #30 [@GarthSnyder]
|
433
|
+
|
434
|
+
* The disabled items should simply not be emitted, even as an empty span #30 [@GarthSnyder]
|
435
|
+
|
436
|
+
* Skip :order in `#count_all` so complex groups with generated columns don't blow up in SQL-land #61 [@keeran, @Empact]
|
437
|
+
|
438
|
+
* Ignore :include in `#count_all` to make it work better with polymorphic eager loading #80 [@njakobsen]
|
439
|
+
|
440
|
+
* Quick fix on `#count` to return the actual number of records on AR 3.0 #45 #50
|
441
|
+
|
442
|
+
* Removed "TERRIBLE HORRIBLE NO GOOD VERY BAD HACK" #82 [@janx, @flop, @pda]
|
443
|
+
|
444
|
+
* Allow for Multiple Themes #64 [@tmilewski]
|
445
|
+
|
446
|
+
* Themes can contain the whole application directory structure now
|
447
|
+
|
448
|
+
* Use `gemspec` method in Gemfile [@p_elliott]
|
449
|
+
|
450
|
+
|
451
|
+
## 0.10.4
|
452
|
+
|
453
|
+
* Do not break ActiveRecord::Base.descendants, by making sure to call super from ActiveRecord::Base.inherited #34 [@rolftimmermans]
|
454
|
+
|
455
|
+
* Fixed vanishing mongoid criteria after calling `page()` #26 [@tyok]
|
456
|
+
|
457
|
+
|
458
|
+
## 0.10.3
|
459
|
+
|
460
|
+
* Fixed a bug that `total_count()` didn't work when chained with `group()` scope #21 [@jgeiger]
|
461
|
+
|
462
|
+
* Fixed a bug that the paginate helper didn't work properly with an Ajax call #23 [@hjuskewycz]
|
463
|
+
|
464
|
+
|
465
|
+
## 0.10.2
|
466
|
+
|
467
|
+
* Added `:param_name` option to the pagination helper #10 [@ivanvr]
|
468
|
+
|
469
|
+
```haml
|
470
|
+
= paginate @users, :param_name => :pagina
|
471
|
+
```
|
472
|
+
|
473
|
+
|
474
|
+
## 0.10.1
|
475
|
+
|
476
|
+
* Fixed a bug that the whole `<nav>` section was not rendered in some cases [@GarthSnyder]
|
477
|
+
|
478
|
+
|
479
|
+
## 0.10.0
|
480
|
+
|
481
|
+
* Railtie initializer name is "kaminari" from now
|
482
|
+
|
483
|
+
* Changed bundler settings to work both on 1.9.2 and 1.8.7 #12 [@l15n]
|
484
|
+
|
485
|
+
* Fixed bugs encountered when running specs on Ruby 1.9.2 #12 [@l15n]
|
486
|
+
|
487
|
+
* Clean up documentation (formatting and editing) #12 [@l15n]
|
488
|
+
|
489
|
+
* Use `Proc.new` instead of lambda for `scoped_options` #13 [@l15n]
|
490
|
+
|
491
|
+
* Use AS hooks for loading AR #14 [@hasimo]
|
492
|
+
|
493
|
+
* Refactor scope definition with Concerns #15 [@l15n]
|
494
|
+
|
495
|
+
* Ensure `output_buffer` is always initialized #11 [@kichiro]
|
496
|
+
|
497
|
+
|
498
|
+
## 0.9.13
|
499
|
+
|
500
|
+
* Added Mongoid support #5 [@juno, @hibariya]
|
501
|
+
|
502
|
+
This means, Kaminari is now *ORM agnostic* ☇3☇3☇3
|
503
|
+
|
504
|
+
|
505
|
+
## 0.9.12
|
506
|
+
|
507
|
+
* Moved the whole pagination logic to the paginator partial so that users can touch it
|
508
|
+
|
509
|
+
Note: You need to update your `_paginator.html.*` if you've already customized it.
|
510
|
+
If you haven't overridden `_paginator.html.*` files, then probably there're nothing you have to do.
|
511
|
+
See this commit for the example: https://github.com/amatsuda/kaminari_themes/commit/2dfb41c
|
512
|
+
|
513
|
+
## 0.9.10
|
514
|
+
|
515
|
+
* the `per()` method accepts String, zero and minus value now #7 [@koic]
|
516
|
+
|
517
|
+
This enables you to do something like this:
|
518
|
+
```ruby
|
519
|
+
Model.page(params[:page]).per(params[:per])
|
520
|
+
```
|
521
|
+
|
522
|
+
* Added support for Gem Testers (http://gem-testers.org/) #8 [@joealba]
|
523
|
+
|
524
|
+
|
525
|
+
## 0.9.9
|
526
|
+
|
527
|
+
* `:params` option for the helper [@yomukaku_memo]
|
528
|
+
|
529
|
+
You can override each link's `url_for` option by this option
|
530
|
+
```haml
|
531
|
+
= paginate @users, :params => {:controller => 'users', :action => 'index2'}
|
532
|
+
```
|
533
|
+
|
534
|
+
* refactor tags
|
535
|
+
|
536
|
+
|
537
|
+
## 0.9.8
|
538
|
+
|
539
|
+
* I18n for the partials `:previous`, `:next`, and `:truncate` are externalized to the I18n resource.
|
540
|
+
|
541
|
+
|
542
|
+
## 0.9.7
|
543
|
+
|
544
|
+
* moved template themes to another repo https://github.com/amatsuda/kaminari_themes
|
545
|
+
|
546
|
+
|
547
|
+
## 0.9.6
|
548
|
+
|
549
|
+
* added `paginates_per` method for setting default `per_page` value for each model in a declarative way
|
550
|
+
|
551
|
+
```ruby
|
552
|
+
class Article < ActiveRecord::Base
|
553
|
+
paginates_per 10
|
554
|
+
end
|
555
|
+
```
|
556
|
+
|
557
|
+
|
558
|
+
## 0.9.5
|
559
|
+
|
560
|
+
* works on AR 3.0.0 and 3.0.1 now #4 [@danillos]
|
561
|
+
|
562
|
+
|
563
|
+
## 0.9.4
|
564
|
+
|
565
|
+
* introduced module based tags
|
566
|
+
|
567
|
+
As a side effect of this internal change, I have to confess that this version brings you a slight backward incompatibility on template API.
|
568
|
+
If you're using custom templates, be sure to update your existing templates. To catch up the new API, you need to update %w[next_url prev_url page_url] local variables to simple 'url' like this. https://github.com/amatsuda/kaminari/commit/da88729
|
569
|
+
|
570
|
+
|
571
|
+
## 0.9.3
|
572
|
+
|
573
|
+
* improved template detection logic
|
574
|
+
|
575
|
+
When a template for a tag could not be found in the app/views/kaminari/ directory, it searches the tag's ancestor template files before falling back to engine's default template. This may help keeping your custom templates DRY.
|
576
|
+
|
577
|
+
* simplified bundled template themes
|
578
|
+
|
579
|
+
|
580
|
+
## 0.9.2
|
581
|
+
|
582
|
+
* stop adding extra LF between templates when joining
|
583
|
+
|
584
|
+
* githubish template theme [@maztomo]
|
585
|
+
|
586
|
+
|
587
|
+
## 0.9.1
|
588
|
+
|
589
|
+
* googlish template theme [@maztomo]
|
590
|
+
|
591
|
+
|
592
|
+
## 0.9.0
|
593
|
+
|
594
|
+
* added `per_page` to the template local variables #3 [@hsbt]
|
595
|
+
|
596
|
+
* show no contents when the current page is the only page (in other words, `num_pages == 1`) #2 [@hsbt]
|
597
|
+
|
598
|
+
|
599
|
+
## 0.8.0
|
600
|
+
|
601
|
+
* using HTML5 `<nav>` tag rather than `<div>` for the container tag
|
602
|
+
|
603
|
+
|
604
|
+
## 0.7.0
|
605
|
+
|
606
|
+
* Ajaxified paginator templates
|
607
|
+
|
608
|
+
|
609
|
+
## 0.6.0
|
610
|
+
|
611
|
+
* Hamlized paginator templates
|
612
|
+
|
613
|
+
|
614
|
+
## 0.5.0
|
615
|
+
|
616
|
+
* reset `content_for :kaminari_paginator_tags` before rendering #1 [@hsbt]
|
617
|
+
|
618
|
+
|
619
|
+
## 0.4.0
|
620
|
+
|
621
|
+
* partialize the outer div
|
622
|
+
|
623
|
+
|
624
|
+
## 0.3.0
|
625
|
+
|
626
|
+
* suppress logging when rendering each partial
|
627
|
+
|
628
|
+
|
629
|
+
## 0.2.0
|
630
|
+
|
631
|
+
* default `PER_PAGE` to 25 [@hsbt]
|
632
|
+
|
633
|
+
|
634
|
+
## 0.1.0
|
635
|
+
|
636
|
+
* First release
|