jekyll_plugin_support 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/error/jekyll_plugin_error_handling.rb +2 -4
- data/lib/jekyll_plugin_support/version.rb +1 -1
- data/lib/jekyll_plugin_support.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eab3c711a499142ca58c0c2083dbac62072dd98f86dd343c57dda2d7603aed8b
|
4
|
+
data.tar.gz: 101b79a6402931862a23be32c12fd3a8152b56aa3644f38cd73a1a7d2bde9a2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a82cb83ce7c34268e79c0c4715832442cab58bd2e49a67ee849bf7d0fbd378bb068f0a5e499db9ccbace3567b04e95b5d0efd061a8d6f21a164a4ef6cc881efe
|
7
|
+
data.tar.gz: 0e6328a5b3e0fc4320c999cc88cfa13a92cacf5279027afe26bcff5f0dc9f56404f14747124b403bf417815282ac7025fd9fcf9e7e161aeb6bf6a54fd4d47571
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
|
4
|
+
## 1.0.1 / 2024-07-27
|
5
|
+
|
6
|
+
* Moved `warn_short_trace`, `maybe_reraise_error`, `remove_ansi_color`,
|
7
|
+
`format_error_message` and `exit_without_stack_trace` into `JekyllSupportError`.
|
8
|
+
* Added missing `shared_include.css` and `clippy.svg` to `demo/`.
|
9
|
+
* Fixed missing module name when invoking `format_error_message`.
|
10
|
+
|
11
|
+
|
3
12
|
## 1.0.0 / 2024-07-23
|
4
13
|
|
5
14
|
* Added the `redef_without_warning` method so tag and block plugins can be subclassed.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module JekyllSupportError
|
2
2
|
attr_reader :logger, :page
|
3
3
|
|
4
4
|
# If a Jekyll plugin needs to crash exit, and stop Jekyll, call this method.
|
@@ -24,19 +24,17 @@ module JekyllSupport
|
|
24
24
|
exec "echo ''"
|
25
25
|
end
|
26
26
|
|
27
|
-
# TODO: Delete this
|
28
27
|
def format_error_message(message)
|
29
28
|
page = " of #{@page['path']}" if @page
|
30
29
|
remove_ansi_color "on line #{line_number} (after front matter)#{page}.\n#{message}"
|
31
30
|
end
|
32
31
|
|
33
|
-
# TODO: Delete this
|
34
32
|
def remove_ansi_color(string)
|
35
33
|
string.gsub(/\e\[([;\d]+)?m/, '')
|
36
34
|
end
|
37
35
|
|
38
36
|
def maybe_reraise_error(error, throw_error: true)
|
39
|
-
fmsg = format_error_message "#{error.class}: #{error.message.strip}"
|
37
|
+
fmsg = JekyllSupport.format_error_message "#{error.class}: #{error.message.strip}"
|
40
38
|
@logger.error { fmsg }
|
41
39
|
return "<span class='jekyll_plugin_support_error'>#{fmsg}</span>" unless throw_error
|
42
40
|
|
@@ -28,3 +28,21 @@ require_directory "#{__dir__}/generator"
|
|
28
28
|
require_directory "#{__dir__}/helper"
|
29
29
|
require_directory "#{__dir__}/jekyll_plugin_support"
|
30
30
|
require_directory "#{__dir__}/tag"
|
31
|
+
|
32
|
+
module JekyllSupport
|
33
|
+
class JekyllTag
|
34
|
+
include JekyllSupportError
|
35
|
+
end
|
36
|
+
|
37
|
+
class JekyllTagNoArgParsing
|
38
|
+
include JekyllSupportError
|
39
|
+
end
|
40
|
+
|
41
|
+
class JekyllBlock
|
42
|
+
include JekyllSupportError
|
43
|
+
end
|
44
|
+
|
45
|
+
class JekyllBlockNoArgParsing
|
46
|
+
include JekyllSupportError
|
47
|
+
end
|
48
|
+
end
|
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.1
|
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-07-
|
11
|
+
date: 2024-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|