responsive_images 0.0.4 → 0.1.0
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 +8 -8
- data/lib/responsive_images/version.rb +1 -1
- data/lib/responsive_images/view_helpers.rb +4 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDQ3NzBhZGE1YTcwMjA1MWJmZTU4YTg1NzU5MDc1NGVhMjQ0YmE5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmU0ZTY0YTExMjNkMjIwMzJkOWMyNjcyMzhjZjA0N2Y0YzExZTM1NA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2UxNzY5ZjAzZjRmZDc0ODNjNzJiMzQ4NDQyODFmNjE5OTc4ZWJmYjNlNWZj
|
10
|
+
OTcyODMyMjZhOWRmNDQyODk1N2E1MTRkOTkwNmI0NTNmMTUyMzk1M2I5Mjgz
|
11
|
+
ZGI3NjNiMzJkODFlMjBiMmQ2ODVjYWRiMmU3YzZlNzBmYTcyNzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGY0ZWU4ZDMzNTFjODliMjYxMTEwMTI3ZmFkN2VmN2RkNWZiMWM1MTJhMTVi
|
14
|
+
YTc0NWE5NzUwM2Q3YWQ1NmI0ZjdiNmI3Yzc1NWJhYzA5ZGY3N2E5NDA5N2My
|
15
|
+
NThmMGFkNTJmYzU1YTMyNTFhZDZkY2E2Njc3M2FlMmJjNmRiYTI=
|
@@ -34,11 +34,11 @@ module ResponsiveImages
|
|
34
34
|
def src_path image, sizes
|
35
35
|
case device_type
|
36
36
|
when :desktop
|
37
|
-
image_src = sizes[:default] == :default ? image.url : image.
|
37
|
+
image_src = sizes[:default] == :default ? image.url : image.send(sizes[:default])
|
38
38
|
when :tablet
|
39
|
-
image_src = sizes[:sizes][:tablet].present? ? image.
|
39
|
+
image_src = sizes[:sizes][:tablet].present? ? image.send(sizes[:sizes][:tablet]) : image.send(sizes[:default])
|
40
40
|
when :mobile
|
41
|
-
image_src = sizes[:sizes][:mobile].present? ? image.
|
41
|
+
image_src = sizes[:sizes][:mobile].present? ? image.send(sizes[:sizes][:mobile]) : image.send(sizes[:default])
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -48,7 +48,7 @@ module ResponsiveImages
|
|
48
48
|
data_sizes = {}
|
49
49
|
sizes[:sizes].each do |size, value|
|
50
50
|
if value.present?
|
51
|
-
data_sizes["data-#{size}-src"] = (value == :default ? image.url : image.
|
51
|
+
data_sizes["data-#{size}-src"] = (value == :default ? image.url : image.send(value))
|
52
52
|
else
|
53
53
|
false
|
54
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: responsive_images
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Koht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,3 +98,4 @@ signing_key:
|
|
98
98
|
specification_version: 4
|
99
99
|
summary: A responsive image gem for Rails and Carrierwave
|
100
100
|
test_files: []
|
101
|
+
has_rdoc:
|