meta-tags 1.4.0 → 1.4.1

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.
@@ -1,3 +1,9 @@
1
+ ## 1.4.1 (March 14, 2013)
2
+
3
+ Bugfixes:
4
+
5
+ - Added support for Hash inside of an Array
6
+
1
7
  ## 1.4.0 (March 14, 2013)
2
8
 
3
9
  Features:
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)
@@ -1,3 +1,3 @@
1
1
  module MetaTags
2
- VERSION = '1.4.0'
2
+ VERSION = '1.4.1'
3
3
  end
@@ -245,7 +245,11 @@ module MetaTags
245
245
  end
246
246
  else
247
247
  Array(content).each do |c|
248
- result << tag(:meta, :property => "#{property}", :content => c) unless c.blank?
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
@@ -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: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 0
10
- version: 1.4.0
9
+ - 1
10
+ version: 1.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dmytro Shteflyuk