jekyll-liquify 0.0.3 → 0.1.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/.github/workflows/rubocop.yml +28 -0
- data/.github/workflows/ruby.yml +29 -0
- data/.gitignore +3 -1
- data/.rubocop-relaxed-2.5.yml +153 -0
- data/.rubocop.yml +39 -0
- data/.rubocop_todo.yml +36 -0
- data/Gemfile +16 -1
- data/Gemfile.lock +172 -0
- data/README.md +5 -4
- data/Rakefile +4 -2
- data/jekyll-liquify.gemspec +17 -16
- data/lib/jekyll/liquify_filter.rb +19 -0
- data/lib/jekyll-liquify.rb +2 -14
- data/script/bootstrap +2 -2
- data/script/cibuild +2 -2
- data/script/console +9 -7
- data/spec/fixtures/_config.yml +6 -0
- data/spec/lib/jekyll/liquify_filter_spec.rb +51 -0
- data/spec/spec_helper.rb +11 -6
- metadata +39 -62
- data/spec/jekyll-liquify_spec.rb +0 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 334bd4d4d72fe79b2ecb119208ca7d3f0bb0cb27f6e2e163a1d5f301d1406d08
|
4
|
+
data.tar.gz: 0da4eb30de0ddced83d129eca95fdb73d1f39af6ba9d21eddb56e5a4238fd55c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13facb6ccb63e6d39a36a96a7aae5cd891af52ca2fabcf18aef4b61837cf34c3f0dcdf8df7b411e2af6d1019bc1c365d763b221f310710971f5c54a7f49cdf7d
|
7
|
+
data.tar.gz: b638b0377590da816d97558da423d9e91a72a574a9d78db65551f20d9c73d21505936837fa47e00a1bdeeb1c7b442ca8f55a54a76957ee7e7048035e33ac0201
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Rubocop
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby-version: ['3.4', '3.3']
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
bundler-cache: true
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
24
|
+
- name: Install dependencies
|
25
|
+
run: bundle install -j 5
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rubocop
|
28
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: RSpec
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
build:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby-version: ['3.4', '3.3', '3.2', '3.1']
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
bundler-cache: true
|
24
|
+
ruby-version: ${{ matrix.ruby-version }}
|
25
|
+
- name: Install dependencies
|
26
|
+
run: bundle install -j 5
|
27
|
+
- name: Run RSpecs
|
28
|
+
run: bundle exec rspec --format progress -p 3
|
29
|
+
|
data/.gitignore
CHANGED
@@ -0,0 +1,153 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.5
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: https://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: https://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: https://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: https://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: https://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: https://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: https://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: https://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: https://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/NumericPredicate:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate
|
71
|
+
|
72
|
+
Style/ParallelAssignment:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
|
75
|
+
|
76
|
+
Style/PercentLiteralDelimiters:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
|
79
|
+
|
80
|
+
Style/PerlBackrefs:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
|
83
|
+
|
84
|
+
Style/Semicolon:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: https://relaxed.ruby.style/#stylesemicolon
|
87
|
+
|
88
|
+
Style/SignalException:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: https://relaxed.ruby.style/#stylesignalexception
|
91
|
+
|
92
|
+
Style/SingleLineBlockParams:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
|
95
|
+
|
96
|
+
Style/SingleLineMethods:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
|
99
|
+
|
100
|
+
Layout/SpaceBeforeBlockBraces:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
103
|
+
|
104
|
+
Layout/SpaceInsideParens:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
|
107
|
+
|
108
|
+
Style/SpecialGlobalVars:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
|
111
|
+
|
112
|
+
Style/StringLiterals:
|
113
|
+
Enabled: false
|
114
|
+
StyleGuide: https://relaxed.ruby.style/#stylestringliterals
|
115
|
+
|
116
|
+
Style/TrailingCommaInArguments:
|
117
|
+
Enabled: false
|
118
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
|
119
|
+
|
120
|
+
Style/TrailingCommaInArrayLiteral:
|
121
|
+
Enabled: false
|
122
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
123
|
+
|
124
|
+
Style/TrailingCommaInHashLiteral:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
|
127
|
+
|
128
|
+
Style/SymbolArray:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: http://relaxed.ruby.style/#stylesymbolarray
|
131
|
+
|
132
|
+
Style/WhileUntilModifier:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
|
135
|
+
|
136
|
+
Style/WordArray:
|
137
|
+
Enabled: false
|
138
|
+
StyleGuide: https://relaxed.ruby.style/#stylewordarray
|
139
|
+
|
140
|
+
Lint/AmbiguousRegexpLiteral:
|
141
|
+
Enabled: false
|
142
|
+
StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
|
143
|
+
|
144
|
+
Lint/AssignmentInCondition:
|
145
|
+
Enabled: false
|
146
|
+
StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
|
147
|
+
|
148
|
+
Layout/LineLength:
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Metrics:
|
152
|
+
Enabled: false
|
153
|
+
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rake
|
3
|
+
- rubocop-rspec
|
4
|
+
|
5
|
+
inherit_from:
|
6
|
+
- .rubocop-relaxed-2.5.yml
|
7
|
+
- .rubocop_todo.yml
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
NewCops: enable
|
11
|
+
TargetRubyVersion: 3
|
12
|
+
SuggestExtensions: true
|
13
|
+
UseCache: true
|
14
|
+
DefaultFormatter: progress
|
15
|
+
DisplayStyleGuide: true
|
16
|
+
DisplayCopNames: true
|
17
|
+
Exclude:
|
18
|
+
- "**/rubocop"
|
19
|
+
- "**/vendor/bundle/**/*"
|
20
|
+
Include:
|
21
|
+
- '**/*.rb'
|
22
|
+
- '**/*.gemfile'
|
23
|
+
- '**/*.gemspec'
|
24
|
+
- '**/*.rake'
|
25
|
+
- '**/*.ru'
|
26
|
+
- '**/Gemfile'
|
27
|
+
- '**/Rakefile'
|
28
|
+
|
29
|
+
Layout/HashAlignment:
|
30
|
+
Enabled: true
|
31
|
+
EnforcedColonStyle: table
|
32
|
+
|
33
|
+
Style/Dir:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
RSpec/ContextWording:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2025-01-13 10:34:52 UTC using RuboCop version 1.70.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Severity, Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'jekyll-liquify.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 2
|
17
|
+
# Configuration parameters: AllowedMethods.
|
18
|
+
# AllowedMethods: enums
|
19
|
+
Lint/ConstantDefinitionInBlock:
|
20
|
+
Exclude:
|
21
|
+
- 'spec/spec_helper.rb'
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
# Configuration parameters: DebuggerMethods, DebuggerRequires.
|
25
|
+
Lint/Debugger:
|
26
|
+
Exclude:
|
27
|
+
- 'script/console'
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
31
|
+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
32
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
33
|
+
Naming/FileName:
|
34
|
+
Exclude:
|
35
|
+
- 'Rakefile.rb'
|
36
|
+
- 'lib/jekyll-liquify.rb'
|
data/Gemfile
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
group :development, :test do
|
6
|
+
gem 'debug', '>= 1.0.0'
|
7
|
+
gem 'jekyll'
|
8
|
+
gem 'rake'
|
9
|
+
gem 'rspec'
|
10
|
+
gem 'rspec-core'
|
11
|
+
gem 'rspec-its'
|
12
|
+
gem 'rubocop'
|
13
|
+
gem 'rubocop-rake'
|
14
|
+
gem 'rubocop-rspec'
|
15
|
+
gem 'simplecov'
|
16
|
+
end
|
2
17
|
|
3
18
|
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
jekyll-liquify (0.1.0)
|
5
|
+
base64
|
6
|
+
csv
|
7
|
+
liquid
|
8
|
+
logger
|
9
|
+
redcarpet
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
addressable (2.8.7)
|
15
|
+
public_suffix (>= 2.0.2, < 7.0)
|
16
|
+
ast (2.4.2)
|
17
|
+
base64 (0.2.0)
|
18
|
+
bigdecimal (3.1.9)
|
19
|
+
colorator (1.1.0)
|
20
|
+
concurrent-ruby (1.3.5)
|
21
|
+
csv (3.3.2)
|
22
|
+
date (3.4.1)
|
23
|
+
debug (1.10.0)
|
24
|
+
irb (~> 1.10)
|
25
|
+
reline (>= 0.3.8)
|
26
|
+
diff-lcs (1.5.1)
|
27
|
+
docile (1.4.1)
|
28
|
+
em-websocket (0.5.3)
|
29
|
+
eventmachine (>= 0.12.9)
|
30
|
+
http_parser.rb (~> 0)
|
31
|
+
eventmachine (1.2.7)
|
32
|
+
ffi (1.17.1-arm64-darwin)
|
33
|
+
ffi (1.17.1-x86_64-linux-gnu)
|
34
|
+
forwardable-extended (2.6.0)
|
35
|
+
google-protobuf (4.29.3-arm64-darwin)
|
36
|
+
bigdecimal
|
37
|
+
rake (>= 13)
|
38
|
+
google-protobuf (4.29.3-x86_64-linux)
|
39
|
+
bigdecimal
|
40
|
+
rake (>= 13)
|
41
|
+
http_parser.rb (0.8.0)
|
42
|
+
i18n (1.14.6)
|
43
|
+
concurrent-ruby (~> 1.0)
|
44
|
+
io-console (0.8.0)
|
45
|
+
irb (1.14.3)
|
46
|
+
rdoc (>= 4.0.0)
|
47
|
+
reline (>= 0.4.2)
|
48
|
+
jekyll (4.3.4)
|
49
|
+
addressable (~> 2.4)
|
50
|
+
colorator (~> 1.0)
|
51
|
+
em-websocket (~> 0.5)
|
52
|
+
i18n (~> 1.0)
|
53
|
+
jekyll-sass-converter (>= 2.0, < 4.0)
|
54
|
+
jekyll-watch (~> 2.0)
|
55
|
+
kramdown (~> 2.3, >= 2.3.1)
|
56
|
+
kramdown-parser-gfm (~> 1.0)
|
57
|
+
liquid (~> 4.0)
|
58
|
+
mercenary (>= 0.3.6, < 0.5)
|
59
|
+
pathutil (~> 0.9)
|
60
|
+
rouge (>= 3.0, < 5.0)
|
61
|
+
safe_yaml (~> 1.0)
|
62
|
+
terminal-table (>= 1.8, < 4.0)
|
63
|
+
webrick (~> 1.7)
|
64
|
+
jekyll-sass-converter (3.0.0)
|
65
|
+
sass-embedded (~> 1.54)
|
66
|
+
jekyll-watch (2.2.1)
|
67
|
+
listen (~> 3.0)
|
68
|
+
json (2.9.1)
|
69
|
+
kramdown (2.5.1)
|
70
|
+
rexml (>= 3.3.9)
|
71
|
+
kramdown-parser-gfm (1.1.0)
|
72
|
+
kramdown (~> 2.0)
|
73
|
+
language_server-protocol (3.17.0.3)
|
74
|
+
liquid (4.0.4)
|
75
|
+
listen (3.9.0)
|
76
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
77
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
78
|
+
logger (1.6.5)
|
79
|
+
mercenary (0.4.0)
|
80
|
+
parallel (1.26.3)
|
81
|
+
parser (3.3.6.0)
|
82
|
+
ast (~> 2.4.1)
|
83
|
+
racc
|
84
|
+
pathutil (0.16.2)
|
85
|
+
forwardable-extended (~> 2.6)
|
86
|
+
psych (5.2.2)
|
87
|
+
date
|
88
|
+
stringio
|
89
|
+
public_suffix (6.0.1)
|
90
|
+
racc (1.8.1)
|
91
|
+
rainbow (3.1.1)
|
92
|
+
rake (13.2.1)
|
93
|
+
rb-fsevent (0.11.2)
|
94
|
+
rb-inotify (0.11.1)
|
95
|
+
ffi (~> 1.0)
|
96
|
+
rdoc (6.10.0)
|
97
|
+
psych (>= 4.0.0)
|
98
|
+
redcarpet (3.6.0)
|
99
|
+
regexp_parser (2.10.0)
|
100
|
+
reline (0.6.0)
|
101
|
+
io-console (~> 0.5)
|
102
|
+
rexml (3.4.0)
|
103
|
+
rouge (4.5.1)
|
104
|
+
rspec (3.13.0)
|
105
|
+
rspec-core (~> 3.13.0)
|
106
|
+
rspec-expectations (~> 3.13.0)
|
107
|
+
rspec-mocks (~> 3.13.0)
|
108
|
+
rspec-core (3.13.2)
|
109
|
+
rspec-support (~> 3.13.0)
|
110
|
+
rspec-expectations (3.13.3)
|
111
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
+
rspec-support (~> 3.13.0)
|
113
|
+
rspec-its (2.0.0)
|
114
|
+
rspec-core (>= 3.13.0)
|
115
|
+
rspec-expectations (>= 3.13.0)
|
116
|
+
rspec-mocks (3.13.2)
|
117
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
+
rspec-support (~> 3.13.0)
|
119
|
+
rspec-support (3.13.2)
|
120
|
+
rubocop (1.70.0)
|
121
|
+
json (~> 2.3)
|
122
|
+
language_server-protocol (>= 3.17.0)
|
123
|
+
parallel (~> 1.10)
|
124
|
+
parser (>= 3.3.0.2)
|
125
|
+
rainbow (>= 2.2.2, < 4.0)
|
126
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
127
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
128
|
+
ruby-progressbar (~> 1.7)
|
129
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
130
|
+
rubocop-ast (1.37.0)
|
131
|
+
parser (>= 3.3.1.0)
|
132
|
+
rubocop-rake (0.6.0)
|
133
|
+
rubocop (~> 1.0)
|
134
|
+
rubocop-rspec (3.3.0)
|
135
|
+
rubocop (~> 1.61)
|
136
|
+
ruby-progressbar (1.13.0)
|
137
|
+
safe_yaml (1.0.5)
|
138
|
+
sass-embedded (1.83.4-arm64-darwin)
|
139
|
+
google-protobuf (~> 4.29)
|
140
|
+
sass-embedded (1.83.4-x86_64-linux-gnu)
|
141
|
+
google-protobuf (~> 4.29)
|
142
|
+
simplecov (0.22.0)
|
143
|
+
docile (~> 1.1)
|
144
|
+
simplecov-html (~> 0.11)
|
145
|
+
simplecov_json_formatter (~> 0.1)
|
146
|
+
simplecov-html (0.13.1)
|
147
|
+
simplecov_json_formatter (0.1.4)
|
148
|
+
stringio (3.1.2)
|
149
|
+
terminal-table (3.0.2)
|
150
|
+
unicode-display_width (>= 1.1.1, < 3)
|
151
|
+
unicode-display_width (2.6.0)
|
152
|
+
webrick (1.9.1)
|
153
|
+
|
154
|
+
PLATFORMS
|
155
|
+
arm64-darwin
|
156
|
+
x86_64-linux
|
157
|
+
|
158
|
+
DEPENDENCIES
|
159
|
+
debug (>= 1.0.0)
|
160
|
+
jekyll
|
161
|
+
jekyll-liquify!
|
162
|
+
rake
|
163
|
+
rspec
|
164
|
+
rspec-core
|
165
|
+
rspec-its
|
166
|
+
rubocop
|
167
|
+
rubocop-rake
|
168
|
+
rubocop-rspec
|
169
|
+
simplecov
|
170
|
+
|
171
|
+
BUNDLED WITH
|
172
|
+
2.6.2
|
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Jekyll Liquify
|
2
2
|
|
3
|
-
|
4
|
-
*
|
3
|
+
A Jekyll filter that can parse Liquid in front matter
|
5
4
|
|
6
5
|
[](https://rubygems.org/gems/jekyll-liquify)
|
7
|
-
|
8
|
-
[](https://github.com/kigster/jekyll-liquify/actions/workflows/rubocop.yml)
|
8
|
+
|
9
|
+
[](https://github.com/kigster/jekyll-liquify/actions/workflows/ruby.yml)
|
9
10
|
|
10
11
|
## Usage
|
11
12
|
|
data/Rakefile
CHANGED
data/jekyll-liquify.gemspec
CHANGED
@@ -1,24 +1,25 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name =
|
5
|
-
spec.summary =
|
6
|
-
spec.version =
|
7
|
-
spec.authors = [
|
8
|
-
spec.email =
|
9
|
-
spec.homepage =
|
10
|
-
spec.licenses = [
|
4
|
+
spec.name = 'jekyll-liquify'
|
5
|
+
spec.summary = 'A Jekyll filter that can parse Liquid in front matter.'
|
6
|
+
spec.version = '0.1.0'
|
7
|
+
spec.authors = ['Brian Hedberg']
|
8
|
+
spec.email = 'briansheahedberg@gmail.com'
|
9
|
+
spec.homepage = 'https://github.com/gemfarmer/jekyll-liquify'
|
10
|
+
spec.licenses = ['MIT']
|
11
|
+
|
12
|
+
spec.required_ruby_version = '>= 3'
|
11
13
|
|
12
14
|
spec.files = `git ls-files -z`.split("\x0")
|
13
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
-
spec.
|
15
|
-
spec.require_paths = ["lib"]
|
16
|
+
spec.require_paths = ['lib']
|
16
17
|
|
17
|
-
spec.
|
18
|
-
spec.
|
18
|
+
spec.add_dependency 'base64'
|
19
|
+
spec.add_dependency 'csv'
|
20
|
+
spec.add_dependency 'liquid'
|
21
|
+
spec.add_dependency 'logger'
|
22
|
+
spec.add_dependency 'redcarpet'
|
19
23
|
|
20
|
-
spec.
|
21
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "bundler", "~> 1.6"
|
24
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
24
25
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'jekyll'
|
4
|
+
require 'csv'
|
5
|
+
require 'redcarpet'
|
6
|
+
|
7
|
+
module Jekyll
|
8
|
+
module LiquifyFilter
|
9
|
+
def liquify(input)
|
10
|
+
if input.is_a? String
|
11
|
+
Liquid::Template.parse(input).render(@context)
|
12
|
+
else
|
13
|
+
input
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
Liquid::Template.register_filter(Jekyll::LiquifyFilter)
|
data/lib/jekyll-liquify.rb
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
module LiquifyFilter
|
5
|
-
def liquify(input)
|
6
|
-
if input.is_a? String
|
7
|
-
Liquid::Template.parse(input).render(@context)
|
8
|
-
else
|
9
|
-
input
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
Liquid::Template.register_filter(LiquidFilter)
|
3
|
+
require_relative 'jekyll/liquify_filter'
|
data/script/bootstrap
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
bundle install
|
3
|
+
bundle install -j 4
|
data/script/cibuild
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
bundle exec rspec
|
3
|
+
bundle exec rspec --format progress
|
data/script/console
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'debug'
|
2
5
|
|
3
6
|
def relative_to_root(path)
|
4
7
|
File.expand_path(path, File.dirname(File.dirname(__FILE__)))
|
5
8
|
end
|
6
9
|
|
7
10
|
require 'jekyll'
|
8
|
-
require relative_to_root('lib/jekyll-liquify
|
9
|
-
require 'pry-debugger'
|
11
|
+
require relative_to_root('lib/jekyll-liquify')
|
10
12
|
|
11
13
|
SOURCE_DIR = relative_to_root('spec/fixtures')
|
12
14
|
DEST_DIR = relative_to_root('spec/dest')
|
@@ -21,14 +23,14 @@ end
|
|
21
23
|
|
22
24
|
def config(overrides = {})
|
23
25
|
Jekyll.configuration({
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
'source' => source_dir,
|
27
|
+
'destination' => dest_dir,
|
28
|
+
'url' => 'http://example.org'
|
29
|
+
}).merge(overrides)
|
28
30
|
end
|
29
31
|
|
30
32
|
def site(configuration = config)
|
31
33
|
Jekyll::Site.new(configuration)
|
32
34
|
end
|
33
35
|
|
34
|
-
binding.
|
36
|
+
binding.break
|
data/spec/fixtures/_config.yml
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module Jekyll
|
6
|
+
RSpec.describe(LiquifyFilter) do
|
7
|
+
let(:overrides) do
|
8
|
+
{
|
9
|
+
'source' => source_dir,
|
10
|
+
'destination' => dest_dir,
|
11
|
+
'url' => 'http://example.org'
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
let(:config) { Jekyll.configuration(overrides) }
|
16
|
+
let(:site) { Jekyll::Site.new(config) }
|
17
|
+
let(:contents) { File.read(dest_dir('index.html')) }
|
18
|
+
|
19
|
+
before { site.process }
|
20
|
+
|
21
|
+
context 'when the `liquify` filter is used' do
|
22
|
+
it 'parses Liquid in the front matter' do
|
23
|
+
expect(contents).to match(/The first president of the United States was George Washington./)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'does not match first president' do
|
27
|
+
expect(contents).not_to match(/The first president of the United States was {{ page.first_president }}./)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'when the `liquify` filter is not used' do
|
32
|
+
it 'does not parse Liquid in the front matter' do
|
33
|
+
expect(contents).to match(/The second president of the United States was {{ page.second_president }}./)
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'does not match the second president' do
|
37
|
+
expect(contents).not_to match(/The second president of the United States was John Adams./)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'when it is used in conjunction with the `markdownify` filter' do
|
42
|
+
it 'works with markdownify first' do
|
43
|
+
expect(contents).to match(/Google’s URL is \*\*Hello\*\*/)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'does not work with markdownify second' do
|
47
|
+
expect(contents).to match(%r{Visit google at <strong>Hello</strong>})
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,15 +1,20 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rspec'
|
4
|
+
require 'rspec/its'
|
5
|
+
require 'simplecov'
|
6
|
+
|
7
|
+
SimpleCov.start
|
8
|
+
|
9
|
+
require 'jekyll/liquify_filter'
|
3
10
|
|
4
11
|
Jekyll.logger.log_level = :error
|
5
12
|
|
6
13
|
RSpec.configure do |config|
|
7
|
-
config.run_all_when_everything_filtered = true
|
8
|
-
config.filter_run :focus
|
9
14
|
config.order = 'random'
|
10
15
|
|
11
|
-
SOURCE_DIR = File.expand_path(
|
12
|
-
DEST_DIR = File.expand_path(
|
16
|
+
SOURCE_DIR = File.expand_path('fixtures', __dir__)
|
17
|
+
DEST_DIR = File.expand_path('dest', __dir__)
|
13
18
|
|
14
19
|
def source_dir(*files)
|
15
20
|
File.join(SOURCE_DIR, *files)
|
metadata
CHANGED
@@ -1,125 +1,106 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-liquify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Hedberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: base64
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: csv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '5.0'
|
33
|
+
version: '0'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '5.0'
|
40
|
+
version: '0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
42
|
+
name: liquid
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
54
|
-
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '5.0'
|
57
|
-
type: :development
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
58
49
|
prerelease: false
|
59
50
|
version_requirements: !ruby/object:Gem::Requirement
|
60
51
|
requirements:
|
61
52
|
- - ">="
|
62
53
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
64
|
-
- - "<"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '5.0'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rspec
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '3.0'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '3.0'
|
54
|
+
version: '0'
|
81
55
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
56
|
+
name: logger
|
83
57
|
requirement: !ruby/object:Gem::Requirement
|
84
58
|
requirements:
|
85
|
-
- - "
|
59
|
+
- - ">="
|
86
60
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
88
|
-
type: :
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
89
63
|
prerelease: false
|
90
64
|
version_requirements: !ruby/object:Gem::Requirement
|
91
65
|
requirements:
|
92
|
-
- - "
|
66
|
+
- - ">="
|
93
67
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
68
|
+
version: '0'
|
95
69
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
70
|
+
name: redcarpet
|
97
71
|
requirement: !ruby/object:Gem::Requirement
|
98
72
|
requirements:
|
99
|
-
- - "
|
73
|
+
- - ">="
|
100
74
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
102
|
-
type: :
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
103
77
|
prerelease: false
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
105
79
|
requirements:
|
106
|
-
- - "
|
80
|
+
- - ">="
|
107
81
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
82
|
+
version: '0'
|
109
83
|
description:
|
110
84
|
email: briansheahedberg@gmail.com
|
111
85
|
executables: []
|
112
86
|
extensions: []
|
113
87
|
extra_rdoc_files: []
|
114
88
|
files:
|
89
|
+
- ".github/workflows/rubocop.yml"
|
90
|
+
- ".github/workflows/ruby.yml"
|
115
91
|
- ".gitignore"
|
92
|
+
- ".rubocop-relaxed-2.5.yml"
|
93
|
+
- ".rubocop.yml"
|
94
|
+
- ".rubocop_todo.yml"
|
116
95
|
- ".travis.yml"
|
117
96
|
- Gemfile
|
97
|
+
- Gemfile.lock
|
118
98
|
- LICENSE
|
119
99
|
- README.md
|
120
100
|
- Rakefile
|
121
101
|
- jekyll-liquify.gemspec
|
122
102
|
- lib/jekyll-liquify.rb
|
103
|
+
- lib/jekyll/liquify_filter.rb
|
123
104
|
- script/bootstrap
|
124
105
|
- script/cibuild
|
125
106
|
- script/console
|
@@ -127,12 +108,13 @@ files:
|
|
127
108
|
- spec/fixtures/_config.yml
|
128
109
|
- spec/fixtures/_layouts/some_default.html
|
129
110
|
- spec/fixtures/index.html
|
130
|
-
- spec/jekyll
|
111
|
+
- spec/lib/jekyll/liquify_filter_spec.rb
|
131
112
|
- spec/spec_helper.rb
|
132
113
|
homepage: https://github.com/gemfarmer/jekyll-liquify
|
133
114
|
licenses:
|
134
115
|
- MIT
|
135
|
-
metadata:
|
116
|
+
metadata:
|
117
|
+
rubygems_mfa_required: 'true'
|
136
118
|
post_install_message:
|
137
119
|
rdoc_options: []
|
138
120
|
require_paths:
|
@@ -141,20 +123,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
123
|
requirements:
|
142
124
|
- - ">="
|
143
125
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
126
|
+
version: '3'
|
145
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
128
|
requirements:
|
147
129
|
- - ">="
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
requirements: []
|
151
|
-
rubygems_version: 3.0.3
|
133
|
+
rubygems_version: 3.0.3.1
|
152
134
|
signing_key:
|
153
135
|
specification_version: 4
|
154
136
|
summary: A Jekyll filter that can parse Liquid in front matter.
|
155
|
-
test_files:
|
156
|
-
- spec/fixtures/_config.yml
|
157
|
-
- spec/fixtures/_layouts/some_default.html
|
158
|
-
- spec/fixtures/index.html
|
159
|
-
- spec/jekyll-liquify_spec.rb
|
160
|
-
- spec/spec_helper.rb
|
137
|
+
test_files: []
|
data/spec/jekyll-liquify_spec.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe(Jekyll) do
|
4
|
-
let(:overrides) do
|
5
|
-
{
|
6
|
-
"source" => source_dir,
|
7
|
-
"destination" => dest_dir,
|
8
|
-
"url" => "http://example.org",
|
9
|
-
}
|
10
|
-
end
|
11
|
-
let(:config) do
|
12
|
-
Jekyll.configuration(overrides)
|
13
|
-
end
|
14
|
-
let(:site) { Jekyll::Site.new(config) }
|
15
|
-
let(:contents) { File.read(dest_dir("index.html")) }
|
16
|
-
|
17
|
-
before(:each) do
|
18
|
-
site.process
|
19
|
-
end
|
20
|
-
|
21
|
-
context 'the `liquify` filter is used' do
|
22
|
-
it "parses Liquid in the front matter" do
|
23
|
-
expect(contents).to match /The first president of the United States was George Washington./
|
24
|
-
expect(contents).to_not match /The first president of the United States was {{ page.first_president }}./
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
context 'the `liquify` filter is not used' do
|
29
|
-
it "does not parse Liquid in the front matter" do
|
30
|
-
expect(contents).to match /The second president of the United States was {{ page.second_president }}./
|
31
|
-
expect(contents).to_not match /The second president of the United States was John Adams./
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
context "it is used in conjunction with the `markdownify` filter" do
|
36
|
-
it 'works with markdownify first' do
|
37
|
-
expect(contents).to match /Google’s URL is \*\*Hello\*\*/
|
38
|
-
end
|
39
|
-
|
40
|
-
it 'does not work with markdownify second' do
|
41
|
-
expect(contents).to match /Visit google at <strong>Hello<\/strong>/
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|