bridgetown-paginate 0.21.0.beta4 → 0.21.3

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: 5e9bbb0482691a59cd093b423e8872cfe31dd79f8b14066c992168d92584e148
4
- data.tar.gz: 9aceeaacc6a79e1b89b63e4549a1854f611d663482d801dbcdcd6d4c0958def9
3
+ metadata.gz: 04d94f97eb062654a42ae01347d17218c0415ad79ab66d057c9edf2443e4d689
4
+ data.tar.gz: 4d558f3739429dc5d4b118d9b0e2cc5017bd4c33a4657a19f79e0fba0dceaeb1
5
5
  SHA512:
6
- metadata.gz: 1cd91a7626d55b41f866f353f437f463dc6f58aa72e07184e77fb822116fb7d7f101ff17fc828aa823ede9c3f5d0c85e7b45b477ccb010096989b12d03bdf7e2
7
- data.tar.gz: 3f2ffbfe3936a2e78f50963965af1eff53b10887fc04b019745e34d329cef2b7eb05f43db1c21c08b4e4da2016fbede212006e99dcbf9916e6e482707cfa3dc9
6
+ metadata.gz: 1f43513cabe783023538e01a54c3dbb3cbd4ad80743b7e4ac62ada8e96cd77f9302b94f9d6c1961e55788f943247e91d4db536162db74ca6e61fc87976c703f7
7
+ data.tar.gz: 29b7cf579f0af84d1632e7f57ad4194196242c6c76057ff4c12401a4294b8c3343fd60f91cee0212a42cec4c96c3bb2dc3c1daba286694c2092f019455987418
@@ -340,7 +340,9 @@ module Bridgetown
340
340
  else
341
341
  template.dir
342
342
  end
343
- first_index_page_url = Utils.ensure_trailing_slash(first_index_page_url)
343
+ first_index_page_url = Utils.ensure_trailing_slash(
344
+ Utils.remove_double_slash(first_index_page_url)
345
+ )
344
346
  paginated_page_url = File.join(first_index_page_url, paginated_page_url)
345
347
 
346
348
  # 3. Create the paginator logic for this page, pass in the prev and next
@@ -36,9 +36,8 @@ module Bridgetown
36
36
  # If the input already has a dot in position zero, it will be
37
37
  # returned unchanged.
38
38
  #
39
- # path - a String path
40
- #
41
- # Returns the path with a leading slash
39
+ # @param path [String]
40
+ # @return [String] the path with a leading slash
42
41
  def self.ensure_leading_dot(path)
43
42
  path[0..0] == "." ? path : ".#{path}"
44
43
  end
@@ -47,29 +46,26 @@ module Bridgetown
47
46
  # If the input already has a forward slash in position zero, it will be
48
47
  # returned unchanged.
49
48
  #
50
- # path - a String path
51
- #
52
- # Returns the path with a leading slash
49
+ # @param path [String]
50
+ # @return [String] the path with a leading slash
53
51
  def self.ensure_leading_slash(path)
54
52
  path[0..0] == "/" ? path : "/#{path}"
55
53
  end
56
54
 
57
- # Static: Return a String version of the input without a leading slash.
55
+ # Static: Return a String version of the input with only one leading slash.
58
56
  #
59
- # path - a String path
60
- #
61
- # Returns the input without the leading slash
62
- def self.remove_leading_slash(path)
63
- path[0..0] == "/" ? path[1..-1] : path
57
+ # @param path [String]
58
+ # @return [String] the input without the leading slash
59
+ def self.remove_double_slash(path)
60
+ path[0..1] == "//" ? path[1..-1] : path
64
61
  end
65
62
 
66
63
  # Static: Return a String version of the input which has a trailing slash.
67
64
  # If the input already has a forward slash at the end, it will be
68
65
  # returned unchanged.
69
66
  #
70
- # path - a String path
71
- #
72
- # Returns the path with a trailing slash
67
+ # @param path [String]
68
+ # @return [String] the path with a trailing slash
73
69
  def self.ensure_trailing_slash(path)
74
70
  path[-1] == "/" ? path : "#{path}/"
75
71
  end
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: 0.21.0.beta4
4
+ version: 0.21.3
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-05-30 00:00:00.000000000 Z
11
+ date: 2021-08-07 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: 0.21.0.beta4
19
+ version: 0.21.3
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: 0.21.0.beta4
26
+ version: 0.21.3
27
27
  description:
28
28
  email: maintainers@bridgetownrb.com
29
29
  executables: []
@@ -57,9 +57,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 1.3.1
62
+ version: '0'
63
63
  requirements: []
64
64
  rubygems_version: 3.1.4
65
65
  signing_key: