manage_meta 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,11 @@
1
1
  module ManageMeta
2
- private
2
+ def self.included(mod)
3
+ begin
4
+ mod.send(:helper_method, :render_meta)
5
+ rescue Exception
6
+ end
7
+ end
8
+
3
9
  #- initialize instance variables
4
10
  def _manage_meta_init
5
11
  return if @manage_meta_meta_hash.instance_of? Hash
@@ -31,7 +37,6 @@ module ManageMeta
31
37
  end
32
38
 
33
39
  #--
34
- protected
35
40
 
36
41
  #++
37
42
  # add_meta(name, value[, options]) - adds meta tag 'name' with value 'value' to meta tags to be displayed
@@ -129,4 +134,8 @@ module ManageMeta
129
134
  def _manage_meta_name_to_sym(name)
130
135
  name.to_s.downcase.gsub(/[-_]+/, '_').to_sym
131
136
  end
137
+
138
+ public :add_meta, :del_meta, :add_meta_format, :render_meta
139
+ private :_manage_meta_init, :_manage_meta_sym_to_name, :_manage_meta_name_to_sym
140
+
132
141
  end
@@ -147,12 +147,12 @@ class ManageMetaTest < Test::Unit::TestCase
147
147
 
148
148
  # test 'render_meta' do
149
149
  def test_render_meta_renders_meta
150
- assert_match /name="Robots"/, render_meta, "render_meta contains robots meta tag"
151
- assert_match /name="Generator"/, render_meta, "render_meta contains generator meta tag" \
150
+ assert_match(/name="Robots"/, render_meta, "render_meta contains robots meta tag")
151
+ assert_match(/name="Generator"/, render_meta, "render_meta contains generator meta tag") \
152
152
  if defined? Rails
153
153
  add_meta :foo, 'a value'
154
- assert_match /name="Foo"/, render_meta, "render_meta contains 'foo' meta tag"
155
- assert_match /content="a value"/, render_meta, "render_meta tag for foo has content 'a value'"
154
+ assert_match(/name="Foo"/, render_meta, "render_meta contains 'foo' meta tag")
155
+ assert_match(/content="a value"/, render_meta, "render_meta tag for foo has content 'a value'")
156
156
  end
157
157
 
158
158
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manage_meta
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 7
10
- version: 0.0.7
5
+ version: 0.0.9
11
6
  platform: ruby
12
7
  authors:
13
8
  - Mike Howard
@@ -48,18 +43,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
43
  requirements:
49
44
  - - ">="
50
45
  - !ruby/object:Gem::Version
51
- hash: 3
52
- segments:
53
- - 0
54
46
  version: "0"
55
47
  required_rubygems_version: !ruby/object:Gem::Requirement
56
48
  none: false
57
49
  requirements:
58
50
  - - ">="
59
51
  - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 0
63
52
  version: "0"
64
53
  requirements: []
65
54