utopia-gallery 2.4.0 → 2.5.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: 37b59231492289681e3fd589373f2390b365854be41ab2392787a175597f00de
4
- data.tar.gz: 6fcf0ea6323140671d4a9e6bc97e06fc6b1a4ed76c32944b23f7a28c306b4180
3
+ metadata.gz: 105b16e2416d4ced027b2d53b58f629abc10bc812943f81503fac1625ac1d863
4
+ data.tar.gz: 2c97ba40b4ba26a756bd733eedbfd0986ec0dc84088be894d19bca681ffb1654
5
5
  SHA512:
6
- metadata.gz: b4a658ffc4e165d25da6fe686afd349fcb6fe74ff6bb939875e9dc3ca1c01462e2108d861750a37076c567f4952ca26b67a66b2e5042f27c9a02869a2a66e59e
7
- data.tar.gz: 1cca4d8d0c8c184ec9fa41f868ec883be647cf4be1bfe707536e53bed290317c79979a8b8a347285dd9354f30110519a5da6a265c44760713333f550ae0d1779
6
+ metadata.gz: 937d93695a5ae43c6c04f0e6f9aa69abf660dd97ab9b36202333367096c8535534935eb42cb2cb4381fad03cf9c565b5f02a6af62191dc815c6947bfe7ca5d0f
7
+ data.tar.gz: 791be91c088d27d05966a088e35a0840d1933a5800c42cd223c463a2f7d46f7366aa1a45157cb9cb04dbe1b6dd48518b74c82bb9608eb23aa2bb97dfb95d5b47
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This extension for [Utopia](https://github.com/ioquatix/utopia) provides tags for generating photo galleries. Works well in conjunction with [jQuery.LiteBox](https://github.com/ioquatix/jquery-litebox).
4
4
 
5
- [![Build Status](https://secure.travis-ci.com/ioquatix/utopia-gallery.svg)](http://travis-ci.com/ioquatix/utopia-gallery)
5
+ [![Build Status](https://travis-ci.com/ioquatix/utopia-gallery.svg?branch=master)](https://travis-ci.com/ioquatix/utopia-gallery)
6
6
  [![Code Climate](https://codeclimate.com/github/ioquatix/utopia-gallery.svg)](https://codeclimate.com/github/ioquatix/utopia-gallery)
7
7
  [![Coverage Status](https://coveralls.io/repos/ioquatix/utopia-gallery/badge.svg)](https://coveralls.io/r/ioquatix/utopia-gallery)
8
8
 
@@ -65,10 +65,8 @@ module Utopia
65
65
 
66
66
  # Process the media, update files in the cache.
67
67
  def update
68
- locals = {}
69
-
70
68
  @processes.values.each do |process|
71
- process.call(self, locals)
69
+ process.call(self)
72
70
  end
73
71
 
74
72
  return self
@@ -92,22 +92,23 @@ module Utopia
92
92
  end
93
93
  end
94
94
 
95
- def resizer_for(media_path)
96
- Vips::Thumbnail::Resizer.new(media_path)
95
+ def resizer_for(input_path)
96
+ Vips::Thumbnail::Resizer.new(input_path)
97
97
  end
98
98
 
99
- def call(cache, locals)
99
+ def call(cache)
100
+ input_path = cache.input_path
100
101
  output_path = cache.output_path_for(self)
101
- media = cache.media
102
- media_path = File.join(cache.media_root, media.path)
103
102
 
104
- return if Process.fresh?(media_path, output_path)
103
+ return if Process.fresh?(input_path, output_path)
105
104
 
106
- resizer = locals[:resizer] ||= resizer_for(media_path)
105
+ resizer = resizer_for(cache.input_path)
107
106
 
108
107
  FileUtils.mkdir_p(File.dirname(output_path))
109
108
 
110
109
  generate_output(resizer, output_path)
110
+ ensure
111
+ resizer&.close
111
112
  end
112
113
  end
113
114
 
@@ -130,8 +131,8 @@ module Utopia
130
131
  end
131
132
  end
132
133
 
133
- def resizer_for(media_path)
134
- Vips::Thumbnail::Resizer.new(media_path, scale: @scale)
134
+ def resizer_for(input_path)
135
+ Vips::Thumbnail::Resizer.new(input_path, scale: @scale)
135
136
  end
136
137
  end
137
138
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Utopia
22
22
  module Gallery
23
- VERSION = "2.4.0"
23
+ VERSION = "2.5.0"
24
24
  end
25
25
  end
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.add_dependency "utopia", "~> 2.0"
20
20
  spec.add_dependency "trenni", "~> 3.9"
21
- spec.add_dependency "vips-thumbnail", "~> 1.1"
21
+ spec.add_dependency "vips-thumbnail", "~> 1.6"
22
22
 
23
23
  spec.add_development_dependency "covered"
24
24
  spec.add_development_dependency "bundler"
25
- spec.add_development_dependency "rake", "~> 10.5"
25
+ spec.add_development_dependency "rake"
26
26
  spec.add_development_dependency "rspec", "~> 3.5"
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia-gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-14 00:00:00.000000000 Z
11
+ date: 2020-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: utopia
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.1'
47
+ version: '1.6'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.1'
54
+ version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: covered
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '10.5'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '10.5'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement