baron 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/baron.gemspec +2 -2
- data/lib/baron.rb +7 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/baron.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "baron"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nathan Buggia"]
|
12
|
-
s.date = "2013-03-
|
12
|
+
s.date = "2013-03-11"
|
13
13
|
s.description = "What's in the box: (1) Publish to Heroku using Git (2) Author articles in markdown (3) Article categories (4) Multiple permalink formats supported (5) Redirects (6) Advanced SEO optimizations and Google Analytics/ Webmaster Tools support. Uses Rack, RSpec, Bootstrap, JQuery, Disqus, Thin"
|
14
14
|
s.email = "nbuggia@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/baron.rb
CHANGED
@@ -65,9 +65,13 @@ module Baron
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def render_html partial_template, layout_template
|
68
|
-
@content = ERB.new(File.read(partial_template)).result(binding)
|
69
68
|
@theme_root = "/themes/#{@config[:theme]}"
|
70
|
-
ERB.new(File.read(
|
69
|
+
@content = ERB.new(File.read(partial_template)).result(binding)
|
70
|
+
if @content[0..99].include? '<html'
|
71
|
+
return @content
|
72
|
+
else
|
73
|
+
ERB.new(File.read(layout_template)).result(binding)
|
74
|
+
end
|
71
75
|
end
|
72
76
|
|
73
77
|
def render_rss template
|
@@ -272,7 +276,7 @@ module Baron
|
|
272
276
|
"/#{permalink_prefix}/#{self[:category]}#{date_path}/#{slug}/".squeeze('/')
|
273
277
|
end
|
274
278
|
|
275
|
-
def title() self[:title]
|
279
|
+
def title() self[:title] || 'Untitled' end
|
276
280
|
def date() @config[:date].call(self[:date]) end
|
277
281
|
def author() self[:author] || @config[:author] end
|
278
282
|
def category() self[:category] end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|