item 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/item/version.rb +1 -1
- data/lib/item/view_helpers.rb +2 -2
- data/test/view_helpers_test.rb +2 -2
- 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: 896e577ff1509ed63b85717b0629b16d202253b7
|
4
|
+
data.tar.gz: 805b031c703dfedf62692c3442c06ec7e6df594e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca45cbaf092ec7d9a830e604e06022c0393e28d19b613c73d2990f9fae28537c9ba4393ca8960de1da872fd59044f8fc04f03fbdf174bbeed8f0cf1c9f30c038
|
7
|
+
data.tar.gz: d57f6be3192403b90e1be271757e808682c0ce43696bb485f69adee389eee82915aff96a65513194d7a6d8943b2ebc68f18730942c05fded31769dae42d3eb90
|
data/CHANGELOG.md
CHANGED
data/lib/item/version.rb
CHANGED
data/lib/item/view_helpers.rb
CHANGED
@@ -2,7 +2,7 @@ module Item
|
|
2
2
|
module ViewHelpers
|
3
3
|
def scope(key, options = {}, &block)
|
4
4
|
tag = options.delete(:tag) || :div
|
5
|
-
tag_options = { itemscope:
|
5
|
+
tag_options = { itemscope: "itemscope", itemtype: Util.itemtype(key) }.merge(options)
|
6
6
|
content_tag(tag, tag_options, &block)
|
7
7
|
end
|
8
8
|
|
@@ -24,7 +24,7 @@ module Item
|
|
24
24
|
if block
|
25
25
|
tag = options.delete(:tag) || :div
|
26
26
|
itemtype = Util.itemtype(options.delete(:type) || key)
|
27
|
-
tag_options = { itemprop: itemprop, itemscope:
|
27
|
+
tag_options = { itemprop: itemprop, itemscope: "itemscope", itemtype: itemtype }.merge(options)
|
28
28
|
content_tag(tag, tag_options, &block)
|
29
29
|
else
|
30
30
|
tag = options.delete(:tag) || :span
|
data/test/view_helpers_test.rb
CHANGED
@@ -36,9 +36,9 @@ class ViewHelpersTest < ActionView::TestCase
|
|
36
36
|
end
|
37
37
|
|
38
38
|
test "hidden prop" do
|
39
|
-
content = prop(aggregate_rating: "Rating content",
|
39
|
+
content = prop(aggregate_rating: "Rating content", availability: :in_stock)
|
40
40
|
|
41
|
-
assert_equal %{<meta content="Rating content" itemprop="aggregateRating" />\n<
|
41
|
+
assert_equal %{<meta content="Rating content" itemprop="aggregateRating" />\n<link href="http://schema.org/InStock" itemprop="availability" />},
|
42
42
|
content
|
43
43
|
end
|
44
44
|
|