jekyll_pre 1.4.5 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +31 -17
- data/CHANGELOG.md +11 -0
- data/README.md +33 -0
- data/jekyll_pre.gemspec +1 -1
- data/lib/exec_tag.rb +5 -4
- data/lib/jekyll_pre/version.rb +1 -1
- data/lib/noselect_tag.rb +2 -2
- data/lib/pre_tag_block.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a156945af855f2ce50bb42141c6a64ce4aaa61bd75cf9d220f00587e362c213
|
4
|
+
data.tar.gz: 2ccb2e202e9100ca00b4e5f166bcfd5f7a02ef7c2150b091e5e5bee7ea41468b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcaecd9c72063b080b54803bd5276b82e41e36f1e1d18b7d81bae79b29b59a94457ccecf5f45ad225e61368053c3c282f6956c3eb659f3bcaa873c1afcece9bb
|
7
|
+
data.tar.gz: f37962b1b94b63e2bc53fc2363d20054fc64467f9ad470ed227e949b4850142b8c29b273c1e41dc5a1ed4725bf62cb9d298d3aca686fe4eeef115560442326d6
|
data/.rubocop.yml
CHANGED
@@ -8,6 +8,7 @@ require:
|
|
8
8
|
AllCops:
|
9
9
|
Exclude:
|
10
10
|
- binstub/**/*
|
11
|
+
- demo/_site/*
|
11
12
|
- vendor/**/*
|
12
13
|
- Gemfile*
|
13
14
|
NewCops: enable
|
@@ -15,10 +16,10 @@ AllCops:
|
|
15
16
|
Gemspec/DeprecatedAttributeAssignment:
|
16
17
|
Enabled: false
|
17
18
|
|
18
|
-
Gemspec/
|
19
|
+
Gemspec/RequireMFA:
|
19
20
|
Enabled: false
|
20
21
|
|
21
|
-
Gemspec/
|
22
|
+
Gemspec/RequiredRubyVersion:
|
22
23
|
Enabled: false
|
23
24
|
|
24
25
|
Layout/HashAlignment:
|
@@ -29,25 +30,45 @@ Layout/LineLength:
|
|
29
30
|
Max: 150
|
30
31
|
|
31
32
|
Metrics/AbcSize:
|
32
|
-
Max:
|
33
|
+
Max: 55
|
33
34
|
|
34
35
|
Metrics/BlockLength:
|
35
36
|
Exclude:
|
36
|
-
-
|
37
|
+
- jekyll_plugin_support.gemspec
|
37
38
|
Max: 30
|
38
39
|
|
39
40
|
Metrics/CyclomaticComplexity:
|
40
|
-
Max:
|
41
|
+
Max: 25
|
41
42
|
|
42
43
|
Metrics/MethodLength:
|
43
|
-
Max:
|
44
|
+
Max: 50
|
44
45
|
|
45
46
|
Metrics/PerceivedComplexity:
|
46
|
-
Max:
|
47
|
+
Max: 25
|
47
48
|
|
48
49
|
Naming/FileName:
|
49
50
|
Exclude:
|
50
51
|
- Rakefile
|
52
|
+
- "*.md"
|
53
|
+
|
54
|
+
RSpec/ExampleLength:
|
55
|
+
Max: 30
|
56
|
+
|
57
|
+
RSpec/SpecFilePathFormat:
|
58
|
+
Enabled: false
|
59
|
+
IgnoreMethods: true
|
60
|
+
|
61
|
+
RSpec/SpecFilePathSuffix:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
RSpec/IndexedLet:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
RSpec/MultipleExpectations:
|
68
|
+
Max: 15
|
69
|
+
|
70
|
+
Style/ClassVars:
|
71
|
+
Enabled: false
|
51
72
|
|
52
73
|
Style/Documentation:
|
53
74
|
Enabled: false
|
@@ -55,15 +76,8 @@ Style/Documentation:
|
|
55
76
|
Style/FrozenStringLiteralComment:
|
56
77
|
Enabled: false
|
57
78
|
|
79
|
+
Style/StringConcatenation:
|
80
|
+
Enabled: false
|
81
|
+
|
58
82
|
Style/TrailingCommaInHashLiteral:
|
59
83
|
EnforcedStyleForMultiline: comma
|
60
|
-
|
61
|
-
RSpec/FilePath:
|
62
|
-
IgnoreMethods: true
|
63
|
-
SpecSuffixOnly: true
|
64
|
-
|
65
|
-
RSpec/ExampleLength:
|
66
|
-
Max: 30
|
67
|
-
|
68
|
-
RSpec/MultipleExpectations:
|
69
|
-
Max: 15
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -192,6 +192,8 @@ More information is available on
|
|
192
192
|
|
193
193
|
## Installation
|
194
194
|
|
195
|
+
### Gem
|
196
|
+
|
195
197
|
Add this line to your application's Gemfile, within the `jekyll_plugins` group:
|
196
198
|
|
197
199
|
```ruby
|
@@ -207,6 +209,37 @@ $ bundle
|
|
207
209
|
```
|
208
210
|
|
209
211
|
|
212
|
+
### CSS and Assets
|
213
|
+
|
214
|
+
Copy assets and CSS from the demo/ directory of the jekyll_pre GitHub project.
|
215
|
+
|
216
|
+
* Copy `demo/assets/images/clippy.svg` to a directory of the same name in your Jekyll project.
|
217
|
+
* Copy `demo/assets/css/jekyll_plugin_support.css` to your Jekyll project assets directory.
|
218
|
+
* Copy `demo/assets/css/shared_include_pre.css` to your Jekyll project assets directory.
|
219
|
+
* Copy `demo/assets/css/jekyll_pre.css` to your Jekyll project assets directory.
|
220
|
+
* Incorporate the CSS stylesheets into the appropriate layout in your Jekyll project:
|
221
|
+
|
222
|
+
```html
|
223
|
+
{% assign nowMillis = site.time | date: '%s' %}
|
224
|
+
<link rel="stylesheet" href="{{ '/assets/css/jekyll_plugin_support.css?v=' | append: nowMillis }}" type="text/css">
|
225
|
+
<link rel="stylesheet" href="{{ '/assets/css/shared_include_pre.css?v=' | append: nowMillis }}" type="text/css">
|
226
|
+
<link rel="stylesheet" href="{{ '/assets/css/jekyll_pre.css?v=' | append: nowMillis }}" type="text/css">
|
227
|
+
```
|
228
|
+
|
229
|
+
|
230
|
+
### JavaScript
|
231
|
+
|
232
|
+
Copy `demo/assets/js/clipboard.min.js` from the `jekyll_flexible_include_plugin` GitHub project
|
233
|
+
to your Jekyll project’s JavaScript directory.
|
234
|
+
|
235
|
+
Modify the Jekyll layout or selected pages to load the JavaScript.
|
236
|
+
You can load it from your project, as shown below, or from a CDN.
|
237
|
+
|
238
|
+
```html
|
239
|
+
<script defer src="/assets/js/clipboard.min.js"></script>
|
240
|
+
```
|
241
|
+
|
242
|
+
|
210
243
|
## Usage
|
211
244
|
|
212
245
|
The following examples are rendered on
|
data/jekyll_pre.gemspec
CHANGED
@@ -33,6 +33,6 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.version = JekyllPreVersion::VERSION
|
34
34
|
|
35
35
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
36
|
-
spec.add_dependency 'jekyll_plugin_support', '>= 0.
|
36
|
+
spec.add_dependency 'jekyll_plugin_support', '>= 1.0.0'
|
37
37
|
spec.add_dependency 'rack'
|
38
38
|
end
|
data/lib/exec_tag.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'jekyll_plugin_support'
|
2
|
+
require 'open3'
|
2
3
|
require 'rack/utils'
|
3
4
|
require_relative 'jekyll_pre/version'
|
4
5
|
|
@@ -11,7 +12,7 @@ module JekyllPreModule
|
|
11
12
|
result
|
12
13
|
end
|
13
14
|
|
14
|
-
class ExecTag < JekyllSupport::JekyllTag
|
15
|
+
class ExecTag < ::JekyllSupport::JekyllTag
|
15
16
|
include JekyllPreVersion
|
16
17
|
|
17
18
|
def self.remove_html_tags(string)
|
@@ -21,7 +22,7 @@ module JekyllPreModule
|
|
21
22
|
def render_impl
|
22
23
|
parse_args
|
23
24
|
@original_command = @helper.remaining_markup_original
|
24
|
-
command = JekyllPluginHelper.expand_env @original_command
|
25
|
+
command = ::JekyllSupport::JekyllPluginHelper.expand_env @original_command
|
25
26
|
if command.strip.empty?
|
26
27
|
msg = "Command is empty on on line #{@line_number} (after front matter) of #{@page['path']}"
|
27
28
|
unless @die_if_error
|
@@ -73,7 +74,7 @@ module JekyllPreModule
|
|
73
74
|
|
74
75
|
def parse_args
|
75
76
|
@cd = @helper.parameter_specified? 'cd'
|
76
|
-
@cd = JekyllPluginHelper.expand_env(@cd) if @cd
|
77
|
+
@cd = ::JekyllSupport::JekyllPluginHelper.expand_env(@cd) if @cd
|
77
78
|
|
78
79
|
@no_escape = @helper.parameter_specified? 'no_escape'
|
79
80
|
@no_strip = @helper.parameter_specified? 'no_strip'
|
@@ -116,6 +117,6 @@ module JekyllPreModule
|
|
116
117
|
stdout_str
|
117
118
|
end
|
118
119
|
|
119
|
-
JekyllPluginHelper.register(self, 'exec')
|
120
|
+
::JekyllSupport::JekyllPluginHelper.register(self, 'exec')
|
120
121
|
end
|
121
122
|
end
|
data/lib/jekyll_pre/version.rb
CHANGED
data/lib/noselect_tag.rb
CHANGED
@@ -4,7 +4,7 @@ require_relative 'jekyll_pre/version'
|
|
4
4
|
module JekyllPreModule
|
5
5
|
# """\\{% noselect %} or \\{% noselect this all gets copied.
|
6
6
|
# Also, space before the closing percent is signficant %}"""
|
7
|
-
class NoSelectTag < JekyllSupport::JekyllTagNoArgParsing
|
7
|
+
class NoSelectTag < ::JekyllSupport::JekyllTagNoArgParsing
|
8
8
|
include JekyllPreVersion
|
9
9
|
|
10
10
|
def render_impl
|
@@ -13,6 +13,6 @@ module JekyllPreModule
|
|
13
13
|
"<span class='unselectable'>#{text}</span>"
|
14
14
|
end
|
15
15
|
|
16
|
-
JekyllPluginHelper.register(self, 'noselect')
|
16
|
+
::JekyllSupport::JekyllPluginHelper.register(self, 'noselect')
|
17
17
|
end
|
18
18
|
end
|
data/lib/pre_tag_block.rb
CHANGED
@@ -3,7 +3,7 @@ require 'securerandom'
|
|
3
3
|
require_relative 'jekyll_pre/version'
|
4
4
|
|
5
5
|
module JekyllPreModule
|
6
|
-
class PreTagBlock < JekyllSupport::JekyllBlock
|
6
|
+
class PreTagBlock < ::JekyllSupport::JekyllBlock
|
7
7
|
include JekyllPreVersion
|
8
8
|
|
9
9
|
@@prefix = "<button class='copyBtn' data-clipboard-target="
|
@@ -114,6 +114,6 @@ module JekyllPreModule
|
|
114
114
|
END_OUTPUT
|
115
115
|
end
|
116
116
|
|
117
|
-
JekyllPluginHelper.register(self, 'pre')
|
117
|
+
::JekyllSupport::JekyllPluginHelper.register(self, 'pre')
|
118
118
|
end
|
119
119
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_pre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-22 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: 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
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
107
|
+
rubygems_version: 3.5.17
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Jekyll tags pre and noselect, for HTML <pre/> tag, prompts and unselectable
|