vips-thumbnail 1.5.1 → 1.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e4e45c4ec971eac776164b15ddb4a8fae1130e7e7ab0a6dc6d34c41639e7601
4
- data.tar.gz: 623f2a09ea83a558734b4e8eea77961185c9252b1271c1b0274233bb363affda
3
+ metadata.gz: 21d0a15a71b5687f26d6daed21e8b6b18bb0149b86513128470c98d00be6296d
4
+ data.tar.gz: a0164f21031eb214bcc07b6c9ec0c179233a35a6652d7f9710327417f588a9b0
5
5
  SHA512:
6
- metadata.gz: 1773573ba2cf1684fe7c3bc081e37ec529c6708167f9cb431f6d22e779c8fa7d5bd1ba3f3b5a5b28cc5b1af218b0226dc4c5c6eef796f42fe8fca2fe3dda3b77
7
- data.tar.gz: b20ad5bd344785f36db3b6a578888c0000d9e89a1a9ff68959a746f3a70cd6a4d51d618c8822fac19103fdb71d52218fd88ddd29680610c204d248e80dc5f4e8
6
+ metadata.gz: 3fd455a2424f8d9f8f34ff7df4041848cc410bf68801a163be91c4a0b305b2b6570d48d128e7a16beb0122cef3c1f815add5f47a4eef3fec5b336dc70e442bfc
7
+ data.tar.gz: db75943352ad7b14cf915ebd56399c93c7e7bfece24c54384cad865faeb153cf4347c3b564baa30cdfa4b01fe31925009ac5c25dbc37b9a48ada2a5c71ac516a
checksums.yaml.gz.sig ADDED
Binary file
@@ -35,10 +35,13 @@ module Vips
35
35
  attr :input_path
36
36
  attr :options
37
37
 
38
- def flush!
38
+ def close
39
+ @input_image&.close
39
40
  @input_image = nil
40
41
  end
41
42
 
43
+ alias flush! close
44
+
42
45
  def input_image
43
46
  unless @input_image
44
47
  @input_image = @block.call
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Vips
22
22
  module Thumbnail
23
- VERSION = "1.5.1"
23
+ VERSION = "1.6.1"
24
24
  end
25
25
  end
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vips-thumbnail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2020-01-06 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
14
+ ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
15
+ MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
16
+ aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
17
+ AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
18
+ xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
19
+ eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
20
+ L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
21
+ 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
22
+ E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
23
+ rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
24
+ w+XmCywiTQrFzMMAvcA7rPI4F0nU1rZId51rOvvfxaONp+wgTi4P8owZLw0/j0m4
25
+ 8C20DYi6EYx4AHDXiLpElWh3AgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8E
26
+ BAMCBLAwHQYDVR0OBBYEFB6ZaeWKxQjGTI+pmz7cKRmMIywwMC4GA1UdEQQnMCWB
27
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWB
28
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEB
29
+ CwUAA4IBgQBVoM+pu3dpdUhZM1w051iw5GfiqclAr1Psypf16Tiod/ho//4oAu6T
30
+ 9fj3DPX/acWV9P/FScvqo4Qgv6g4VWO5ZU7z2JmPoTXZtYMunRAmQPFL/gSUc6aK
31
+ vszMHIyhtyzRc6DnfW2AiVOjMBjaYv8xXZc9bduniRVPrLR4J7ozmGLh4o4uJp7w
32
+ x9KCFaR8Lvn/r0oJWJOqb/DMAYI83YeN2Dlt3jpwrsmsONrtC5S3gOUle5afSGos
33
+ bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
34
+ Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
35
+ y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
36
+ RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
+ HiLJ8VOFx6w=
38
+ -----END CERTIFICATE-----
39
+ date: 2022-06-24 00:00:00.000000000 Z
12
40
  dependencies:
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: vips
@@ -16,16 +44,16 @@ dependencies:
16
44
  requirements:
17
45
  - - "~>"
18
46
  - !ruby/object:Gem::Version
19
- version: '8.8'
47
+ version: '8.9'
20
48
  type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
52
  - - "~>"
25
53
  - !ruby/object:Gem::Version
26
- version: '8.8'
54
+ version: '8.9'
27
55
  - !ruby/object:Gem::Dependency
28
- name: covered
56
+ name: bundler
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
59
  - - ">="
@@ -39,7 +67,7 @@ dependencies:
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
- name: bundler
70
+ name: covered
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
73
  - - ">="
@@ -52,20 +80,6 @@ dependencies:
52
80
  - - ">="
53
81
  - !ruby/object:Gem::Version
54
82
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '10.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '10.0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -80,28 +94,21 @@ dependencies:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
96
  version: '3.0'
83
- description:
97
+ description:
84
98
  email:
85
- - samuel.williams@oriontransfer.co.nz
86
99
  executables: []
87
100
  extensions: []
88
101
  extra_rdoc_files: []
89
102
  files:
90
- - ".gitignore"
91
- - ".rspec"
92
- - ".travis.yml"
93
- - Gemfile
94
- - README.md
95
- - Rakefile
96
103
  - lib/vips/thumbnail.rb
97
104
  - lib/vips/thumbnail/resizer.rb
