jekyll_draft 3.0.0 → 3.0.1

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: 6bccff30e811690f02c8b5d429c7bd3ed98e78ccd704d7baf440426be26ef1a0
4
- data.tar.gz: 99b14ff0b6237d8b97cc5e21f3a4ec7f777b4f49727ad8c01b9f16df38568ecc
3
+ metadata.gz: d19e46e62c8e1d7cf29a6337023ea875a6497040f773c2b416f9798488820199
4
+ data.tar.gz: c4e3f0ae938781b77a267b3681640234c15dffa3349cf966fff74836bbe4234e
5
5
  SHA512:
6
- metadata.gz: 6451f0a15a14ade6305c7876f51387d00ecb913e619a7a6d116af445ce4564d0f2f11a4620eac66185be15bc0187f6e15b5297d6ccdd5794aeadd633c2a454c6
7
- data.tar.gz: 6925ed553fc89df595f6b181ca6b255bae43759df8c48b809267159b05af9a03dc3878ff06a25b5ba4639b0011f71b9bf112a31c8439e93525404f5afcd3f0f9
6
+ metadata.gz: b192fb472d77c23932160650cdfe68eacfb1f52b1ccf9d0f84c6e19642e4471eeb82d3ffcba920dc3e1ae6d5ba42a04ae8372361b873bae6386521c96eacab2f
7
+ data.tar.gz: b7e2bfbdd778dfe7dd89846c7c7fb0d57fdb1b7d6a1c2688278c32cf9f17edaf28707749fdb90b7698820ae713f3900afb0e93d4fce41c4fea2ff4d433515b51
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- ## 3.0.0 / In process
3
+ ## 3.0.1 / 2025-08-26
4
4
 
5
5
  * Now requires [Jekyll 4.4.1](https://jekyllrb.com/news/2025/01/29/jekyll-4-4-1-released/) or later, and Ruby 3.2.0 or later
6
6
 
data/README.md CHANGED
@@ -5,6 +5,9 @@ visible when the website is published in `production` mode.
5
5
  The Jekyll documentation is scattered and incomplete regarding detecting draft pages and documents.
6
6
  This plugin provides standard ways for detecting draft pages and documents.
7
7
 
8
+ You can display the Jekyll mode that was active when a page was
9
+ generated with `{{jekyll.environment}}`.
10
+
8
11
  `Jekyll_draft` provides the following:
9
12
 
10
13
  * Jekyll block tags: `if_draft`, `if_page_draft`, `unless_draft`, and `unless_page_draft`.
@@ -312,7 +315,7 @@ Here is an example of embedding the `draft_html` inline tag into an HTML documen
312
315
  ```
313
316
 
314
317
  By default, if the document is a draft, and the Jekyll website generation was performed in development mode,
315
- `draft_html` emits ` <i class='jekyll_draft>Draft</i>`,
318
+ `draft_html` emits ` <i class='jekyll_draft'>Draft</i>`,
316
319
  otherwise it does not emit anything.
317
320
 
318
321
  <p>You can change this behavior in several ways:</p>
@@ -1,3 +1,3 @@
1
1
  module DraftVersion
2
- VERSION = '3.0.0'.freeze unless defined?(VERSION)
2
+ VERSION = '3.0.1'.freeze unless defined?(VERSION)
3
3
  end
@@ -11,7 +11,8 @@ RSpec.describe(Jekyll::Draft) do
11
11
  PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
12
12
  end
13
13
 
14
- let(:parse_context) { TestParseContext.new }
14
+ let(:parse_context_published) { TestParseContext.new(published: true) }
15
+ let(:parse_context_draft) { TestParseContext.new(published: false) }
15
16
 
16
17
  it 'detects drafts' do
17
18
  # expect(result).to match_ignoring_whitespace <<-END_RESULT
data/spec/jekyll/mocks.rb CHANGED
@@ -23,7 +23,7 @@ end
23
23
 
24
24
  # Mock for Liquid::Context
25
25
  class TestLiquidContext < Liquid::Context
26
- def initialize
26
+ def initialize(published: false)
27
27
  super
28
28
 
29
29
  page = {
@@ -35,6 +35,7 @@ class TestLiquidContext < Liquid::Context
35
35
  "layout" => "default",
36
36
  "name" => "index.html",
37
37
  "path" => "index.html",
38
+ "published" => published,
38
39
  "title" => "Welcome",
39
40
  "url" => "/",
40
41
  }
@@ -1,3 +1,3 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------- | ------ | --------------- |
3
- ./spec/jekyll/draft_spec.rb[1:1] | failed | 0.00558 seconds |
3
+ ./spec/jekyll/draft_spec.rb[1:1] | passed | 0.00041 seconds |
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_draft
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-03-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jekyll
@@ -108,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
107
  - !ruby/object:Gem::Version
109
108
  version: '0'
110
109
  requirements: []
111
- rubygems_version: 3.5.22
112
- signing_key:
110
+ rubygems_version: 3.7.1
113
111
  specification_version: 4
114
112
  summary: This Jekyll filter detects draft documents.
115
113
  test_files: