pagy 4.8.0 → 4.8.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: 487fac817e4547394310b019c71487100912f052b625708349f85bbae35d4ff4
4
- data.tar.gz: 8965c695260c137926ff3cbaf1dbded460bb89cdeb95885af10e083ee61cdf89
3
+ metadata.gz: c87ea4c3c1bf0dbfb6ae76db111177cda391165a844ff3302f8ee2722249ef2f
4
+ data.tar.gz: 26618714b6555f46cb9c140166b3407efb350bf8263cfcb8bdd4bde293265ca9
5
5
  SHA512:
6
- metadata.gz: 2b51db8c041d553a42248e503ed2824056dcd582d6b805cc531d741208e47ba812fc086a4783ef4b1f8f5140788d3bda179740cc7341427a8708de44f5f0bb51
7
- data.tar.gz: 052426c9f52caa3727bfd967f60b2a861379e95ef49f0074c61c6c1ee4369ec01e2b6fbc73f2ec4d57f2b4125da522f13a76ef5efea779892aaef11a874c290a
6
+ metadata.gz: 5e0026cc9cb9051f43c3b89a3d68bde3fbb738ea21055117da0427e0dba9eae6c1d501dcd76d5dadd68890609fde321d33372fe8c949cf8c03c3388e4aa61317
7
+ data.tar.gz: 643f315b5de922a30f47f70465e7e13d7a5837835b6da90cf52cdf491eaec75f66450678094a3cbef0f38d65afd280ddafec0e0dc16dc52a479e324b896655dd
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (4.8.0)
3
+ # Pagy initializer file (4.8.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.8.0'
5
+ Pagy.version = '4.8.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.8.0'
8
+ VERSION = '4.8.1'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
@@ -23,7 +23,7 @@ class Pagy
23
23
  # Merge and validate the options, do some simple arithmetic and set the instance variables
24
24
  def initialize(vars)
25
25
  @vars = VARS.merge( vars.delete_if{|k,v| VARS.key?(k) && (v.nil? || v == '') } )
26
- @vars[:fragment] = deprecated_var(:anchor, @vars[:anchor], :fragment, @vars[:fragment]) if @vars[:anchor]
26
+ @vars[:fragment] = Pagy.deprecated_var(:anchor, @vars[:anchor], :fragment, @vars[:fragment]) if @vars[:anchor]
27
27
 
28
28
  INSTANCE_VARS_MIN.each do |name,min|
29
29
  raise VariableError.new(self), "expected :#{name} >= #{min}; got #{@vars[name].inspect}" \
@@ -4,22 +4,22 @@ class Pagy
4
4
 
5
5
  # deprecated variables
6
6
  def deprecated_var(var, val, new_var, new_val)
7
- value = new_val || val
8
- Warning.warn %([PAGY WARNING] deprecated use of `#{var}` var will not be supported in 5.0! Use `#{new_var}: #{value.inspect}` instead.)
7
+ value = val || new_val
8
+ Warning.warn %([PAGY WARNING] deprecated use of '#{var}' var will not be supported in 5.0! Use '#{new_var}: #{value.inspect}' instead.)
9
9
  value
10
10
  end
11
11
 
12
12
  # deprecated pagy_url_for argument order
13
13
  def deprecated_order(pagy, page)
14
- Warning.warn '[PAGY WARNING] inverted use of pagy/page in pagy_url_for will not be supported in 5.0! Use pagy_url_for(pagy, page) instead.'
14
+ Warning.warn %([PAGY WARNING] inverted use of pagy/page in pagy_url_for will not be supported in 5.0! Use pagy_url_for(pagy, page) instead.)
15
15
  [page, pagy]
16
16
  end
17
17
 
18
18
 
19
19
  # deprecated posiitioal arguments
20
20
  def deprecated_arg(arg, val, new_key, new_val)
21
- value = new_val || val # we use the new_val if present
22
- Warning.warn %([PAGY WARNING] deprecated use of positional `#{arg}` arg will not be supported in 5.0! Use only the keyword arg `#{new_key}: #{value.inspect}` instead.)
21
+ value = val || new_val # we use the new_val if present
22
+ Warning.warn %([PAGY WARNING] deprecated use of positional '#{arg}' arg will not be supported in 5.0! Use only the keyword arg '#{new_key}: #{value.inspect}' instead.)
23
23
  value
24
24
  end
25
25
 
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.8.0
4
+ version: 4.8.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-08 00:00:00.000000000 Z
11
+ date: 2021-06-14 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,