bridgetown-paginate 0.17.1 → 0.18.4

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: df77a1915c24e17c2228663b2bfeae828d41a1bc7a6a74084567d6bf86780f9e
4
- data.tar.gz: ddf253c13ea5ee94878d47510ba1eeb1c52d5d947a18dfbae36b7cbd4fa340a6
3
+ metadata.gz: 92af8f9e66a855320c56adaf8c165ead375294e0cead82692dd7db605aa85676
4
+ data.tar.gz: cc58166e6c0941d5b90b6ae6cf2566d15e3c0c9c5be81d693129b1e95292f053
5
5
  SHA512:
6
- metadata.gz: b9bbdf8203813db0c2d13a27be7f2a7487684e38ad22f1a58745cc318b942fc842513dfd7dd097b57afba33334bb5e66f9485490a7ae20c1f1e7db69cebde59a
7
- data.tar.gz: 3d4846a1f14536ee7e3767f3459a80880e18124f2db310a2ce09ab91ab852e36f37e0e82fd896c3791ff8c76e8d16dfe58968cca1644ba8c9cd373c00f87f7be
6
+ metadata.gz: 87a4f36d1c12cd189345e233fd998ebca18c21c41af5a0e294390813717e92a5b9a16dff28162b67383987d94037a13ea222f73e14d7d5bfc4d6f51a36e157ba
7
+ data.tar.gz: 7326a18e418ad6c6677dff8af8dca895a976c9ea73ba7dda7e43dbaa7018636096b36cef1c41ef8331e551ec0cca315b7abf6ee887891469f5657b966ef17a81
@@ -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.17.1
4
+ version: 0.18.4
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-02 00:00:00.000000000 Z
11
+ date: 2020-11-05 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.17.1
19
+ version: 0.18.4
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.17.1
26
+ version: 0.18.4
27
27
  description:
28
28
  email: maintainers@bridgetownrb.com
29
29
  executables: []
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.0.6
64
+ rubygems_version: 3.1.4
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: A Bridgetown plugin to add pagination support for posts and collection indices.