pagy 0.8.1 → 0.8.2

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
2
  SHA256:
3
- metadata.gz: 9fc2f90371fc435135b19f4ee4be00d69cdf946cb925babfb6646b03306d62c5
4
- data.tar.gz: fd07adf8fe473bc5e6aaf644a7d08fb1de9352b7aec204338cd11c26f610c12c
3
+ metadata.gz: 9c540ef29200104732d3123cddfd7490cbfdee6084a0da2e6d7608806a131d35
4
+ data.tar.gz: 87103c5d8d1b3a6fd37149f6c333cd674d1f140af02a923415d57c7023c6bb7d
5
5
  SHA512:
6
- metadata.gz: bc0a479d3bd32c7f06814912d107079e1c31f1c73f3033a4d69566ade0b98339d5104371e3b59932dd00134605b6c2e46d1b6db89ba5ef88f060d81006519c87
7
- data.tar.gz: 1aa594ad6986364960fe70df3cad7f41474e66f8b6fb9995d075195ea340661bc729c8b6459c9f8eed190fc7bb447d2b4456a09127fe74e255f7f7bec01c19fd
6
+ metadata.gz: 3128af4fcb7b0e4196c324e2ba7565784c9e90a30911814913a2116c833dcc505c35f4605f82f7010d7f5e433209391f45bc29c09fbb47c80815a30db67cefad
7
+ data.tar.gz: 35cd02a10243dc4f4491c812b559f83e6ebdc2e74173221f19a295e7086063634be219256bed6799691d066d54fa6407de7be96cdfb0ffa54fda1890e3cd67c4
data/lib/pagy.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'pathname'
4
4
 
5
- class Pagy ; VERSION = '0.8.1'
5
+ class Pagy ; VERSION = '0.8.2'
6
6
 
7
7
  class OutOfRangeError < StandardError; end
8
8
 
data/lib/pagy/backend.rb CHANGED
@@ -18,7 +18,7 @@ class Pagy
18
18
  # sub-method called only by #pagy: here for easy customization of variables by overriding
19
19
  def pagy_get_vars(collection, vars)
20
20
  # return the merged variables to initialize the pagy object
21
- { count: collection.count,
21
+ { count: collection.count(:all),
22
22
  page: params[vars[:page_param]||VARS[:page_param]] }.merge!(vars)
23
23
  end
24
24
 
@@ -35,7 +35,9 @@
35
35
 
36
36
  # Non Core Variables (See https://ddnexus.github.io/pagy/api/pagy#non-core-variables)
37
37
  # Pagy::VARS[:size] = [1,4,4,1] # default
38
- # Pagy::Vars[:page_param] = :page # default
38
+ # Pagy::VARS[:page_param] = :page # default
39
+ # Pagy::VARS[:params] = {} # default
40
+ # Pagy::VARS[:anchor] = '#anchor' # example
39
41
  # Pagy::VARS[:link_extra] = 'data-remote="true"' # example
40
42
  # Pagy::VARS[:item_path] = 'activerecord.models.product' # example
41
43
 
data/pagy.gemspec CHANGED
@@ -1,41 +1,19 @@
1
-
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'pagy'
5
- require 'date'
6
4
 
7
5
  Gem::Specification.new do |s|
8
6
  s.name = 'pagy'
9
7
  s.version = Pagy::VERSION
10
8
  s.authors = ['Domizio Demichelis']
11
9
  s.email = ['dd.nexus@gmail.com']
12
- s.date = Date.today.to_s
13
-
14
10
  s.summary = 'The Ultimate Pagination Ruby Gem'
15
11
  s.description = 'Agnostic pagination in plain ruby: it works with any framework, ORM and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays, JSON data... and just whatever you can count. Easy to use and customize, very fast and very light.'
16
12
  s.homepage = 'https://github.com/ddnexus/pagy'
17
13
  s.license = 'MIT'
18
- s.require_paths = ['lib']
19
-
20
14
  s.files = `git ls-files -z`.split("\x0").select{|f| f.start_with?('lib', 'pagy.gemspec', 'LICENSE') }
15
+ s.required_ruby_version = '>= 2.3.0'
21
16
 
22
-
23
- s.add_development_dependency 'bundler', '~> 1.16'
24
- s.add_development_dependency 'rake', '~> 10.0'
25
- s.add_development_dependency 'minitest', '~> 5.0'
26
- s.add_development_dependency 'rack'
27
- s.add_development_dependency 'slim'
28
- s.add_development_dependency 'haml'
29
- s.add_development_dependency 'benchmark-ips'
30
- s.add_development_dependency 'kalibera'
31
- s.add_development_dependency 'memory_profiler'
32
- s.add_development_dependency 'rubocop', '~> 0.55.0' # needs to be fixed since it constantly adds new cops
33
-
34
-
35
- s.post_install_message = <<END_OF_MESSAGE
36
- ******************************************************************************
37
- Pagy CHANGELOG: https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md
38
- ******************************************************************************
39
- END_OF_MESSAGE
40
-
17
+ # remove after 1.0
18
+ s.post_install_message = "Pagy CHANGELOG: https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md"
41
19
  end
metadata CHANGED
@@ -1,155 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '5.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rack
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: slim
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: haml
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: benchmark-ips
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: kalibera
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: memory_profiler
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 0.55.0
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 0.55.0
11
+ date: 2018-06-01 00:00:00.000000000 Z
12
+ dependencies: []
153
13
  description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
154
14
  and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
155
15
  JSON data... and just whatever you can count. Easy to use and customize, very fast
@@ -184,10 +44,7 @@ homepage: https://github.com/ddnexus/pagy
184
44
  licenses:
185
45
  - MIT
186
46
  metadata: {}
187
- post_install_message: |
188
- ******************************************************************************
189
- Pagy CHANGELOG: https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md
190
- ******************************************************************************
47
+ post_install_message: 'Pagy CHANGELOG: https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md'
191
48
  rdoc_options: []
192
49
  require_paths:
193
50
  - lib
@@ -195,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
52
  requirements:
196
53
  - - ">="
197
54
  - !ruby/object:Gem::Version
198
- version: '0'
55
+ version: 2.3.0
199
56
  required_rubygems_version: !ruby/object:Gem::Requirement
200
57
  requirements:
201
58
  - - ">="