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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 573aa33bc1c5aefabf51ff8509dc7bd55fa6a09e
4
- data.tar.gz: f8c0aefbcb4d513b3b52b41aa08efa4cc4a59ddf
3
+ metadata.gz: fc971fdfa3ebbcae98bc4a62e9c83c9cbb7d1a40
4
+ data.tar.gz: 87e9c6714e3b40a73c1c9d648ec6dc20b7c957d3
5
5
  SHA512:
6
- metadata.gz: 3362f10528462b3405e0a1959c48d935c1ae220e09564dfef9326f112bcb523444dca904e4f80848c7e4626c9077c14710c19d0cf0eec6da0433c82988f7ecba
7
- data.tar.gz: aa4077dfae88ef932c291891f53553dc1f5382b95cca2b831abbd47db5302a1c219b0e0ee4bc5a39747d418fec51d8e9a86b636e70811a64ff4944e74d0c2c34
6
+ metadata.gz: 3a760a29d15260f3606569b748d1718e2527d91453a6e045d0514683b8d919a98a358d07b49c7779af66b589a81ec026de905f5efe10ad96fe34ae759ed5b0f3
7
+ data.tar.gz: 3f5850ba63d80d743293cde5f1b488d793f056a331eac8be013a6ca0f909a4c121fe8ec8870c919779c18caff27549f86f439d24de821c884a55f26b57d0dcb6
@@ -1,3 +1,8 @@
1
+ ## v0.7.1
2
+
3
+ - Hotfix for the new alternative sizes when additional non-numeric option keys
4
+ are being passed to `artwork_thumb_for()` (such as `auto_height: true`).
5
+
1
6
  ## v0.7.0
2
7
 
3
8
  **Backwards-incompatible changes**
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Artwork
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitar Dimitrov