artwork 0.4.0 → 0.4.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: eea1f0b27e394aabf472e48645693cb62f95df54
4
- data.tar.gz: 493fdce70015ab3c194a9502542e43f08f3f8da8
3
+ metadata.gz: 0b0d7d992466ff46722a06047434dbf8a45f725a
4
+ data.tar.gz: 12762bbc853844aee095a497472cac66ee9fea3e
5
5
  SHA512:
6
- metadata.gz: 939897e270a6b5f0354763b544be4d9bd991c96021c3d0bc8921f749f9eb42e9830bf54cff7e31086dbedabf8b151a1dd59ff677c9607c8016ae63c20f803aed
7
- data.tar.gz: 097fd8418344ae6ee63f5bc49e20e81b92d805381b57f8a484fd2f51b958e07733303b7ad1997490b8d7ecfcf9ae816f7c10b19468eaf85f80878a63f50658cc
6
+ metadata.gz: 7508e3ed8cb033ce3c481c92d04023ec5c8f6aa21291bd95bf6e48149249b895180dc0c7432520319214a12d133130220eed5ea45b356683e4b93379bfac6e3f
7
+ data.tar.gz: bd84075a0ce6eb000f3bd41377ce81db17304d89db3d69f6c1442a78f889a5b034217eed78278fe7c3d8a98436ac00ca80a90680ca4079e21435c22f51d59572
data/README.md CHANGED
@@ -107,8 +107,8 @@ The following criteria are taken into account for picking up the appropriate
107
107
  thumb name:
108
108
 
109
109
  - The `default_resolution` specified in the Artwork configuration file.
110
- - The current resolition, approximated to the nearest largest supported
111
- resolution.
110
+ - The current resolition, approximated to the nearest supported resolution
111
+ which is larger than the current user's one.
112
112
  - Whether or not the screen is retina.
113
113
  - The width of the requested thumb size (e.g. `400` for `400x300_crop`).
114
114
  - The label of the requested thumb (e.g. `crop` for `400x300_crop`); the label
@@ -121,13 +121,13 @@ thumb name:
121
121
 
122
122
  For a thumb to be returned as matching, all of the following must be true:
123
123
 
124
- - It must me the smallest thumb which is still larger than the requested width,
124
+ - It must be the smallest thumb which is still larger than the requested width,
125
125
  scaled for the current resolution.
126
126
  - If the requested thumb has a label (including a blank one, like in `400x_`),
127
127
  the thumb must match the requested label.
128
128
  - If the requested thumb specifies an aspect ratio, the matching thumb must
129
- have the same aspect ratio, rounded to the second decimal. If no aspect ratio
130
- is specified in the request, aspect ratio checks will not be performed.
129
+ have the same aspect ratio, within a delta of 0.1. If no aspect ratio is
130
+ specified in the request, aspect ratio checks will not be performed.
131
131
  - If the current device is a retina device, a retina thumb will be preferred.
132
132
  If no retuna thumb exists, a non-retina one will be selected.
133
133
 
@@ -41,7 +41,7 @@ module Artwork
41
41
  matching_thumb_name.to_sym
42
42
  end
43
43
 
44
- def artwork_url(attachment_name, size, options = nil)
44
+ def artwork_url(attachment_name, size, options = {})
45
45
  thumb_name = artwork_thumb_for(attachment_name, size)
46
46
  send(attachment_name).url(thumb_name, options)
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module Artwork
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -82,7 +82,7 @@ module Artwork
82
82
  expect(instance).to receive(:artwork_thumb_for).with(:photo, :size).and_return(:computed_size)
83
83
 
84
84
  attachment = double
85
- expect(attachment).to receive(:url).with(:computed_size, nil).and_return 'some/url'
85
+ expect(attachment).to receive(:url).with(:computed_size, {}).and_return 'some/url'
86
86
  expect(instance).to receive(:photo).and_return(attachment)
87
87
 
88
88
  expect(instance.artwork_url(:photo, :size)).to eq 'some/url'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitar Dimitrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2014-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler