jekyll_picture_tag 2.1.0 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 112ac65fbe4fb0b25934864d20de4e840259aa7bac0b43c8d6724d3d0c1ded7d
4
- data.tar.gz: 8d6d101b1849762e3e955c80b301049a3cab5d7bea6f9ad8469521fb8e7fe60c
3
+ metadata.gz: 9c2eba1d97111de1ef819824525ee40dadc297235b0d9a723e50292aca614277
4
+ data.tar.gz: 2b50ae28f44441be8b41329cc488d99afb68954f13b3292af1bac90e1cbc9fad
5
5
  SHA512:
6
- metadata.gz: 86c1e2e9f9e8f62fbbc1ae69975ac490f40358649725b6308c9b964ce29571bbdaef22c6f3a0036e8c3d6352bd799d3b05db080914b143283ba97d61282632d6
7
- data.tar.gz: 17cf9d9e1d397651148191fd2c3d9cde68f2af59c17edabb18b9fb27ebba9ea534a42936f601bb999944d2ff884e09788e6301494896a2ceeae0c2d1b9c23aae
6
+ metadata.gz: 8b9be36209c87b8475377e7f76117f1d0ac042d885f10e46f49a757d18af751a5df4953b2bd85ebbe94af77fd878e8a425394e713c181573e71d2c00c53be8f0
7
+ data.tar.gz: 1c7a556b2f1bc1b0a29010e9c7a8c484df86b049ac0247d831b23b7c58478f3b0a54a07df014b126af727d4f110677f0c366a83712b9f10b8229b3b9dbb7f8eb
@@ -2,12 +2,9 @@ name: 'Tests & Formatting'
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [master]
6
6
  pull_request:
7
- branches: [ master ]
8
- schedule:
9
- # Run weekly; github deletes caches that haven't been used in a week.
10
- - cron: '0 0 * * 0'
7
+ branches: [master]
11
8
 
12
9
  jobs:
13
10
  checks:
@@ -2,6 +2,11 @@
2
2
  ---
3
3
  # Release History
4
4
 
5
+ * 2.1.2 13 September, 2024
6
+ * Remove overly specific version spec for ruby-vips - thanks to [@hschne](https://github.com/hschne) for [#313](https://github.com/rbuchberger/jekyll_picture_tag/pull/313)
7
+ * 2.1.1 20 July, 2024
8
+ * Don't provide Q setting for PPM images - thanks to @dichiban for [#309](https://github.com/rbuchberger/jekyll_picture_tag/pull/309)
9
+ * Fix alpha premultiplication - thanks to @KaarlisCaune for [#302](https://github.com/rbuchberger/jekyll_picture_tag/pull/302)
5
10
  * 2.1.0 29 January, 2024
6
11
  * Check whether the vips CLI is installed before trying to use it. Thanks to @philrb for
7
12
  [#299](https://github.com/rbuchberger/jekyll_picture_tag/pull/299)
data/docs/index.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  ---
3
3
 
4
- ![](logo.svg)
4
+ ![](logo.png)
5
5
 
6
6
  _Responsive Images, Done Correctly._
7
7
 
data/docs/logo.png CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  # HTML attributes
2
2
 
3
3
  Jekyll Picture Tag has comprehensive attribute support for all generated HTML. You can add
4
- attributes both through the [liquid tag]({{ site.baseurl }}{% link /users/liquid_tag/index.md %}),
5
- and the [preset]({{ site.baseurl }}{% link /usage/users/presets/html_attributes.md %}) (scroll down a bit).
4
+ attributes both through the [liquid tag](../liquid_tag/index.md),
5
+ and the [preset](../presets/html_attributes.md) (scroll down a bit).
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  # rainbow is used to colorize terminal output.
39
39
  spec.add_runtime_dependency 'rainbow', '~> 3.0'
40
40
  # ruby-vips interfaces with libvips.
41
- spec.add_runtime_dependency 'ruby-vips', '~> 2.0.17'
41
+ spec.add_runtime_dependency 'ruby-vips', '~> 2.2'
42
42
 
43
43
  # libvips handles all image processing operations.
44
44
  spec.requirements << 'libvips'
@@ -57,9 +57,9 @@ module PictureTag
57
57
 
58
58
  opts[:strip] = PictureTag.preset['strip_metadata']
59
59
 
60
- # gifs don't accept a quality setting, and PNGs don't on older versions of
60
+ # gifs don't accept a quality setting, and PNGs and PPMs don't on older versions of
61
61
  # vips. Since it's not remarkably useful anyway, we'll ignore them.
62
- opts[quality_key] = base.quality unless %w[gif png].include? base.format
62
+ opts[quality_key] = base.quality unless %w[gif png ppm].include? base.format
63
63
 
64
64
  opts.transform_keys(&:to_sym)
65
65
  end
@@ -86,7 +86,13 @@ module PictureTag
86
86
  end
87
87
 
88
88
  def resize(image)
89
- image.resize(scale_value)
89
+ if image.has_alpha?
90
+ image = image.premultiply
91
+ image = image.resize(scale_value)
92
+ image.unpremultiply
93
+ else
94
+ image.resize(scale_value)
95
+ end
90
96
  end
91
97
 
92
98
  def crop(image)
@@ -1,3 +1,3 @@
1
1
  module PictureTag
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.1.2'.freeze
3
3
  end
data/readme.md CHANGED
@@ -1,31 +1,18 @@
1
1
  # Jekyll Picture Tag
2
2
 
3
- ## Help Wanted
4
-
5
- My life just got a lot busier; I'd really like a maintainer or two to help. I'm not abandoning JPT,
6
- I just don't have a ton of time to put into hacking on it.
7
-
8
- If you've been learning Ruby and you want to move beyond tutorials and throwaway projects, I'd love
9
- to hear from you. I'd be happy to help you gain experience and credibility, if you're willing to
10
- help me maintain this project!
11
-
12
- If you're interested, contact me: robert@buchberger.cc
13
-
14
- ![Logo](docs/logo.svg)
15
-
16
- ![Tests & Formatting](https://github.com/rbuchberger/jekyll_picture_tag/workflows/Tests%20&%20Formatting/badge.svg)
17
-
18
3
  **Responsive Images done correctly.**
19
4
 
20
- It's simple to throw a photo on a page and call it a day, but doing justice to users on all
21
- different browsers and devices is tedious and tricky. Tedious, tricky things should be automated.
22
- [This blog post further elaborates on that theme.](https://robert-buchberger.com/blog/2021/responsive_images.html)
5
+ ![Logo](docs/logo.png)
23
6
 
24
7
  Jekyll Picture Tag automatically builds cropped, resized, and reformatted images, builds several
25
8
  kinds of markup, offers extensive configuration while requiring none, and solves both the art
26
9
  direction and resolution switching problems with a little YAML configuration and a simple template
27
10
  tag.
28
11
 
12
+ It's simple to throw a photo on a page and call it a day, but doing justice to users on all
13
+ different browsers and devices is tedious and tricky.
14
+ [Tedious, tricky things should be automated](https://robert-buchberger.com/blog/2021/responsive_images.html).
15
+
29
16
  ## Why use Responsive Images?
30
17
 
31
18
  **Performance:** The fastest sites are static sites, but if you plonk a 2mb picture of your dog at
@@ -59,8 +46,13 @@ Tag is your responsive images minion - give it simple instructions and it'll han
59
46
 
60
47
  Recent releases:
61
48
 
49
+ * 2.1.2 13 September, 2024
50
+ * Remove overly specific version spec for ruby-vips - thanks to [@hschne](https://github.com/hschne) for [#313](https://github.com/rbuchberger/jekyll_picture_tag/pull/313)
51
+ * 2.1.1 20 July, 2024
52
+ * Don't provide Q setting for PPM images - thanks to [@dichiban](https://github.com/dichiban) for [#309](https://github.com/rbuchberger/jekyll_picture_tag/pull/309)
53
+ * Fix alpha premultiplication - thanks to [@KaarlisCaune](https://github.com/kaarliscaune) for [#302](https://github.com/rbuchberger/jekyll_picture_tag/pull/302)
62
54
  * 2.1.0 29 January, 2024
63
- * Check whether the vips CLI is installed before trying to use it. Thanks to @philrb for
55
+ * Check whether the vips CLI is installed before trying to use it. Thanks to [@philrb](https://github.com/philrb) for
64
56
  [#299](https://github.com/rbuchberger/jekyll_picture_tag/pull/299)
65
57
  * Update minimum required mocha version to maintain compatibility with minitest
66
58
  * 2.0.4 August 16, 2022
@@ -100,11 +92,3 @@ Recent releases:
100
92
  * Drop support for `markup_presets` and `media_presets`. They are now
101
93
  officially and only `presets` and `media_queries`.
102
94
  * Improve docs with an introductory tutorial and 'how-to' flow.
103
-
104
- ## Help Wanted
105
-
106
- Writing code is only part of the job; often the harder part is knowing what needs to be changed. Any
107
- and all feedback is greatly appreciated, especially in regards to documentation. What are your pain
108
- points? See the [contributing
109
- guidelines](https://rbuchberger.github.io/jekyll_picture_tag/devs/contributing), or the
110
- [issues](https://github.com/rbuchberger/jekyll_picture_tag/issues) page for more.
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.1.0
4
+ version: 2.1.2
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: 2024-01-29 00:00:00.000000000 Z
13
+ date: 2024-09-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: 2.0.17
91
+ version: '2.2'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: 2.0.17
98
+ version: '2.2'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: bundler
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -311,7 +311,6 @@ files:
311
311
  - docs/devs/releases.md
312
312
  - docs/index.md
313
313
  - docs/logo.png
314
- - docs/logo.svg
315
314
  - docs/users/configuration/directories.md
316
315
  - docs/users/configuration/disable.md
317
316
  - docs/users/configuration/fast_build.md