metamagic 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/metamagic/helper_methods.rb +7 -7
- metadata +17 -37
@@ -3,19 +3,19 @@ module Metamagic
|
|
3
3
|
def meta_tags
|
4
4
|
@meta_tags ||= []
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def meta(*options)
|
8
8
|
# add page specific meta tags
|
9
9
|
add_meta_tags options
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
def add_tag_if_not_existing(new_tag)
|
13
13
|
# add meta tag if it's not existing
|
14
14
|
unless meta_tags.find { |tag| tag[:name] && new_tag[:name] && tag[:name] == new_tag[:name] }
|
15
15
|
meta_tags << new_tag
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def add_meta_tags(options)
|
20
20
|
options.each do |option|
|
21
21
|
if option.is_a?(Hash)
|
@@ -39,7 +39,7 @@ module Metamagic
|
|
39
39
|
def metamagic(*options)
|
40
40
|
# apply default meta tags if they don't exist
|
41
41
|
add_meta_tags options
|
42
|
-
|
42
|
+
|
43
43
|
# loop through the added tags
|
44
44
|
out = []
|
45
45
|
meta_tags.each do |tag|
|
@@ -50,9 +50,9 @@ module Metamagic
|
|
50
50
|
out << tag(:meta, tag)
|
51
51
|
end
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
# return tags
|
55
|
-
out.join.html_safe
|
55
|
+
out.join("\n").html_safe
|
56
56
|
end
|
57
57
|
end
|
58
|
-
end
|
58
|
+
end
|
metadata
CHANGED
@@ -1,66 +1,46 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: metamagic
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.5
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 0
|
9
|
-
- 4
|
10
|
-
version: 2.0.4
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Lasse Bunk
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2012-07-07 00:00:00 Z
|
12
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: Metamagic is a simple Ruby on Rails plugin for creating meta tags.
|
22
15
|
email: lassebunk@gmail.com
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
18
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
files:
|
19
|
+
files:
|
30
20
|
- lib/metamagic/helper_methods.rb
|
31
21
|
- lib/metamagic.rb
|
32
22
|
homepage: http://github.com/lassebunk/metamagic
|
33
23
|
licenses: []
|
34
|
-
|
35
24
|
post_install_message:
|
36
25
|
rdoc_options: []
|
37
|
-
|
38
|
-
require_paths:
|
26
|
+
require_paths:
|
39
27
|
- lib
|
40
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
29
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
- 0
|
48
|
-
version: "0"
|
49
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
35
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
version: "0"
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
58
40
|
requirements: []
|
59
|
-
|
60
41
|
rubyforge_project:
|
61
42
|
rubygems_version: 1.8.24
|
62
43
|
signing_key:
|
63
44
|
specification_version: 3
|
64
45
|
summary: Simple Ruby on Rails plugin for creating meta tags.
|
65
46
|
test_files: []
|
66
|
-
|