pagy 3.8.1 → 3.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: 7ea52feecd4bb597b050def40adc283602005ff5e92b4df578228e05d747f9ef
4
- data.tar.gz: 808775763c37c92e3457214284fffcfc1075a7c8fbde1da39286b35c06923424
3
+ metadata.gz: eb6594ae7a224e823f3796f39c8c3603b0dd1c37f7883b362a2654d2cd85e9c3
4
+ data.tar.gz: 9fda3ae984287802b2f8a91d52cea1b9c88a3b406f0d0982fb357680f49b0bee
5
5
  SHA512:
6
- metadata.gz: 80015e89122214f8e8054e2c8e8490b407f4fb9513a4336458eeedd2b5bc986e27abf339830157392afd9cd8f901d61fcd0403480fe7acb093da27d68f9d800b
7
- data.tar.gz: ec2ab4d61e3763c580d011565811a55595b15f1f7498b9879dd20f6986f5b470f155f1f4ff5c74286892836c5a2f133e0f2d17e32f82d2b0e1e737a876b89155
6
+ metadata.gz: f2c47131206f194b5306d1c3f476405baf6e53265ee8e9fcf12bd86926605b767a9357ba699f2399aef597c89f362ed31b88571080b39453285ebeae6fd19d0a
7
+ data.tar.gz: c9a427a85448b69a1890d792e6f49192276c16c2c9b062d7a6c74c263d64fb3b39b39217598187b0dff38a69fe7f5dd3a16b4e3bfc7c613cc220222519134134
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- # Pagy initializer file (3.8.1)
4
+ # Pagy initializer file (3.8.2)
5
5
  # Customize only what you really need and notice that Pagy works also without any of the following lines.
6
6
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  function Pagy(){}
4
4
 
5
- Pagy.version = '3.8.1';
5
+ Pagy.version = '3.8.2';
6
6
 
7
7
  Pagy.init = function(arg){
8
8
  var target = arg instanceof Event || arg === undefined ? document : arg,
@@ -4,7 +4,7 @@
4
4
 
5
5
  require 'pathname'
6
6
 
7
- class Pagy ; VERSION = '3.8.1'
7
+ class Pagy ; VERSION = '3.8.2'
8
8
 
9
9
  # Root pathname to get the path of Pagy files like templates or dictionaries
10
10
  def self.root; @root ||= Pathname.new(__FILE__).dirname.freeze end
@@ -15,7 +15,7 @@ class Pagy
15
15
  end
16
16
 
17
17
  def pagy_prev_link(pagy, text = pagy_t('pagy.nav.prev'), link_extra = '')
18
- pagy.prev ? %(<span class="page prev"><a href="#{pagy_prev_url(pagy)}" rel="next" aria-label="next" #{pagy.vars[:link_extra]} #{link_extra}>#{text}</a></span>)
18
+ pagy.prev ? %(<span class="page prev"><a href="#{pagy_prev_url(pagy)}" rel="prev" aria-label="previous" #{pagy.vars[:link_extra]} #{link_extra}>#{text}</a></span>)
19
19
  : %(<span class="page prev disabled">#{text}</span>)
20
20
  end
21
21
 
@@ -50,11 +50,11 @@ class Pagy
50
50
  end
51
51
 
52
52
  # Return examples: "Displaying items 41-60 of 324 in total" of "Displaying Products 41-60 of 324 in total"
53
- def pagy_info(pagy)
53
+ def pagy_info(pagy, item_name=nil)
54
54
  path = if (count = pagy.count) == 0 ; 'pagy.info.no_items'
55
55
  else pagy.pages == 1 ? 'pagy.info.single_page' : 'pagy.info.multiple_pages'
56
56
  end
57
- pagy_t(path, item_name: pagy_t(pagy.vars[:i18n_key], count: count), count: count, from: pagy.from, to: pagy.to)
57
+ pagy_t(path, item_name: item_name || pagy_t(pagy.vars[:i18n_key], count: count), count: count, from: pagy.from, to: pagy.to)
58
58
  end
59
59
 
60
60
  # Returns a performance optimized proc to generate the HTML links
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: 3.8.1
4
+ version: 3.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: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2020-06-12 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,