jekyll_plugin_support 1.0.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +17 -1
  3. data/CHANGELOG.md +33 -6
  4. data/README.md +787 -30
  5. data/jekyll_plugin_support.gemspec +13 -11
  6. data/lib/block/jekyll_plugin_support_block.rb +31 -15
  7. data/lib/block/jekyll_plugin_support_block_noarg.rb +0 -2
  8. data/lib/generator/jekyll_plugin_support_generator.rb +1 -7
  9. data/lib/helper/jekyll_plugin_helper.rb +6 -6
  10. data/lib/helper/jekyll_plugin_helper_class.rb +8 -3
  11. data/lib/hooks/a_page.rb +69 -0
  12. data/lib/hooks/all_collections_hooks.rb +61 -0
  13. data/lib/hooks/all_files.rb +48 -0
  14. data/lib/hooks/class_methods.rb +50 -0
  15. data/lib/jekyll_all_collections/all_collections_tag.rb +157 -0
  16. data/lib/jekyll_plugin_support/jekyll_plugin_support_class.rb +61 -28
  17. data/lib/jekyll_plugin_support/jekyll_plugin_support_spec_support.rb +1 -3
  18. data/lib/jekyll_plugin_support/version.rb +1 -1
  19. data/lib/jekyll_plugin_support.rb +18 -13
  20. data/lib/tag/jekyll_plugin_support_tag.rb +26 -15
  21. data/lib/tag/jekyll_plugin_support_tag_noarg.rb +0 -2
  22. data/lib/util/mslinn_binary_search.rb +152 -0
  23. data/lib/util/send_chain.rb +56 -0
  24. data/spec/all_collections_tag/all_collections_tag_sort_spec.rb +112 -0
  25. data/spec/bsearch_spec.rb +50 -0
  26. data/spec/custom_error_spec.rb +9 -9
  27. data/spec/date_sort_spec.rb +84 -0
  28. data/spec/jekyll_plugin_helper_options_spec.rb +7 -3
  29. data/spec/liquid_variable_parsing_spec.rb +8 -8
  30. data/spec/mslinn_binary_search_spec.rb +47 -0
  31. data/spec/send_chain_spec.rb +72 -0
  32. data/spec/send_spec.rb +28 -0
  33. data/spec/sorted_lru_files_spec.rb +82 -0
  34. data/spec/spec_helper.rb +2 -0
  35. data/spec/status_persistence.txt +3 -9
  36. data/spec/testable_spec.rb +38 -0
  37. metadata +42 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4f3097e166568e130edb33f7dac7b366f0813bd9d21bc8e5e4687b7f8e9fbe2
4
- data.tar.gz: d5523a0a88be86c56091eb906376507cd4b6d5e42e1722e90b5c568959ff03f6
3
+ metadata.gz: 74f595dc019d923dbbad9e84b1eacdaa15808b36d54fc692044e30f26e0767f1
4
+ data.tar.gz: 5632b03e8d9d29080ae0c43428d5c9a13243c4df529255013d63951d669a670d
5
5
  SHA512:
6
- metadata.gz: b4d7f3863be9bf780ecc5da65141be8ddda6b920ee354a4065b8f43e05d1532083b36537c8112494ef83e18ce0cf47b25ee45f25a3ba7af149240ba40ebe1f75
7
- data.tar.gz: d5ba448bfd2b4bdbf01208e00d1b932b76293a7c6e78e7fe57f706c2dc8f9b3cd48af7867c0da38347dabdbda7e0f4420f739889f1e0aeda747b8f92bbee3b39
6
+ metadata.gz: b5839393146e5d1ab2317f004a563bad4144467e506fd41516f489b065fa52d00bfcea4eedc7d8d06028afd35cba34b3360b19f4d968ec6a456e429f6a2af542
7
+ data.tar.gz: 203f6111c4127b4909534d4dcc6b7dcb7f3f5d7bbf9fa60016920558a6eb9faed7cd736212b8c3f25cb52514e21b75035dd00ea55928525127b9ca662ede224d
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  # - rubocop-jekyll
3
3
  - rubocop-md
4
4
  - rubocop-performance
@@ -26,6 +26,14 @@ Layout/HashAlignment:
26
26
  EnforcedColonStyle: table
27
27
  EnforcedHashRocketStyle: table
28
28
 
29
+ Layout/IndentationConsistency:
30
+ Exclude:
31
+ - "*.md"
32
+
33
+ Layout/InitialIndentation:
34
+ Exclude:
35
+ - "*.md"
36
+
29
37
  Layout/LineLength:
30
38
  Max: 150
31
39
 
@@ -37,12 +45,20 @@ Metrics/BlockLength:
37
45
  - jekyll_plugin_support.gemspec
38
46
  Max: 30
39
47
 
48
+ Metrics/ClassLength:
49
+ Exclude:
50
+ - "**/all_collections_tag.rb"
51
+
40
52
  Metrics/CyclomaticComplexity:
41
53
  Max: 25
42
54
 
43
55
  Metrics/MethodLength:
44
56
  Max: 50
45
57
 
58
+ Metrics/ModuleLength:
59
+ Exclude:
60
+ - "**/jekyll_plugin_support_class.rb"
61
+
46
62
  Metrics/PerceivedComplexity:
47
63
  Max: 25
48
64
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.0 / 2025-02-09
4
+
5
+ * Numbered as v3.0.0 because `jekyll_draft` was at v2.1.0 and the two projects should have similar version numbers.
6
+ * `Jekyll_all_collections` was folded into this project.
7
+ * Now requires [Jekyll 4.4.1](https://jekyllrb.com/news/2025/01/29/jekyll-4-4-1-released/) or later,
8
+ and Ruby 3.2.0 or later
9
+
10
+
11
+ ## 1.1.0 / 2025-02-07
12
+
13
+ * Now replaces include and layout variables with their values
14
+ * Renamed `@helper.markup` to `@helper.argument_string`
15
+ * Improved `nil` handling throughout
16
+ * Added the **Debug Demo production** launch configuration to debug the demo website in production mode
17
+ * Added the `bin/release_port` script that kills hung processes being debugged
18
+ * Added the `cleanDemo` task for the **Debug Demo production** and **Debug Demo development** tasks
19
+ * Many minor improvements to the demo.
20
+ * `JekyllSupport::JekyllPluginHelper::register` now accepts a `quiet` option, to suppress the signon message.
21
+ Use it like this:
22
+
23
+ ```ruby
24
+ JekyllPluginHelper.register(self, 'tag_name', quiet: true)
25
+ ```
26
+
3
27
 
4
28
  ## 1.0.3 / 2024-08-19
5
29
 
@@ -14,12 +38,15 @@
14
38
  The following seems to be optimal for custom plugins; it suppresses the ridiculously long stack trace that used to be generated:
15
39
 
16
40
  ```ruby
17
- rescue DemoInlineTagError => e # jekyll_plugin_support handles StandardError
18
- @logger.error { e.logger_message }
19
- exit! 1 if @die_on_demo_tag_error
20
-
21
- e.html_message
22
- ```
41
+ begin
42
+ # ...
43
+ rescue DemoInlineTagError => e # jekyll_plugin_support handles StandardError
44
+ @logger.error { e.logger_message }
45
+ exit! 1 if @die_on_demo_tag_error
46
+
47
+ e.html_message
48
+ end
49
+ ```
23
50
 
24
51
 
25
52
  ## 1.0.1 / 2024-07-27