jekyll_quote 0.3.1 → 0.4.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -2
- data/CHANGELOG.md +3 -0
- data/README.md +4 -11
- data/jekyll_quote.gemspec +2 -2
- data/lib/jekyll_quote/version.rb +1 -1
- data/lib/jekyll_quote.rb +11 -8
- data/spec/status_persistence.txt +6 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 410dc88a139c0b1b0769b3896a644e6276f20a45ced9864a01d7f8f540a8e567
|
4
|
+
data.tar.gz: 79f5d5b5963ad4f062d3fe8bd772698749025388f72f2672133fba63b83fadbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f3ede950a0fbfefcf9c2731948cd1a3a6b58935ad9cab8b47824a8bfeb4e97d58350c00a61ff52c2bf4ef0f4c2d8df456872015e572a02a94e59f8fbd5f2993
|
7
|
+
data.tar.gz: e8449f5ea4015b67cd5726b18fb8675ec3fa21901cf6fcb661de1c4bd1c2acc0d092ce06ef13360a21bc49e264b14a54e53a8f3e5a86ad9a1e2c9167727281e0
|
data/.rubocop.yml
CHANGED
@@ -28,8 +28,7 @@ Layout/InitialIndentation:
|
|
28
28
|
|
29
29
|
Layout/HashAlignment:
|
30
30
|
EnforcedColonStyle: table
|
31
|
-
|
32
|
-
- jekyll_quote.gemspec
|
31
|
+
EnforcedHashRocketStyle: table
|
33
32
|
|
34
33
|
Layout/LineLength:
|
35
34
|
Max: 150
|
@@ -41,6 +40,9 @@ Lint/RedundantCopDisableDirective:
|
|
41
40
|
Exclude:
|
42
41
|
- jekyll_quote.gemspec
|
43
42
|
|
43
|
+
Metrics/AbcSize:
|
44
|
+
Max: 25
|
45
|
+
|
44
46
|
Metrics/BlockLength:
|
45
47
|
Exclude:
|
46
48
|
- jekyll_quote.gemspec
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -8,8 +8,7 @@ See [demo/index.html](demo/index.html) for examples.
|
|
8
8
|
|
9
9
|
|
10
10
|
## Installation
|
11
|
-
|
12
|
-
Add this line to your Jekyll project's Gemfile, within the `jekyll_plugins` group:
|
11
|
+
Add the following line to your Jekyll project's Gemfile, within the `jekyll_plugins` group:
|
13
12
|
|
14
13
|
```ruby
|
15
14
|
group :jekyll_plugins do
|
@@ -17,19 +16,13 @@ group :jekyll_plugins do
|
|
17
16
|
end
|
18
17
|
```
|
19
18
|
|
20
|
-
Also add it to `_config.yml`:
|
21
|
-
```yaml
|
22
|
-
plugins:
|
23
|
-
- jekyll_quote
|
24
|
-
```
|
25
|
-
|
26
19
|
And then execute:
|
27
20
|
|
28
21
|
$ bundle install
|
29
22
|
|
30
|
-
Or install it yourself as:
|
31
23
|
|
32
|
-
|
24
|
+
## Attribution
|
25
|
+
See [`jekyll_plugin_support` for `attribution`](https://github.com/mslinn/jekyll_plugin_support#subclass-attribution)
|
33
26
|
|
34
27
|
|
35
28
|
## Additional Information
|
@@ -66,7 +59,7 @@ jekyll_quote (0.1.0)
|
|
66
59
|
Generates Jekyll logger with colored output.
|
67
60
|
```
|
68
61
|
|
69
|
-
###
|
62
|
+
### Demo
|
70
63
|
Examine the output by running:
|
71
64
|
```shell
|
72
65
|
$ demo/_bin/debug -r
|
data/jekyll_quote.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
|
7
7
|
spec.authors = ['Mike Slinn']
|
8
8
|
spec.email = ['mslinn@mslinn.com']
|
9
9
|
spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
|
10
|
-
spec.homepage = 'https://www.mslinn.com/
|
10
|
+
spec.homepage = 'https://www.mslinn.com/jekyll/3000-jekyll-plugins.html#jekyll_quote'
|
11
11
|
spec.license = 'MIT'
|
12
12
|
spec.metadata = {
|
13
13
|
'allowed_push_host' => 'https://rubygems.org',
|
@@ -29,5 +29,5 @@ 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_plugin_support', '~> 0.
|
32
|
+
spec.add_dependency 'jekyll_plugin_support', '~> 0.6.0'
|
33
33
|
end
|
data/lib/jekyll_quote/version.rb
CHANGED
data/lib/jekyll_quote.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'jekyll_plugin_support'
|
2
|
-
require '
|
2
|
+
require 'jekyll_plugin_helper'
|
3
3
|
require_relative 'jekyll_quote/version'
|
4
4
|
|
5
5
|
# @author Copyright 2022 Michael Slinn
|
@@ -22,6 +22,8 @@ module Jekyll
|
|
22
22
|
include JekyllQuoteVersion
|
23
23
|
|
24
24
|
def render_impl(text)
|
25
|
+
@helper.gem_file __FILE__ # This enables plugin attribution
|
26
|
+
|
25
27
|
@break = @helper.parameter_specified? 'break' # enforced by CSS if a list ends the body
|
26
28
|
@by = @helper.parameter_specified? 'by'
|
27
29
|
@cite = @helper.parameter_specified? 'cite'
|
@@ -32,18 +34,19 @@ module Jekyll
|
|
32
34
|
preposition = 'By' if @by
|
33
35
|
preposition = '' if @noprep
|
34
36
|
if @cite
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
quote_attribution = if @url && !@url.empty?
|
38
|
+
"<a href='#{@url}' rel='nofollow' target='_blank'>#{@cite}</a>"
|
39
|
+
else
|
40
|
+
"#{@cite}\n"
|
41
|
+
end
|
40
42
|
tag = @break ? 'div' : 'span'
|
41
|
-
|
43
|
+
quote_attribution = "<#{tag} class='quoteAttribution'> – #{preposition} #{quote_attribution}</#{tag}>\n"
|
42
44
|
text = "<div class='quoteText clearfix'>#{text}</div>" if @break
|
43
45
|
end
|
44
46
|
<<~END_HERE
|
45
47
|
<div class='quote'>
|
46
|
-
#{text}#{
|
48
|
+
#{text}#{quote_attribution}
|
49
|
+
#{@helper.attribute if @helper.attribution}
|
47
50
|
</div>
|
48
51
|
END_HERE
|
49
52
|
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
example_id | status | run_time |
|
2
|
+
-------------------------------- | ------ | --------------- |
|
3
|
+
./spec/jekyll_quote_spec.rb[1:1] | failed | 0.01849 seconds |
|
4
|
+
./spec/jekyll_quote_spec.rb[1:2] | failed | 0.00035 seconds |
|
5
|
+
./spec/jekyll_quote_spec.rb[1:3] | failed | 0.00018 seconds |
|
6
|
+
./spec/jekyll_quote_spec.rb[1:4] | failed | 0.00009 seconds |
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_quote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.6.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.6.0
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- mslinn@mslinn.com
|
@@ -55,14 +55,15 @@ files:
|
|
55
55
|
- lib/jekyll_quote/version.rb
|
56
56
|
- spec/jekyll_quote_spec.rb
|
57
57
|
- spec/spec_helper.rb
|
58
|
-
|
58
|
+
- spec/status_persistence.txt
|
59
|
+
homepage: https://www.mslinn.com/jekyll/3000-jekyll-plugins.html#jekyll_quote
|
59
60
|
licenses:
|
60
61
|
- MIT
|
61
62
|
metadata:
|
62
63
|
allowed_push_host: https://rubygems.org
|
63
64
|
bug_tracker_uri: https://github.com/mslinn/jekyll_quote/issues
|
64
65
|
changelog_uri: https://github.com/mslinn/jekyll_quote/CHANGELOG.md
|
65
|
-
homepage_uri: https://www.mslinn.com/
|
66
|
+
homepage_uri: https://www.mslinn.com/jekyll/3000-jekyll-plugins.html#jekyll_quote
|
66
67
|
source_code_uri: https://github.com/mslinn/jekyll_quote
|
67
68
|
post_install_message: |2+
|
68
69
|
|
@@ -89,4 +90,5 @@ summary: Provides a Jekyll filter that creates formatted quotes.
|
|
89
90
|
test_files:
|
90
91
|
- spec/jekyll_quote_spec.rb
|
91
92
|
- spec/spec_helper.rb
|
93
|
+
- spec/status_persistence.txt
|
92
94
|
...
|