postmarkdown 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/app/controllers/posts_controller.rb +10 -1
- data/app/helpers/post_helper.rb +20 -0
- data/app/models/post.rb +16 -24
- data/app/views/posts/_post.html.haml +2 -2
- data/app/views/posts/feed.xml.builder +1 -1
- data/gemfiles/rails3_0.gemfile +2 -0
- data/gemfiles/rails3_1.gemfile +2 -0
- data/gemfiles/rails3_2.gemfile +2 -0
- data/lib/generators/postmarkdown/override_generator.rb +1 -1
- data/lib/generators/postmarkdown/post_generator.rb +13 -4
- data/lib/postmarkdown/config.rb +1 -1
- data/lib/postmarkdown/version.rb +1 -1
- data/postmarkdown.gemspec +2 -1
- data/readme.md +9 -3
- data/spec/helpers/post_helper_spec.rb +44 -0
- data/spec/integrations/posts_spec.rb +20 -4
- data/spec/internal/app/posts/2011-05-01-full-metadata.markdown +2 -0
- data/spec/internal/app/views/layouts/custom_layout.html.erb +14 -0
- data/spec/lib/generators/postmarkdown/post_generator_spec.rb +82 -0
- data/spec/models/posts_spec.rb +13 -14
- data/spec/spec_helper.rb +10 -0
- data/spec/support/data/posts/2012-02-13-102030-custom-title-and-timestamp.markdown +5 -0
- metadata +32 -7
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class PostsController < ApplicationController
|
2
|
-
layout
|
2
|
+
layout :choose_layout
|
3
3
|
|
4
4
|
def show
|
5
5
|
resource
|
@@ -34,4 +34,13 @@ class PostsController < ApplicationController
|
|
34
34
|
def posts_per_page
|
35
35
|
params[:count] || Postmarkdown::Config.options[:posts_per_page]
|
36
36
|
end
|
37
|
+
|
38
|
+
def choose_layout
|
39
|
+
if Postmarkdown::Config.options[:use_theme]
|
40
|
+
ActiveSupport::Deprecation.warn "`Postmarkdown::Config.options[:use_theme]` is deprecated. Use `Postmarkdown::Config.options[:layout] = 'postmarkdown'` instead."
|
41
|
+
'postmarkdown'
|
42
|
+
else
|
43
|
+
Postmarkdown::Config.options[:layout]
|
44
|
+
end
|
45
|
+
end
|
37
46
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module PostHelper
|
2
|
+
class Sanitizer < HTML::WhiteListSanitizer
|
3
|
+
self.allowed_tags -= %w(img a)
|
4
|
+
end
|
5
|
+
|
6
|
+
def post_summary_html(post)
|
7
|
+
if post.summary.present?
|
8
|
+
content_tag :p, post.summary
|
9
|
+
else
|
10
|
+
html = Sanitizer.new.sanitize(post_content_html(post))
|
11
|
+
doc = Nokogiri::HTML.fragment(html)
|
12
|
+
para = doc.search('p').detect { |p| p.text.present? }
|
13
|
+
para.try(:to_html).try(:html_safe)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def post_content_html(post)
|
18
|
+
RDiscount.new(render(:inline => post.content)).to_html.html_safe
|
19
|
+
end
|
20
|
+
end
|
data/app/models/post.rb
CHANGED
@@ -9,11 +9,16 @@ class Post
|
|
9
9
|
|
10
10
|
attr_reader :slug
|
11
11
|
|
12
|
-
|
12
|
+
TIME_FORMAT = /-\d{6}/
|
13
|
+
DATE_FORMAT = /\d{4}-\d{2}-\d{2}(#{TIME_FORMAT})?/
|
14
|
+
SLUG_FORMAT = /[A-Za-z0-9\-]+/
|
15
|
+
EXTENSION_FORMAT = /\.[^.]+/
|
16
|
+
|
17
|
+
FILENAME_FORMAT = /^(#{DATE_FORMAT})-(#{SLUG_FORMAT})(#{EXTENSION_FORMAT})$/
|
13
18
|
|
14
19
|
def initialize(path)
|
15
20
|
@path = path
|
16
|
-
@date_str, @slug = File.basename(path).match(FILENAME_FORMAT).captures
|
21
|
+
@date_str, _, @slug = File.basename(path).match(FILENAME_FORMAT).captures
|
17
22
|
end
|
18
23
|
|
19
24
|
def to_param
|
@@ -47,6 +52,10 @@ class Post
|
|
47
52
|
metadata[:title] || slug.titleize
|
48
53
|
end
|
49
54
|
|
55
|
+
def summary
|
56
|
+
metadata[:summary]
|
57
|
+
end
|
58
|
+
|
50
59
|
def author
|
51
60
|
metadata[:author]
|
52
61
|
end
|
@@ -74,35 +83,18 @@ class Post
|
|
74
83
|
"#{title.inspect} (#{slug})"
|
75
84
|
end
|
76
85
|
|
77
|
-
def content_html
|
78
|
-
RDiscount.new(content).to_html.html_safe
|
79
|
-
end
|
80
|
-
|
81
|
-
class Sanitizer < HTML::WhiteListSanitizer
|
82
|
-
self.allowed_tags -= %w(img a)
|
83
|
-
end
|
84
|
-
|
85
|
-
TagHelper = Class.new.extend ActionView::Helpers::TagHelper
|
86
|
-
|
87
|
-
def summary_html
|
88
|
-
if metadata[:summary].present?
|
89
|
-
TagHelper.content_tag :p, metadata[:summary]
|
90
|
-
else
|
91
|
-
html = Sanitizer.new.sanitize(content_html)
|
92
|
-
doc = Nokogiri::HTML.fragment(html)
|
93
|
-
para = doc.search('p').detect { |p| p.text.present? }
|
94
|
-
para.try(:to_html).try(:html_safe)
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
86
|
class << self
|
99
87
|
def all
|
100
88
|
file_extensions = Postmarkdown::Config.options[:markdown_file_extensions].join(',')
|
101
|
-
@@posts ||= Dir.glob(
|
89
|
+
@@posts ||= Dir.glob("#{directory}/*.{#{file_extensions}}").map do |filename|
|
102
90
|
Post.new filename
|
103
91
|
end.select(&:visible?).sort_by(&:date).reverse
|
104
92
|
end
|
105
93
|
|
94
|
+
def directory
|
95
|
+
Rails.root.join('app', 'posts')
|
96
|
+
end
|
97
|
+
|
106
98
|
def where(conditions = {})
|
107
99
|
conditions = conditions.symbolize_keys
|
108
100
|
conditions.assert_valid_keys :year, :month, :day, :slug, :to_param
|
data/gemfiles/rails3_0.gemfile
CHANGED
data/gemfiles/rails3_1.gemfile
CHANGED
data/gemfiles/rails3_2.gemfile
CHANGED
@@ -36,7 +36,7 @@ module Postmarkdown
|
|
36
36
|
|
37
37
|
def override_theme
|
38
38
|
if options.theme || options.all
|
39
|
-
directory 'views/layouts', 'views/layouts'
|
39
|
+
directory 'views/layouts', 'app/views/layouts'
|
40
40
|
if Rails.application.config.respond_to?(:assets) && Rails.application.config.assets.enabled
|
41
41
|
directory '../vendor/assets/stylesheets', 'app/assets/stylesheets'
|
42
42
|
else
|
@@ -6,14 +6,14 @@ module Postmarkdown
|
|
6
6
|
class_option :date, :type => :string, :group => :runtime, :desc => 'Publish date for the post'
|
7
7
|
|
8
8
|
def check_slug
|
9
|
-
unless slug =~
|
9
|
+
unless slug =~ /^#{Post::SLUG_FORMAT}$/
|
10
10
|
puts 'Invalid slug - valid characters include letters, digits and dashes.'
|
11
11
|
exit
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def check_date
|
16
|
-
if options.date && options.date !~
|
16
|
+
if options.date && options.date !~ /^#{Post::DATE_FORMAT}$/
|
17
17
|
puts 'Invalid date - please use the following format: YYYY-MM-DD, eg. 2011-01-01.'
|
18
18
|
exit
|
19
19
|
end
|
@@ -26,8 +26,17 @@ module Postmarkdown
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def publish_date
|
29
|
-
|
30
|
-
|
29
|
+
format = '%Y-%m-%d-%H%M%S'
|
30
|
+
|
31
|
+
if options.date.present?
|
32
|
+
date_string = options.date
|
33
|
+
date_string += '-000000' unless options.date.match(/(#{Post::TIME_FORMAT}$)/)
|
34
|
+
date = Time.strptime(date_string, format)
|
35
|
+
else
|
36
|
+
date = Time.zone.now
|
37
|
+
end
|
38
|
+
|
39
|
+
date.strftime(format)
|
31
40
|
end
|
32
41
|
end
|
33
42
|
end
|
data/lib/postmarkdown/config.rb
CHANGED
@@ -13,7 +13,7 @@ Postmarkdown::Config.options[:permalink_format] = :day
|
|
13
13
|
|
14
14
|
Postmarkdown::Config.options[:posts_per_page] = 5
|
15
15
|
|
16
|
-
Postmarkdown::Config.options[:
|
16
|
+
Postmarkdown::Config.options[:layout] = 'application'
|
17
17
|
|
18
18
|
Postmarkdown::Config.options[:permalink_regex] = {}
|
19
19
|
Postmarkdown::Config.options[:permalink_regex][:day] = %r[\d{4}/\d{2}/\d{2}/[^/]+]
|
data/lib/postmarkdown/version.rb
CHANGED
data/postmarkdown.gemspec
CHANGED
@@ -29,8 +29,9 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_dependency 'kaminari'
|
30
30
|
|
31
31
|
s.add_development_dependency 'appraisal'
|
32
|
-
s.add_development_dependency 'rspec-rails', '~> 2.
|
32
|
+
s.add_development_dependency 'rspec-rails', '~> 2.8'
|
33
33
|
s.add_development_dependency 'capybara', '~> 1.0.0.beta'
|
34
34
|
s.add_development_dependency 'sqlite3'
|
35
35
|
s.add_development_dependency 'delorean', '>= 0.2'
|
36
|
+
s.add_development_dependency 'combustion', '~> 0.3.1'
|
36
37
|
end
|
data/readme.md
CHANGED
@@ -72,11 +72,17 @@ To customize the feed title, add the following to an initializer (`config/initia
|
|
72
72
|
|
73
73
|
To link to the feed in your app, simply use the route helper: `<%= link_to 'RSS Feed', posts_feed_path %>`
|
74
74
|
|
75
|
-
##
|
75
|
+
## Customizing the layout
|
76
76
|
|
77
|
-
Postmarkdown
|
77
|
+
By default, Postmarkdown will use your application's default layout, but if you wish to use a specific custom layout, you can set the following configuration in an initializer (`config/initializers/postmarkdown.rb`):
|
78
78
|
|
79
|
-
Postmarkdown::Config.options[:
|
79
|
+
Postmarkdown::Config.options[:layout] = 'layout_name'
|
80
|
+
|
81
|
+
### Built-in Theme
|
82
|
+
|
83
|
+
Postmarkdown comes with minimal built-in theme for your convenience.
|
84
|
+
|
85
|
+
Postmarkdown::Config.options[:layout] = 'postmarkdown'
|
80
86
|
|
81
87
|
## Customizing Routes
|
82
88
|
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PostHelper do
|
4
|
+
def test_post(file_name)
|
5
|
+
Post.new(File.dirname(__FILE__) + "/../support/data/posts/#{file_name}")
|
6
|
+
end
|
7
|
+
|
8
|
+
let(:summary_html) { helper.post_summary_html(post) }
|
9
|
+
let(:content_html) { helper.post_content_html(post) }
|
10
|
+
|
11
|
+
context 'with first post' do
|
12
|
+
let(:post) { test_post '2011-04-01-first-post.markdown' }
|
13
|
+
|
14
|
+
it 'renders HTML content' do
|
15
|
+
content_html.should be_html_safe
|
16
|
+
content_html.should =~ /^<p>Lorem ipsum/
|
17
|
+
content_html.should =~ /^<p>Duis aute irure dolor/
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'renders HTML summary' do
|
21
|
+
summary_html.should be_html_safe
|
22
|
+
summary_html.should =~ /^<p>Lorem ipsum/
|
23
|
+
summary_html.should_not =~ /^<p>Duis aute irure dolor/
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'with image post' do
|
28
|
+
let(:post) { test_post '2011-04-28-image.markdown' }
|
29
|
+
|
30
|
+
it 'renders HTML summary' do
|
31
|
+
summary_html.should be_html_safe
|
32
|
+
summary_html.should =~ /^<p>Image description/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context 'with custom summary post' do
|
37
|
+
let(:post) { test_post '2011-04-28-summary.markdown' }
|
38
|
+
|
39
|
+
it 'renders HTML summary' do
|
40
|
+
summary_html.should be_html_safe
|
41
|
+
summary_html.should eq '<p>This is a custom & test summary.</p>'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -141,6 +141,10 @@ describe 'Post views', :type => :request do
|
|
141
141
|
it 'should preserve whitespace on code blocks' do
|
142
142
|
page.source.should match '<pre><code>First line of code.
 Second line of code.
</code></pre>'
|
143
143
|
end
|
144
|
+
|
145
|
+
it 'should allow calling Rails helpers via ERB tags' do
|
146
|
+
page.source.should match('<p>Paragraph created by Rails helper</p>')
|
147
|
+
end
|
144
148
|
end
|
145
149
|
|
146
150
|
context 'Posts#feed' do
|
@@ -180,15 +184,27 @@ describe 'Post views', :type => :request do
|
|
180
184
|
end
|
181
185
|
|
182
186
|
context 'theme' do
|
183
|
-
|
187
|
+
before { @original_layout = Postmarkdown::Config.options[:layout] }
|
188
|
+
after { Postmarkdown::Config.options[:layout] = @original_layout }
|
189
|
+
|
190
|
+
it 'should use the application layout by default' do
|
184
191
|
visit posts_path
|
185
192
|
page.should_not have_content('A postmarkdown blog')
|
186
193
|
end
|
187
194
|
|
188
|
-
it 'should use the
|
189
|
-
|
195
|
+
it 'should use the postmarkdown layout when using theme' do
|
196
|
+
ActiveSupport::Deprecation.silence do
|
197
|
+
Postmarkdown::Config.options[:use_theme] = true
|
198
|
+
visit posts_path
|
199
|
+
page.should have_content('A postmarkdown blog')
|
200
|
+
Postmarkdown::Config.options[:use_theme] = false
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
it 'should use the built-in layout when the global option is set to true' do
|
205
|
+
Postmarkdown::Config.options[:layout] = 'custom_layout'
|
190
206
|
visit posts_path
|
191
|
-
page.should have_content('A
|
207
|
+
page.should have_content('A custom layout')
|
192
208
|
end
|
193
209
|
end
|
194
210
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Postmarkdown
|
4
|
+
describe PostGenerator do
|
5
|
+
include GeneratorSpec::TestCase
|
6
|
+
destination File.expand_path('../../../../../tmp', __FILE__)
|
7
|
+
|
8
|
+
before do
|
9
|
+
prepare_destination
|
10
|
+
|
11
|
+
Post.stub(:directory) { File.expand_path('tmp/app/posts') }
|
12
|
+
Post.class_variable_set('@@posts', nil)
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'with the slug parameter' do
|
16
|
+
it 'creates a file for the slug and the current date' do
|
17
|
+
Timecop.freeze(Time.utc(2012, 1, 1, 10, 20, 30)) do
|
18
|
+
run_generator %w(test-post)
|
19
|
+
|
20
|
+
Dir.glob('tmp/app/posts/*').should == ['tmp/app/posts/2012-01-01-102030-test-post.markdown']
|
21
|
+
|
22
|
+
Post.all.count.should == 1
|
23
|
+
|
24
|
+
post = Post.first
|
25
|
+
post.slug.should == 'test-post'
|
26
|
+
post.date.should == Date.parse('2012-01-01')
|
27
|
+
post.title.should == 'Test post'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'with the slug and date parameters' do
|
33
|
+
it 'creates a file for the slug and the given date' do
|
34
|
+
run_generator %w(other-post --date=2012-01-02)
|
35
|
+
|
36
|
+
Dir.glob('tmp/app/posts/*').should == ['tmp/app/posts/2012-01-02-000000-other-post.markdown']
|
37
|
+
|
38
|
+
Post.all.count.should == 1
|
39
|
+
|
40
|
+
post = Post.first
|
41
|
+
post.slug.should == 'other-post'
|
42
|
+
post.date.should == Date.parse('2012-01-02')
|
43
|
+
post.title.should == 'Other post'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'with the slug, date and time parameters' do
|
48
|
+
it 'creates a file for the slug and the given date' do
|
49
|
+
run_generator %w(other-post --date=2012-01-02-102030)
|
50
|
+
|
51
|
+
Dir.glob('tmp/app/posts/*').should == ['tmp/app/posts/2012-01-02-102030-other-post.markdown']
|
52
|
+
|
53
|
+
Post.all.count.should == 1
|
54
|
+
|
55
|
+
post = Post.first
|
56
|
+
post.slug.should == 'other-post'
|
57
|
+
post.date.should == Time.utc(2012, 01, 02, 10, 20, 30).to_date
|
58
|
+
post.title.should == 'Other post'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'with invalid slug' do
|
63
|
+
it 'raises a system exit exception' do
|
64
|
+
lambda { run_generator %w(!test-post) }.should raise_error(SystemExit)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'does not create the file' do
|
68
|
+
Dir['app/posts/*'].should be_empty
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context 'with invalid date' do
|
73
|
+
it 'raises a system exit exception' do
|
74
|
+
lambda { run_generator %w(test-post --date=2012-02) }.should raise_error(SystemExit)
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'does not create the file' do
|
78
|
+
Dir['app/posts/*'].should be_empty
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
data/spec/models/posts_spec.rb
CHANGED
@@ -16,18 +16,16 @@ describe Post do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
it 'should return the correct directory' do
|
20
|
+
Post.directory.should == Rails.root.join('app', 'posts')
|
21
|
+
end
|
22
|
+
|
19
23
|
context 'with first post' do
|
20
24
|
subject { test_post '2011-04-01-first-post.markdown' }
|
21
25
|
its(:slug) { should == 'first-post' }
|
22
26
|
its(:date) { should == Date.parse('2011-04-01') }
|
23
27
|
its(:title) { should == 'First Post' }
|
24
28
|
its(:content) { should =~ /\ALorem ipsum/ }
|
25
|
-
its(:content_html) { should =~ /^<p>Lorem ipsum/ }
|
26
|
-
its(:content_html) { should =~ /^<p>Duis aute irure dolor/ }
|
27
|
-
its(:content_html) { should be_html_safe }
|
28
|
-
its(:summary_html) { should =~ /^<p>Lorem ipsum/ }
|
29
|
-
its(:summary_html) { should_not =~ /^<p>Duis aute irure dolor/ }
|
30
|
-
its(:summary_html) { should be_html_safe }
|
31
29
|
end
|
32
30
|
|
33
31
|
context 'with custom title post' do
|
@@ -38,22 +36,23 @@ describe Post do
|
|
38
36
|
its(:content) { should == "Content goes here.\n" }
|
39
37
|
end
|
40
38
|
|
39
|
+
context 'with a custom title that also and including timestamp' do
|
40
|
+
subject { test_post '2012-02-13-102030-custom-title-and-timestamp.markdown' }
|
41
|
+
its(:slug) { should == 'custom-title-and-timestamp' }
|
42
|
+
its(:date) { should == Time.utc(2012, 02, 13, 10, 20, 30).to_date }
|
43
|
+
its(:title) { should == 'This is a custom title' }
|
44
|
+
its(:content) { should == "Content goes here.\n" }
|
45
|
+
end
|
46
|
+
|
41
47
|
context 'with author' do
|
42
48
|
subject { test_post '2011-05-01-full-metadata.markdown' }
|
43
49
|
its(:author) { should == 'John Smith' }
|
44
50
|
its(:email) { should == 'john.smith@example.com' }
|
45
51
|
end
|
46
52
|
|
47
|
-
context 'with image post' do
|
48
|
-
subject { test_post '2011-04-28-image.markdown' }
|
49
|
-
its(:summary_html) { should =~ /^<p>Image description/ }
|
50
|
-
its(:summary_html) { should be_html_safe }
|
51
|
-
end
|
52
|
-
|
53
53
|
context 'with custom summary post' do
|
54
54
|
subject { test_post '2011-04-28-summary.markdown' }
|
55
|
-
its(:
|
56
|
-
its(:summary_html) { should be_html_safe }
|
55
|
+
its(:summary) { should == 'This is a custom & test summary.' }
|
57
56
|
end
|
58
57
|
|
59
58
|
context 'with alternate markdown file extension' do
|
data/spec/spec_helper.rb
CHANGED
@@ -18,11 +18,21 @@ require 'capybara/rspec'
|
|
18
18
|
require 'rspec/rails'
|
19
19
|
require 'capybara/rails'
|
20
20
|
|
21
|
+
require 'timecop'
|
22
|
+
require 'generator_spec/test_case'
|
23
|
+
Dir[File.expand_path('lib/generators/postmarkdown/*.rb')].each { |f| require f }
|
24
|
+
|
21
25
|
require 'delorean'
|
22
26
|
|
23
27
|
RSpec.configure do |config|
|
24
28
|
config.mock_with :rspec
|
25
29
|
config.include Delorean
|
30
|
+
config.order = :random
|
31
|
+
|
32
|
+
config.after do
|
33
|
+
Timecop.return
|
34
|
+
FileUtils.rm_rf('spec/tmp/app/posts/.')
|
35
|
+
end
|
26
36
|
end
|
27
37
|
|
28
38
|
ActiveSupport::Deprecation.debug = true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postmarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-
|
15
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -133,7 +133,7 @@ dependencies:
|
|
133
133
|
requirements:
|
134
134
|
- - ~>
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: '2.
|
136
|
+
version: '2.8'
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
139
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -141,7 +141,7 @@ dependencies:
|
|
141
141
|
requirements:
|
142
142
|
- - ~>
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '2.
|
144
|
+
version: '2.8'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: capybara
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,6 +190,22 @@ dependencies:
|
|
190
190
|
- - ! '>='
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0.2'
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: combustion
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
196
|
+
none: false
|
197
|
+
requirements:
|
198
|
+
- - ~>
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: 0.3.1
|
201
|
+
type: :development
|
202
|
+
prerelease: false
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
204
|
+
none: false
|
205
|
+
requirements:
|
206
|
+
- - ~>
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 0.3.1
|
193
209
|
description: A simple Rails blog engine powered by markdown.
|
194
210
|
email:
|
195
211
|
- jason.weathered@ennova.com.au
|
@@ -208,6 +224,7 @@ files:
|
|
208
224
|
- Rakefile
|
209
225
|
- app/controllers/application_controller.rb
|
210
226
|
- app/controllers/posts_controller.rb
|
227
|
+
- app/helpers/post_helper.rb
|
211
228
|
- app/models/post.rb
|
212
229
|
- app/views/layouts/postmarkdown.html.haml
|
213
230
|
- app/views/posts/_feed_link.html.haml
|
@@ -235,6 +252,7 @@ files:
|
|
235
252
|
- lib/postmarkdown/version.rb
|
236
253
|
- postmarkdown.gemspec
|
237
254
|
- readme.md
|
255
|
+
- spec/helpers/post_helper_spec.rb
|
238
256
|
- spec/integrations/posts_spec.rb
|
239
257
|
- spec/internal/.gitignore
|
240
258
|
- spec/internal/app/posts/2011-04-01-first-post.markdown
|
@@ -243,11 +261,13 @@ files:
|
|
243
261
|
- spec/internal/app/posts/2011-05-01-full-metadata.markdown
|
244
262
|
- spec/internal/app/posts/2015-02-13-custom-title.markdown
|
245
263
|
- spec/internal/app/views/layouts/application.html.erb
|
264
|
+
- spec/internal/app/views/layouts/custom_layout.html.erb
|
246
265
|
- spec/internal/config/database.yml
|
247
266
|
- spec/internal/config/environments/test.rb
|
248
267
|
- spec/internal/config/routes.rb
|
249
268
|
- spec/internal/db/schema.rb
|
250
269
|
- spec/internal/log/.gitignore
|
270
|
+
- spec/lib/generators/postmarkdown/post_generator_spec.rb
|
251
271
|
- spec/models/posts_spec.rb
|
252
272
|
- spec/requests/assets_spec.rb
|
253
273
|
- spec/requests/views_spec.rb
|
@@ -260,6 +280,7 @@ files:
|
|
260
280
|
- spec/support/data/posts/2011-05-02-md-file-extension.md
|
261
281
|
- spec/support/data/posts/2011-05-02-mdown-file-extension.mdown
|
262
282
|
- spec/support/data/posts/2011-05-02-mkd-file-extension.mkd
|
283
|
+
- spec/support/data/posts/2012-02-13-102030-custom-title-and-timestamp.markdown
|
263
284
|
- spec/support/data/posts/2015-02-13-custom-title.markdown
|
264
285
|
- spec/support/data/posts/missing-date-from-filename.markdown
|
265
286
|
- spec/support/rails_app/.gitignore
|
@@ -290,7 +311,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
290
311
|
version: '0'
|
291
312
|
segments:
|
292
313
|
- 0
|
293
|
-
hash: -
|
314
|
+
hash: -2900006150133001093
|
294
315
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
295
316
|
none: false
|
296
317
|
requirements:
|
@@ -299,14 +320,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
320
|
version: '0'
|
300
321
|
segments:
|
301
322
|
- 0
|
302
|
-
hash: -
|
323
|
+
hash: -2900006150133001093
|
303
324
|
requirements: []
|
304
325
|
rubyforge_project: postmarkdown
|
305
|
-
rubygems_version: 1.8.
|
326
|
+
rubygems_version: 1.8.24
|
306
327
|
signing_key:
|
307
328
|
specification_version: 3
|
308
329
|
summary: A simple Rails blog engine powered by markdown.
|
309
330
|
test_files:
|
331
|
+
- spec/helpers/post_helper_spec.rb
|
310
332
|
- spec/integrations/posts_spec.rb
|
311
333
|
- spec/internal/.gitignore
|
312
334
|
- spec/internal/app/posts/2011-04-01-first-post.markdown
|
@@ -315,11 +337,13 @@ test_files:
|
|
315
337
|
- spec/internal/app/posts/2011-05-01-full-metadata.markdown
|
316
338
|
- spec/internal/app/posts/2015-02-13-custom-title.markdown
|
317
339
|
- spec/internal/app/views/layouts/application.html.erb
|
340
|
+
- spec/internal/app/views/layouts/custom_layout.html.erb
|
318
341
|
- spec/internal/config/database.yml
|
319
342
|
- spec/internal/config/environments/test.rb
|
320
343
|
- spec/internal/config/routes.rb
|
321
344
|
- spec/internal/db/schema.rb
|
322
345
|
- spec/internal/log/.gitignore
|
346
|
+
- spec/lib/generators/postmarkdown/post_generator_spec.rb
|
323
347
|
- spec/models/posts_spec.rb
|
324
348
|
- spec/requests/assets_spec.rb
|
325
349
|
- spec/requests/views_spec.rb
|
@@ -332,6 +356,7 @@ test_files:
|
|
332
356
|
- spec/support/data/posts/2011-05-02-md-file-extension.md
|
333
357
|
- spec/support/data/posts/2011-05-02-mdown-file-extension.mdown
|
334
358
|
- spec/support/data/posts/2011-05-02-mkd-file-extension.mkd
|
359
|
+
- spec/support/data/posts/2012-02-13-102030-custom-title-and-timestamp.markdown
|
335
360
|
- spec/support/data/posts/2015-02-13-custom-title.markdown
|
336
361
|
- spec/support/data/posts/missing-date-from-filename.markdown
|
337
362
|
- spec/support/rails_app/.gitignore
|