98
105
  - lib/vips/thumbnail/version.rb
99
- - vips-thumbnail.gemspec
100
106
  homepage: https://github.com/ioquatix/vips-thumbnail
101
107
  licenses:
102
108
  - MIT
103
- metadata: {}
104
- post_install_message:
109
+ metadata:
110
+ funding_uri: https://github.com/sponsors/ioquatix/
111
+ post_install_message:
105
112
  rdoc_options: []
106
113
  require_paths:
107
114
  - lib
@@ -116,8 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
123
  - !ruby/object:Gem::Version
117
124
  version: '0'
118
125
  requirements: []
119
- rubygems_version: 3.0.6
120
- signing_key:
126
+ rubygems_version: 3.3.7
127
+ signing_key:
121
128
  specification_version: 4
122
129
  summary: Convenient thumbnail resizing using libvips.
123
130
  test_files: []
metadata.gz.sig ADDED
Binary file
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
data/.rspec DELETED
@@ -1,5 +0,0 @@
1
- --color
2
- --format documentation
3
- --backtrace
4
- --warnings
5
- --require spec_helper
data/.travis.yml DELETED
@@ -1,19 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
- cache: bundler
4
-
5
- matrix:
6
- include:
7
- - rvm: 2.4
8
- - rvm: 2.5
9
- - rvm: 2.6
10
- - rvm: 2.6
11
- env: COVERAGE=PartialSummary,Coveralls
12
- - rvm: 2.7
13
- - rvm: truffleruby
14
- - rvm: jruby
15
- - rvm: ruby-head
16
- allow_failures:
17
- - rvm: truffleruby
18
- - rvm: ruby-head
19
- - rvm: jruby-head
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in vips-thumbnail.gemspec
4
- gemspec
data/README.md DELETED
@@ -1,75 +0,0 @@
1
- # Vips::Thumbnail
2
-
3
- An easy to use thumbnail resizer. It's based on libvips so it's [faster than everything else](http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use).
4
-
5
- [![Build Status](https://travis-ci.com/ioquatix/vips-thumbnail.svg)](https://travis-ci.com/ioquatix/vips-thumbnail)
6
- [![Code Climate](https://codeclimate.com/github/ioquatix/vips-thumbnail.svg)](https://codeclimate.com/github/ioquatix/vips-thumbnail)
7
- [![Coverage Status](https://coveralls.io/repos/ioquatix/vips-thumbnail/badge.svg)](https://coveralls.io/r/ioquatix/vips-thumbnail)
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- ```ruby
14
- gem 'vips-thumbnail'
15
- ```
16
-
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install vips-thumbnail
24
-
25
- ### Minimum Version
26
-
27
- `libvips` has some [integer truncation issues](https://github.com/jcupitt/ruby-vips/issues/82) in versions < 8.4, so you *must* use a release >= 8.4 otherwise you may experience problems with `resize_to_fill`.
28
-
29
- ## Usage
30
-
31
- It's super easy:
32
-
33
- ```ruby
34
- resizer = Vips::Thumbnail::Resizer.new(input_path)
35
- if image = resizer.resize_to_fit([800, 600])
36
- image.write_to_file(output_path)
37
- else
38
- # The source image wasn't big enough:
39
- symlink(input_path, output_path)
40
- end
41
- ```
42
-
43
- There are two main methods, `#resize_to_fit` which preserves aspect ratio, and `#resize_to_fill` which resizes and crops to fit the desired size if needed.
44
-
45
- ## Contributing
46
-
47
- 1. Fork it
48
- 2. Create your feature branch (`git checkout -b my-new-feature`)
49
- 3. Commit your changes (`git commit -am 'Add some feature'`)
50
- 4. Push to the branch (`git push origin my-new-feature`)
51
- 5. Create new Pull Request
52
-
53
- ## License
54
-
55
- Released under the MIT license.
56
-
57
- Copyright, 2017, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
58
-
59
- Permission is hereby granted, free of charge, to any person obtaining a copy
60
- of this software and associated documentation files (the "Software"), to deal
61
- in the Software without restriction, including without limitation the rights
62
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63
- copies of the Software, and to permit persons to whom the Software is
64
- furnished to do so, subject to the following conditions:
65
-
66
- The above copyright notice and this permission notice shall be included in
67
- all copies or substantial portions of the Software.
68
-
69
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
75
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,25 +0,0 @@
1
- require_relative 'lib/vips/thumbnail/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "vips-thumbnail"
5
- spec.version = Vips::Thumbnail::VERSION
6
- spec.license = "MIT"
7
- spec.authors = ["Samuel Williams"]
8
- spec.email = ["samuel.williams@oriontransfer.co.nz"]
9
-
10
- spec.summary = %q{Convenient thumbnail resizing using libvips.}
11
- spec.homepage = "https://github.com/ioquatix/vips-thumbnail"
12
-
13
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
14
- f.match(%r{^(test|spec|features)/})
15
- end
16
-
17
- spec.require_paths = ["lib"]
18
-
19
- spec.add_dependency "vips", "~> 8.8"
20
-
21
- spec.add_development_dependency "covered"
22
- spec.add_development_dependency "bundler"
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "rspec", "~> 3.0"
25
- end