amp_helper 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/amp_helper/amp_image_tag_helper.rb +1 -1
- data/lib/amp_helper/version.rb +1 -1
- 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: 57f84112724f8febeb83e9564db3fdc6b77f0398
|
4
|
+
data.tar.gz: 5877521f758d8d35fa176a409598ea560d336481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ae311480df691c349b620478324bfd79cb325090b9cc263e5320d2f69cf32115960a7851593893bf52f0ada56279942422cc591d5c912722dea7f5866b3d867
|
7
|
+
data.tar.gz: 0f403c347c25607beeb288e35710d0b3c6cb44eec231df70511d3045e591905ab26a719550989e4c92f231ec9c2aa93919e9127013a55f622eb40a9614182cc3
|
data/README.md
CHANGED
@@ -44,11 +44,11 @@ Or install it yourself as:
|
|
44
44
|
|
45
45
|
##### Retina
|
46
46
|
|
47
|
-
$ amp_image_tag('http://placehold.it/350x150', srcset: 'http://placehold.it/700x300', size: '20x20')
|
48
|
-
#=> '<amp-img alt="350x150" height="20" src="http://placehold.it/350x150" srcset="http://placehold.it/700x300" width="20" /></amp-img>'
|
47
|
+
$ amp_image_tag('http://placehold.it/350x150', srcset: 'http://placehold.it/700x300 2x', size: '20x20')
|
48
|
+
#=> '<amp-img alt="350x150" height="20" src="http://placehold.it/350x150" srcset="http://placehold.it/700x300 2x" width="20" /></amp-img>'
|
49
49
|
|
50
50
|
$ amp_image_tag(ThumbUploader.new.square, format_2x: '%s_2x')
|
51
|
-
#=> '<amp-img alt="Square 350x150" height="20" src="http://placehold.it/square_350x150" srcset="http://placehold.it/square_2x_350x150" width="20" /></amp-img>'
|
51
|
+
#=> '<amp-img alt="Square 350x150" height="20" src="http://placehold.it/square_350x150" srcset="http://placehold.it/square_2x_350x150 2x" width="20" /></amp-img>'
|
52
52
|
|
53
53
|
##### ThumbUploader Sample
|
54
54
|
|
@@ -26,7 +26,7 @@ module AmpImageTagHelper
|
|
26
26
|
!source.class.processors.empty? &&
|
27
27
|
format_2x = opts.delete(:format_2x)
|
28
28
|
name_2x = format_2x % source.version_name
|
29
|
-
opts[:srcset] = source.parent_version.send(name_2x).url
|
29
|
+
opts[:srcset] = "#{source.parent_version.send(name_2x).url} 2x"
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
data/lib/amp_helper/version.rb
CHANGED