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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bc0ec346bfde6c907da343d7c3f7ad611cbb69f4ed8e36aa09b69b48276ecb6
4
- data.tar.gz: 9d936c804c00f7eb530c9a7f5d1ecf763704daf84e35b9a3288eae2f88d3e3be
3
+ metadata.gz: 39e1594de6e9b2ca3919cf666e3b7735c96656447d78c39ce0a4aaf85a737487
4
+ data.tar.gz: ec8e032be1fe73b5890c1fc42c05d81c397015b468120a8cd97dcdd2bf88fcfa
5
5
  SHA512:
6
- metadata.gz: a2e92a735ed04def206a2cdd81577ff39042cc03f98a4343b6e8889c008bb5ba8277bd76168b1d3f39067bc68b9e9b4b1805721cac9a12cded2a491b106023db
7
- data.tar.gz: 825ad4c0c076d4dae52ba69772b0c827662181ddd9bd077c41ec5a167b0da506bf7153493a99ab5a704043f08918b1d0e460430c8fa7ee08d0675b1f3d1a5619
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.5)
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
 
@@ -5,7 +5,7 @@
5
5
  // Container for the whole pagy stuff
6
6
  function Pagy(){}
7
7
 
8
- Pagy.version = '5.6.5'
8
+ Pagy.version = '5.6.6'
9
9
 
10
10
  // Used by the waitForMe function
11
11
  Pagy.delay = 100
@@ -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.5'
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.5
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-08 00:00:00.000000000 Z
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.3
129
+ rubygems_version: 3.2.32
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: The kick-ass pagination ruby gem