jekyll_img 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/img_props.rb +5 -3
- data/lib/jekyll_img/version.rb +1 -1
- data/lib/jekyll_img.rb +3 -5
- 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: 68b1a33d89b04dfab1851a2ba9adaac2ebeb7b7fbd91428cb2431f008f9226a1
|
4
|
+
data.tar.gz: ac86e8906b8d5e96d7295486f8e7b0ac2f76a825e2f9cd66d6072a5e644c0fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f44391734629f99eedf6d62579bf3e4342ba334f20b6bc7b67e6a046cca8f774cc8e181fbc9c5c4c0661d6ba532c6cc525a8de62cf6f5ce049eea4c7766bc0b5
|
7
|
+
data.tar.gz: d7fa41d16eb7b23368ce08dddb59574a5c71b5a4afab28705bd16b44ab7b10d527db90e068d51ef91780e1cb950fb1a23953bc5d1922d2c0800a1d81418d34fc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.2.5 / 2024-07-23
|
4
|
+
|
5
|
+
* Depends on jekyll_plugin_support v1.0.2
|
6
|
+
* Error handling improved
|
7
|
+
* Corrected `README.md#Configuration` and fixed demo `_config.yml`
|
8
|
+
so they correctly specify error handling for this plugin:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
img:
|
12
|
+
die_on_img_error: false
|
13
|
+
pry_on_img_error: false
|
14
|
+
```
|
15
|
+
|
16
|
+
|
3
17
|
## 0.2.4 / 2024-07-23
|
4
18
|
|
5
19
|
* Depends on jekyll_plugin_support v1.0.0
|
data/README.md
CHANGED
data/lib/img_props.rb
CHANGED
@@ -67,8 +67,6 @@ class ImgProperties
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def src_any(filetype)
|
70
|
-
raise Jekyll::ImgError, "The 'src' parameter was not specified" if @src.to_s.empty?
|
71
|
-
|
72
70
|
@src.gsub('.webp', ".#{filetype}")
|
73
71
|
end
|
74
72
|
|
@@ -86,8 +84,12 @@ class ImgProperties
|
|
86
84
|
private
|
87
85
|
|
88
86
|
def setup_src
|
87
|
+
raise Jekyll::ImgError, "The 'src' parameter was not specified" if @src.nil?
|
88
|
+
|
89
|
+
raise Jekyll::ImgError, "The 'src' parameter was empty" if @src.empty?
|
90
|
+
|
89
91
|
@src = @src.to_s.strip
|
90
|
-
raise Jekyll::ImgError, "The 'src' parameter
|
92
|
+
raise Jekyll::ImgError, "The 'src' parameter only contained whitespace" if @src.empty?
|
91
93
|
|
92
94
|
filetype = File.extname(URI(@src).path)
|
93
95
|
@src += '.webp' if filetype.empty?
|
data/lib/jekyll_img/version.rb
CHANGED
data/lib/jekyll_img.rb
CHANGED
@@ -47,13 +47,11 @@ module Jekyll
|
|
47
47
|
@builder = ImgBuilder.new(props)
|
48
48
|
@builder.to_s
|
49
49
|
rescue ImgError => e # jekyll_plugin_support handles StandardError
|
50
|
-
e.
|
51
|
-
msg = format_error_message e.message
|
52
|
-
@logger.error { "#{e.class} raised #{msg}" }
|
50
|
+
@logger.error { e.logger_message }
|
53
51
|
binding.pry if @pry_on_img_error # rubocop:disable Lint/Debugger
|
54
|
-
|
52
|
+
exit! 1 if @die_on_img_error
|
55
53
|
|
56
|
-
|
54
|
+
e.html_message
|
57
55
|
end
|
58
56
|
|
59
57
|
::JekyllSupport::JekyllPluginHelper.register(self, ImgModule::PLUGIN_NAME)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_img
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.5.
|
89
|
+
rubygems_version: 3.5.17
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Provides a Jekyll tag that generates images.
|