pagy 4.5.0 → 4.5.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: ea6862ff93b09769c9810860307a4a63a88de1ecf8d6a4f8176f6cb90e22565f
4
- data.tar.gz: 5564e6b0f2e006b098dc9fe07ea8409ce4748bd6a32acb0f19bdb56e6f8b791d
3
+ metadata.gz: 19e29bbf55102d30e9da7d4e6e3e72b838bd4973451ce861e4724fc1824a6cc8
4
+ data.tar.gz: 483657a52db974186448c72c3dc071dc754855e9d8bf6963886c6c0600cf8516
5
5
  SHA512:
6
- metadata.gz: b299c1727379ba77ace97691cce28df77e81a25bfaac7d0fff7668f1f5b8178b60963ec8f5fd27fb824ef5f0f067ee3070b846f7d975269cec83ddec5db6763b
7
- data.tar.gz: daeb51d6b08394c64833938a5b594d46a189ae27357885361b6d0fb6dc1fa91c78def2b47cb09ec649fdebe39326577f989ac2569f32190ae8a756a7ccb591bf
6
+ metadata.gz: 41e8776832f9fa255056815fcbae25d066716fd6910cba99eb0a1351807d5e601a1229c1815065a555971f2aa76fca4c9cdee33188ca30e627fb2c7b3afcba64
7
+ data.tar.gz: 23a50e3d270c22a4b12fd12ec0a7543db527a939ddf27da19cf2acab8edfe1f9da1f307ba4adab50775c8d8846728d9a2fad39565257df786ea819980fa67885
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (4.5.0)
3
+ # Pagy initializer file (4.5.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.5.0'
5
+ Pagy.version = '4.5.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.5.0'
8
+ VERSION = '4.5.1'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pagy' # so you can require just the extra in the console
4
+ require 'pagy/extras/standalone'
5
+
6
+ class Pagy
7
+ # include Pagy::Console in irb/rails console for a ready to use pagy environment
8
+ module Console
9
+ def self.included(main)
10
+ main.include(Backend)
11
+ main.include(Frontend)
12
+ VARS[:url] = 'http://www.example.com/subdir'
13
+ end
14
+
15
+ def pagy_extras(*extras)
16
+ extras.each {|extra| require "pagy/extras/#{extra}"}
17
+ puts "Required extras: #{extras.map(&:inspect).join(', ')}"
18
+ end
19
+ end
20
+
21
+ end
@@ -55,17 +55,4 @@ class Pagy
55
55
  end
56
56
  end
57
57
 
58
- # include Pagy::Console in irb/rails console for a ready to use pagy environment
59
- module Console
60
- def self.included(main)
61
- main.include(Backend)
62
- main.include(Frontend)
63
- VARS[:url] = 'http://www.example.com/subdir'
64
- end
65
-
66
- def pagy_extras(*extras)
67
- extras.each {|extra| require "pagy/extras/#{extra}"}
68
- end
69
- end
70
-
71
58
  end
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.5.0
4
+ version: 4.5.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-04-30 00:00:00.000000000 Z
11
+ date: 2021-05-02 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,
@@ -56,6 +56,7 @@ files:
56
56
  - lib/locales/zh-TW.yml
57
57
  - lib/pagy.rb
58
58
  - lib/pagy/backend.rb
59
+ - lib/pagy/console.rb
59
60
  - lib/pagy/countless.rb
60
61
  - lib/pagy/deprecation.rb
61
62
  - lib/pagy/exceptions.rb