bridgetown-paginate 0.18.0 → 0.18.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: 661268942dccb1db7a6606dd119ed4aa384eccbe5ff0de33e58299ea2f740a33
4
- data.tar.gz: f73d95e0da8bcbe070dc534238ad6d4ecef2268ec0b089fda997c3c2b273895a
3
+ metadata.gz: 81d942a88662c16dcd180fc5f01c010fe1aa6a97111c5a8fd309470b5f57c84d
4
+ data.tar.gz: 77a3231ca1e7e2ef4032875f7e8b875f942094c1857f3ced49ef327f0c7eb91d
5
5
  SHA512:
6
- metadata.gz: c6f1ef2d8963d9ad1ff7fabe0e7b6316f56eb6c19febdd7a0a05e5c9b1f423b22257c6ba4b1d117b6bdcca4f0d4e165f1c0602b006b1038f67fe18d462e6e3f5
7
- data.tar.gz: 3f8e17e3ca527e53fa0487164615bce28fe8ed6b1c709bc2747c2c66e20f56d26ce30cce5ba7cd4f4906ada54145081239f6ca7bf72790534d788a90d0b36630
6
+ metadata.gz: 81e453d78b03ec03fe1d671c6ed584514e09fcf3d90720e738224e6d4bd7564c27916cd9282c6db875661078c82a38f406949342674c497e86a3514a597d73ea
7
+ data.tar.gz: 97d345ccd0e38c5c890e4bf43dfe08e9fbcb4f4363ec9da1dd8c589ac2b75e7f75f0462188fe67e9aef74116c6e4f2a8b2af0a688f745e91304eed4272a0f793
@@ -12,13 +12,6 @@ Bridgetown/NoPutsAllowed:
12
12
  Layout/CommentIndentation:
13
13
  Exclude:
14
14
  - lib/bridgetown-paginate/defaults.rb
15
- Metrics/AbcSize:
16
- Exclude:
17
- - lib/bridgetown-paginate/pagination_generator.rb
18
- - lib/bridgetown-paginate/pagination_indexer.rb
19
- - lib/bridgetown-paginate/pagination_model.rb
20
- - lib/bridgetown-paginate/pagination_page.rb
21
- - lib/bridgetown-paginate/paginator.rb
22
15
  Metrics/BlockNesting:
23
16
  Exclude:
24
17
  - lib/bridgetown-paginate/pagination_model.rb
@@ -27,7 +27,7 @@ module Bridgetown
27
27
  # site - The Site.
28
28
  #
29
29
  # Returns nothing.
30
- def generate(site)
30
+ def generate(site) # rubocop:todo Metrics/AbcSize
31
31
  # Retrieve and merge the pagination configuration from the site yml file
32
32
  default_config = Bridgetown::Utils.deep_merge_hashes(
33
33
  DEFAULT,
@@ -17,7 +17,7 @@ module Bridgetown
17
17
  # Create a hash index for all documents based on a key in the
18
18
  # document.data table
19
19
  #
20
- def self.index_documents_by(all_documents, index_key)
20
+ def self.index_documents_by(all_documents, index_key) # rubocop:todo Metrics/AbcSize
21
21
  return nil if all_documents.nil?
22
22
  return all_documents if index_key.nil?
23
23
 
@@ -30,7 +30,7 @@ module Bridgetown
30
30
  end
31
31
 
32
32
  # rubocop:disable Metrics/BlockLength
33
- def run(default_config, templates, site_title)
33
+ def run(default_config, templates, site_title) # rubocop:todo Metrics/AbcSize
34
34
  if templates.size.to_i <= 0
35
35
  @logging_lambda.call "is enabled in the config, but no paginated pages found." \
36
36
  " Add 'pagination:\\n enabled: true' to the front-matter of a page.", "warn"
@@ -142,7 +142,7 @@ module Bridgetown
142
142
  end
143
143
 
144
144
  # rubocop:disable Layout/LineLength
145
- def _debug_print_config_info(config, page_path)
145
+ def _debug_print_config_info(config, page_path) # rubocop:todo Metrics/AbcSize
146
146
  r = 20
147
147
  f = "Pagination: ".rjust(20)
148
148
  # Debug print the config
@@ -185,6 +185,7 @@ module Bridgetown
185
185
  # template - The index.html Page that requires pagination.
186
186
  # config - The configuration settings that should be used
187
187
  #
188
+ # rubocop:todo Metrics/AbcSize
188
189
  def paginate(template, config, site_title, documents_payload)
189
190
  # By default paginate on all posts in the site
190
191
  using_posts = documents_payload[:posts]
@@ -446,6 +447,7 @@ module Bridgetown
446
447
  end
447
448
  end
448
449
  end
450
+ # rubocop:enable Metrics/AbcSize
449
451
  end
450
452
  end
451
453
  end
@@ -11,6 +11,7 @@ module Bridgetown
11
11
  # not read from disk
12
12
  #
13
13
  class PaginationPage < Bridgetown::Page
14
+ # rubocop:todo Metrics/AbcSize
14
15
  def initialize(page_to_copy, cur_page_nr, total_pages, index_pageandext, template_ext)
15
16
  @site = page_to_copy.site
16
17
  @base = ""
@@ -44,6 +45,7 @@ module Bridgetown
44
45
 
45
46
  Bridgetown::Hooks.trigger :pages, :post_init, self
46
47
  end
48
+ # rubocop:enable Metrics/AbcSize
47
49
 
48
50
  # rubocop:disable Naming/AccessorMethodName
49
51
  def set_url(url_value)
@@ -13,7 +13,7 @@ module Bridgetown
13
13
 
14
14
  # Initialize a new Paginator.
15
15
  #
16
- def initialize(
16
+ def initialize( # rubocop:todo Metrics/AbcSize
17
17
  config_per_page,
18
18
  first_index_page_url,
19
19
  paginated_page_url,
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.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2020-10-30 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.18.0
19
+ version: 0.18.1
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.18.0
26
+ version: 0.18.1
27
27
  description:
28
28
  email: maintainers@bridgetownrb.com
29
29
  executables: []