jekyll_eval_filter 0.1.1 → 0.1.3
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 +43 -25
- data/CHANGELOG.md +17 -2
- data/README.md +13 -5
- data/jekyll_eval_filter.gemspec +2 -1
- data/lib/jekyll_eval_filter/version.rb +1 -1
- data/lib/jekyll_eval_filter.rb +1 -1
- data/spec/jekyll_eval_filter_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -7
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26e94d9681f72e85a42864aaefc10af3c5205a8f84ad7319af1932f0e9090b75
|
4
|
+
data.tar.gz: ba72de6a1467b0253ea778bb0d2331cd8cf8da3add4d862c38882f2bf443e916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b278ef344476bb2cb5f365a5c3f98eaf70445a9f19d461864173ab46901940702492952d44290ed5ce48b5828ea851fe517e4705bf13e1d87902f0b587b483b2
|
7
|
+
data.tar.gz: 5348380aa7cbbfc0ae1227802b3da89353f900156731ac7bae01b89e845189ebe80e221354e3cea8a1a54cb46fcfd0311eda90cc8644cf6ddda8bb3b012a83e4
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require:
|
2
|
-
# - rubocop-jekyll
|
3
2
|
- rubocop-md
|
4
3
|
- rubocop-performance
|
5
4
|
- rubocop-rake
|
@@ -7,15 +6,14 @@ require:
|
|
7
6
|
|
8
7
|
AllCops:
|
9
8
|
Exclude:
|
9
|
+
- _site/**/*
|
10
10
|
- binstub/**/*
|
11
|
+
- Gemfile*
|
11
12
|
- exe/**/*
|
13
|
+
- jekyll/**/*
|
12
14
|
- vendor/**/*
|
13
|
-
- Gemfile*
|
14
15
|
NewCops: enable
|
15
|
-
TargetRubyVersion:
|
16
|
-
|
17
|
-
Gemspec/DeprecatedAttributeAssignment:
|
18
|
-
Enabled: false
|
16
|
+
TargetRubyVersion: 2.6
|
19
17
|
|
20
18
|
Gemspec/RequireMFA:
|
21
19
|
Enabled: false
|
@@ -24,32 +22,43 @@ Layout/HashAlignment:
|
|
24
22
|
EnforcedColonStyle: table
|
25
23
|
EnforcedHashRocketStyle: table
|
26
24
|
|
25
|
+
Layout/LeadingCommentSpace:
|
26
|
+
Exclude:
|
27
|
+
- _bin/**/*
|
28
|
+
|
27
29
|
Layout/LineLength:
|
28
30
|
Max: 150
|
29
31
|
|
32
|
+
Layout/FirstHashElementIndentation:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Layout/MultilineMethodCallIndentation:
|
36
|
+
Enabled: false
|
37
|
+
|
30
38
|
Metrics/AbcSize:
|
31
|
-
Max:
|
39
|
+
Max: 40
|
32
40
|
|
33
41
|
Metrics/BlockLength:
|
34
|
-
|
35
|
-
- jekyll_eval_filter.gemspec
|
36
|
-
Max: 30
|
42
|
+
Max: 50
|
37
43
|
|
38
44
|
Metrics/CyclomaticComplexity:
|
39
45
|
Max: 15
|
40
46
|
|
41
47
|
Metrics/MethodLength:
|
42
|
-
Max:
|
43
|
-
|
44
|
-
Metrics/ModuleLength:
|
45
|
-
Enabled: false
|
48
|
+
Max: 30
|
46
49
|
|
47
50
|
Metrics/PerceivedComplexity:
|
48
|
-
Max:
|
51
|
+
Max: 20
|
49
52
|
|
50
53
|
Naming/FileName:
|
51
54
|
Exclude:
|
52
|
-
-
|
55
|
+
- "_bin/**/*"
|
56
|
+
- "*.md"
|
57
|
+
|
58
|
+
Style/Alias:
|
59
|
+
Exclude:
|
60
|
+
- _plugins/symlink_watcher.rb
|
61
|
+
- blog/bin/avImport
|
53
62
|
|
54
63
|
Style/Documentation:
|
55
64
|
Enabled: false
|
@@ -57,15 +66,24 @@ Style/Documentation:
|
|
57
66
|
Style/FrozenStringLiteralComment:
|
58
67
|
Enabled: false
|
59
68
|
|
60
|
-
Style/
|
61
|
-
|
69
|
+
Style/HashSyntax:
|
70
|
+
EnforcedStyle: ruby19
|
71
|
+
EnforcedShorthandSyntax: consistent
|
62
72
|
|
63
|
-
|
64
|
-
|
65
|
-
SpecSuffixOnly: true
|
73
|
+
Style/PercentLiteralDelimiters:
|
74
|
+
Enabled: false
|
66
75
|
|
67
|
-
|
68
|
-
|
76
|
+
Style/RegexpLiteral:
|
77
|
+
Enabled: false
|
69
78
|
|
70
|
-
|
71
|
-
|
79
|
+
Style/StringLiterals:
|
80
|
+
Enabled: false
|
81
|
+
|
82
|
+
Style/StringLiteralsInInterpolation:
|
83
|
+
Enabled: false
|
84
|
+
|
85
|
+
Style/TrailingCommaInArrayLiteral:
|
86
|
+
Enabled: false
|
87
|
+
|
88
|
+
Style/TrailingCommaInHashLiteral:
|
89
|
+
EnforcedStyleForMultiline: comma
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## 0.1.3
|
4
|
+
|
5
|
+
* Compatible with `jekyll_plugin_support` v1.0.0
|
6
|
+
|
7
|
+
|
8
|
+
## 0.1.2
|
9
|
+
|
10
|
+
* Mitigates vulnerability GHSA-xc9x-jj77-9p9j Moderate severity
|
11
|
+
|
12
|
+
|
1
13
|
## 0.1.1
|
2
|
-
|
14
|
+
|
15
|
+
* Removed spurious dependency.
|
16
|
+
|
3
17
|
|
4
18
|
## 0.1.0
|
5
|
-
|
19
|
+
|
20
|
+
* Initial release.
|
data/README.md
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
`jekyll_eval_filter`
|
2
|
-
[](https://badge.fury.io/rb/jekyll_eval_filter)
|
3
|
-
===========
|
1
|
+
# `jekyll_eval_filter` [](https://badge.fury.io/rb/jekyll_eval_filter)
|
4
2
|
|
5
3
|
`jekyll_eval_filter` evaluates given Ruby expression passed to it and returns the response.
|
6
4
|
|
7
5
|
|
8
6
|
## CAUTION
|
7
|
+
|
9
8
|
This filter can evaluation *any Ruby expression*.
|
10
9
|
No limitations are imposed.
|
11
10
|
|
@@ -16,13 +15,14 @@ With great power comes great responsibility.
|
|
16
15
|
|
17
16
|
## Usage
|
18
17
|
|
19
|
-
```
|
18
|
+
```html
|
20
19
|
{{ '1+2' | evaluate }} # returns 3
|
21
20
|
|
22
21
|
{{ 'sudo rm -rf /' | evaluate }} # potentially destroys your system
|
23
22
|
# On a clear disk you can seek forever
|
24
23
|
```
|
25
24
|
|
25
|
+
|
26
26
|
## Installation
|
27
27
|
|
28
28
|
Add this line to your application's Gemfile:
|
@@ -32,12 +32,14 @@ gem 'jekyll_eval_filter'
|
|
32
32
|
```
|
33
33
|
|
34
34
|
And then execute:
|
35
|
+
|
35
36
|
```bash
|
36
37
|
$ bundle
|
37
38
|
```
|
38
39
|
|
39
40
|
|
40
41
|
## Additional Information
|
42
|
+
|
41
43
|
More information is available on
|
42
44
|
[Mike Slinn’s website](https://www.mslinn.com/jekyll/10400-jekyll-plugin-template-collection.html).
|
43
45
|
|
@@ -50,6 +52,7 @@ You can also run `bin/console` for an interactive prompt that will allow you to
|
|
50
52
|
|
51
53
|
|
52
54
|
### Build and Install Locally
|
55
|
+
|
53
56
|
To build and install this gem onto your local machine, run:
|
54
57
|
|
55
58
|
```shell
|
@@ -59,7 +62,8 @@ jekyll_eval_filter (1.0.0) installed.
|
|
59
62
|
```
|
60
63
|
|
61
64
|
Examine the newly built gem:
|
62
|
-
|
65
|
+
|
66
|
+
```shell
|
63
67
|
$ gem info jekyll_eval_filter
|
64
68
|
|
65
69
|
*** LOCAL GEMS ***
|
@@ -76,13 +80,17 @@ jekyll_eval_filter (1.0.0)
|
|
76
80
|
|
77
81
|
|
78
82
|
### Build and Push to RubyGems
|
83
|
+
|
79
84
|
To release a new version,
|
85
|
+
|
80
86
|
1. Update the version number in `version.rb`.
|
81
87
|
2. Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
|
82
88
|
3. Run the following:
|
89
|
+
|
83
90
|
```shell
|
84
91
|
$ bundle exec rake release
|
85
92
|
```
|
93
|
+
|
86
94
|
The above creates a git tag for the version, commits the created tag,
|
87
95
|
and pushes the new `.gem` file to [RubyGems.org](https://rubygems.org).
|
88
96
|
|
data/jekyll_eval_filter.gemspec
CHANGED
@@ -30,5 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.version = JekyllEvalFilter::VERSION
|
31
31
|
|
32
32
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
33
|
-
spec.add_dependency 'jekyll_plugin_support', '>= 0.
|
33
|
+
spec.add_dependency 'jekyll_plugin_support', '>= 1.0.0'
|
34
|
+
spec.add_dependency 'nokogiri', '>= 1.16.2'
|
34
35
|
end
|
data/lib/jekyll_eval_filter.rb
CHANGED
@@ -5,6 +5,6 @@ require 'jekyll_plugin_support'
|
|
5
5
|
require_relative 'jekyll_eval_filter/version'
|
6
6
|
|
7
7
|
# Require all Ruby files in 'lib/', except this file
|
8
|
-
Dir[File.join(__dir__, '*.rb')].each do |file|
|
8
|
+
Dir[File.join(__dir__, '*.rb')].sort.each do |file|
|
9
9
|
require file unless file.end_with?('/jekyll_eval_filter.rb')
|
10
10
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require_relative '../lib/jekyll_eval_filter'
|
2
2
|
|
3
|
-
RSpec.describe JekyllEvalFilter
|
3
|
+
RSpec.describe JekyllEvalFilter do
|
4
4
|
let(:logger) do
|
5
5
|
PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
|
6
6
|
end
|
7
7
|
|
8
8
|
let(:parse_context) { TestParseContext.new }
|
9
9
|
|
10
|
-
it 'has a test' do
|
11
|
-
expect(true).to
|
10
|
+
it 'has a test', skip: 'not implemented' do
|
11
|
+
expect(true).to be_truthy
|
12
12
|
end
|
13
13
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
require 'jekyll'
|
2
2
|
require 'jekyll_plugin_logger'
|
3
|
-
require 'liquid'
|
4
3
|
require 'fileutils'
|
5
4
|
require 'yaml'
|
6
|
-
require_relative '../lib
|
5
|
+
require_relative '../lib/jekyll_eval_filter'
|
7
6
|
|
8
7
|
RSpec.configure do |config|
|
9
|
-
config.filter_run :focus
|
10
8
|
# config.order = 'random'
|
11
|
-
config.
|
9
|
+
config.filter_run_when_matching focus: true
|
12
10
|
|
13
11
|
# See https://relishapp.com/rspec/rspec-core/docs/command-line/only-failures
|
14
12
|
config.example_status_persistence_file_path = '../spec/status_persistence.txt'
|
15
|
-
|
16
|
-
config.filter_run_when_matching focus: true
|
17
13
|
end
|
18
14
|
|
19
15
|
Registers = Struct.new(:page, :site)
|
@@ -30,7 +26,7 @@ class SiteMock
|
|
30
26
|
attr_reader :config
|
31
27
|
|
32
28
|
def initialize
|
33
|
-
@config = YAML.
|
29
|
+
@config = YAML.safe_load_file('../demo/_config.yml')
|
34
30
|
@config['env'] = { 'JEKYLL_ENV' => 'development' }
|
35
31
|
end
|
36
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_eval_filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -30,14 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 1.0.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: 1.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.16.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.16.2
|
41
55
|
description: 'Evaluates input. Caution! Input can be any Ruby expression.
|
42
56
|
|
43
57
|
'
|
@@ -84,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
98
|
- !ruby/object:Gem::Version
|
85
99
|
version: '0'
|
86
100
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
101
|
+
rubygems_version: 3.5.16
|
88
102
|
signing_key:
|
89
103
|
specification_version: 4
|
90
104
|
summary: Evaluates input. Caution! Input can be any Ruby expression.
|