bridgetown-paginate 1.0.0.alpha8 → 1.0.0.beta1

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: 8a23a5d62a0d557c05a66fac5c57d82e44930b1bc5ff94cfa30e6ae4fb0bebad
4
- data.tar.gz: 4efb39106564df0bfaceefe87c7d1ac39204bf6933037313143c008a415fd3e3
3
+ metadata.gz: 598253ec8df444a3d539ba263176f314a28da389ad085a3a36ce859cf97d684b
4
+ data.tar.gz: 9fd2198fb261f3a7212899a97c68c40aca130bc543865e7d05f3463a6351b5f5
5
5
  SHA512:
6
- metadata.gz: b226df9931683b9a652c84036ed8196a8690d4670f5b963e83cdb7b5aecbcb1ad46d937bae6326bd48208c10e7bd046e13bc6a19aac16023c67f85db7dd81d4f
7
- data.tar.gz: 6943f7c3578525e7617a1722287c98c62c431b91736b9bfde2b932fdf23db7de3f62cf2e3fd797060f1843bc133a4ae824547c58c864b423034e060cb6536860
6
+ metadata.gz: d2111a8417f2a5f1f13803986f5fe29527dd9496626b35a0371d91503665bd74ab05bcf24e0edaa1426ad02351abcdd1f01b39ac946764612316b220c62ccb0c
7
+ data.tar.gz: 3ac2e512502227f3a4e4d777a4981bc4182229f1b4e61d72124ea2c5bb587263326f04428f74ead715fda783b7125468d7cc504f98ececa1c3a2ada6657f6c05
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Handles Generated Pages
4
- Bridgetown::Hooks.register :generated_pages, :post_init, reloadable: false do |page|
4
+ Bridgetown::Hooks.register_one :generated_pages, :post_init, reloadable: false do |page|
5
5
  if page.class != Bridgetown::Paginate::PaginationPage &&
6
6
  page.site.config.dig("pagination", "enabled")
7
7
  data = page.data.with_dot_access
@@ -13,7 +13,7 @@ Bridgetown::Hooks.register :generated_pages, :post_init, reloadable: false do |p
13
13
  end
14
14
 
15
15
  # Handles Resources
16
- Bridgetown::Hooks.register :resources, :post_read, reloadable: false do |page|
16
+ Bridgetown::Hooks.register_one :resources, :post_read, reloadable: false do |page|
17
17
  if page.site.config.dig("pagination", "enabled") && (
18
18
  (page.data.pagination.present? && page.data.pagination.enabled != false) ||
19
19
  (page.data.paginate.present? && page.data.paginate.enabled != false)
@@ -23,6 +23,6 @@ Bridgetown::Hooks.register :resources, :post_read, reloadable: false do |page|
23
23
  end
24
24
 
25
25
  # Ensure sites clear out templates before rebuild
26
- Bridgetown::Hooks.register :site, :after_reset, reloadable: false do |_site|
26
+ Bridgetown::Hooks.register_one :site, :after_reset, reloadable: false do |_site|
27
27
  Bridgetown::Paginate::PaginationGenerator.matching_templates.clear
28
28
  end
@@ -269,7 +269,7 @@ module Bridgetown
269
269
  puts "#{"Pagination: ".rjust(20)}Rolling through the date fields for all documents"
270
270
  end
271
271
  using_posts.each do |u_post|
272
- next unless u_post.respond_to?("date")
272
+ next unless u_post.respond_to?(:date)
273
273
 
274
274
  tmp_date = u_post.date
275
275
  next unless !tmp_date || tmp_date.nil?
@@ -80,7 +80,7 @@ module Bridgetown
80
80
  return 1 if !a.nil? && b.nil?
81
81
  return a.downcase <=> b.downcase if a.is_a?(String)
82
82
 
83
- if a.respond_to?("to_datetime") && b.respond_to?("to_datetime")
83
+ if a.respond_to?(:to_datetime) && b.respond_to?(:to_datetime)
84
84
  return a.to_datetime <=> b.to_datetime
85
85
  end
86
86
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha8
4
+ version: 1.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-05 00:00:00.000000000 Z
11
+ date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.alpha8
19
+ version: 1.0.0.beta1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0.alpha8
26
+ version: 1.0.0.beta1
27
27
  description:
28
28
  email: maintainers@bridgetownrb.com
29
29
  executables: []