pagy 4.10.0 → 4.10.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
2
  SHA256:
3
- metadata.gz: ac5363f9e7c7fa6c00eda0eae38e2ce292bac8f1afede24c2bf1bf71d874d3f6
4
- data.tar.gz: 0ab42911923b12cbcc7cbe39f2d933cac8a196299ead6c61f69fc589b9c6269e
3
+ metadata.gz: dfababb2b5f9594ebcf7827cde7c45e9073ba9a270ddca251714e0d8fa1ef711
4
+ data.tar.gz: b20c84d4099a7302d6324fa671001051275d01d363eff5b6007d4240b1700d8a
5
5
  SHA512:
6
- metadata.gz: 565141342d7be4697ae7f63422fa959597fd8a5a519739a43cfccd34a24f1df24a94df8adb0837a4986b699aed4a73efe3dd2d960a4de304fd04643de628626b
7
- data.tar.gz: 6c99c7c414c28120d777b50a0f8555118b168d02fa53fd94d9a672be1984debb986b9cefaec9d58d2a35905ae9693cf951cbfaf88387b44557851e015e8ccfa2
6
+ metadata.gz: ba6eadeb0285c6dcf1ae98dfe58fe8844916f3d517813fbc8add6b5b0e0d3933234e26eb15c9fa931c7fccd256844df26d72694f23a3596fa874c3288a4fd4aa
7
+ data.tar.gz: 35d1b022f3d4c85521e69b960be16812c5ffe276e1a015e6fa9ce1630f1abf05486908568585dcd0257fee4d2fb304fe6296839404a9091e54a3c6fa10d0068b
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (4.10.0)
3
+ # Pagy initializer file (4.10.1)
4
4
  # Customize only what you really need and notice that Pagy works also without any of the following lines.
5
5
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  function Pagy(){}
4
4
 
5
- Pagy.version = '4.10.0'
5
+ Pagy.version = '4.10.1'
6
6
 
7
7
  Pagy.delay = 100
8
8
 
data/lib/pagy.rb CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  # main class
7
7
  class Pagy
8
- VERSION = '4.10.0'
8
+ VERSION = '4.10.1'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
@@ -15,9 +15,9 @@ class Pagy
15
15
 
16
16
  # create a Pagy object from a Meilisearch results
17
17
  def self.new_from_meilisearch(results, vars={})
18
- vars[:items] = results.raw_answer[:limit]
19
- vars[:page] = [results.raw_answer[:offset] / vars[:items], 1].max
20
- vars[:count] = results.raw_answer[:nbHits]
18
+ vars[:items] = results.raw_answer['limit']
19
+ vars[:page] = [results.raw_answer['offset'] / vars[:items], 1].max
20
+ vars[:count] = results.raw_answer['nbHits']
21
21
  new(vars)
22
22
  end
23
23
 
@@ -32,7 +32,7 @@ class Pagy
32
32
  options[:limit] = vars[:items]
33
33
  options[:offset] = (vars[:page] - 1) * vars[:items]
34
34
  results = model.search(term, **options)
35
- vars[:count] = results.raw_answer[:nbHits]
35
+ vars[:count] = results.raw_answer['nbHits']
36
36
 
37
37
  pagy = Pagy.new(vars)
38
38
  # with :last_page overflow we need to re-run the method in order to get the hits
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.0
4
+ version: 4.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-23 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
14
14
  and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,