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 +4 -4
- data/README.md +1 -1
- data/lib/utopia/gallery/cache.rb +1 -3
- data/lib/utopia/gallery/process.rb +10 -9
- data/lib/utopia/gallery/version.rb +1 -1
- data/utopia-gallery.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 105b16e2416d4ced027b2d53b58f629abc10bc812943f81503fac1625ac1d863
|
4
|
+
data.tar.gz: 2c97ba40b4ba26a756bd733eedbfd0986ec0dc84088be894d19bca681ffb1654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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://
|
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
|
|
data/lib/utopia/gallery/cache.rb
CHANGED
@@ -92,22 +92,23 @@ module Utopia
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
def resizer_for(
|
96
|
-
Vips::Thumbnail::Resizer.new(
|
95
|
+
def resizer_for(input_path)
|
96
|
+
Vips::Thumbnail::Resizer.new(input_path)
|
97
97
|
end
|
98
98
|
|
99
|
-
def call(cache
|
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?(
|
103
|
+
return if Process.fresh?(input_path, output_path)
|
105
104
|
|
106
|
-
resizer =
|
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(
|
134
|
-
Vips::Thumbnail::Resizer.new(
|
134
|
+
def resizer_for(input_path)
|
135
|
+
Vips::Thumbnail::Resizer.new(input_path, scale: @scale)
|
135
136
|
end
|
136
137
|
end
|
137
138
|
end
|
data/utopia-gallery.gemspec
CHANGED
@@ -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.
|
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"
|
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
|
+
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-
|
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.
|
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.
|
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: '
|
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: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|