shrine-blurhash 0.1.0 → 0.2.1

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: 9f4650238faaadb15dffee5a1ac789edb8be01357bd46591d2cb4fbab32890d1
4
- data.tar.gz: e1f9853635ccd673feacad7ab25d8a36a632ffeba564911c653e4fa32bb97039
3
+ metadata.gz: 39c6d8fd3e19a78ac91d21d5adebb1a834fafcb80c1493b281a132f6d9880201
4
+ data.tar.gz: e4e7faea183a676725b610353fc8d052417fdf1bdd58544ed73647b87e9f777c
5
5
  SHA512:
6
- metadata.gz: 2ef4077470e95bed536756b304d175a9650bf34b2a2061cc6d8e731560cfdd2e5e5240600181b5a522f4fb454a2b943ad8a62d9314b0bc442663ffbe2ed0c969
7
- data.tar.gz: 382ab14aef4378e3fa1797fa1937bf254efb052443b8a15f274e0e776cc5062e8f1c3019c47c4d85f070c6fe97d1f626ae1c56f5b0c03f609c44746a33d9aeb0
6
+ metadata.gz: 11e4c2bf34926fc35e6bc18b75c6642eeda93ecda13e3c8a767ce0e776a428e4a6d2fb05833f7e9e42701941dc5dc8c9acf34adf933c4afa05b5979e6aaa75f7
7
+ data.tar.gz: 595c3ae789fd7267d195bec699893cb7b56972607b301a3a9da6d5abb566fadad0cc8447b78323324b0e970d33314b81e1f0f92392b1c4d288a76be0e79117fa
data/README.md CHANGED
@@ -78,7 +78,7 @@ You can either specify the target size or `nil` to disable image resizing comple
78
78
  Type: `symbol` or `lambda`
79
79
 
80
80
  ```ruby
81
- plugin :blurhash, extractor: :ruby-vips
81
+ plugin :blurhash, extractor: :ruby_vips
82
82
  ```
83
83
 
84
84
  Supported extractors:
@@ -130,6 +130,7 @@ class Shrine
130
130
  Shrine.with_file(io) do |file|
131
131
  image = Vips::Image.new_from_file(file.path, access: :sequential)
132
132
  image = image.resize(resize_to.fdiv(image.width), vscale: resize_to.fdiv(image.height)) if resize_to
133
+ image = image.flatten if image.has_alpha?
133
134
 
134
135
  {
135
136
  width: image.width,
@@ -2,9 +2,9 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "shrine-blurhash"
5
- gem.version = "0.1.0"
5
+ gem.version = "0.2.1"
6
6
 
7
- gem.required_ruby_version = ">= 2.5"
7
+ gem.required_ruby_version = ">= 3.1"
8
8
 
9
9
  gem.summary = "Shrine plugin to compute Blurhash on image attachments"
10
10
  gem.homepage = "https://github.com/renchap/shrine-blurhash"
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.files = Dir["README.md", "LICENSE.txt", "lib/**/*.rb", "shrine-blurhash.gemspec"]
16
16
  gem.require_path = "lib"
17
17
 
18
- gem.add_dependency "blurhash", "~> 0.1.4"
18
+ gem.add_dependency "blurhash", "~> 0.1.8"
19
19
  gem.add_dependency "shrine", "~> 3.0"
20
20
 
21
21
  gem.add_development_dependency "minitest"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrine-blurhash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renaud Chaput
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blurhash
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.4
19
+ version: 0.1.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.4
26
+ version: 0.1.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: shrine
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -102,14 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - ">="
104
104
  - !ruby/object:Gem::Version
105
- version: '2.5'
105
+ version: '3.1'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.3.7
112
+ rubygems_version: 3.5.3
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Shrine plugin to compute Blurhash on image attachments