artwork 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/artwork/model.rb +1 -0
- data/lib/artwork/version.rb +1 -1
- data/spec/artwork/model_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc971fdfa3ebbcae98bc4a62e9c83c9cbb7d1a40
|
4
|
+
data.tar.gz: 87e9c6714e3b40a73c1c9d648ec6dc20b7c957d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a760a29d15260f3606569b748d1718e2527d91453a6e045d0514683b8d919a98a358d07b49c7779af66b589a81ec026de905f5efe10ad96fe34ae759ed5b0f3
|
7
|
+
data.tar.gz: 3f5850ba63d80d743293cde5f1b488d793f056a331eac8be013a6ca0f909a4c121fe8ec8870c919779c18caff27549f86f439d24de821c884a55f26b57d0dcb6
|
data/CHANGELOG.md
CHANGED
data/lib/artwork/model.rb
CHANGED
@@ -63,6 +63,7 @@ module Artwork
|
|
63
63
|
return unless alternative_sizes
|
64
64
|
|
65
65
|
new_size_definition = alternative_sizes \
|
66
|
+
.select { |key, value| key.is_a? Numeric } \
|
66
67
|
.sort_by { |max_resolution, size| max_resolution } \
|
67
68
|
.find { |max_resolution, size| Artwork.actual_resolution <= max_resolution }
|
68
69
|
|
data/lib/artwork/version.rb
CHANGED
data/spec/artwork/model_spec.rb
CHANGED
@@ -239,6 +239,13 @@ module Artwork
|
|
239
239
|
|
240
240
|
expect_thumb ['320x', {1280 => '50x@100', 800 => '100x@100'}], :'640x'
|
241
241
|
end
|
242
|
+
|
243
|
+
it 'ignores non-numeric keys' do
|
244
|
+
Artwork.current_resolution = 1200
|
245
|
+
Artwork.actual_resolution = 1200
|
246
|
+
|
247
|
+
expect_thumb ['320x', {1280 => '50x@100', 800 => '100x@100', :foo => 'bar'}], :'640x'
|
248
|
+
end
|
242
249
|
end
|
243
250
|
end
|
244
251
|
end
|