jekyll_quote 0.4.4 → 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 +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/jekyll_quote.gemspec +1 -0
- data/lib/jekyll_quote/version.rb +1 -1
- data/lib/jekyll_quote.rb +4 -4
- data/spec/jekyll_quote_spec.rb +11 -11
- data/spec/status_persistence.txt +6 -6
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00f6eb4a1a87b9140e2ffdf1267b1ba23fcc2d31c29850d052445df794a1369f
|
|
4
|
+
data.tar.gz: 9dd15ddb4b23c83978d736d865358f1f072a5d5ac537fb6da81ab4e8a0575410
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d779769b6d868d27db68778eb3a3efe079f0611edc8aae46984728d20421125c9137125148b965c121c0553510b3de5f1aa0511b4ae3f0804f10b2ff069d561
|
|
7
|
+
data.tar.gz: 3684a74dcb171df17258df68871dd9ad0a1f27756915957e508348c21e63e41b144c943ef80eee06486ea38ea7311614068fd09d8c7d5eccc34f29b34497b168
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
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.
|
data/jekyll_quote.gemspec
CHANGED
|
@@ -29,5 +29,6 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
|
|
29
29
|
spec.version = JekyllQuoteVersion::VERSION
|
|
30
30
|
|
|
31
31
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
|
32
|
+
spec.add_dependency 'jekyll_draft'
|
|
32
33
|
spec.add_dependency 'jekyll_plugin_support', '>= 1.0.0'
|
|
33
34
|
end
|
data/lib/jekyll_quote/version.rb
CHANGED
data/lib/jekyll_quote.rb
CHANGED
|
@@ -24,15 +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?
|
|
27
|
+
@cite = @helper.parameter_specified?('cite') || ""
|
|
28
28
|
@class = @helper.parameter_specified? 'class'
|
|
29
29
|
|
|
30
30
|
@id = @helper.parameter_specified? 'id'
|
|
31
|
-
@id = " id='#{@id}'"
|
|
31
|
+
@id = @id ? " id='#{@id}'" : ""
|
|
32
32
|
|
|
33
33
|
@noprep = @helper.parameter_specified? 'noprep'
|
|
34
34
|
@style = @helper.parameter_specified? 'style'
|
|
35
|
-
@url = @helper.parameter_specified?
|
|
35
|
+
@url = @helper.parameter_specified?('url') || ""
|
|
36
36
|
preposition = 'From'
|
|
37
37
|
preposition = 'By' if @by
|
|
38
38
|
preposition = '' if @noprep
|
|
@@ -53,7 +53,7 @@ module Jekyll
|
|
|
53
53
|
klass = "#{@class} " if @class
|
|
54
54
|
styling = " style='#{@style}'" if @style
|
|
55
55
|
<<~END_HERE
|
|
56
|
-
<div#{@id} class='#{klass}quote'#{styling}>
|
|
56
|
+
<div #{@id} class='#{klass}quote'#{styling}>
|
|
57
57
|
#{@text}#{@cite_markup}
|
|
58
58
|
#{@helper.attribute if @helper.attribution}
|
|
59
59
|
</div>
|
data/spec/jekyll_quote_spec.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'jekyll'
|
|
2
2
|
require 'jekyll_plugin_logger'
|
|
3
3
|
require 'rspec/match_ignoring_whitespace'
|
|
4
|
-
require_relative '
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
112
|
+
logger
|
|
113
113
|
)
|
|
114
114
|
result = quote.send(:render_impl, helper.markup)
|
|
115
115
|
expect(result).to match_ignoring_whitespace <<-END_RESULT
|
data/spec/status_persistence.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
example_id | status
|
|
2
|
-
-------------------------------- |
|
|
3
|
-
./spec/jekyll_quote_spec.rb[1:1] |
|
|
4
|
-
./spec/jekyll_quote_spec.rb[1:2] |
|
|
5
|
-
./spec/jekyll_quote_spec.rb[1:3] |
|
|
6
|
-
./spec/jekyll_quote_spec.rb[1:4] |
|
|
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,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll_quote
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Slinn
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: jekyll
|
|
@@ -23,6 +23,20 @@ dependencies:
|
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
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'
|
|
26
40
|
- !ruby/object:Gem::Dependency
|
|
27
41
|
name: jekyll_plugin_support
|
|
28
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -81,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
81
95
|
- !ruby/object:Gem::Version
|
|
82
96
|
version: '0'
|
|
83
97
|
requirements: []
|
|
84
|
-
rubygems_version:
|
|
98
|
+
rubygems_version: 4.0.21
|
|
85
99
|
specification_version: 4
|
|
86
100
|
summary: Provides a Jekyll filter that creates formatted quotes.
|
|
87
101
|
test_files:
|