jekyll_plugin_support 3.1.1 → 3.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89c80e46269ce8e9476f0758550b2d0acb48bd9462ffe0e6d957c436d1c98d2d
4
- data.tar.gz: 920e92f0c86d0884193650af1039790df087edc158b529537d37c1fa1d04e680
3
+ metadata.gz: 8d4f6b9106ad6c0ac015ac96af510e4f284d01de3296b29f815cfe74a14dd249
4
+ data.tar.gz: aa2ff95dfa6366d6c1b06e6fe7689d34131bf699e17a8ce05090fe1df836ceb8
5
5
  SHA512:
6
- metadata.gz: 1d0045d9f09b3b76c8306073d50c06b1f93fd4c7914a08ce24a826d75ffa033c84660710d8822ea25f18e5585cb94232e7634d68f7b4822aee311865768fc028
7
- data.tar.gz: 779da912b97c957c69f8829265c7ad2ad213c6ccf286acae65d87e13a03c24d23e32eea85d22edd9c93aa4084f07732178325f9e7cb7bbb5484859b8e2f8ca79
6
+ metadata.gz: 629abbd99fb59ca3c741d623bc34248377c65744209a2f2b06b27b030aaaa8fba616e92db61494474ac2810674deb49aafd5ef006761e2fcc05380ecf733de80
7
+ data.tar.gz: bc8b36722bf0a033231a7b60f1cc70de4c354b898c4ab45ea99aaabe6a8cb70886550fb4bde13524ac741a789824178c76bfdfcd3dcd33cb79d854cfe87a6025
data/.rubocop.yml CHANGED
@@ -92,7 +92,7 @@ RSpec/MultipleDescribes:
92
92
 
93
93
  Security/Eval:
94
94
  Exclude:
95
- - spec/all_collections_tag/all_collections_tag_sort_spec.rb
95
+ - spec/all_collections_tag/all_collections_tag_sort_spec.rb
96
96
 
97
97
  Style/ClassVars:
98
98
  Enabled: false
@@ -107,6 +107,11 @@ Style/GlobalVars:
107
107
  Exclude:
108
108
  - spec/mslinn_binary_search_spec.rb
109
109
 
