jekyll_quote 0.4.1 → 0.4.2
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 +24 -6
- data/LICENSE.txt +0 -0
- data/README.md +47 -22
- data/Rakefile +0 -0
- data/jekyll_quote.gemspec +1 -2
- data/lib/jekyll_quote/version.rb +1 -1
- data/lib/jekyll_quote.rb +1 -1
- data/spec/jekyll_quote_spec.rb +6 -6
- data/spec/spec_helper.rb +1 -2
- metadata +5 -7
- data/spec/status_persistence.txt +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2cf31841215c9cee3ccc8ba48b6dc30ae02b4dc5153c3d9e5f45f1708dee814
|
4
|
+
data.tar.gz: ff907b1974e4c509aa9d0cf56a6b7fb9738c9d936cb350daa61d44cfcdd98a98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12ec759cf139fe8a89aaf89aca329c75657f120982e0b266b63291b746c79801b7f74f156904b3d1060d6554514aff72fb4addb74a60255025438287847d0430
|
7
|
+
data.tar.gz: cc6c73e9a901f50db47867b3fc50a3bf6ce580f8e3ea71db438a081c4e298d905e448f49ff6f92289b6cdd9d7d29dd907ee9af6619adad4a18a832b9380833b3
|
data/.rubocop.yml
CHANGED
@@ -8,17 +8,19 @@ require:
|
|
8
8
|
AllCops:
|
9
9
|
Exclude:
|
10
10
|
- demo/_site/**/*
|
11
|
-
-
|
11
|
+
- binstub/**/*
|
12
12
|
- vendor/**/*
|
13
13
|
- Gemfile*
|
14
14
|
- Rakefile
|
15
15
|
- jekyll_quote.gemspec
|
16
16
|
NewCops: enable
|
17
|
-
TargetRubyVersion: 2.6
|
18
17
|
|
19
18
|
Gemspec/DeprecatedAttributeAssignment:
|
20
19
|
Enabled: false
|
21
20
|
|
21
|
+
Gemspec/RequiredRubyVersion:
|
22
|
+
Enabled: false
|
23
|
+
|
22
24
|
Gemspec/RequireMFA:
|
23
25
|
Enabled: false
|
24
26
|
|
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,35 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## 0.4.2 / 2024-04-27
|
4
|
+
|
5
|
+
* Depends upon jekyll_plugin_support v0.8.5
|
6
|
+
|
7
|
+
|
1
8
|
## 0.4.1 / 2023-06-09
|
2
|
-
|
9
|
+
|
10
|
+
* Added `style` and `class` options.
|
11
|
+
|
3
12
|
|
4
13
|
## 0.4.0 / 2023-04-05
|
5
|
-
|
14
|
+
|
15
|
+
* Added [`attribution` support](https://github.com/mslinn/jekyll_plugin_support#subclass-attribution).
|
16
|
+
|
6
17
|
|
7
18
|
## 0.3.1 / 2023-03-15
|
8
|
-
|
19
|
+
|
20
|
+
* Added CSS class: `clearfix`
|
21
|
+
|
9
22
|
|
10
23
|
## 0.3.0 / 2023-01-14
|
11
|
-
|
24
|
+
|
25
|
+
* Added CSS classes: `quoteAttribution` and `quoteText`
|
26
|
+
|
12
27
|
|
13
28
|
## 0.2.0 / 2023-01-14
|
14
|
-
|
29
|
+
|
30
|
+
* Added options: `break`, `by`, and `noprep`
|
31
|
+
|
15
32
|
|
16
33
|
## 0.1.0 / 2023-01-12
|
17
|
-
|
34
|
+
|
35
|
+
* Initial version
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
`jekyll_quote`
|
2
|
-
[](https://badge.fury.io/rb/jekyll_quote)
|
3
|
-
===========
|
1
|
+
# `jekyll_quote` [](https://badge.fury.io/rb/jekyll_quote)
|
4
2
|
|
5
3
|
`jekyll_quote` is a Jekyll plugin that displays formatted quotes.
|
6
4
|
|
@@ -8,21 +6,27 @@ See [demo/index.html](demo/index.html) for examples.
|
|
8
6
|
|
9
7
|
|
10
8
|
## Installation
|
11
|
-
Add the following line to your Jekyll project's Gemfile, within the `jekyll_plugins` group:
|
12
9
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
1. Add the following line to your Jekyll project's Gemfile, within the `jekyll_plugins` group:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
group :jekyll_plugins do
|
14
|
+
gem 'jekyll_quote'
|
15
|
+
end
|
16
|
+
```
|
18
17
|
|
19
|
-
|
18
|
+
2. Install the `jekyll_quote` Ruby gem and mark it as a dependency of your project by typing:
|
20
19
|
|
21
|
-
|
20
|
+
```shell
|
21
|
+
$ bundle
|
22
|
+
```
|
23
|
+
|
24
|
+
3. Copy the CSS classes from `demo/assets/css/jekyll_quote.css` to your Jekyll project's CSS file.
|
22
25
|
|
23
26
|
|
24
27
|
## Syntax
|
25
|
-
|
28
|
+
|
29
|
+
```html
|
26
30
|
{% quote OPTIONS %}
|
27
31
|
Content of quote goes here.
|
28
32
|
{% endquote %}
|
@@ -31,17 +35,19 @@ And then execute:
|
|
31
35
|
The default preposition is 'From'.
|
32
36
|
|
33
37
|
OPTIONS are:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
|
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.
|
41
|
+
* `cite` – Citation text
|
42
|
+
* `class` – Apply additional CSS classes
|
43
|
+
* `noprep` – Do not preface the citation with a preposition. Ignored if `cite` was not specified.
|
44
|
+
* `style` – Apply additional CSS styling
|
45
|
+
* `url` – URL for the citation. Ignored if `cite` was not specified.
|
41
46
|
|
42
47
|
|
43
48
|
## Usage Example
|
44
|
-
|
49
|
+
|
50
|
+
```html
|
45
51
|
{% quote cite="Blaise Pascal, in Lettres provinciales"
|
46
52
|
url="https://en.wikipedia.org/wiki/Lettres_provinciales"
|
47
53
|
%}
|
@@ -52,31 +58,37 @@ OPTIONS are:
|
|
52
58
|
|
53
59
|
|
54
60
|
## Attribution
|
61
|
+
|
55
62
|
See [`jekyll_plugin_support` for `attribution`](https://github.com/mslinn/jekyll_plugin_support#subclass-attribution)
|
56
63
|
|
57
64
|
|
58
65
|
## Demo
|
66
|
+
|
59
67
|
A demo / test website is provided in the `demo` directory.
|
60
68
|
It can be used to debug the plugin or to run freely.
|
61
69
|
Please examine the HTML files in the demo to see how the plugin works.
|
62
70
|
|
63
71
|
To run the demo freely from the command line, type:
|
64
|
-
|
72
|
+
|
73
|
+
```shell
|
65
74
|
$ demo/_bin/debug -r
|
66
75
|
```
|
67
76
|
|
68
77
|
## Additional Information
|
78
|
+
|
69
79
|
More information is available on
|
70
80
|
[Mike Slinn’s website](https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html).
|
71
81
|
|
72
82
|
|
73
83
|
## Development
|
84
|
+
|
74
85
|
After checking out the repo, run `bin/setup` to install dependencies.
|
75
86
|
|
76
87
|
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
77
88
|
|
78
89
|
|
79
90
|
To build and install this gem onto your local machine, run:
|
91
|
+
|
80
92
|
```shell
|
81
93
|
$ bundle exec rake install
|
82
94
|
jekyll_quote 0.1.0 built to pkg/jekyll_quote-0.1.0.gem.
|
@@ -84,6 +96,7 @@ jekyll_quote (0.1.0) installed.
|
|
84
96
|
```
|
85
97
|
|
86
98
|
Examine the newly built gem:
|
99
|
+
|
87
100
|
```shell
|
88
101
|
$ gem info jekyll_quote
|
89
102
|
|
@@ -99,29 +112,41 @@ jekyll_quote (0.1.0)
|
|
99
112
|
Generates Jekyll logger with colored output.
|
100
113
|
```
|
101
114
|
|
102
|
-
|
115
|
+
|
116
|
+
### Running the Demo
|
117
|
+
|
103
118
|
Examine the output by running:
|
119
|
+
|
104
120
|
```shell
|
105
121
|
$ demo/_bin/debug -r
|
106
122
|
```
|
123
|
+
|
107
124
|
... and pointing your web browser to http://localhost:4444/
|
108
125
|
|
126
|
+
|
109
127
|
### Unit Tests
|
128
|
+
|
110
129
|
Either run `rspec` from Visual Studio Code's *Run and Debug* environment
|
111
130
|
(<kbd>Ctrl</kbd>-<kbd>shift</kbd>-<kbd>D</kbd>) and view the *Debug Console* output,
|
112
131
|
or run it from the command line:
|
132
|
+
|
113
133
|
```shell
|
114
134
|
$ rspec
|
115
135
|
```
|
116
136
|
|
137
|
+
|
117
138
|
### Build and Push to RubyGems
|
139
|
+
|
118
140
|
To release a new version,
|
141
|
+
|
119
142
|
1. Update the version number in `version.rb`.
|
120
143
|
2. Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
|
121
144
|
3. Run the following:
|
145
|
+
|
122
146
|
```shell
|
123
147
|
$ bundle exec rake release
|
124
148
|
```
|
149
|
+
|
125
150
|
The above creates a git tag for the version, commits the created tag,
|
126
151
|
and pushes the new `.gem` file to [RubyGems.org](https://rubygems.org).
|
127
152
|
|
data/Rakefile
CHANGED
File without changes
|
data/jekyll_quote.gemspec
CHANGED
@@ -3,7 +3,6 @@ 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.bindir = 'exe'
|
7
6
|
spec.authors = ['Mike Slinn']
|
8
7
|
spec.email = ['mslinn@mslinn.com']
|
9
8
|
spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
|
@@ -29,5 +28,5 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
|
29
28
|
spec.version = JekyllQuoteVersion::VERSION
|
30
29
|
|
31
30
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
32
|
-
spec.add_dependency 'jekyll_plugin_support', '>= 0.
|
31
|
+
spec.add_dependency 'jekyll_plugin_support', '>= 0.8.5'
|
33
32
|
end
|
data/lib/jekyll_quote/version.rb
CHANGED
data/lib/jekyll_quote.rb
CHANGED
data/spec/jekyll_quote_spec.rb
CHANGED
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
# 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
|
-
RSpec.describe Jekyll::Quote do
|
41
|
+
RSpec.describe Jekyll::Quote do
|
42
42
|
let(:logger) do
|
43
43
|
PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
|
44
44
|
end
|
@@ -55,7 +55,7 @@ class MyTest
|
|
55
55
|
|
56
56
|
it 'has no cite or url' do
|
57
57
|
helper.reinitialize('Quote has no cite or url.')
|
58
|
-
quote =
|
58
|
+
quote = described_class.send(
|
59
59
|
:new,
|
60
60
|
'quote',
|
61
61
|
helper.markup.dup,
|
@@ -71,7 +71,7 @@ class MyTest
|
|
71
71
|
|
72
72
|
it 'has a cite but no url' do
|
73
73
|
helper.reinitialize("cite='This is a citation' The quote has a cite but no url.")
|
74
|
-
quote =
|
74
|
+
quote = described_class.send(
|
75
75
|
:new,
|
76
76
|
'quote',
|
77
77
|
helper.markup.dup,
|
@@ -89,7 +89,7 @@ class MyTest
|
|
89
89
|
|
90
90
|
it 'has a url but no cite' do
|
91
91
|
helper.reinitialize("url='https://blah.com' The quote has a url but no cite.")
|
92
|
-
quote =
|
92
|
+
quote = described_class.send(
|
93
93
|
:new,
|
94
94
|
'quote',
|
95
95
|
helper.markup.dup,
|
@@ -104,8 +104,8 @@ class MyTest
|
|
104
104
|
end
|
105
105
|
|
106
106
|
it 'has a cite and a url' do
|
107
|
-
helper.reinitialize "cite='This is a citation' url='https://blah.com' The quote has a url and a cite."
|
108
|
-
quote =
|
107
|
+
helper.reinitialize "cite='This is a citation' url='https://blah.com' The quote has a url and a cite.".+
|
108
|
+
quote = described_class.send(
|
109
109
|
:new,
|
110
110
|
'quote',
|
111
111
|
helper.markup.dup,
|
data/spec/spec_helper.rb
CHANGED
@@ -2,9 +2,8 @@ require 'jekyll'
|
|
2
2
|
require_relative '../lib/jekyll_quote'
|
3
3
|
|
4
4
|
RSpec.configure do |config|
|
5
|
-
config.
|
5
|
+
config.filter_run_when_matching focus: true
|
6
6
|
config.order = 'random'
|
7
|
-
config.run_all_when_everything_filtered = true
|
8
7
|
|
9
8
|
# See https://relishapp.com/rspec/rspec-core/docs/command-line/only-failures
|
10
9
|
config.example_status_persistence_file_path = 'spec/status_persistence.txt'
|
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.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-28 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.8.5
|
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.8.5
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- mslinn@mslinn.com
|
@@ -55,7 +55,6 @@ files:
|
|
55
55
|
- lib/jekyll_quote/version.rb
|
56
56
|
- spec/jekyll_quote_spec.rb
|
57
57
|
- spec/spec_helper.rb
|
58
|
-
- spec/status_persistence.txt
|
59
58
|
homepage: https://www.mslinn.com/jekyll_plugins/jekyll_quote.html
|
60
59
|
licenses:
|
61
60
|
- MIT
|
@@ -90,5 +89,4 @@ summary: Provides a Jekyll filter that creates formatted quotes.
|
|
90
89
|
test_files:
|
91
90
|
- spec/jekyll_quote_spec.rb
|
92
91
|
- spec/spec_helper.rb
|
93
|
-
- spec/status_persistence.txt
|
94
92
|
...
|
data/spec/status_persistence.txt
DELETED
@@ -1,6 +0,0 @@
|
|
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 |
|