responsive_image_tag 0.0.7 → 0.0.8
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.
- data/VERSION +1 -1
- data/lib/responsive_image_tag.rb +1 -1
- data/responsive_image_tag.gemspec +1 -1
- data/test/test_responsive_image_tag.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/lib/responsive_image_tag.rb
CHANGED
@@ -7,7 +7,7 @@ module ResponsiveImageTag
|
|
7
7
|
# asset_tag_helper.
|
8
8
|
#
|
9
9
|
def responsive_image_tag(small, big, options = {})
|
10
|
-
options["
|
10
|
+
options["data-fullsrc"] = image_path(big)
|
11
11
|
output = tag "span", {:class => "img-placeholder"}
|
12
12
|
output += tag "noscript", nil, true
|
13
13
|
output += image_tag(small, options)
|
@@ -24,11 +24,11 @@ class TestResponsiveImageTag < MiniTest::Unit::TestCase
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have a full-src attribute" do
|
27
|
-
@tag.must_match "
|
27
|
+
@tag.must_match "data-fullsrc="
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should use big.jpg as the value for full-src" do
|
31
|
-
@tag.must_match "
|
31
|
+
@tag.must_match "data-fullsrc=\"/images/big.jpg\""
|
32
32
|
end
|
33
33
|
|
34
34
|
describe "with an :alt option specified" do
|
@@ -49,7 +49,7 @@ class TestResponsiveImageTag < MiniTest::Unit::TestCase
|
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should prepend the correct asset path onto full-src" do
|
52
|
-
@tag.must_match "
|
52
|
+
@tag.must_match "data-fullsrc=\"/images/big.jpg"
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: responsive_image_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dave Hrycyszyn
|