meta-tags 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/README.md +2 -0
- data/lib/meta_tags/version.rb +1 -1
- data/lib/meta_tags/view_helper.rb +5 -1
- data/spec/meta_tags_spec.rb +14 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -350,3 +350,5 @@ There are several plugins influenced me to create this one:
|
|
350
350
|
* [Guille Lopez](https://github.com/guillelopez) (contributor)
|
351
351
|
* [Holger Frohloff](https://github.com/jazzgumpy) (contributor)
|
352
352
|
* [Jakub Wojtysiak](https://github.com/schiza) (contributor)
|
353
|
+
* [Matthew Callis](https://github.com/MatthewCallis) (contributor)
|
354
|
+
* [Andre Luiz Carvalho](https://github.com/alcarvalho) (contributor)
|
data/lib/meta_tags/version.rb
CHANGED
@@ -245,7 +245,11 @@ module MetaTags
|
|
245
245
|
end
|
246
246
|
else
|
247
247
|
Array(content).each do |c|
|
248
|
-
|
248
|
+
if c.is_a?(Hash)
|
249
|
+
result.concat process_tree(property, c)
|
250
|
+
else
|
251
|
+
result << tag(:meta, :property => "#{property}", :content => c) unless c.blank?
|
252
|
+
end
|
249
253
|
end
|
250
254
|
end
|
251
255
|
result
|
data/spec/meta_tags_spec.rb
CHANGED
@@ -367,12 +367,25 @@ describe MetaTags::ViewHelper do
|
|
367
367
|
:bar => "lorem",
|
368
368
|
:baz => {
|
369
369
|
:qux => ["lorem", "ipsum"]
|
370
|
-
}
|
370
|
+
},
|
371
|
+
:quux => [ {
|
372
|
+
:corge => "lorem",
|
373
|
+
:grault => "ipsum"
|
374
|
+
},
|
375
|
+
{
|
376
|
+
:corge => "dolor",
|
377
|
+
:grault => "sit"
|
378
|
+
} ]
|
371
379
|
})
|
372
380
|
subject.display_meta_tags(:site => 'someSite').tap do |content|
|
373
381
|
content.should include('<meta content="lorem" property="foo:bar" />')
|
374
382
|
content.should include('<meta content="lorem" property="foo:baz:qux" />')
|
375
383
|
content.should include('<meta content="ipsum" property="foo:baz:qux" />')
|
384
|
+
content.should include('<meta content="lorem" property="foo:quux:corge"')
|
385
|
+
content.should include('<meta content="ipsum" property="foo:quux:grault"')
|
386
|
+
content.should include('<meta content="dolor" property="foo:quux:corge"')
|
387
|
+
content.should include('<meta content="sit" property="foo:quux:grault"')
|
388
|
+
content.should_not include('property="foo:quux"')
|
376
389
|
end
|
377
390
|
end
|
378
391
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 1
|
10
|
+
version: 1.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dmytro Shteflyuk
|