jekyll_quote 0.4.3 → 0.4.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: a8c0cf6ba4acc52426ba924726f71c6eaa05059dee13ad5650c0c001c99e2682
4
- data.tar.gz: d4ca9501acdbc08091c7b7cf6b692dc4973eb85ab1e6dee5598669d1b9fdfb8f
3
+ metadata.gz: 00f6eb4a1a87b9140e2ffdf1267b1ba23fcc2d31c29850d052445df794a1369f
4
+ data.tar.gz: 9dd15ddb4b23c83978d736d865358f1f072a5d5ac537fb6da81ab4e8a0575410
5
5
  SHA512:
6
- metadata.gz: adbed464deefcc300befebdfac0c49adcf1fd1a643d17ff0c1f5c42f53557fbc80e1cf901277e0b3846e249b99d08633896bbce2ed88e7d4d9ac6c910118c2b0
7
- data.tar.gz: 7e61341d90a5dce1fdb0efadc4f6372dde7ab21a50ec9cc31b6a83f25779e011c84e80684896d992d931705bafa1e1fdec16cb27447c2fa7d2f35ce653fa41d0
6
+ metadata.gz: 6d779769b6d868d27db68778eb3a3efe079f0611edc8aae46984728d20421125c9137125148b965c121c0553510b3de5f1aa0511b4ae3f0804f10b2ff069d561
7
+ data.tar.gz: 3684a74dcb171df17258df68871dd9ad0a1f27756915957e508348c21e63e41b144c943ef80eee06486ea38ea7311614068fd09d8c7d5eccc34f29b34497b168
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  # - rubocop-jekyll
3
3
  - rubocop-md
4
4
  - rubocop-performance
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.4.5 / 2026-09-22
4
+
5
+ * Fixed generated html
6
+
7
+ ## 0.4.4 / 2025-01-11
8
+
9
+ * Added `id` option.
10
+
3
11
 
4
12
  ## 0.4.3 / 2024-07-22
5
13
 
data/README.md CHANGED
@@ -18,7 +18,7 @@ See [demo/index.html](demo/index.html) for examples.
18
18
  2. Install the `jekyll_quote` Ruby gem and mark it as a dependency of your project by typing:
19
19
 
20
20
  ```shell
21
- $ bundle
21
+ $ bundle install
22
22
  ```
23
23
 
24
24
  3. Copy the CSS classes from `demo/assets/css/jekyll_quote.css` to your Jekyll project's CSS file.
@@ -37,10 +37,13 @@ The default preposition is 'From'.
37
37
  OPTIONS are:
38
38
 
39
39
  * `break` – Put the citation on a separate line. Ignored if `cite` was not specified.
40
- * `by` – Preface the citation with the preposition 'By'. Ignored if `cite` was not specified.
40
+ * `by` – Preface the citation with the preposition 'By'.
41
+ Ignored if `cite` was not specified.
41
42
  * `cite` – Citation text
42
43
  * `class` – Apply additional CSS classes
43
- * `noprep` – Do not preface the citation with a preposition. Ignored if `cite` was not specified.
44
+ * `id` – HTML id attribute for the enclosing `div`
45
+ * `noprep` – Do not preface the citation with a preposition.
46
+ Ignored if `cite` was not specified.
44
47
  * `style` – Apply additional CSS styling
45
48
  * `url` – URL for the citation. Ignored if `cite` was not specified.
46
49
 
data/jekyll_quote.gemspec CHANGED
@@ -3,11 +3,11 @@ require_relative 'lib/jekyll_quote/version'
3
3
  Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
4
4
  github = 'https://github.com/mslinn/jekyll_quote'
5
5
 
6
- spec.authors = ['Mike Slinn']
7
- spec.email = ['mslinn@mslinn.com']
8
- spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
6
+ spec.authors = ['Mike Slinn']
7
+ spec.email = ['mslinn@mslinn.com']
8
+ spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
9
9
  spec.homepage = 'https://www.mslinn.com/jekyll_plugins/jekyll_quote.html'
10
- spec.license = 'MIT'
10
+ spec.license = 'MIT'
11
11
  spec.metadata = {
12
12
  'allowed_push_host' => 'https://rubygems.org',
13
13
  'bug_tracker_uri' => "#{github}/issues",
@@ -15,18 +15,20 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
15
15
  'homepage_uri' => spec.homepage,
16
16
  'source_code_uri' => github,
17
17
  }
