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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa951bbfd148bc82240773e639cbe2e49d9eff1d
4
- data.tar.gz: 8f64417bbae8acffbecc2834a5329db999f9f508
3
+ metadata.gz: 57f84112724f8febeb83e9564db3fdc6b77f0398
4
+ data.tar.gz: 5877521f758d8d35fa176a409598ea560d336481
5
5
  SHA512:
6
- metadata.gz: 9d9c548951e44e6451936402fac6640f4dfd0cf355ab351f6c27fd0826fe1b6997949fc15c3918531217b488b85db71b9565dee3df955bc177bb3f21198a57eb
7
- data.tar.gz: dcaed01087a475e2677f376c4b2c55201b6f5ab5e7bc4e265996137ac76e50ea793a5f9b85a25be2106d6f0a3ad241760e8546c0f12de370abc82e2e3ac4b266
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
@@ -1,3 +1,3 @@
1
1
  module AmpHelper
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amp_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Awjecc