content_driven 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +97 -0
- data/Rakefile +4 -0
- data/content_driven.gemspec +25 -0
- data/lib/content_driven/blog.rb +14 -0
- data/lib/content_driven/blog_post.rb +4 -0
- data/lib/content_driven/dsl.rb +31 -0
- data/lib/content_driven/page.rb +55 -0
- data/lib/content_driven/page_list.rb +19 -0
- data/lib/content_driven/routes.rb +13 -0
- data/lib/content_driven/site.rb +4 -0
- data/lib/content_driven/support.rb +14 -0
- data/lib/content_driven/tag.rb +4 -0
- data/lib/content_driven/tag_cloud.rb +9 -0
- data/lib/content_driven/version.rb +3 -0
- data/lib/content_driven.rb +9 -0
- data/spec/dsl_spec.rb +50 -0
- data/spec/page_spec.rb +57 -0
- data/spec/routes_spec.rb +64 -0
- data/spec/spec_helper.rb +17 -0
- metadata +129 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f3403e03f4fc413624e8ce2e5f2d73bd279bc83c
|
4
|
+
data.tar.gz: 6b0d0ab09da151ba396bae5eb3700c5b025ddd0f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a3d3a1724d30c2bd7ee8f5ef159894ee2eff2b374d815345b1a40794101b9b19ec9989ca0673ae85473a493330147e72bf396486ebffa878000af29e65c109cf
|
7
|
+
data.tar.gz: a33a5eb1b9435cfa87c0d719df4eca2d49a99acdfd7c129c8264793f5393c1a8076825af847a4d8d343e2733cc74d19e2d90b3f1197097c7084912256c311b29
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Nicholas Johnson
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
# Content Driven Gem
|
2
|
+
|
3
|
+
A super clean DLS for defining blogs and websites with an emphasis on clean **Information Architecture**, sensible **Metadata** and **SEO**. Filesystem based so no database required. Works with any Ruby framework but plays especially nicely with Sinatra.
|
4
|
+
|
5
|
+
Aimed at developers. Define your site architecture using the simple Ruby DSL. Write your content in HAML, Markdown, ERB, whatever suits. Push to Heroku and you're live!
|
6
|
+
|
7
|
+
Create custom content types simply by subclassing ContentDriven::Page. The DSL will learn and adapt.
|
8
|
+
|
9
|
+
Define your site using calls like blog_post :post_title.
|
10
|
+
|
11
|
+
## No database
|
12
|
+
|
13
|
+
I blog on the train. I have no network access, so no access to a remote CMS. I wanted to be able to write my blog posts in HAML, and store them in a Git repository.
|
14
|
+
|
15
|
+
I wrote Stripes to help me do that.
|
16
|
+
|
17
|
+
## Sinatra
|
18
|
+
|
19
|
+
Stripes will work with any Ruby framework from Camping to Rails, but plays especially well with Sinatra. If you'd like to use Sinatra, check out the Stripes_sinatra gem instead. (note: not yet available)
|
20
|
+
|
21
|
+
## Heroku
|
22
|
+
|
23
|
+
Stripes is fully compatible with Heroku. Get your blog live in minutes on Heroku free tier.
|
24
|
+
|
25
|
+
## Installation
|
26
|
+
|
27
|
+
Add this line to your application's Gemfile:
|
28
|
+
|
29
|
+
gem 'content_driven'
|
30
|
+
|
31
|
+
And then execute:
|
32
|
+
|
33
|
+
$ bundle
|
34
|
+
|
35
|
+
Or install it yourself as:
|
36
|
+
|
37
|
+
$ gem install content_driven
|
38
|
+
|
39
|
+
## Usage
|
40
|
+
|
41
|
+
Define your website like so
|
42
|
+
|
43
|
+
@website = ContentDriven::Site.new do
|
44
|
+
add_blog :my_blog do
|
45
|
+
add_post :rule_world
|
46
|
+
self.title = "How to Rule the World with Ruby"
|
47
|
+
end
|
48
|
+
add_post :build_awesome
|
49
|
+
self.title = "How to build more awesome"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
You'll get back an object of class Website which you can then query like so:
|
55
|
+
|
56
|
+
# Get the default blog
|
57
|
+
@blog = @website.blog
|
58
|
+
|
59
|
+
# Get a blog by key if you have more than one
|
60
|
+
@website.blog[:by_blog]
|
61
|
+
|
62
|
+
# Get the posts for a blog
|
63
|
+
@website.blog.posts
|
64
|
+
|
65
|
+
# Get the first blog post
|
66
|
+
@website.blog.first_post
|
67
|
+
|
68
|
+
## Adding additional content types
|
69
|
+
|
70
|
+
Add additional content types by subclassing Stripes::Page. eg.
|
71
|
+
|
72
|
+
class Product < Stripes::Page
|
73
|
+
attr_accessor :price
|
74
|
+
end
|
75
|
+
|
76
|
+
You can now call methods like this:
|
77
|
+
|
78
|
+
site = Stripes::Site do
|
79
|
+
add_product :kitty do
|
80
|
+
self.title = "Teeny black kitten"
|
81
|
+
self.price = 5.99
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
site.products.length
|
86
|
+
# => 1
|
87
|
+
|
88
|
+
site.product[:kitty]
|
89
|
+
# => Product
|
90
|
+
|
91
|
+
## Contributing
|
92
|
+
|
93
|
+
1. Fork it
|
94
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
95
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
96
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
97
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'content_driven/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "content_driven"
|
8
|
+
spec.version = ContentDriven::VERSION
|
9
|
+
spec.authors = ["Nicholas Johnson"]
|
10
|
+
spec.email = ["nicholas@forwardadvance.com"]
|
11
|
+
spec.description = %q{A clean, simple DSL for defining websites, no database required}
|
12
|
+
spec.summary = %q{Emphasised great Information Architecture, Metadata and SEO. Define your website using the simple Ruby DSL. Build your pages in HAML, ERB, MD, etc. Deploy via git.}
|
13
|
+
spec.homepage = "http://www.github.com/forwardadvance/content_driven"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_dependency "activesupport"
|
25
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative 'page'
|
2
|
+
|
3
|
+
module ContentDriven
|
4
|
+
|
5
|
+
class Blog < Page
|
6
|
+
# TODO: Convenience shorthand methods
|
7
|
+
# alias_method :add_post, :add_blog_post
|
8
|
+
# alias_method :next_post, :next_blog_post
|
9
|
+
# alias_method :prev_post, :prev_blog_post
|
10
|
+
# alias_method :post, :blog_post
|
11
|
+
# alias_method :last_post, :last_blog_post
|
12
|
+
# alias_method :last_post, :last_blog_post
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'active_support/core_ext/string'
|
2
|
+
|
3
|
+
module ContentDriven
|
4
|
+
# Extends ContentDriven with methods to create content of all the types it knows about
|
5
|
+
module DSL
|
6
|
+
|
7
|
+
# Dynamically extend the DSL when we subclass Page
|
8
|
+
def define_dsl_for(subclass)
|
9
|
+
class_name = subclass.to_s.split("::").last.camelcase.underscore
|
10
|
+
|
11
|
+
# Allows us to call methods like site.blogs and blog.blog_posts
|
12
|
+
define_method("get_#{class_name.pluralise}") do
|
13
|
+
children.dup.delete_if do |child|
|
14
|
+
!children[child].is_a? subclass
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Allows us to call methods like site.get_blog which will return the first blog
|
19
|
+
define_method("get_#{class_name}") do |url=nil|
|
20
|
+
send("get_#{class_name.pluralise}")[url]
|
21
|
+
end
|
22
|
+
|
23
|
+
# Allows us to call methods like site.add_blog and blog.add_blog_posts
|
24
|
+
define_method "add_#{class_name}" do |key=nil, &block|
|
25
|
+
content_class = ContentDriven.const_get class_name.to_s.camelcase
|
26
|
+
child = content_class.new &block
|
27
|
+
add_child(key, child)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require_relative "support"
|
2
|
+
require_relative "dsl"
|
3
|
+
require_relative "page_list"
|
4
|
+
require_relative "routes"
|
5
|
+
require 'active_support/core_ext/string'
|
6
|
+
|
7
|
+
module ContentDriven
|
8
|
+
|
9
|
+
# ContentDriven defines a tree of content. Page is the base class.
|
10
|
+
# A Page has a parent and zero or more children
|
11
|
+
class Page
|
12
|
+
attr_accessor :parent, :children, :url, :title, :date
|
13
|
+
|
14
|
+
extend ContentDriven::DSL
|
15
|
+
include ContentDriven::Routes
|
16
|
+
|
17
|
+
# Extend the DSL when Page is subclasses
|
18
|
+
def self.inherited(subclass)
|
19
|
+
define_dsl_for(subclass)
|
20
|
+
end
|
21
|
+
|
22
|
+
def initialize &block
|
23
|
+
self.children = PageList.new
|
24
|
+
if block_given?
|
25
|
+
self.instance_eval &block
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# Add a child page. You will seldom need to call this directly.
|
30
|
+
# Instead use add_blog or add_article
|
31
|
+
def add_child key, page = nil
|
32
|
+
if key.is_a? Page
|
33
|
+
page, key = key, (children.keys.length + 1).to_sym
|
34
|
+
end
|
35
|
+
page.parent = self
|
36
|
+
page.url = key
|
37
|
+
children[key] = page
|
38
|
+
end
|
39
|
+
|
40
|
+
# Is this a root page, i.e. it has no parent?
|
41
|
+
def root?
|
42
|
+
self.parent.nil?
|
43
|
+
end
|
44
|
+
|
45
|
+
# Returns the URL fragment as a symbol, or :root if it is the root page
|
46
|
+
def to_sym
|
47
|
+
if root?
|
48
|
+
return :root
|
49
|
+
else
|
50
|
+
return self.url.to_sym
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module ContentDriven
|
2
|
+
class PageList < Hash
|
3
|
+
|
4
|
+
# TODO: Add methods like this:
|
5
|
+
# def last_blog_post
|
6
|
+
# blog_posts.values.last
|
7
|
+
# end
|
8
|
+
|
9
|
+
# def next_blog_post key
|
10
|
+
# keys = post.keys
|
11
|
+
# self.posts[keys[keys.index_of(key) + 1]]
|
12
|
+
# end
|
13
|
+
|
14
|
+
# def prev_blog_post key
|
15
|
+
# keys = post.keys
|
16
|
+
# self.posts[keys[keys.index_of(key) + 1]]
|
17
|
+
# end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module ContentDriven
|
2
|
+
module Routes
|
3
|
+
# Walks the tree based on a url and returns the requested page
|
4
|
+
# Will return nil if the page does not exist
|
5
|
+
def content_for route
|
6
|
+
parts = route.split("/").delete_if &:empty?
|
7
|
+
content = parts.inject(self) do |page, part|
|
8
|
+
page.children[part.to_sym] if page
|
9
|
+
end
|
10
|
+
content
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require_relative "content_driven/blog"
|
2
|
+
require_relative "content_driven/blog_post"
|
3
|
+
require_relative "content_driven/tag"
|
4
|
+
require_relative "content_driven/tag_cloud"
|
5
|
+
require_relative "content_driven/site"
|
6
|
+
require_relative "content_driven/version"
|
7
|
+
|
8
|
+
module ContentDriven
|
9
|
+
end
|
data/spec/dsl_spec.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'content_driven'
|
3
|
+
require 'content_driven/page'
|
4
|
+
|
5
|
+
describe ContentDriven::Page do
|
6
|
+
|
7
|
+
it "will extend the DSL when subclassed" do
|
8
|
+
class ContentDriven::HamsterJam < ContentDriven::Page;end
|
9
|
+
expect(ContentDriven::Page.instance_methods.include? :get_hamster_jams).to be_true
|
10
|
+
expect(ContentDriven::Page.instance_methods.include? :add_hamster_jam).to be_true
|
11
|
+
expect(ContentDriven::Page.instance_methods.include? :get_hamster_jam).to be_true
|
12
|
+
end
|
13
|
+
|
14
|
+
it "will gain a method of the form add_x when subclassed" do
|
15
|
+
class ContentDriven::Pony < ContentDriven::Page;end
|
16
|
+
expect(ContentDriven::Page.instance_methods.include? :add_pony).to be_true
|
17
|
+
page = ContentDriven::Page.new
|
18
|
+
page.add_pony :wow_a_pony
|
19
|
+
expect(page.children.length).to eq(1)
|
20
|
+
expect(page.children[:wow_a_pony].class).to be(ContentDriven::Pony)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "will gain a method of the form get_x when subclassed" do
|
24
|
+
class ContentDriven::Awesomeness < ContentDriven::Page;end
|
25
|
+
expect(ContentDriven::Page.instance_methods.include? :get_awesomeness).to be_true
|
26
|
+
page = ContentDriven::Page.new
|
27
|
+
awe = ContentDriven::Awesomeness.new
|
28
|
+
page.add_awesomeness :awe
|
29
|
+
awe = page.get_awesomeness :awe
|
30
|
+
expect(awe.class).to be(ContentDriven::Awesomeness)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "will gain a method of the form add_x when subclassed" do
|
34
|
+
class ContentDriven::Cat < ContentDriven::Page; end
|
35
|
+
class ContentDriven::Dog < ContentDriven::Page; end
|
36
|
+
expect(ContentDriven::Page.instance_methods.include? :get_cats).to be_true
|
37
|
+
page = ContentDriven::Page.new do
|
38
|
+
add_cat :first
|
39
|
+
add_cat :second
|
40
|
+
add_dog :third
|
41
|
+
add_cat :fourth
|
42
|
+
add_dog :fifth
|
43
|
+
end
|
44
|
+
puts "Cats"
|
45
|
+
expect(page.children.length).to be(5)
|
46
|
+
expect(page.get_dogs.length).to be(2)
|
47
|
+
expect(page.get_cats.length).to be(3)
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
data/spec/page_spec.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'content_driven'
|
3
|
+
require 'content_driven/page'
|
4
|
+
|
5
|
+
describe ContentDriven::Page do
|
6
|
+
|
7
|
+
before :each do
|
8
|
+
@page = ContentDriven::Page.new
|
9
|
+
@title = "Bum Cakes!"
|
10
|
+
end
|
11
|
+
|
12
|
+
it "can be initialized with a block" do
|
13
|
+
page = ContentDriven::Page.new {add_blog :test}
|
14
|
+
expect(page.children.length).to be(1)
|
15
|
+
expect(page.children[:test].class).to be(ContentDriven::Blog)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "can be initialized with a nested block" do
|
19
|
+
page = ContentDriven::Page.new do
|
20
|
+
add_blog :test do
|
21
|
+
add_blog :test_2
|
22
|
+
end
|
23
|
+
end
|
24
|
+
expect(page.children.length).to be(1)
|
25
|
+
expect(page.children[:test].class).to be(ContentDriven::Blog)
|
26
|
+
expect(page.children[:test].children.length).to be(1)
|
27
|
+
expect(page.children[:test].children[:test_2].class).to be(ContentDriven::Blog)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "has a title" do
|
31
|
+
@page.title = @title
|
32
|
+
expect(@page.title).to be(@title)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "can add a child page with a key" do
|
36
|
+
child = ContentDriven::Page.new
|
37
|
+
@page.add_child :child, child
|
38
|
+
expect(@page.children.length).to be(1)
|
39
|
+
expect(@page.children[:child]).to be(child)
|
40
|
+
expect(child.parent).to be(@page)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "can add a child page without a key" do
|
44
|
+
child = ContentDriven::Page.new
|
45
|
+
@page.add_child child
|
46
|
+
expect(@page.children.length).to be(1)
|
47
|
+
expect(@page.children.keys).to eq([:'1'])
|
48
|
+
expect(@page.children[:"1"]).to be(child)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "can add a child page with a key and block" do
|
52
|
+
@page.add_child :child, ContentDriven::Page.new do
|
53
|
+
self.title = @title
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
data/spec/routes_spec.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'content_driven'
|
3
|
+
require 'content_driven/page'
|
4
|
+
require 'content_driven/site'
|
5
|
+
require 'content_driven/blog'
|
6
|
+
require 'content_driven/blog_post'
|
7
|
+
|
8
|
+
describe ContentDriven::Page do
|
9
|
+
before :all do
|
10
|
+
@blog_title = blog_title = "The Many Uses of Toast"
|
11
|
+
@post_title = post_title = ["Decoration", "Recreation", "Procreation"]
|
12
|
+
@site = ContentDriven::Site.new do
|
13
|
+
add_blog :blog do
|
14
|
+
self.title = blog_title
|
15
|
+
add_blog_post :post_1 do
|
16
|
+
self.title = post_title.first
|
17
|
+
end
|
18
|
+
add_blog_post :post_2 do
|
19
|
+
self.title = post_title.last
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context "/" do
|
26
|
+
it "can get the current page" do
|
27
|
+
expect(@site.content_for("/")).to be @site
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "child" do
|
32
|
+
before do
|
33
|
+
@blog = @site.content_for("blog")
|
34
|
+
@post = @blog.content_for("post_1")
|
35
|
+
end
|
36
|
+
it "can find by name" do
|
37
|
+
expect(@blog).to_not be_nil
|
38
|
+
expect(@blog.title).to be(@blog_title)
|
39
|
+
end
|
40
|
+
it "can find by name again" do
|
41
|
+
expect(@post.title).to be(@post_title.first)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context "descendent" do
|
46
|
+
before do
|
47
|
+
@post_1 = @site.content_for("/blog/post_1")
|
48
|
+
@post_2 = @site.content_for("/blog/post_2")
|
49
|
+
end
|
50
|
+
it "can find by name" do
|
51
|
+
expect(@post_1.title).to be(@post_title.first)
|
52
|
+
expect(@post_2.title).to be(@post_title.last)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "404" do
|
57
|
+
it "will return nil" do
|
58
|
+
expect(@site.content_for("/fdsafds")).to be_nil
|
59
|
+
expect(@site.content_for("/blog/fdsafds")).to be_nil
|
60
|
+
expect(@site.content_for("/fdsafds/gfdsgfd")).to be_nil
|
61
|
+
expect(@site.content_for("/gfdsgfd/gfdsgfd/gfdsgfd")).to be_nil
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
9
|
+
config.run_all_when_everything_filtered = true
|
10
|
+
config.filter_run :focus
|
11
|
+
|
12
|
+
# Run specs in random order to surface order dependencies. If you find an
|
13
|
+
# order dependency and want to debug it, you can fix the order by providing
|
14
|
+
# the seed, which is printed after each run.
|
15
|
+
# --seed 1234
|
16
|
+
config.order = 'random'
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: content_driven
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nicholas Johnson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A clean, simple DSL for defining websites, no database required
|
70
|
+
email:
|
71
|
+
- nicholas@forwardadvance.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- .rspec
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- content_driven.gemspec
|
83
|
+
- lib/content_driven.rb
|
84
|
+
- lib/content_driven/blog.rb
|
85
|
+
- lib/content_driven/blog_post.rb
|
86
|
+
- lib/content_driven/dsl.rb
|
87
|
+
- lib/content_driven/page.rb
|
88
|
+
- lib/content_driven/page_list.rb
|
89
|
+
- lib/content_driven/routes.rb
|
90
|
+
- lib/content_driven/site.rb
|
91
|
+
- lib/content_driven/support.rb
|
92
|
+
- lib/content_driven/tag.rb
|
93
|
+
- lib/content_driven/tag_cloud.rb
|
94
|
+
- lib/content_driven/version.rb
|
95
|
+
- spec/dsl_spec.rb
|
96
|
+
- spec/page_spec.rb
|
97
|
+
- spec/routes_spec.rb
|
98
|
+
- spec/spec_helper.rb
|
99
|
+
homepage: http://www.github.com/forwardadvance/content_driven
|
100
|
+
licenses:
|
101
|
+
- MIT
|
102
|
+
metadata: {}
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements: []
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 2.0.3
|
120
|
+
signing_key:
|
121
|
+
specification_version: 4
|
122
|
+
summary: Emphasised great Information Architecture, Metadata and SEO. Define your
|
123
|
+
website using the simple Ruby DSL. Build your pages in HAML, ERB, MD, etc. Deploy
|
124
|
+
via git.
|
125
|
+
test_files:
|
126
|
+
- spec/dsl_spec.rb
|
127
|
+
- spec/page_spec.rb
|
128
|
+
- spec/routes_spec.rb
|
129
|
+
- spec/spec_helper.rb
|