kaminari 1.0.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7b67b58621c8bfea03f5ff946d94c6f01807052c
4
- data.tar.gz: d6f12bc97f4350a70f156e7e7fd9353d37511c7a
2
+ SHA256:
3
+ metadata.gz: 62a37b3deee187d19c0346edd24a455460fcbd9aa22a1759d72a6df40faf2285
4
+ data.tar.gz: e4094f7511aa1e57a3abab885f6c071685f31d0e6f04b7827a218ad2d23df8d0
5
5
  SHA512:
6
- metadata.gz: 734dd1c489691a13723280886ec8e2daf36128992ebe89a7e989f863aa3a50b58a32bc89ef12cd891e9b06d466b4cb8d7665528bb5e98855fa45d4c5c6620d01
7
- data.tar.gz: 43bf0b17a8e83db3105a0995b74f24ae24c5f9f56e8daa5a8676b837fc19a5e83e5f75c35989dda89e241741b667716ddcd8442d603d6cc10a5834281d8bcb4d
6
+ metadata.gz: 163a7121c51a8a653ea4e29f6fd11375eebd4f24a38cf2f7022d8abe077d774993e2c2651e729ef868c8eb43e9517760210474d6568428193f170d6e708b3445
7
+ data.tar.gz: d9e0d3e3d9647da5d1791117d05c6543c5a59bf0a92d6e6f4c585cc1f23f3f8f13e27c07eaeb1c4e90d3e1c23a6452ae2fa03bf0e0027976f8d4161e7b91e42f
@@ -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
@@ -7,3 +7,4 @@ pkg/*
7
7
 
8
8
  doc
9
9
  log
10
+ *.sqlite3
@@ -1,48 +1,98 @@
1
1
  language: ruby
2
- dist: trusty
2
+
3
+ dist: xenial
4
+
5
+ services:
6
+ - postgresql
7
+ - mysql
3
8
 
4
9
  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.6.0
12
- - rbx-3
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
13
17
 
14
18
  gemfile:
19
+ - gemfiles/active_record_60.gemfile
20
+ - gemfiles/active_record_52.gemfile
21
+ - gemfiles/active_record_51.gemfile
15
22
  - gemfiles/active_record_50.gemfile
16
23
  - gemfiles/active_record_42.gemfile
17
24
  - gemfiles/active_record_41.gemfile
18
25
  - gemfiles/active_record_edge.gemfile
19
26
 
20
- sudo: false
27
+ env:
28
+ - DB=sqlite3
29
+ - DB=postgresql
30
+ - DB=mysql
21
31
 
22
- before_install: gem update bundler --no-document
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;
23
36
  script: 'bundle exec rake test'
24
37
 
25
38
  cache: bundler
26
39
 
27
40
  matrix:
28
41
  exclude:
29
- - rvm: 2.0.0
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
30
47
  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
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
36
61
  gemfile: gemfiles/active_record_edge.gemfile
37
- - rvm: 2.4.0
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
38
67
  gemfile: gemfiles/active_record_41.gemfile
39
- - rvm: 2.4.0
68
+ - rvm: 2.3.8
69
+ gemfile: gemfiles/active_record_edge.gemfile
70
+ - rvm: 2.3.8
71
+ gemfile: gemfiles/active_record_60.gemfile
72
+ - rvm: ruby-head
40
73
  gemfile: gemfiles/active_record_42.gemfile
41
74
  - rvm: ruby-head
42
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
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
43
93
  allow_failures:
44
94
  - rvm: ruby-head
45
- - rvm: jruby-9.1.6.0
46
- - rvm: rbx-3
95
+ - rvm: jruby-9.2.9.0
96
+ # - rvm: rbx-3
47
97
  - gemfile: gemfiles/active_record_edge.gemfile
48
98
  fast_finish: true
@@ -1,3 +1,71 @@
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
+
1
69
  ## 1.0.0
2
70
 
3
71
  ### Breaking Changes:
@@ -29,6 +97,8 @@
29
97
 
30
98
  * Renamed the model class method for configuring `max_pages` from `max_pages_per` to `max_pages`
31
99
 
100
+ * Raise ZeroPerPageOperation when The number of pages was incalculable of `total_pages`, `current_page` methods
101
+
32
102
  ### Enhancements:
33
103
 
34
104
  * Exposed `path_to_prev_page`, `path_to_next_page` helpers as public API #683 [@neilang]
@@ -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
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  source 'https://rubygems.org'
3
4
 
4
5
  # Specify your gem's dependencies in kaminari.gemspec
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Kaminari [![Build Status](https://travis-ci.org/amatsuda/kaminari.svg)](http://travis-ci.org/amatsuda/kaminari) [![Code Climate](https://img.shields.io/codeclimate/github/amatsuda/kaminari.svg)](https://codeclimate.com/github/amatsuda/kaminari) [![Inch CI](http://inch-ci.org/github/amatsuda/kaminari.svg)](http://inch-ci.org/github/amatsuda/kaminari)
1
+ # Kaminari [![Build Status](https://travis-ci.org/kaminari/kaminari.svg)](http://travis-ci.org/kaminari/kaminari) [![Code Climate](https://codeclimate.com/github/kaminari/kaminari/badges/gpa.svg)](https://codeclimate.com/github/kaminari/kaminari) [![Inch CI](http://inch-ci.org/github/kaminari/kaminari.svg)](http://inch-ci.org/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 `
30
30
 
31
31
  ## Supported Versions
32
32
 
33
- * Ruby 2.0.0, 2.1.x, 2.2.x, 2.3.x, 2.4
33
+ * Ruby 2.0.0, 2.1.x, 2.2.x, 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7.x, 2.8
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
36
36
 
37
- * Sinatra 1.4
37
+ * Sinatra 1.4, 2.0
38
38
 
39
39
  * Haml 3+
40
40
 
@@ -74,6 +74,19 @@ 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
+ You can get page numbers or page conditions by using below methods.
78
+ ```ruby
79
+ User.count #=> 1000
80
+ User.page(1).limit_value #=> 20
81
+ User.page(1).total_pages #=> 50
82
+ User.page(1).current_page #=> 1
83
+ User.page(1).next_page #=> 2
84
+ User.page(2).prev_page #=> 1
85
+ User.page(1).first_page? #=> true
86
+ User.page(50).last_page? #=> true
87
+ User.page(100).out_of_range? #=> true
88
+ ```
89
+
77
90
  ### The `per` Scope
78
91
 
79
92
  To show a lot more users per each page (change the `per_page` value)
@@ -105,6 +118,14 @@ User.page(7).per(50).padding(3)
105
118
 
106
119
  Note that the `padding` scope also is not directly defined on the models.
107
120
 
121
+ ### Unscoping
122
+
123
+ If for some reason you need to unscope `page` and `per` methods you can call `except(:limit, :offset)`
124
+
125
+ ```ruby
126
+ users = User.page(7).per(50)
127
+ unpaged_users = users.except(:limit, :offset) # unpaged_users will not use the kaminari scopes
128
+ ```
108
129
 
109
130
  ## Configuring Kaminari
110
131
 
@@ -207,7 +228,7 @@ page.
207
228
  <%= paginate @users, outer_window: 3 %>
208
229
  ```
209
230
 
210
- This would output something like `1 2 3 4 ...(snip)... 17 18 19 20` while having 20 pages in total.
231
+ This would output something like `1 2 3 ...(snip)... 18 19 20` while having 20 pages in total.
211
232
 
212
233
  ### Outer Window Can Be Separately Specified by left, right (0 by default)
213
234
 
@@ -428,6 +449,13 @@ You can specify the `total_count` value through options Hash. This would be help
428
449
  @paginatable_array = Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
429
450
  ```
430
451
 
452
+ or, in the case of using an external API to source the page of data:
453
+ ```ruby
454
+ page_size = 10
455
+ one_page = get_page_of_data params[:page], page_size
456
+ @paginatable_array = Kaminari.paginate_array(one_page.data, total_count: one_page.total_count).page(params[:page]).per(page_size)
457
+ ```
458
+
431
459
 
432
460
  ## Creating Friendly URLs and Caching
433
461
 
@@ -484,7 +512,7 @@ gem 'kaminari-actionview'
484
512
 
485
513
  Kaminari currently provides adapters for the following ORMs:
486
514
 
487
- * Active Record: https://github.com/amatsuda/kaminari/tree/master/kaminari-activerecord (included in this repo)
515
+ * Active Record: https://github.com/kaminari/kaminari/tree/master/kaminari-activerecord (included in this repo)
488
516
  * Mongoid: https://github.com/kaminari/kaminari-mongoid
489
517
  * MongoMapper: https://github.com/kaminari/kaminari-mongo_mapper
490
518
  * DataMapper: https://github.com/kaminari/kaminari-data_mapper (would not work on kaminari 1.0.x)
@@ -500,14 +528,14 @@ gem 'kaminari-sinatra'
500
528
 
501
529
  Kaminari currently provides adapters for the following web frameworks:
502
530
 
503
- * Action View: https://github.com/amatsuda/kaminari/tree/master/kaminari-actionview (included in this repo)
531
+ * Action View: https://github.com/kaminari/kaminari/tree/master/kaminari-actionview (included in this repo)
504
532
  * Sinatra: https://github.com/kaminari/kaminari-sinatra
505
533
  * Grape: https://github.com/kaminari/kaminari-grape
506
534
 
507
535
 
508
536
  ## For More Information
509
537
 
510
- Check out Kaminari recipes on the GitHub Wiki for more advanced tips and techniques. https://github.com/amatsuda/kaminari/wiki/Kaminari-recipes
538
+ Check out Kaminari recipes on the GitHub Wiki for more advanced tips and techniques. https://github.com/kaminari/kaminari/wiki/Kaminari-recipes
511
539
 
512
540
 
513
541
  ## Questions, Feedback
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,14 +5,18 @@ 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', '>= 1.3.0'
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
21
  platforms :rbx do
18
22
  gem 'rubysl', '~> 2.0'
@@ -5,14 +5,18 @@ 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', '>= 1.3.0'
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
21
  platforms :rbx do
18
22
  gem 'rubysl', '~> 2.0'
@@ -5,10 +5,14 @@ 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', '>= 1.3.0'
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
17
  platforms :rbx do
14
18
  gem 'rubysl', '~> 2.0'
@@ -0,0 +1,24 @@
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
+ platforms :rbx do
18
+ gem 'rubysl', '~> 2.0'
19
+ gem 'racc'
20
+ gem 'minitest'
21
+ gem 'rubinius-developer_tools'
22
+ end
23
+
24
+ gemspec path: '../'
@@ -0,0 +1,24 @@
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
+ platforms :rbx do
18
+ gem 'rubysl', '~> 2.0'
19
+ gem 'racc'
20
+ gem 'minitest'
21
+ gem 'rubinius-developer_tools'
22
+ end
23
+
24
+ gemspec path: '../'
@@ -0,0 +1,26 @@
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
+ platforms :rbx do
20
+ gem 'rubysl', '~> 2.0'
21
+ gem 'racc'
22
+ gem 'minitest'
23
+ gem 'rubinius-developer_tools'
24
+ end
25
+
26
+ gemspec path: '../'
@@ -11,18 +11,17 @@ github 'rails/rails' do
11
11
  gem 'actionview', require: 'action_view'
12
12
  end
13
13
 
14
- gem 'rack', github: 'rack/rack'
15
- gem 'arel', github: 'rails/arel'
14
+ gem 'selenium-webdriver'
16
15
 
17
16
  platforms :ruby do
18
- if RUBY_VERSION > "2.1.0"
19
- gem 'sqlite3'
20
- else
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
26
  platforms :rbx do
28
27
  gem 'rubysl', '~> 2.0'
@@ -1,29 +1,31 @@
1
- # -*- encoding: utf-8 -*-
2
1
  # frozen_string_literal: true
2
+
3
3
  $:.push File.expand_path("../lib", __FILE__)
4
4
  require "kaminari/version"
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = 'kaminari'
8
- s.version = Kaminari::VERSION
9
- s.authors = ['Akira Matsuda', 'Yuki Nishijima', 'Zachary Scott', 'Hiroshi Shibata']
10
- s.email = ['ronnie@dio.jp']
11
- s.homepage = 'https://github.com/amatsuda/kaminari'
12
- s.summary = 'A pagination engine plugin for Rails 4+ and other modern frameworks'
13
- s.description = 'Kaminari is a Scope & Engine based, clean, powerful, agnostic, customizable and sophisticated paginator for Rails 4+'
14
- s.license = "MIT"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'kaminari'
8
+ spec.version = Kaminari::VERSION
9
+ spec.authors = ['Akira Matsuda', 'Yuki Nishijima', 'Zachary Scott', 'Hiroshi Shibata']
10
+ spec.email = ['ronnie@dio.jp']
11
+ spec.homepage = 'https://github.com/kaminari/kaminari'
12
+ spec.summary = 'A pagination engine plugin for Rails 4+ and other modern frameworks'
13
+ spec.description = 'Kaminari is a Scope & Engine based, clean, powerful, agnostic, customizable and sophisticated paginator for Rails 4+'
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files | egrep -v 'kaminari-(core|actionview|activerecord)' | grep -v '^test'`.split("\n")
17
+ spec.require_paths = ['lib']
15
18
 
16
- s.files = `git ls-files | egrep -v 'kaminari-(core|actionview|activerecord)' | grep -v '^test'`.split("\n")
17
- s.require_paths = ['lib']
19
+ spec.required_ruby_version = '>= 2.0.0'
18
20
 
19
- s.add_dependency 'activesupport', '>= 4.1.0'
20
- s.add_dependency 'kaminari-core', Kaminari::VERSION
21
- s.add_dependency 'kaminari-actionview', Kaminari::VERSION
22
- s.add_dependency 'kaminari-activerecord', Kaminari::VERSION
21
+ spec.add_dependency 'activesupport', '>= 4.1.0'
22
+ spec.add_dependency 'kaminari-core', Kaminari::VERSION
23
+ spec.add_dependency 'kaminari-actionview', Kaminari::VERSION
24
+ spec.add_dependency 'kaminari-activerecord', Kaminari::VERSION
23
25
 
24
- s.add_development_dependency 'test-unit-rails'
25
- s.add_development_dependency 'bundler', '>= 1.0.0'
26
- s.add_development_dependency 'rake', '>= 0'
27
- s.add_development_dependency 'rr', '>= 0'
28
- s.add_development_dependency 'capybara', '>= 1.0'
26
+ spec.add_development_dependency 'test-unit-rails'
27
+ spec.add_development_dependency 'bundler', '>= 1.0.0'
28
+ spec.add_development_dependency 'rake', '>= 0'
29
+ spec.add_development_dependency 'rr', '>= 0'
30
+ spec.add_development_dependency 'capybara', '>= 1.0'
29
31
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'kaminari/core'
3
4
  require 'kaminari/actionview'
4
5
  require 'kaminari/activerecord'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Kaminari
3
- VERSION = '1.0.0'
4
+ VERSION = '1.2.1'
4
5
  end
@@ -11,8 +11,8 @@ gemfile(true) do
11
11
  gem "railties", "5.0.1"
12
12
  gem "activerecord", "5.0.1"
13
13
  gem "sqlite3"
14
- gem "kaminari-core", "1.0.0"
15
- gem "kaminari-activerecord", "1.0.0"
14
+ gem "kaminari-core"
15
+ gem "kaminari-activerecord"
16
16
  end
17
17
 
18
18
  require "active_record"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaminari
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-01-10 00:00:00.000000000 Z
14
+ date: 2020-05-27 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.0.0
36
+ version: 1.2.1
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.0.0
43
+ version: 1.2.1
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.0.0
50
+ version: 1.2.1
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.0.0
57
+ version: 1.2.1
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.0.0
64
+ version: 1.2.1
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.0.0
71
+ version: 1.2.1
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: test-unit-rails
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +147,7 @@ executables: []
147
147
  extensions: []
148
148
  extra_rdoc_files: []
149
149
  files:
150
+ - ".codeclimate.yml"
150
151
  - ".document"
151
152
  - ".gitignore"
152
153
  - ".travis.yml"
@@ -159,12 +160,15 @@ 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
162
166
  - gemfiles/active_record_edge.gemfile
163
167
  - kaminari.gemspec
164
168
  - lib/kaminari.rb
165
169
  - lib/kaminari/version.rb
166
170
  - misc/bug_report_template.rb
167
- homepage: https://github.com/amatsuda/kaminari
171
+ homepage: https://github.com/kaminari/kaminari
168
172
  licenses:
169
173
  - MIT
170
174
  metadata: {}
@@ -176,15 +180,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
180
  requirements:
177
181
  - - ">="
178
182
  - !ruby/object:Gem::Version
179
- version: '0'
183
+ version: 2.0.0
180
184
  required_rubygems_version: !ruby/object:Gem::Requirement
181
185
  requirements:
182
186
  - - ">="
183
187
  - !ruby/object:Gem::Version
184
188
  version: '0'
185
189
  requirements: []
186
- rubyforge_project:
187
- rubygems_version: 2.6.8
190
+ rubygems_version: 3.2.0.pre1
188
191
  signing_key:
189
192
  specification_version: 4
190
193
  summary: A pagination engine plugin for Rails 4+ and other modern frameworks