forked from middleman/middleman-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
168 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rvm: | ||
- 1.8.7 | ||
- 1.9.2 | ||
- 1.9.3 | ||
script: "bundle exec rake test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
require 'bundler' | ||
Bundler::GemHelper.install_tasks | ||
|
||
require 'cucumber/rake/task' | ||
|
||
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t| | ||
t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}" | ||
end | ||
|
||
require 'rake/clean' | ||
|
||
task :test => ["cucumber"] | ||
|
||
desc "Build HTML documentation" | ||
task :doc do | ||
sh 'bundle exec yard' | ||
end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Feature: Preview Changes | ||
In order to run quickly, we should update internal caches on file changes | ||
|
||
Scenario: A template changes contents during preview | ||
Given the Server is running at "preview-app" | ||
And the file "source/2011/01/01/new-article.html.markdown" has the contents | ||
""" | ||
--- | ||
title: "New Article" | ||
date: 01/01/2011 | ||
--- | ||
New Article Content | ||
""" | ||
When I go to "/2011/01/01/new-article.html" | ||
Then I should see "New Article Content" | ||
And I should see "New Article</title>" | ||
And the file "source/2011/01/01/new-article.html.markdown" has the contents | ||
""" | ||
--- | ||
title: "Newer Article" | ||
date: 01/01/2011 | ||
--- | ||
Newer Article Content | ||
""" | ||
Then I should see "Newer Article Content" | ||
And I should see "Newer Article</title>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) | ||
require "middleman" | ||
require "middleman/step_definitions" | ||
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-blog') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
activate :blog |
6 changes: 6 additions & 0 deletions
6
fixtures/preview-app/source/2011/01/01/new-article.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "Newer Article" | ||
date: 01/01/2011 | ||
--- | ||
|
||
Newer Article Content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<article class="hentry"> | ||
<h1 class="entry-title"> | ||
<%= current_article_title %> | ||
<time class="updated" pubdate><%= current_article_date.strftime('%b %e %Y') %></time> | ||
</h1> | ||
|
||
<div class="entry-content"> | ||
<%= yield_content :blog_article %> | ||
</div> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<% data.blog.articles[0...5].each_with_index do |article, i| %> | ||
<article class="<%= (i == 0) ? 'first' : '' %>"> | ||
<h1><a href="<%= article.url %>"><%= article.title %></a> <span><%= article.date.strftime('%b %e %Y') %></span></h1> | ||
|
||
<%= article.summary %> | ||
|
||
<div class="more"><a href="<%= article.url %>">read on »</a></div> | ||
</article> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge;chrome=1' /> | ||
|
||
<% if is_blog_article? %> | ||
<title><%= current_article_title %></title> | ||
<% end %> | ||
</head> | ||
<body> | ||
|
||
<div id="main" role="main"> | ||
<% if is_blog_article? %> | ||
<% content_for :blog_article, yield %> | ||
<%= partial settings.blog_article_template %> | ||
<% else %> | ||
<%= yield %> | ||
<% end %> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Middleman::Extensions.register(:blog, ">= 3.0.0.alpha") do | ||
require "middleman" | ||
|
||
::Middleman::Extensions.register(:blog, ">= 3.0.0.alpha") do | ||
require "middleman-blog/extension" | ||
require "middleman-blog/template" | ||
|
||
Middleman::Extensions::Blog | ||
::Middleman::Extensions::Blog | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters