meta-tags-helpers 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -39,17 +39,19 @@ The first example above will produce the following html:
39
39
  <meta name="X-UA-Compatible" content="IE=edge,chrome=1" />
40
40
  <meta name="viewport" content="width=device-width" />
41
41
  <title>MyBlog - This is a Blog</title>
42
- <meta name="description" content="The blog of mine &amp; a reserved character" />
43
- <meta name="og:url" content="(THE CURRENT REQUESTED URL)" />
44
- <meta name="og:type" content="website" />
45
- <meta name="og:title" content="MyBlog - This is a Blog" />
46
- <meta name="og:description" content="The blog of mine &amp; a reserved character" />
47
- <meta name="ns:my_custom_meta" content="a value" />
42
+ <meta property="description" content="The blog of mine &amp; a reserved character" />
43
+ <meta property="og:url" content="(THE CURRENT REQUESTED URL)" />
44
+ <meta property="og:type" content="website" />
45
+ <meta property="og:title" content="MyBlog - This is a Blog" />
46
+ <meta property="og:description" content="The blog of mine &amp; a reserved character" />
47
+ <meta property="ns:my_custom_meta" content="a value" />
48
48
  <meta name="csrf-param" content="..." />
49
49
  <meta name="csrf-token" content="..." />
50
50
 
51
51
  ```
52
52
 
53
+ **NOTE:** namespaced meta (eg. `og:title`) are supposed to be RDF properties and so they are marked using a `property` attribute.
54
+
53
55
  ### Setting meta tags from controller/partials/other views
54
56
 
55
57
  You can customize some of defautls (see below) through handy helpers within controllers or views:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -64,7 +64,7 @@ module MetaTagsHelpers
64
64
  html = ""
65
65
  html << "<title>#{h(meta_hash.delete(:title)) }</title>\n"
66
66
  meta_hash.each {|k,v|
67
- if k.to_s.starts_with?("og:")
67
+ if k.to_s =~ /[a-zA-Z_][-a-zA-Z0-9_.]\:/
68
68
  html << "<meta property=\"#{h(k)}\" content=\"#{h(v)}\" />\n"
69
69
  else
70
70
  html << "<meta name=\"#{h(k)}\" content=\"#{h(v)}\" />\n"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "meta-tags-helpers"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta-tags-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: 4070837164793012239
92
+ hash: -3024929928964013503
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements: