jekyll_img 0.2.3 → 0.2.5
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 +0 -0
- data/CHANGELOG.md +19 -0
- data/LICENSE.txt +0 -0
- data/README.md +1 -1
- data/Rakefile +0 -0
- data/jekyll_img.gemspec +1 -1
- data/lib/img_builder.rb +0 -0
- data/lib/img_props.rb +5 -3
- data/lib/jekyll_img/version.rb +1 -1
- data/lib/jekyll_img.rb +6 -8
- data/spec/img_builder_spec.rb +0 -0
- data/spec/img_props_spec.rb +0 -0
- data/spec/jekyll_img_spec.rb +0 -0
- data/spec/spec_helper.rb +0 -0
- metadata +5 -7
- data/spec/status_persistence.txt +0 -10
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/.rubocop.yml
CHANGED
File without changes
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
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
|
+
|
17
|
+
## 0.2.4 / 2024-07-23
|
18
|
+
|
19
|
+
* Depends on jekyll_plugin_support v1.0.0
|
20
|
+
|
21
|
+
|
3
22
|
## 0.2.3 / 2024-04-27
|
4
23
|
|
5
24
|
* Depends on jekyll_plugin_support v0.8.5
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
data/Rakefile
CHANGED
File without changes
|
data/jekyll_img.gemspec
CHANGED
data/lib/img_builder.rb
CHANGED
File without changes
|
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
@@ -13,10 +13,10 @@ module ImgModule
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module Jekyll
|
16
|
-
ImgError = JekyllSupport.define_error
|
16
|
+
ImgError = ::JekyllSupport.define_error
|
17
17
|
|
18
18
|
# Plugin implementation
|
19
|
-
class Img < JekyllSupport::JekyllTag
|
19
|
+
class Img < ::JekyllSupport::JekyllTag
|
20
20
|
include JekyllImgVersion
|
21
21
|
|
22
22
|
def render_impl
|
@@ -47,15 +47,13 @@ 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
|
-
JekyllPluginHelper.register(self, ImgModule::PLUGIN_NAME)
|
57
|
+
::JekyllSupport::JekyllPluginHelper.register(self, ImgModule::PLUGIN_NAME)
|
60
58
|
end
|
61
59
|
end
|
data/spec/img_builder_spec.rb
CHANGED
File without changes
|
data/spec/img_props_spec.rb
CHANGED
File without changes
|
data/spec/jekyll_img_spec.rb
CHANGED
File without changes
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
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
|
@@ -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
|
description:
|
42
42
|
email:
|
43
43
|
- mslinn@mslinn.com
|
@@ -59,7 +59,6 @@ files:
|
|
59
59
|
- spec/img_props_spec.rb
|
60
60
|
- spec/jekyll_img_spec.rb
|
61
61
|
- spec/spec_helper.rb
|
62
|
-
- spec/status_persistence.txt
|
63
62
|
homepage: https://www.mslinn.com/jekyll_plugins/jekyll_img.html
|
64
63
|
licenses:
|
65
64
|
- MIT
|
@@ -87,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
86
|
- !ruby/object:Gem::Version
|
88
87
|
version: '0'
|
89
88
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
89
|
+
rubygems_version: 3.5.17
|
91
90
|
signing_key:
|
92
91
|
specification_version: 4
|
93
92
|
summary: Provides a Jekyll tag that generates images.
|
@@ -96,5 +95,4 @@ test_files:
|
|
96
95
|
- spec/img_props_spec.rb
|
97
96
|
- spec/jekyll_img_spec.rb
|
98
97
|
- spec/spec_helper.rb
|
99
|
-
- spec/status_persistence.txt
|
100
98
|
...
|
data/spec/status_persistence.txt
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
------------------------------- | ------ | --------------- |
|
3
|
-
./spec/img_builder_spec.rb[1:1] | passed | 0.00073 seconds |
|
4
|
-
./spec/img_props_spec.rb[1:1] | passed | 0.0001 seconds |
|
5
|
-
./spec/img_props_spec.rb[1:2] | passed | 0.00008 seconds |
|
6
|
-
./spec/img_props_spec.rb[1:3] | failed | 0.00051 seconds |
|
7
|
-
./spec/img_props_spec.rb[1:4] | passed | 0.0011 seconds |
|
8
|
-
./spec/img_props_spec.rb[1:5] | passed | 0.00019 seconds |
|
9
|
-
./spec/img_props_spec.rb[1:6] | failed | 0.00008 seconds |
|
10
|
-
./spec/jekyll_img_spec.rb[1:1] | failed | 0.00037 seconds |
|