jekyll_plugin_support 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -2
- data/lib/error/jekyll_custom_error.rb +2 -4
- data/lib/jekyll_plugin_support/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc8c02963da77be335a8e4713e9bcffc12395912733d31781e16198f9f9392f0
|
4
|
+
data.tar.gz: 8851a2ede60d7a70f0cb7eab711c7a3cb06da87d9764740d5dd50a385ee8066d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b06073d76ba15d23d69d585d3148edd0e2adcd86ffc0b6d7982d2659989aad9da79b6adab83220c9c4299354e423a4bc3490ace1f2c1348d5e9a01e1b848c8
|
7
|
+
data.tar.gz: 9e9bd5db4569abe954ba547e38538c62ecf99037f772a893ef73a1fe68c9a9766df4c15069f6e1ff3aea578913d92e91922ab076c2be632540eb1e31a73e33a4
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
3
|
|
4
|
+
## 1.0.2 / 2024-08-19
|
5
|
+
|
6
|
+
* Computes line_number and path properly
|
7
|
+
* Refactored demo CSS
|
8
|
+
* Improved custom plugin error handling and sample code.
|
9
|
+
The following seems to be optimal for custom plugins; it suppresses the ridiculously long stack trace that used to be generated:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
rescue DemoInlineTagError => e # jekyll_plugin_support handles StandardError
|
13
|
+
@logger.error e.logger_message
|
14
|
+
exit! 1 if @die_on_demo_tag_error
|
15
|
+
|
16
|
+
e.html_message
|
17
|
+
```
|
18
|
+
|
19
|
+
|
4
20
|
## 1.0.1 / 2024-07-27
|
5
21
|
|
6
22
|
* Moved `warn_short_trace`, `maybe_reraise_error`, `remove_ansi_color`,
|
data/README.md
CHANGED
@@ -466,9 +466,8 @@ class DemoBlock < JekyllSupport::JekyllBlock
|
|
466
466
|
def render_impl(text)
|
467
467
|
raise DemoBlockTagError, 'Fall down, go boom.'
|
468
468
|
rescue DemoBlockTagError => e
|
469
|
-
e.shorten_backtrace
|
470
469
|
@logger.error e.logger_message
|
471
|
-
|
470
|
+
exit! 1 if @die_on_demo_block_error
|
472
471
|
|
473
472
|
e.html_message
|
474
473
|
end
|
@@ -23,8 +23,7 @@ module JekyllSupport
|
|
23
23
|
# @return HTML <div> tag with class set to the snake_case version of the error class name.
|
24
24
|
def html_message
|
25
25
|
shorten_backtrace
|
26
|
-
line_number =
|
27
|
-
path = self.class.class_variable_get :@@path
|
26
|
+
path, line_number, _caller = backtrace[1].split(':')
|
28
27
|
<<~END_MSG
|
29
28
|
<div class='#{error_name.snakecase}'>
|
30
29
|
#{self.class} raised in #{calling_file} while processing line #{line_number} (after front matter) of #{path}
|
@@ -36,8 +35,7 @@ module JekyllSupport
|
|
36
35
|
def logger_message
|
37
36
|
shorten_backtrace
|
38
37
|
kaller = caller(1..1).first
|
39
|
-
line_number =
|
40
|
-
path = self.class.class_variable_get :@@path
|
38
|
+
path, line_number, _caller = backtrace[1].split(':')
|
41
39
|
<<~END_MSG
|
42
40
|
#{error_name} raised in #{kaller} while processing line #{line_number} (after front matter) of #{path}
|
43
41
|
#{message}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_plugin_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
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-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.5.
|
143
|
+
rubygems_version: 3.5.17
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Provides a framework for writing and testing Jekyll plugins
|