shrine-blurhash 0.1.0 → 0.2.0

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: 31499fb6782c8196f5e50a1a8f1b0a4fc998c0bea417be14bb44f21ce4231fed
4
+ data.tar.gz: 61658ddfad136925c5e162e3be945d31ec63c867389b92173e583ae328a26401
5
5
  SHA512:
6
- metadata.gz: 2ef4077470e95bed536756b304d175a9650bf34b2a2061cc6d8e731560cfdd2e5e5240600181b5a522f4fb454a2b943ad8a62d9314b0bc442663ffbe2ed0c969
7
- data.tar.gz: 382ab14aef4378e3fa1797fa1937bf254efb052443b8a15f274e0e776cc5062e8f1c3019c47c4d85f070c6fe97d1f626ae1c56f5b0c03f609c44746a33d9aeb0
6
+ metadata.gz: a3948c77c0b720439c9e7066c6cf9870ce22b2a918d9f8d031bb7f7b8ab3acb64d0583a6b8ad0ade1b1a732a678724751f953f5f2def01eff8a9dd6ddca7c8fd
7
+ data.tar.gz: 51131b0613123598d50668ecc8be4b9415aeb94c075bbaf4bae4b31da29bdd643c8100620e16dc7f8f1613fa9b98ba96de7c53af8cf6a649d2a6e33562fcbc9e
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.0"
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.0
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-22 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