pagy 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +1 -1
- data/lib/javascripts/pagy.js +1 -1
- data/lib/pagy.rb +1 -1
- data/lib/pagy/console.rb +21 -0
- data/lib/pagy/extras/standalone.rb +0 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19e29bbf55102d30e9da7d4e6e3e72b838bd4973451ce861e4724fc1824a6cc8
|
4
|
+
data.tar.gz: 483657a52db974186448c72c3dc071dc754855e9d8bf6963886c6c0600cf8516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
|
data/lib/javascripts/pagy.js
CHANGED
data/lib/pagy.rb
CHANGED
data/lib/pagy/console.rb
ADDED
@@ -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.
|
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-
|
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
|