bridgetown-paginate 1.2.0.beta4 → 1.2.0

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: 9d99e5854dd4323784082d6378f766a1d913fb9e9c935f9b9cd7d9f27241ee5e
4
- data.tar.gz: 56a11c006dac3e642773d08b5ba2de05166b9064f57ba62a212b3b43155ff79d
3
+ metadata.gz: e7ac04970775784b47d8b096e3052541535e270cb3edf00942a97b0151daba42
4
+ data.tar.gz: bbde9aa72a8979849ca5714abbfd4438674f7ffce65387466179a2d7daf3671e
5
5
  SHA512:
6
- metadata.gz: b11ee6a61f2c6802c4f50a6ec7d1c565605c8dfcb703866c19c637f03c991d7a9a6a50d2c45be51862ba703ec68dc30d47a7499dfe8ef15818d256f89655fb8d
7
- data.tar.gz: 370336cb3f229296b694316159a6244ee8ada3cd32204309448f3739158360f39162f996b610dcceca658d531a934f997d55f4d6805c26e5b5b5ab18a5a3442a
6
+ metadata.gz: c0605b83449fa3434942b713ca7ae05224dd44696c1e987e2e5dd2c05dc66385199cc6ad81ef3ca2cd5613f21ecc6b78a571b4d2bf8f98fd07be8d3490412449
7
+ data.tar.gz: f3c9aacdf1cbbee32c28664ae418f78a7196739db80b0aee9ca859bc13b229b3ba4210e84ed0e0f349a63ab0a6c1f02f4aa44eb70713f9283c331dcbce9004d6
@@ -33,11 +33,7 @@ module Bridgetown
33
33
  end
34
34
 
35
35
  init = (@page - 1) * @per_page
36
- offset = if init + @per_page - 1 >= documents.size
37
- documents.size
38
- else
39
- init + @per_page - 1
40
- end
36
+ offset = [init + @per_page - 1, documents.size].min
41
37
 
42
38
  # Ensure that the current page has correct extensions if needed
43
39
  this_page_url = Utils.ensure_full_path(
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.2.0.beta4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-07 00:00:00.000000000 Z
11
+ date: 2023-01-25 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.2.0.beta4
19
+ version: 1.2.0
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.2.0.beta4
26
+ version: 1.2.0
27
27
  description:
28
28
  email: maintainers@bridgetownrb.com
29
29
  executables: []
@@ -61,9 +61,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">"
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 1.3.1
66
+ version: '0'
67
67
  requirements: []
68
68
  rubygems_version: 3.1.4
69
69
  signing_key: