insightful 0.0.1.5 → 0.0.1.6
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.
- data/README.markdown +5 -1
- data/Rakefile +1 -1
- data/lib/insightful.rb +2 -3
- data/lib/insightful/head_helper.rb +19 -2
- metadata +4 -9
data/README.markdown
CHANGED
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
|
|
5
5
|
spec = Gem::Specification.new do |s|
|
6
6
|
s.name = "insightful"
|
7
7
|
s.authors = ["Lance Pollard"]
|
8
|
-
s.version = "0.0.1.
|
8
|
+
s.version = "0.0.1.6"
|
9
9
|
s.summary = "Insightful: DRY, SEO-friendly Rails Views"
|
10
10
|
s.homepage = "http://github.com/viatropos/insightful"
|
11
11
|
s.email = "lancejpollard@gmail.com"
|
data/lib/insightful.rb
CHANGED
@@ -11,12 +11,11 @@
|
|
11
11
|
# http://github.com/html/once/blob/master/lib/once.rb
|
12
12
|
# http://github.com/fnando/breadcrumbs.git
|
13
13
|
# http://github.com/semanticart/smart-meta
|
14
|
-
|
15
14
|
Dir["#{File.expand_path(File.dirname(__FILE__))}/insightful/*"].each {|file| require file}
|
16
15
|
|
17
16
|
Insightful.send(:include, Insightful::HeadHelper)
|
18
17
|
Insightful.send(:include, Insightful::BodyHelper)
|
19
18
|
Insightful.send(:include, Insightful::NavigationHelper)
|
20
19
|
|
21
|
-
ActionView::Base.send(:include, Insightful) if defined?(ActionView)
|
22
|
-
ActionController::Base.helper(Insightful) if defined?(ActionController)
|
20
|
+
ActionView::Base.send(:include, Insightful) if defined?(ActionView::Base)
|
21
|
+
ActionController::Base.helper(Insightful) if defined?(ActionController::Base)
|
@@ -1,6 +1,23 @@
|
|
1
1
|
module Insightful
|
2
2
|
module HeadHelper
|
3
|
-
|
3
|
+
|
4
|
+
def meta_for(post)
|
5
|
+
result = ""
|
6
|
+
unless post.title.blank?
|
7
|
+
result << title(post.title)
|
8
|
+
result << "\n"
|
9
|
+
end
|
10
|
+
unless post.tags.blank?
|
11
|
+
result << keywords(post.tags.join(", "))
|
12
|
+
result << "\n"
|
13
|
+
end
|
14
|
+
unless post.description.blank?
|
15
|
+
result << description(post.description)
|
16
|
+
result << "\n"
|
17
|
+
end
|
18
|
+
result
|
19
|
+
end
|
20
|
+
|
4
21
|
def meta(options = {})
|
5
22
|
title(options[:title]) if options.has_key?(:title)
|
6
23
|
description(options[:description]) if options.has_key?(:description)
|
@@ -80,7 +97,7 @@ module Insightful
|
|
80
97
|
else
|
81
98
|
title = normalize_title(title)
|
82
99
|
title = [site] + title
|
83
|
-
title.reverse!
|
100
|
+
title.reverse! unless options[:reverse] === false
|
84
101
|
sep = prefix + separator + suffix
|
85
102
|
result = content_tag(:title, title.join(sep))
|
86
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: insightful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 65
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 0
|
9
8
|
- 1
|
10
|
-
-
|
11
|
-
version: 0.0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.0.1.6
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Lance Pollard
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-
|
18
|
+
date: 2010-08-24 00:00:00 -05:00
|
20
19
|
default_executable:
|
21
20
|
dependencies: []
|
22
21
|
|
@@ -52,27 +51,23 @@ rdoc_options: []
|
|
52
51
|
require_paths:
|
53
52
|
- lib
|
54
53
|
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
54
|
requirements:
|
57
55
|
- - ">="
|
58
56
|
- !ruby/object:Gem::Version
|
59
|
-
hash: 3
|
60
57
|
segments:
|
61
58
|
- 0
|
62
59
|
version: "0"
|
63
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
-
none: false
|
65
61
|
requirements:
|
66
62
|
- - ">="
|
67
63
|
- !ruby/object:Gem::Version
|
68
|
-
hash: 3
|
69
64
|
segments:
|
70
65
|
- 0
|
71
66
|
version: "0"
|
72
67
|
requirements: []
|
73
68
|
|
74
69
|
rubyforge_project: insightful
|
75
|
-
rubygems_version: 1.3.
|
70
|
+
rubygems_version: 1.3.6
|
76
71
|
signing_key:
|
77
72
|
specification_version: 3
|
78
73
|
summary: "Insightful: DRY, SEO-friendly Rails Views"
|