110
+ Style/RedundantParentheses:
111
+ Exclude:
112
+ - README.md
113
+ - demo/_plugins/*.rb
114
+
110
115
  Style/StringConcatenation:
111
116
  Enabled: false
112
117
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.1.5
4
+
5
+ * Added install subcommand to bundle invocations
6
+ * Replaced wslvar which is no longer maintained
7
+
8
+ ## 3.1.4
9
+
10
+ * Added `@jekyll_version` instance variable exposing raw HTML content of the page being processed
11
+ * Added `@raw_content` instance variable exposing raw HTML content of the page being processed
12
+
13
+
14
+ ## 3.1.3 / 2025-01-02
15
+
16
+ * Modified `JekyllPluginHelper.expand_env` to only expand Bash environment
17
+ variables (`$VAR` or `${VAR}`), not Windows environment variables (`%VAR%`)
18
+ * Removed the `use_wslvar` parameter from `JekyllPluginHelper.expand_env` method
19
+ signature
20
+ * `env_var_expand_windows` remains available for plugins that specifically need
21
+ Windows environment variable expansion
22
+
23
+
24
+ ## 3.1.2 / 2025-11-17
25
+
26
+ * Support for [Claude CLI](https://www.mslinn.com/llm/7900-claude.html) is
27
+ provided in the `.claude` directory. This was implemented so it would work
28
+ with other LLMs, for example [Cursor](https://mslinn.com/llm/7980_cursor.html) and
29
+ [MiniMax Mini-Agent](https://www.mslinn.com/llm/7997-mini-agent.html).
30
+ * `JekyllPluginHelper.env_var_expand_windows` expands Windows environment
31
+ variables (surrounded by `%` characters) using a case-insensitive search,
32
+ which also works when running on Linux and macOS. This is used by
33
+ [`jekyll_flexible_include_plugin`](https://www.mslinn.com/jekyll_plugins/jekyll_flexible_include.html).
34
+ * `JekyllPluginHelper.wsl_detected?` detects if Jekyll is running under WSL
35
+ * Changed `JekyllPluginHelper.initialize` to make `no_arg_parsing` a keyword argument.
36
+ * Now requires `jekyll_draft` using `Gemfile` instead of the gemspec, to avoid a warning
37
+ when running `bundle install`.
38
+ * Handles `include` variables with types other than `String`.
39
+
40
+
3
41
  ## 3.1.1 / 2025-09-13
4
42
 
5
43
  * Now looks up Windows environment variables (surrounded by `%` characters).
@@ -36,12 +74,7 @@
36
74
  * Added the `bin/release_port` script that kills hung processes being debugged
37
75
  * Added the `cleanDemo` task for the **Debug Demo production** and **Debug Demo development** tasks
38
76
  * Many minor improvements to the demo.
39
- * `JekyllSupport::JekyllPluginHelper::register` now accepts a `quiet` option, to suppress the signon message.
40
- Use it like this:
41
-
42
- ```ruby
43
- JekyllPluginHelper.register(self, 'tag_name', quiet: true)
44
- ```
77
+ * `JekyllPluginHelper.register` now accepts a `quiet` option to suppress the signon message
45
78
 
46
79
 
47
80
  ## 1.0.3 / 2024-08-19
@@ -53,19 +86,7 @@
53
86
 
54
87
  * Computes line_number and path properly
55
88
  * Refactored demo CSS
56
- * Improved custom plugin error handling and sample code.
57
- The following seems to be optimal for custom plugins; it suppresses the ridiculously long stack trace that used to be generated:
58
-
59
- ```ruby
60
- begin
61
- # ...
62
- rescue DemoInlineTagError => e # jekyll_plugin_support handles StandardError
63
- @logger.error { e.logger_message }
64
- exit! 1 if @die_on_demo_tag_error
65
-
66
- e.html_message
67
- end
68
- ```
89
+ * Improved custom plugin error handling and sample code
69
90
 
70
91
 
71
92
  ## 1.0.1 / 2024-07-27
@@ -128,10 +149,8 @@
128
149
  * Demo site now shows how to define and handle custom errors.
129
150
  * Added `@tag_config` variable, which can be inspected to determine whether to die on various types of exceptions.
130
151
  * Added `format_error_message`, `maybe_reraise_error`, and `raise_error` to `JekyllBlock` and `JekyllTag`
131
- * Adds a method called `shorten_backtrace` to `StandardError` and all custom error
132
- classes defined by `JekyllSupport.define_error`.
133
- See the `demo/` directory for examples of how to use this optional feature.
134
- * The `plugin-vars` section in `_config.yml` was renamed to `liquid_vars`.
152
+ * Added `shorten_backtrace` to StandardError and all custom error classes defined by `JekyllSupport.define_error`
153
+ * The `plugin-vars` section in `_config.yml` was renamed to `liquid_vars`
135
154
 
136
155
 
137
156
  ## 0.7.2 / 2023-08-14
@@ -143,10 +162,8 @@
143
162
 
144
163
  * Suppressed stack trace from issue [#4](../../issues/4).
145
164
  * Now using Shopify `ruby-lsp` instead of `rebornix.Ruby` by Peng Lv
146
- * Debug configurations changed to `rdbg` instead of `ruby`, so the `debase` development dependency was changed to
147
- [`debug`](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg),
148
- which provides the `rdgb` command.
149
- The `ruby-debug-ide` development dependency is also no longer required.
165
+ * Debug configurations changed to `rdbg` instead of `ruby`, so the `debase` development dependency was changed to [`debug`](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg)
166
+ * The `ruby-debug-ide` development dependency is no longer required
150
167
 
151
168
 
152
169
  ## 0.7.0 / 2023-05-22
data/README.md CHANGED
@@ -14,16 +14,39 @@ At present, only Jekyll tags and blocks are supported.
14
14
  Public plugins that use `jekyll_plugin_support` include:
15
15
 
16
16
  <ul style="columns: 2">
17
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_badge'><code>jekyll_badge</code></a></li>
18
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_draft'><code>jekyll_draft</code></a></li>
19
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_emoji'><code>jekyll_emoji</code></a></li>
20
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_flexible_include.html'><code>jekyll_flexible_include</code></a></li>
21
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_google_translate'><code>jekyll_google_translate</code></a></li>
22
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_href.html'><code>jekyll_href</code></a></li>
23
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_img.html'><code>jekyll_img</code></a></li>
24
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_outline.html'><code>jekyll_outline</code></a></li>
25
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_pre.html'><code>jekyll_pre</code></a></li>
26
- <li><a href='https://www.mslinn.com/jekyll_plugins/jekyll_quote.html'><code>jekyll_quote</code></a></li>
17
+ <li>
18
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_badge'><code>jekyll_badge</code></a>
19
+ </li>
20
+ <li>
21
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_draft'><code>jekyll_draft</code></a>
22
+ </li>
23
+ <li>
24
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_emoji'><code>jekyll_emoji</code></a>
25
+ </li>
26
+ <li>
27
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_flexible_include.html'><code>jekyll_flexible_include</code></a>
28
+ </li>
29
+ <li>
30
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_google_translate'><code>jekyll_google_translate</code></a>
31
+ </li>
32
+ <li>
33
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_href.html'><code>jekyll_href</code></a>
34
+ </li>
35
+ <li>
36
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_img.html'><code>jekyll_img</code></a>
37
+ </li>
38
+ <li>
39
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_kramdown.html'><code>jekyll_kramdown</code></a>
40
+ </li>
41
+ <li>
42
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_outline.html'><code>jekyll_outline</code></a>
43
+ </li>
44
+ <li>
45
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_pre.html'><code>jekyll_pre</code></a>
46
+ </li>
47
+ <li>
48
+ <a href='https://www.mslinn.com/jekyll_plugins/jekyll_quote.html'><code>jekyll_quote</code></a>
49
+ </li>
27
50
  </ul>
28
51
 
29
52
  ... and also the demonstration plugins in
@@ -34,6 +57,8 @@ Public plugins that use `jekyll_plugin_support` include:
34
57
 
35
58
  Jekyll plugin tags created from `jekyll_plugin_support` framework automatically have the following features:
36
59
 
60
+ 0. Generic LLM support is provided; tested and works with Claude and mini-agent from MiniMax.
61
+ Gemini is not recommended since it can only handle one project at a time, and this component is a project.
37
62
  1. Boilerplate is removed, so you can focus on the required logic and output.
38
63
  2. Arguments are parsed for keywords and name/value parameters.
39
64
  3. Single or double quotes can be used for arguments and parameters.
@@ -73,15 +98,14 @@ Jekyll plugin tags created from `jekyll_plugin_support` framework automatically
73
98
 
74
99
  ### If You Need Windows Environment Variable Expansion
75
100
 
76
- This only works if Jekyll is running on a Windows / WSL machine.
77
- If you have a Mac, ignore the rest of this section, however be sure
78
- not to try to include a file whose name contains two percent characters.
101
+ This works for Jekyll running on any OS.
79
102
 
103
+ A Jekyll Support plugin can selectively expand Windows-style environment variables
80
104
  If a %WindowsStyleEnvironmentVariable% is detected in the `url` parameter,
81
105
  `wslvar` is called.
82
106
  If your WSL installation is old it might not have the `wslvar` command
83
107
 
84
- The wslvar utility is part of the wslu package, a collection of useful utilities that come with WSL.
108
+ The wslvar utility is part of the `wslu` package, a collection of useful utilities that come with WSL.
85
109
  The most straightforward fix is to reinstall it.
86
110
 
87
111
  ```shell
@@ -89,6 +113,15 @@ $ sudo apt update
89
113
  $ sudo apt install wslu
90
114
  ```
91
115
 
116
+ If a Windows-style env var is evaluated on a non-Windows machine,
117
+ then a Bash environment variable of the same name is searched for and used, if found.
118
+
119
+ - If an exact case-sensitive match is found, it is used.
120
+ A debug-level log message is emitted stating what happened.
121
+ - If a case-insensitive match is found, it is used, and a warning is issued.
122
+ - If more than one case-insensitive match is found, Jekyll is shut down.
123
+
124
+
92
125
  ### For A Jekyll Website
93
126
 
94
127
  `Jekyll_plugin_support` is packaged as a Ruby gem.
@@ -125,7 +158,7 @@ end
125
158
  Install the `jekyll_plugin_support` gem into your plugin project in the usual manner:
126
159
 
127
160
  ```shell
128
- $ bundle
161
+ $ bundle install
129
162
  ```
130
163
 
131
164
  Copy the CSS classes from
@@ -427,9 +460,21 @@ Included spaces are ignored:
427
460
  * [`@config`](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#configuring-jekyll-in-your-github-pages-site)
428
461
  The [YAML](https://yaml.org/) Jekyll site configuration file
429
462
 
463
+ - `@jekyll_version` version of Jekyll, the returned string might have a value like "4.4.1".
464
+
430
465
  * [`@helper`](https://github.com/mslinn/jekyll_plugin_support/blob/master/lib/jekyll_plugin_helper.rb)
431
466
  `JekyllPluginHelper` instance for your plugin.
432
467
 
468
+ * `@highlighter_prefix` Syntax highlighter prefix, as it exists
469
+ during the [layout rendering stage](https://jekyllrb.com/docs/plugins/hooks/)
470
+ occurring between `:documents, :post_convert` and `:documents, :post_render`.
471
+ All pages, posts and documents go through this phase.
472
+
473
+ * `@highlighter_suffix` Syntax highlighter suffix, as it exists
474
+ during the [layout rendering stage](https://jekyllrb.com/docs/plugins/hooks/)
475
+ occurring between `:documents, :post_convert` and `:documents, :post_render`.
476
+ All pages, posts and documents go through this phase.
477
+
433
478
  * [`@layout`](https://jekyllrb.com/docs/variables/#global-variables) Layout information
434
479
 
435
480
  * `@logger` [`jekyll_plugin_logger`](https://github.com/mslinn/jekyll_plugin_logger) instance for your Jekyll plugin.
@@ -441,6 +486,11 @@ Included spaces are ignored:
441
486
 
442
487
  * [`@paginator`](https://jekyllrb.com/docs/variables/#page-variables) Pagination variables
443
488
 
489
+ - `@raw_content` The raw HTML/Markdown content of the current page, as it exists
490
+ during the [layout rendering stage](https://jekyllrb.com/docs/plugins/hooks/)
491
+ occurring between `:documents, :post_convert` and `:documents, :post_render`.
492
+ All pages, posts and documents go through this phase.
493
+
444
494
  * [`@scopes`](https://jekyllrb.com/docs/variables/)
445
495
  See the [`jekyll_plugin_support` demo project](demo/variables.html)
446
496
 
@@ -614,16 +664,20 @@ They are can be used like any other Liquid variable.
614
664
  ## Variable Expansion
615
665
 
616
666
  Jekyll expands Liquid variable references during the page rendering process.
617
- Jekyll does not expand Liquid variable references passes as parameters to tag and block plugins, however.
667
+ Jekyll does not expand Liquid variable references passed as parameters to tag and block plugins, however.
618
668
  However, plugins made from `jekyll_plugin_support` automatically
619
669
  expand all types of variable references passed as parameters and in block tag bodies.
620
670
 
621
- `Jekyll_plugin_support` tag and block plugins expand the following types of variables:
671
+ `jekyll_plugin_support` tag and block plugins expand the following types of variables:
622
672
 
623
- * Jekyll_plugin_support configuration variables, discussed above.
673
+ * jekyll_plugin_support configuration variables, discussed above.
624
674
  * Jekyll [page](https://jekyllrb.com/docs/variables/#page-variables) and
625
675
  [layout](https://jekyllrb.com/docs/layouts/#variables) variables.
676
+ * Jekyll global variables such as `jekyll.version` and `jekyll.environment`.
626
677
  * Inline Liquid variables (defined in [assign](https://shopify.dev/docs/api/liquid/tags/assign) and [capture](https://shopify.dev/docs/api/liquid/tags/capture) statements).
678
+ * Include variables (when plugins are invoked from within Jekyll include files with parameters).
679
+ * Theme variables (provided by the active theme).
680
+ * Paginator variables (for sites with pagination).
627
681
 
628
682
  In the following example web page, Jekyll expands the `var1` reference within the `<p></p>` tag,
629
683
  but not the `var1` or `var2` references passed to `my_plugin`.
@@ -645,8 +699,14 @@ Thus, the above is interpreted as follows when `my_plugin` is evaluated during t
645
699
  {% my_plugin param1="value1" param2="value 2" %}
646
700
  ```
647
701
 
702
+ **Note on Variable Resolution Order**: Variables are processed in Jekyll's actual priority order to ensure expected behavior:
703
+ 1. Page variables (e.g., `{{page.title}}`)
704
+ 2. Layout variables (e.g., `{{layout.name}}`)
705
+ 3. Jekyll global variables (e.g., `{{jekyll.version}}`)
706
+ 4. Include variables (e.g., `{{include.my_var}}`)
707
+ 5. Liquid variables (e.g., `{{my_var}}` from `assign`/`capture`)
648
708
 
649
- `Jekyll_plugin_support` expands most of the [plugin variables described above](#predefined-variables),
709
+ `jekyll_plugin_support` expands most of the [plugin variables described above](#predefined-variables),
650
710
  replacing Liquid variable references with their values.
651
711
  The exception is `@argument_string`, which is not expanded.
652
712
 
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  END_MESSAGE
26
26
  spec.require_paths = ['lib']
27
- spec.required_ruby_version = '>= 2.6.0'
27
+ spec.required_ruby_version = '>= 3.4.0'
28
28
  spec.summary = 'Provides a framework for writing and testing Jekyll plugins'
29
29
  spec.test_files = spec.files.grep %r{^(test|spec|features)/}
30
30
  spec.version = JekyllPluginSupportVersion::VERSION
@@ -1,7 +1,7 @@
1
1
  module JekyllSupport
2
2
  # Base class for Jekyll block tags
3
3
  class JekyllBlock < Liquid::Block
4
- attr_reader :argument_string, :helper, :line_number, :logger, :page, :site, :text
4
+ attr_reader :argument_string, :helper, :highlighter_prefix, :highlighter_suffix, :jekyll_version, :line_number, :logger, :page, :raw_content, :site, :text
5
5
 
6
6
  # See https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers#create-your-own-tags
7
7
  # @param tag_name [String] the name of the tag, which we usually know.
@@ -30,7 +30,7 @@ module JekyllSupport
30
30
 
31
31
  @logger = PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
32
32
  @logger.debug { "#{self.class}: respond_to?(:no_arg_parsing) #{respond_to?(:no_arg_parsing) ? 'yes' : 'no'}." }
33
- @helper = JekyllPluginHelper.new tag_name, markup, @logger, respond_to?(:no_arg_parsing)
33
+ @helper = JekyllPluginHelper.new(tag_name, markup, @logger, no_arg_parsing: respond_to?(:no_arg_parsing))
34
34
 
35
35
  @error_name = "#{tag_name.camelcase(:upper)}Error"
36
36
  ::JekyllSupport::CustomError.factory @error_name
@@ -62,9 +62,13 @@ module JekyllSupport
62
62
  set_error_context
63
63
 
64
64
  # @envs.keys are :content, :highlighter_prefix, :highlighter_suffix, :jekyll, :layout, :page, :paginator, :site, :theme
65
- @layout = @envs[:layout]
66
- @paginator = @envs[:paginator]
67
- @theme = @envs[:theme]
65
+ @highlighter_prefix = @envs[:highlighter_prefix]
66
+ @highlighter_suffix = @envs[:highlighter_suffix]
67
+ @jekyll_version = @envs[:jekyll]['version']
68
+ @layout = @envs[:layout]
69
+ @paginator = @envs[:paginator]
70
+ @raw_content = @envs[:content]
71
+ @theme = @envs[:theme]
68
72
 
69
73
  env = @config['env']
70
74
  @mode = env&.key?('JEKYLL_ENV') ? env['JEKYLL_ENV'] : 'development'
@@ -100,7 +104,7 @@ module JekyllSupport
100
104
  # Jekyll plugins should override this method, not render,
101
105
  # so they can be tested more easily.
102
106
  # The following variables are predefined:
103
- # @argument_string, @config, @envs, @helper, @layout, @logger, @mode, @page, @paginator, @site, @tag_name and @theme
107
+ # @argument_string, @config, @envs, @helper, @highlighter_prefix, @highlighter_suffix, @layout, @logger, @mode, @page, @paginator, @raw_content, @site, @tag_name and @theme
104
108
  # @return [String] The result to be rendered to the invoking page
105
109
  def render_impl(text)
106
110
  text
@@ -9,16 +9,12 @@ module JekyllSupport
9
9
  :keys_values, :jpsh_subclass_caller, :logger, :markup, :no_arg_parsing, :params, :params_original,
10
10
  :tag_name
11
11
 
12
- # See https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers#create-your-own-tags
13
12
  # @param tag_name [String] the name of the tag, which we already know.
14
- # @param argument_string [String] the arguments from the tag, as a single string.
15
- # @param parse_context [Liquid::ParseContext] hash that stores Liquid options.
16
- # By default it has two keys: :locale and :line_numbers, the first is a Liquid::I18n object, and the second,
17
- # a boolean parameter that determines if error messages should display the line number the error occurred.
18
- # This argument is used mostly to display localized error messages on Liquid built-in Tags and Filters.
19
- # See https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers#create-your-own-tags
13
+ # @param markup [String] the arguments from the tag, as a single string.
14
+ # @param logger [Jekyll::Logger] logger instance to use for logging messages.
15
+ # @param no_arg_parsing [Boolean] if true, argument parsing is suppressed.
20
16
  # @return [void]
21
- def initialize(tag_name, markup, logger, no_arg_parsing)
17
+ def initialize(tag_name, markup, logger, no_arg_parsing: false)
22
18
  @tag_name = tag_name
23
19
  @logger = logger
24
20
  @markup = markup
@@ -5,9 +5,50 @@ require 'yaml'
5
5
  module JekyllSupport
6
6
  # Class methods for JekyllPluginHelper
7
7
  class JekyllPluginHelper
8
- # Expand an environment variable reference; first expand bash environment variables, then expand windows environment vars
8
+ # Case-insensitive search for a Bash environment variable name
9
+ # # @param name [String] name of environment variable to search for
10
+ # @return matching variable value, or nil if not found
11
+ def self.env_var_case_insensitive(name)
12
+ candidate = ENV.fetch(name, nil) # exact match first
13
+ return candidate if candidate
14
+
15
+ candidates = ENV.select do |key, _value| # case-insensitive search
16
+ key.casecmp?(name)
17
+ end.keys
18
+ case candidates.size
19
+ when 0
20
+ msg = "Environment variable #{name} is undefined, even with a case-insensitive search."
21
+ if Jekyll.logger
22
+ Jekyll.logger.warn msg
23
+ else
24
+ puts "jekyll_plugin_support warning: #{msg}".red
25
+ end
26
+ nil
27
+ when 1
28
+ candidates.first
29
+ else
30
+ msg = "Multiple case-insensitive matches found for environment variable #{name}: #{candidates.join(', ')}"
31
+ raise JekyllPluginSupportError, msg.red, []
32
+ end
33
+ end
34
+
35
+ # Expand an environment variable reference;
36
+ # - expand bash environment variables ($VAR or ${VAR})
37
+ # Note: Windows environment variables (%VAR%) are NOT expanded here
38
+ # because text content often contains percent pairs that aren't environment variables.
39
+ # Use env_var_expand_windows() directly if Windows environment variable expansion is needed.
9
40
  def self.expand_env(str, logger = nil, die_if_undefined: false)
10
- x = str&.gsub(/\$([a-zA-Z_][a-zA-Z0-9_]*)|\${\g<1>}/) do
41
+ JekyllPluginHelper.env_var_expand_bash(str, logger, die_if_undefined: die_if_undefined)
42
+ end
43
+
44
+ # If a Windows-style env var is evaluated on a non-Windows machine,
45
+ # then a Bash environment variable of the same name is searched for and used, if found.
46
+ # - If an exact case-sensitive match is found, it is used.
47
+ # A debug-level log message is emitted stating what happened.
48
+ # - If a case-insensitive match is found, it is used, and a warning is issued.
49
+ # - If more than one case-insensitive match is found, Jekyll is shut down.
50
+ def self.env_var_expand_bash(str, logger = nil, die_if_undefined: false)
51
+ str&.gsub(/\$([a-zA-Z_][a-zA-Z0-9_]*)|\${\g<1>}/) do
11
52
  envar = Regexp.last_match 1
12
53
  unless ENV.key? envar
13
54
  msg = "jekyll_plugin_support error: environment variable #{envar} is undefined"
@@ -21,12 +62,37 @@ module JekyllSupport
21
62
  end
22
63
  ENV.fetch(envar, nil)
23
64
  end
24
- # Only expand %VAR% if x is not nil and contains a %
25
- if x&.include?('%')
26
- x.gsub(/%([a-zA-Z_][a-zA-Z0-9_]*)%|{\g<1>}/) do
65
+ end
66
+
67
+ # Called for Linux, MacOS, and Windows (with WSL)
68
+ #
69
+ def self.find_windows_envar(envar, use_wslvar: true)
70
+ if use_wslvar
71
+ result = self.wslvar envar
72
+ if result.empty?
73
+ error "jekyll_plugin_support warning: wslvar did not find $#{envar}; will attempt to find it in the bash environment variables."
74
+ return env_var_case_insensitive(envar)
75
+ end
76
+
77
+ return result
78
+ end
79
+ env_var_case_insensitive(envar)
80
+ end
81
+
82
+ def self.wslvar(envar)
83
+ result = `powershell.exe -NoProfile -Command "Write-Output \\$env:#{envar}" 2> /dev/null`.chomp("\r\n")
84
+ end
85
+
86
+ # Detect if Jekyll is running under WSL
87
+ def self.wsl_detected? = File.read('/proc/version').include?('-WSL')
88
+
89
+ def self.env_var_expand_windows(str, logger = nil, die_if_undefined: false, use_wslvar: true)
90
+ # Only expand %VAR% if str is not nil and contains a %
91
+ if str&.include?('%')
92
+ str.gsub(/%([a-zA-Z_][a-zA-Z0-9_]*)%|{\g<1>}/) do
27
93
  envar = Regexp.last_match 1
28
- value = `wslvar #{envar} &2> /dev/null`.chomp
29
- unless value
94
+ value = find_windows_envar(envar, use_wslvar: use_wslvar)
95
+ if value.to_s.empty?
30
96
  msg = "jekyll_plugin_support error: Windows environment variable %#{envar}% is undefined"
31
97
  raise JekyllPluginSupportError, msg.red, [] if die_if_undefined
32
98
 
@@ -39,7 +105,7 @@ module JekyllSupport
39
105
  value
40
106
  end
41
107
  else
42
- x
108
+ str
43
109
  end
44
110
  end
45
111
 
@@ -51,17 +51,22 @@ module JekyllSupport
51
51
 
52
52
  scope = liquid_context.scopes.last
53
53
 
54
+ # Support multiple environment variable keys and fall back to Jekyll's environment
54
55
  env = site.config['env']
55
- @mode = env&.key?('JEKYLL_ENV') ? env['JEKYLL_ENV'] : 'development'
56
+ @mode = env&.[]('JEKYLL_ENV') ||
57
+ env&.[]('JEKYLL_ENVIRONMENT') ||
58
+ site.config['JEKYLL_ENV'] ||
59
+ site.config['JEKYLL_ENVIRONMENT'] ||
60
+ 'development'
56
61
 
57
- # Set default values
62
+ # Set default values (support multiple data types)
58
63
  plugin_variables&.each do |name, value|
59
- scope[name] = value if value.instance_of? String
64
+ scope[name] = value
60
65
  end
61
66
 
62
67
  # Override with environment-specific values
63
68
  plugin_variables&.[](@mode)&.each do |name, value|
64
- scope[name] = value if value.instance_of? String
69
+ scope[name] = value
65
70
  end
66
71
 
67
72
  liquid_context
@@ -87,9 +92,17 @@ module JekyllSupport
87
92
  page = liquid_context.registers[:page]
88
93
  envs = liquid_context.environments.first
89
94
  layout = envs[:layout]
90
-
91
- markup = process_layout_variables logger, layout, markup
95
+ jekyll = envs[:jekyll]
96
+
97
+ # Process variables in Jekyll's actual priority order:
98
+ # 1. Page variables (registers[:page])
99
+ # 2. Layout variables (environments.first[:layout])
100
+ # 3. Jekyll global variables (environments.first[:jekyll])
101
+ # 4. Include variables (scopes)
102
+ # 5. Liquid variables (scopes)
92
103
  markup = process_page_variables logger, page, markup
104
+ markup = process_layout_variables logger, layout, markup
105
+ markup = process_jekyll_variables logger, jekyll, markup
93
106
  liquid_context.scopes&.each do |scope|
94
107
  markup = process_included_variables logger, scope, markup
95
108
  markup = process_liquid_variables logger, scope, markup
@@ -101,11 +114,13 @@ module JekyllSupport
101
114
 
102
115
  def self.process_included_variables(logger, scope, markup)
103
116
  scope['include']&.each do |name, value|
104
- if value.nil?
105
- value = ''
106
- logger.warn { "include.#{name} is undefined." }
107
- end
108
- markup.gsub!("{{include.#{name}}}", value)
117
+ raise JekyllPluginSupportError, "include.#{name} is undefined." if name.nil?
118
+ raise JekyllPluginSupportError, "include.#{name} is a #{name.class}, not a String." unless name.instance_of?(String)
119
+ raise JekyllPluginSupportError, "include.#{name} has an undefined value." if value.nil?
120
+
121
+ # Sanitize variable name to prevent regex injection
122
+ sanitized_name = sanitize_variable_name(name)
123
+ markup.gsub!("{{include.#{sanitized_name}}}", value.to_s)
109
124
  end
110
125
  markup
111
126
  rescue StandardError => e
@@ -127,6 +142,10 @@ module JekyllSupport
127
142
 
128
143
  # Process assigned, captured and injected variables
129
144
  def self.process_liquid_variables(logger, scope, markup)
145
+ unless markup.instance_of?(String)
146
+ logger.warn { "markup is a #{markup.class}, not a String" }
147
+ return markup
148
+ end
130
149
  scope&.each do |name, value|
131
150
  next if name.nil?
132
151
 
@@ -149,6 +168,28 @@ module JekyllSupport
149
168
  logger.error { e.full_message }
150
169
  end
151
170
 
171
+ def self.process_jekyll_variables(logger, jekyll, markup)
172
+ return markup unless jekyll
173
+
174
+ # JekyllDrop provides access to version and environment
175
+ # Handle known JekyllDrop attributes
176
+ markup.gsub!('{{jekyll.version}}', jekyll.version.to_s) if jekyll.respond_to?(:version)
177
+
178
+ markup.gsub!('{{jekyll.environment}}', jekyll.environment.to_s) if jekyll.respond_to?(:environment)
179
+
180
+ markup
181
+ rescue StandardError => e
182
+ logger.error { e.full_message }
183
+ end
184
+
185
+ # Sanitizes variable names to prevent regex injection attacks
186
+ # @param name [String] the variable name to sanitize
187
+ # @return [String] sanitized variable name
188
+ def self.sanitize_variable_name(name)
189
+ # Allow only alphanumeric characters, underscores, and hyphens
190
+ name.to_s.gsub(/[^a-zA-Z0-9_-]/, '')
191
+ end
192
+
152
193
  def self.warn_short_trace(logger, error)
153
194
  remaining = error.backtrace.length - DISPLAYED_CALLS
154
195
  logger.warn do
@@ -1,3 +1,3 @@
1
1
  module JekyllPluginSupportVersion
2
- VERSION = '3.1.1'.freeze unless defined?(VERSION)
2
+ VERSION = '3.1.5'.freeze unless defined?(VERSION)
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module JekyllSupport
2
2
  # Base class for Jekyll tags
3
3
  class JekyllTag < Liquid::Tag
4
- attr_reader :argument_string, :helper, :line_number, :logger, :page, :site
4
+ attr_reader :argument_string, :helper, :highlighter_prefix, :highlighter_suffix, :jekyll_version, :line_number, :logger, :page, :raw_content, :site
5
5
 
6
6
  # See https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers#create-your-own-tags
7
7
  # @param tag_name [String] the name of the tag, which we usually know.
@@ -30,7 +30,7 @@ module JekyllSupport
30
30
 
31
31
  @logger = PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
32
32
  @logger.debug { "#{self.class}: respond_to?(:no_arg_parsing) #{respond_to?(:no_arg_parsing) ? 'yes' : 'no'}." }
33
- @helper = JekyllPluginHelper.new(tag_name, @argument_string, @logger, respond_to?(:no_arg_parsing))
33
+ @helper = JekyllPluginHelper.new(tag_name, @argument_string, @logger, no_arg_parsing: respond_to?(:no_arg_parsing))
34
34
 
35
35
  @error_name = "#{tag_name.camelcase(:upper)}Error"
36
36
  ::JekyllSupport::CustomError.factory @error_name
@@ -55,9 +55,13 @@ module JekyllSupport
55
55
  set_error_context
56
56
 
57
57
  # @envs.keys are :content, :highlighter_prefix, :highlighter_suffix, :jekyll, :layout, :page, :paginator, :site, :theme
58
- @layout = @envs[:layout]
59
- @paginator = @envs[:paginator]
60
- @theme = @envs[:theme]
58
+ @highlighter_prefix = @envs[:highlighter_prefix]
59
+ @highlighter_suffix = @envs[:highlighter_suffix]
60
+ @jekyll_version = @envs[:jekyll]['version']
61
+ @layout = @envs[:layout]
62
+ @paginator = @envs[:paginator]
63
+ @raw_content = @envs[:content]
64
+ @theme = @envs[:theme]
61
65
 
62
66
  env = @config['env']
63
67
  @mode = env&.key?('JEKYLL_ENV') ? env['JEKYLL_ENV'] : 'development'
@@ -88,7 +92,7 @@ module JekyllSupport
88
92
 
89
93
  # Jekyll plugins must override this method, not render, so their plugin can be tested more easily
90
94
  # The following variables are predefined:
91
- # @argument_string, @config, @envs, @helper, @layout, @logger, @mode, @page, @paginator, @site, @tag_name and @theme
95
+ # @argument_string, @config, @envs, @helper, @highlighter_prefix, @highlighter_suffix, @layout, @logger, @mode, @page, @paginator, @raw_content, @site, @tag_name and @theme
92
96
  def render_impl
93
97
  abort "#{self.class}.render_impl for tag #{@tag_name} must be overridden, but it was not."
94
98
  end
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+ require_relative '../lib/jekyll_plugin_support'
3
+
4
+ ENV['SystemDrive'] = 'C:'
5
+ ENV['os'] = 'Windows_NT'
6
+
7
+ RSpec.describe('Bash and Windows environment variables') do # rubocop:disable RSpec/DescribeClass
8
+ it 'Expands bash environment variables only (no Windows expansion in expand_env)' do
9
+ actual = JekyllSupport::JekyllPluginHelper.expand_env '$HOME'
10
+ expect(actual).to eq(Dir.home)
11
+
12
+ actual = JekyllSupport::JekyllPluginHelper.expand_env '$HOME/abc'
13
+ expect(actual).to eq("#{Dir.home}/abc")
14
+
15
+ actual = JekyllSupport::JekyllPluginHelper.expand_env 'abc/$HOME/def'
16
+ expect(actual).to eq("abc/#{Dir.home}/def")
17
+
18
+ actual = JekyllSupport::JekyllPluginHelper.expand_env 'abc/$HOME/def'
19
+ expect(actual).to eq("abc/#{Dir.home}/def")
20
+
21
+ actual = JekyllSupport::JekyllPluginHelper.expand_env 'abc/$HOME/def/$HOST'
22
+ expect(actual).to eq("abc/#{Dir.home}/def/#{ENV.fetch('HOST', nil)}")
23
+ end
24
+
25
+ it 'Does NOT expand Windows environment variables in expand_env (only Bash)' do
26
+ # Windows environment variables should NOT be expanded by expand_env
27
+ actual = JekyllSupport::JekyllPluginHelper.expand_env '%SystemDrive%'
28
+ expect(actual).to eq('%SystemDrive%') # Should remain unchanged
29
+
30
+ actual = JekyllSupport::JekyllPluginHelper.expand_env '%SystemDrive%/abc'
31
+ expect(actual).to eq('%SystemDrive%/abc') # Should remain unchanged
32
+
33
+ actual = JekyllSupport::JekyllPluginHelper.expand_env 'abc/%SystemDrive%/def'
34
+ expect(actual).to eq('abc/%SystemDrive%/def') # Should remain unchanged
35
+
36
+ actual = JekyllSupport::JekyllPluginHelper.expand_env 'abc/%SystemDrive%/def/%os%'
37
+ expect(actual).to eq('abc/%SystemDrive%/def/%os%') # Should remain unchanged
38
+ end
39
+
40
+ it 'expands Windows environment variables when env_var_expand_windows is called directly' do
41
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows '%SystemDrive%'
42
+ expect(actual).to eq('C:')
43
+
44
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows '%SystemDrive%/abc'
45
+ expect(actual).to eq('C:/abc')
46
+
47
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows 'abc/%SystemDrive%/def'
48
+ expect(actual).to eq('abc/C:/def')
49
+
50
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows 'abc/%SystemDrive%/def/%os%'
51
+ expect(actual).to eq('abc/C:/def/Windows_NT')
52
+ end
53
+
54
+ it 'expands Windows environment variables when env_var_expand_windows is called directly with use_wslvar: false' do
55
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows '%SystemDrive%', use_wslvar: false
56
+ expect(actual).to eq('C:')
57
+
58
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows '%SystemDrive%/abc', use_wslvar: false
59
+ expect(actual).to eq('C:/abc')
60
+
61
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows 'abc/%SystemDrive%/def', use_wslvar: false
62
+ expect(actual).to eq('abc/C:/def')
63
+
64
+ actual = JekyllSupport::JekyllPluginHelper.env_var_expand_windows 'abc/%SystemDrive%/def/%os%', use_wslvar: false
65
+ expect(actual).to eq('abc/C:/def/Windows_NT')
66
+ end
67
+ end
@@ -1,7 +1,4 @@
1
- require 'jekyll'
2
- require 'jekyll_plugin_logger'
3
1
  require 'spec_helper'
4
- # require 'rspec/match_ignoring_whitespace'
5
2
  require_relative '../lib/jekyll_plugin_support'
6
3
  require_relative '../lib/jekyll_plugin_support/jekyll_plugin_support_spec_support'
7
4
 
@@ -10,7 +7,7 @@ class JekyllPluginHelperOptionsTest
10
7
  logger = PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
11
8
 
12
9
  it 'parses quoted string options' do
13
- helper = described_class.new('my_tag', "colors='blue or green' blah ick", logger, false)
10
+ helper = described_class.new('my_tag', "colors='blue or green' blah ick", logger, no_arg_parsing: false)
14
11
  helper.reinitialize helper.markup
15
12
  expect(helper.keys_values.keys).to eq(%w[colors blah ick])
16
13
 
@@ -21,7 +18,7 @@ class JekyllPluginHelperOptionsTest
21
18
  end
22
19
 
23
20
  it 'parses unquoted string options' do
24
- helper = described_class.new('my_tag', 'color=blue blah ick', logger, false)
21
+ helper = described_class.new('my_tag', 'color=blue blah ick', logger, no_arg_parsing: false)
25
22
  helper.reinitialize helper.markup
26
23
  expect(helper.keys_values.keys).to eq(%w[color blah ick])
27
24
 
@@ -32,7 +29,7 @@ class JekyllPluginHelperOptionsTest
32
29
  end
33
30
 
34
31
  it 'parses quoted booleans' do
35
- helper = described_class.new('my_tag', "bool1='true' bool2='false' blah ick", logger, false)
32
+ helper = described_class.new('my_tag', "bool1='true' bool2='false' blah ick", logger, no_arg_parsing: false)
36
33
  helper.reinitialize helper.markup
37
34
  expect(helper.keys_values.keys).to eq(%w[bool1 bool2 blah ick])
38
35
 
@@ -48,7 +45,7 @@ class JekyllPluginHelperOptionsTest
48
45
  end
49
46
 
50
47
  it 'parses unquoted booleans' do
51
- helper = described_class.new('my_tag', 'bool1=true bool2=false blah ick', logger, false)
48
+ helper = described_class.new('my_tag', 'bool1=true bool2=false blah ick', logger, no_arg_parsing: false)
52
49
  helper.reinitialize helper.markup
53
50
  expect(helper.keys_values.keys).to eq(%w[bool1 bool2 blah ick])
54
51
 
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require 'jekyll'
2
+ require 'jekyll_plugin_logger'
3
+ require 'rspec/match_ignoring_whitespace'
2
4
  require_relative '../lib/jekyll_plugin_support'
3
5
 
4
6
  Jekyll.logger.log_level = :info
@@ -1,9 +1,53 @@
1
- example_id | status | run_time |
2
- ------------------------------------------------ | ------ | --------------- |
3
- ./spec/custom_error_spec.rb[1:1] | failed | 0.00772 seconds |
4
- ./spec/custom_error_spec.rb[2:1] | passed | 0.0011 seconds |
5
- ./spec/jekyll_plugin_helper_options_spec.rb[1:1] | failed | 0.00005 seconds |
6
- ./spec/jekyll_plugin_helper_options_spec.rb[1:2] | failed | 0.00003 seconds |
7
- ./spec/jekyll_plugin_helper_options_spec.rb[1:3] | failed | 0.00003 seconds |
8
- ./spec/jekyll_plugin_helper_options_spec.rb[1:4] | failed | 0.00003 seconds |
9
- ./spec/liquid_variable_parsing_spec.rb[1:1] | failed | 0.00003 seconds |
1
+ example_id | status | run_time |
2
+ ----------------------------------------------------------------- | ------- | --------------- |
3
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:1] | passed | 0.00227 seconds |
4
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:2] | passed | 0.00075 seconds |
5
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:3] | passed | 0.00059 seconds |
6
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:4] | passed | 0.00367 seconds |
7
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:5] | passed | 0.0008 seconds |
8
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:6] | passed | 0.00104 seconds |
9
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:7] | passed | 0.00067 seconds |
10
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:8] | passed | 0.00079 seconds |
11
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:9] | passed | 0.00065 seconds |
12
+ ./spec/all_collections_tag/all_collections_tag_sort_spec.rb[1:10] | passed | 0.00245 seconds |
13
+ ./spec/bsearch_spec.rb[1:1] | pending | 0.00005 seconds |
14
+ ./spec/bsearch_spec.rb[1:2] | pending | 0.00038 seconds |
15
+ ./spec/custom_error_spec.rb[1:1] | passed | 0.00211 seconds |
16
+ ./spec/custom_error_spec.rb[2:1] | passed | 0.00182 seconds |
17
+ ./spec/date_sort_spec.rb[1:1] | passed | 0.00019 seconds |
18
+ ./spec/date_sort_spec.rb[1:2] | passed | 0.00069 seconds |
19
+ ./spec/date_sort_spec.rb[1:3] | passed | 0.00051 seconds |
20
+ ./spec/date_sort_spec.rb[1:4] | passed | 0.00006 seconds |
21
+ ./spec/date_sort_spec.rb[1:5] | passed | 0.00067 seconds |
22
+ ./spec/date_sort_spec.rb[1:6] | passed | 0.00007 seconds |
23
+ ./spec/date_sort_spec.rb[1:7] | passed | 0.00062 seconds |
24
+ ./spec/date_sort_spec.rb[1:8] | passed | 0.00007 seconds |
25
+ ./spec/date_sort_spec.rb[1:9] | passed | 0.0005 seconds |
26
+ ./spec/date_sort_spec.rb[1:10] | passed | 0.00008 seconds |
27
+ ./spec/expand_env_spec.rb[1:1] | passed | 0.00007 seconds |
28
+ ./spec/expand_env_spec.rb[1:2] | passed | 0.00003 seconds |
29
+ ./spec/expand_env_spec.rb[1:3] | passed | 1.66 seconds |
30
+ ./spec/expand_env_spec.rb[1:4] | passed | 0.00131 seconds |
31
+ ./spec/jekyll_plugin_helper_options_spec.rb[1:1] | passed | 0.00014 seconds |
32
+ ./spec/jekyll_plugin_helper_options_spec.rb[1:2] | passed | 0.00058 seconds |
33
+ ./spec/jekyll_plugin_helper_options_spec.rb[1:3] | passed | 0.00169 seconds |
34
+ ./spec/jekyll_plugin_helper_options_spec.rb[1:4] | passed | 0.00091 seconds |
35
+ ./spec/liquid_variable_parsing_spec.rb[1:1] | passed | 0.00126 seconds |
36
+ ./spec/mslinn_binary_search_spec.rb[1:1] | passed | 0.0027 seconds |
37
+ ./spec/mslinn_binary_search_spec.rb[1:2] | passed | 0.00006 seconds |
38
+ ./spec/mslinn_binary_search_spec.rb[1:3] | passed | 0.00004 seconds |
39
+ ./spec/send_chain_spec.rb[1:1] | passed | 0.00003 seconds |
40
+ ./spec/send_chain_spec.rb[1:2] | passed | 0.00004 seconds |
41
+ ./spec/send_chain_spec.rb[1:3] | passed | 0.00003 seconds |
42
+ ./spec/send_chain_spec.rb[1:4] | passed | 0.00003 seconds |
43
+ ./spec/send_chain_spec.rb[1:5] | passed | 0.00003 seconds |
44
+ ./spec/send_chain_spec.rb[1:6] | passed | 0.00003 seconds |
45
+ ./spec/send_chain_spec.rb[1:7] | passed | 0.00003 seconds |
46
+ ./spec/send_spec.rb[1:1] | passed | 0.00022 seconds |
47
+ ./spec/send_spec.rb[1:2] | passed | 0.00004 seconds |
48
+ ./spec/sorted_lru_files_spec.rb[1:1] | passed | 0.00009 seconds |
49
+ ./spec/sorted_lru_files_spec.rb[1:2] | passed | 0.00007 seconds |
50
+ ./spec/sorted_lru_files_spec.rb[1:3] | passed | 0.00003 seconds |
51
+ ./spec/sorted_lru_files_spec.rb[1:4] | passed | 0.00005 seconds |
52
+ ./spec/testable_spec.rb[1:1] | passed | 0.00003 seconds |
53
+ ./spec/testable_spec.rb[2:1] | passed | 0.00003 seconds |
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_plugin_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
@@ -145,6 +145,7 @@ files:
145
145
  - spec/bsearch_spec.rb
146
146
  - spec/custom_error_spec.rb
147
147
  - spec/date_sort_spec.rb
148
+ - spec/expand_env_spec.rb
148
149
  - spec/jekyll_plugin_helper_options_spec.rb
149
150
  - spec/liquid_variable_parsing_spec.rb
150
151
  - spec/mslinn_binary_search_spec.rb
@@ -174,14 +175,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
175
  requirements:
175
176
  - - ">="
176
177
  - !ruby/object:Gem::Version
177
- version: 2.6.0
178
+ version: 3.4.0
178
179
  required_rubygems_version: !ruby/object:Gem::Requirement
179
180
  requirements:
180
181
  - - ">="
181
182
  - !ruby/object:Gem::Version
182
183
  version: '0'
183
184
  requirements: []
184
- rubygems_version: 3.7.2
185
+ rubygems_version: 4.0.11
185
186
  specification_version: 4
186
187
  summary: Provides a framework for writing and testing Jekyll plugins
187
188
  test_files:
@@ -189,6 +190,7 @@ test_files:
189
190
  - spec/bsearch_spec.rb
190
191
  - spec/custom_error_spec.rb
191
192
  - spec/date_sort_spec.rb
193
+ - spec/expand_env_spec.rb
192
194
  - spec/jekyll_plugin_helper_options_spec.rb
193
195
  - spec/liquid_variable_parsing_spec.rb
194
196
  - spec/mslinn_binary_search_spec.rb