open_graph_helper 0.0.1 → 0.0.2

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,3 @@
1
1
  module OpenGraphHelper
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -4,29 +4,29 @@ require 'open_graph_helper/railtie' if defined?(Rails)
4
4
  # http://developers.facebook.com/docs/opengraph/
5
5
  module OpenGraphHelper
6
6
  def og_title(content)
7
- "<meta property='og:title' content='#{content}'/>"
7
+ tag(:meta, { :property => "og:title", :content => content }, true)
8
8
  end
9
9
 
10
10
  def og_description(content)
11
11
  content = html_escape(strip_tags(content))
12
- "<meta property='og:description' content='#{truncate(content , :length => 100)}'/>"
12
+ tag(:meta, { :property => "og:description", :content => truncate(content , :length => 100) }, true)
13
13
  end
14
14
 
15
15
  def og_type(content = "article")
16
- "<meta property='og:type' content='#{content}'/>"
16
+ tag(:meta, { :property => "og:type", :content => content }, true)
17
17
  end
18
18
 
19
19
  # 50x50 px ~ 150x150 px
20
20
  def og_image(content)
21
- "<meta property='og:image' content='#{content}'/>"
21
+ tag(:meta, { :property => "og:image", :content => content }, true)
22
22
  end
23
23
 
24
24
  def og_url(content)
25
- "<meta property='og:url' content='#{content}'/>"
25
+ tag(:meta, { :property => "og:url", :content => content }, true)
26
26
  end
27
27
 
28
28
  def og_site_name(content)
29
- "<meta property='og:site_name' content='#{content}'/>"
29
+ tag(:meta, { :property => "og:site_name", :content => content }, true)
30
30
  end
31
31
 
32
32
  def og_fb_app_id(content)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_graph_helper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - xdite