pagy 5.6.5 → 5.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +1 -1
- data/lib/javascripts/pagy.js +1 -1
- data/lib/pagy/extras/frontend_helpers.rb +1 -1
- data/lib/pagy.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39e1594de6e9b2ca3919cf666e3b7735c96656447d78c39ce0a4aaf85a737487
|
4
|
+
data.tar.gz: ec8e032be1fe73b5890c1fc42c05d81c397015b468120a8cd97dcdd2bf88fcfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3df6ce4c03f578555b88c34691be3c667c1aaf2d4712382ebb1ddf905ad5f2f545987ce61270aa0a57705f1cfbe592ffbc649afb5c1137e8f69552388750e198
|
7
|
+
data.tar.gz: c40c023541aaf714d0bfaa0fbaa4034edcb81d2d8b627a05f4e696d9eaa165f5f1aff7596497c9b4ccb9bf19773b65bb1aa79c7ba19765f3c993eab9e260e864
|
data/lib/config/pagy.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Pagy initializer file (5.6.
|
3
|
+
# Pagy initializer file (5.6.6)
|
4
4
|
# Customize only what you really need and notice that the core 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
|
|
data/lib/javascripts/pagy.js
CHANGED
@@ -18,7 +18,7 @@ class Pagy # :nodoc:
|
|
18
18
|
# "350" => [1, 2, :gap, 17, 18, 19, "20", 21, 22, 23, :gap, 49, 50],
|
19
19
|
# "550" => [1, 2, 3, :gap, 16, 17, 18, 19, "20", 21, 22, 23, 24, :gap, 48, 49, 50] }
|
20
20
|
# Notice: if :steps is false it will use the single {0 => @vars[:size]} size
|
21
|
-
def sequels(steps: @vars[:steps] || { 0 => @vars[:size] })
|
21
|
+
def sequels(steps: @vars[:steps] || { 0 => @vars[:size] }, **_)
|
22
22
|
raise VariableError.new(self, :steps, 'to define the 0 width', steps) unless steps.key?(0)
|
23
23
|
|
24
24
|
{}.tap do |sequels|
|
data/lib/pagy.rb
CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
|
|
5
5
|
|
6
6
|
# Core class
|
7
7
|
class Pagy
|
8
|
-
VERSION = '5.6.
|
8
|
+
VERSION = '5.6.6'
|
9
9
|
|
10
10
|
# Root pathname to get the path of Pagy files like templates or dictionaries
|
11
11
|
def self.root
|
@@ -44,7 +44,7 @@ class Pagy
|
|
44
44
|
end
|
45
45
|
|
46
46
|
# Return the array of page numbers and :gap items e.g. [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
|
47
|
-
def series(size: @vars[:size])
|
47
|
+
def series(size: @vars[:size], **_)
|
48
48
|
return [] if size.empty?
|
49
49
|
raise VariableError.new(self, :size, 'to contain 4 items >= 0', size) \
|
50
50
|
unless size.is_a?(Array) && size.size == 4 && size.all? { |num| !num.negative? rescue false } # rubocop:disable Style/RescueModifier
|
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: 5.6.
|
4
|
+
version: 5.6.6
|
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-12-
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Agnostic pagination in plain ruby. It does it all. Better.
|
14
14
|
email:
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.2.
|
129
|
+
rubygems_version: 3.2.32
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: The kick-ass pagination ruby gem
|