18
- spec.name = 'jekyll_quote'
18
+ spec.name = 'jekyll_quote'
19
+ spec.platform = Gem::Platform::RUBY
19
20
  spec.post_install_message = <<~END_MESSAGE
20
21
 
21
22
  Thanks for installing #{spec.name}!
22
23
 
23
24
  END_MESSAGE
24
- spec.require_paths = ['lib']
25
+ spec.require_paths = ['lib']
25
26
  spec.required_ruby_version = '>= 2.6.0'
26
- spec.summary = 'Provides a Jekyll filter that creates formatted quotes.'
27
- spec.test_files = spec.files.grep %r{^(test|spec|features)/}
28
- spec.version = JekyllQuoteVersion::VERSION
27
+ spec.summary = 'Provides a Jekyll filter that creates formatted quotes.'
28
+ spec.test_files = spec.files.grep %r{^(test|spec|features)/}
29
+ spec.version = JekyllQuoteVersion::VERSION
29
30
 
30
31
  spec.add_dependency 'jekyll', '>= 3.5.0'
32
+ spec.add_dependency 'jekyll_draft'
31
33
  spec.add_dependency 'jekyll_plugin_support', '>= 1.0.0'
32
34
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllQuoteVersion
2
- VERSION = '0.4.3'.freeze
2
+ VERSION = '0.4.5'.freeze
3
3
  end
data/lib/jekyll_quote.rb CHANGED
@@ -24,11 +24,15 @@ module Jekyll
24
24
 
25
25
  @break = @helper.parameter_specified? 'break' # enforced by CSS if a list ends the body
26
26
  @by = @helper.parameter_specified? 'by'
27
- @cite = @helper.parameter_specified? 'cite'
27
+ @cite = @helper.parameter_specified?('cite') || ""
28
28
  @class = @helper.parameter_specified? 'class'
29
+
30
+ @id = @helper.parameter_specified? 'id'
31
+ @id = @id ? " id='#{@id}'" : ""
32
+
29
33
  @noprep = @helper.parameter_specified? 'noprep'
30
34
  @style = @helper.parameter_specified? 'style'
31
- @url = @helper.parameter_specified? 'url'
35
+ @url = @helper.parameter_specified?('url') || ""
32
36
  preposition = 'From'
33
37
  preposition = 'By' if @by
34
38
  preposition = '' if @noprep
@@ -49,7 +53,7 @@ module Jekyll
49
53
  klass = "#{@class} " if @class
50
54
  styling = " style='#{@style}'" if @style
51
55
  <<~END_HERE
52
- <div class='#{klass}quote'#{styling}>
56
+ <div #{@id} class='#{klass}quote'#{styling}>
53
57
  #{@text}#{@cite_markup}
54
58
  #{@helper.attribute if @helper.attribution}
55
59
  </div>
@@ -1,7 +1,7 @@
1
1
  require 'jekyll'
2
2
  require 'jekyll_plugin_logger'
3
3
  require 'rspec/match_ignoring_whitespace'
4
- require_relative '../lib/jekyll_quote'
4
+ require_relative 'spec_helper'
5
5
 
6
6
  Registers = Struct.new(:page, :site)
7
7
 
@@ -36,7 +36,7 @@ class TestParseContext < Liquid::ParseContext
36
36
  end
37
37
  end
38
38
 
39
- # These tests all fail because I have not figured out how to provide a Jekyll block body to a test
39
+ # FIXME: These tests all fail because I have not figured out how to provide a Jekyll block body to a test
40
40
  class MyTest
41
41
  RSpec.describe Jekyll::Quote do
42
42
  let(:logger) do
@@ -46,20 +46,20 @@ class MyTest
46
46
  let(:parse_context) { TestParseContext.new }
47
47
 
48
48
  let(:helper) do
