artwork 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfd5d1e44d2b3d06484c65c06ab931a5b3c558c0
4
- data.tar.gz: 690c50079f5892d5b3ddf03e32012a2c323a57f0
3
+ metadata.gz: 6e56305fe5bd63752f1cf13ba018c3354b688b93
4
+ data.tar.gz: 3c11975ed676de962d5ad35056957de662dc6582
5
5
  SHA512:
6
- metadata.gz: 32c86f1333cbb65eaf52b249d075d05ea2c148d0bdc109181d9d91a67c8027dd4166508a29b055d245734c1d5297c437f0797ff2cbf9d0a3686eb07d27c03fa6
7
- data.tar.gz: 37fb27baf3d006dda55d1aae016669523ecf1721636619a1244697da2a148b4898e2e16411f0fe8685c20cbca1c3b90786c259f936afbcf6e8905f8d65ba556a
6
+ metadata.gz: 161644ee8eb7fd885e020b8164cafdb0ad1fb9cc69a885c09af9668cef01fdb9c5ea509bc2f5871ab005a6afffe5fba533f748aeab405c793ebad9c9bbd7689c
7
+ data.tar.gz: 3e92cee31bbfac880b0fb56de9f12a24ceb989f9ee826f1e486845cb2ef9a6cf2d098b75f68717bb8b0e34f95532b62121b230967d722271cbc66db89933ef0e
@@ -32,6 +32,16 @@ module Artwork
32
32
  get(:current_resolution) || default_resolution
33
33
  end
34
34
 
35
+ def actual_resolution_for(request)
36
+ browser_width = request.cookies['_width'].to_i
37
+
38
+ if browser_width > 0
39
+ browser_width
40
+ else
41
+ default_resolution
42
+ end
43
+ end
44
+
35
45
  def current_resolution=(resolution)
36
46
  set :current_resolution, resolution
37
47
  end
@@ -1,3 +1,3 @@
1
1
  module Artwork
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
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.6.0
4
+ version: 0.6.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-12-04 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler