jekyll_picture_tag 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/devs/releases.md +2 -0
- data/lib/jekyll_picture_tag/parsers/image_backend.rb +15 -2
- data/lib/jekyll_picture_tag/version.rb +1 -1
- data/readme.md +2 -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: 4f23ec3ce5d5f881be6bae85ef969945881f158c980d2c42bb1765e206ce4fb2
|
4
|
+
data.tar.gz: f09e7df7586ed7d84e2edbfb1f389542f39b6b44fb21d958a60a795a73392e11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11da88e7d15102e11fa82df0a29622f58efed1d550e127cf5ddfedca12faf9a77451867d303457b96c3f391280b3cfb92cb458408a44855247385e8f1f84ba5b
|
7
|
+
data.tar.gz: 5e055b1a83dd0be96bca325b5d347315f643fd4f52761452d7544fb036992785760300d2fdee98ef2c95fbdf63298703e54ba8add17d7a7726a8398031e4befb
|
data/docs/devs/releases.md
CHANGED
@@ -3,9 +3,9 @@ module PictureTag
|
|
3
3
|
# Returns information regarding image handlers
|
4
4
|
class ImageBackend
|
5
5
|
def handler_for(format)
|
6
|
-
if vips_formats.
|
6
|
+
if (vips_formats & all_names(format)).any?
|
7
7
|
:vips
|
8
|
-
elsif magick_formats.
|
8
|
+
elsif (magick_formats & all_names(format)).any?
|
9
9
|
:magick
|
10
10
|
else
|
11
11
|
raise "No support for generating #{format} files in this environment."
|
@@ -28,6 +28,19 @@ module PictureTag
|
|
28
28
|
.delete_prefix('Delegates (built-in):')
|
29
29
|
.split
|
30
30
|
end
|
31
|
+
|
32
|
+
# Returns an array of all known names of a format, for the purposes of
|
33
|
+
# parsing supported output formats.
|
34
|
+
def all_names(format)
|
35
|
+
alts = alternates.select { |a| a.include? format }.flatten
|
36
|
+
alts.any? ? alts : [format]
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def alternates
|
42
|
+
[%w[jpg jpeg], %w[avif heic heif]]
|
43
|
+
end
|
31
44
|
end
|
32
45
|
end
|
33
46
|
end
|
data/readme.md
CHANGED
@@ -47,6 +47,8 @@ https://rbuchberger.github.io/jekyll_picture_tag/devs/releases
|
|
47
47
|
|
48
48
|
Recent releases:
|
49
49
|
|
50
|
+
* 2.0.3 April 1, 2021
|
51
|
+
* Improve backend format support detection
|
50
52
|
* 2.0.2 March 31, 2021
|
51
53
|
* Do not pass a quality argument when generating PNG files.
|
52
54
|
* It only works on newer versions of vips, breaking builds when using older
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_picture_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Wierzbowski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|