49
- JekyllPluginHelper.new(
49
+ JekyllSupport::JekyllPluginHelper.new(
50
50
  'quote',
51
51
  'This is a quote.',
52
52
  logger
53
53
  )
54
54
  end
55
55
 
56
- it 'has no cite or url' do
56
+ it 'has no cite or url', skip: 'unfinished' do
57
57
  helper.reinitialize('Quote has no cite or url.')
58
58
  quote = described_class.send(
59
59
  :new,
60
60
  'quote',
61
61
  helper.markup.dup,
62
- parse_context
62
+ logger
63
63
  )
64
64
  result = quote.send(:render_impl, helper.markup)
65
65
  expect(result).to match_ignoring_whitespace <<-END_RESULT
@@ -69,13 +69,13 @@ class MyTest
69
69
  END_RESULT
70
70
  end
71
71
 
72
- it 'has a cite but no url' do
72
+ it 'has a cite but no url', skip: 'unfinished' do
73
73
  helper.reinitialize("cite='This is a citation' The quote has a cite but no url.")
74
74
  quote = described_class.send(
75
75
  :new,
76
76
  'quote',
77
77
  helper.markup.dup,
78
- parse_context
78
+ logger
79
79
  )
80
80
  result = quote.send(:render_impl, helper.markup)
81
81
  expect(result).to match_ignoring_whitespace <<-END_RESULT
@@ -87,13 +87,13 @@ class MyTest
87
87
  END_RESULT
88
88
  end
89
89
 
90
- it 'has a url but no cite' do
90
+ it 'has a url but no cite', skip: 'unfinished' do
91
91
  helper.reinitialize("url='https://blah.com' The quote has a url but no cite.")
92
92
  quote = described_class.send(
93
93
  :new,
94
94
  'quote',
95
95
  helper.markup.dup,
96
- parse_context
96
+ logger
97
97
  )
98
98
  result = quote.send(:render_impl, helper.markup)
99
99
  expect(result).to match_ignoring_whitespace <<-END_RESULT
@@ -103,13 +103,13 @@ class MyTest
103
103
  END_RESULT
104
104
  end
105
105
 
106
- it 'has a cite and a url' do
106
+ it 'has a cite and a url', skip: 'unfinished' do
107
107
  helper.reinitialize "cite='This is a citation' url='https://blah.com' The quote has a url and a cite.".+
108
108
  quote = described_class.send(
109
109
  :new,
110
110
  'quote',
111
111
  helper.markup.dup,
112
- parse_context
112
+ logger
113
113
  )
114
114
  result = quote.send(:render_impl, helper.markup)
115
115
  expect(result).to match_ignoring_whitespace <<-END_RESULT
@@ -1,6 +1,6 @@
1
- example_id | status | run_time |
2
- -------------------------------- | ------ | --------------- |
3
- ./spec/jekyll_quote_spec.rb[1:1] | failed | 0.00015 seconds |
4
- ./spec/jekyll_quote_spec.rb[1:2] | failed | 0.00006 seconds |
5
- ./spec/jekyll_quote_spec.rb[1:3] | failed | 0.00006 seconds |
6
- ./spec/jekyll_quote_spec.rb[1:4] | failed | 0.00005 seconds |
1
+ example_id | status | run_time |
2
+ -------------------------------- | ------- | --------------- |
3
+ ./spec/jekyll_quote_spec.rb[1:1] | pending | 0.00001 seconds |
4
+ ./spec/jekyll_quote_spec.rb[1:2] | pending | 0 seconds |
5
+ ./spec/jekyll_quote_spec.rb[1:3] | pending | 0 seconds |
6
+ ./spec/jekyll_quote_spec.rb[1:4] | pending | 0 seconds |
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_quote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-07-26 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
@@ -24,6 +23,20 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: 3.5.0
26
+ - !ruby/object:Gem::Dependency
27
+ name: jekyll_draft
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
27
40
  - !ruby/object:Gem::Dependency
28
41
  name: jekyll_plugin_support
29
42
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +51,6 @@ dependencies:
38
51
  - - ">="
39
52
  - !ruby/object:Gem::Version
40
53
  version: 1.0.0
41
- description:
42
54
  email:
43
55
  - mslinn@mslinn.com
44
56
  executables: []
@@ -83,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
95
  - !ruby/object:Gem::Version
84
96
  version: '0'
85
97
  requirements: []
86
- rubygems_version: 3.5.16
87
- signing_key:
98
+ rubygems_version: 4.0.21
88
99
  specification_version: 4
89
100
  summary: Provides a Jekyll filter that creates formatted quotes.
90
101
  test_files: