machined 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/machined.rb +1 -0
- data/lib/machined/context.rb +1 -0
- data/lib/machined/helpers/locals_helpers.rb +0 -10
- data/lib/machined/helpers/page_helpers.rb +60 -0
- data/lib/machined/helpers/render_helpers.rb +7 -7
- data/lib/machined/server.rb +3 -0
- data/lib/machined/version.rb +1 -1
- data/spec/machined/helpers/locals_helper_spec.rb +10 -10
- data/spec/machined/helpers/page_helpers_spec.rb +97 -0
- data/spec/machined/helpers/render_helpers_spec.rb +16 -1
- data/spec/machined/processors/layout_processor_spec.rb +16 -0
- data/spec/machined/server_spec.rb +21 -1
- metadata +150 -77
data/lib/machined.rb
CHANGED
@@ -13,6 +13,7 @@ module Machined
|
|
13
13
|
autoload :AssetTagHelpers, "machined/helpers/asset_tag_helpers"
|
14
14
|
autoload :LocalsHelpers, "machined/helpers/locals_helpers"
|
15
15
|
autoload :OutputHelpers, "machined/helpers/output_helpers"
|
16
|
+
autoload :PageHelpers, "machined/helpers/page_helpers"
|
16
17
|
autoload :RenderHelpers, "machined/helpers/render_helpers"
|
17
18
|
end
|
18
19
|
|
data/lib/machined/context.rb
CHANGED
@@ -41,16 +41,6 @@ module Machined
|
|
41
41
|
locals.key? name
|
42
42
|
end
|
43
43
|
|
44
|
-
# Returns the default layout, unless overridden by
|
45
|
-
# the YAML front matter.
|
46
|
-
def layout
|
47
|
-
if has_local?(:layout)
|
48
|
-
locals[:layout]
|
49
|
-
else
|
50
|
-
machined.config.layout
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
44
|
def method_missing(method, *args, &block) # :nodoc:
|
55
45
|
if args.empty? && has_local?(method)
|
56
46
|
locals[method]
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require "active_support/concern"
|
2
|
+
require "active_support/core_ext/string/inflections"
|
3
|
+
|
4
|
+
module Machined
|
5
|
+
module Helpers
|
6
|
+
module PageHelpers
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
include LocalsHelpers
|
9
|
+
|
10
|
+
# Returns the context of the given path. This is useful
|
11
|
+
# if you want to get the information from the front matter
|
12
|
+
# of a specific page.
|
13
|
+
def context_for(path, environment = self.environment)
|
14
|
+
pathname = environment.resolve path, :base_path => self.pathname.dirname
|
15
|
+
|
16
|
+
contexts_cache[pathname] ||= begin
|
17
|
+
if pathname == self.pathname
|
18
|
+
self
|
19
|
+
else
|
20
|
+
depend_on_asset pathname
|
21
|
+
environment.find_asset(pathname).send :dependency_context
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns the default layout, unless overridden by
|
27
|
+
# the YAML front matter.
|
28
|
+
def layout
|
29
|
+
if has_local? :layout
|
30
|
+
locals[:layout]
|
31
|
+
else
|
32
|
+
machined.config.layout
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns the local variable, title, if set. Otherwise
|
37
|
+
# return a titleized version of the filename.
|
38
|
+
def title
|
39
|
+
if has_local? :title
|
40
|
+
locals[:title]
|
41
|
+
else
|
42
|
+
File.basename(logical_path).titleize
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Returns the URL to this asset, appending the sprocket's URL.
|
47
|
+
# For HTML files, this will return pretty URLs.
|
48
|
+
def url
|
49
|
+
File.join(environment.config.url, @logical_path).sub /(index)?\.html$/, ''
|
50
|
+
end
|
51
|
+
|
52
|
+
protected
|
53
|
+
|
54
|
+
# Returns a hash where we store found contexts.
|
55
|
+
def contexts_cache # :nodoc:
|
56
|
+
@contexts_cache ||= {}
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -38,7 +38,7 @@ module Machined
|
|
38
38
|
def render_collection(collection, partial, options = {})
|
39
39
|
return if collection.nil? || collection.empty?
|
40
40
|
|
41
|
-
template = resolve_partial
|
41
|
+
template = resolve_partial partial
|
42
42
|
counter = 0
|
43
43
|
collection.inject('') do |output, object|
|
44
44
|
counter += 1
|
@@ -85,7 +85,7 @@ module Machined
|
|
85
85
|
# <%= render_partial "account", :locals => { :user => buyer } %>
|
86
86
|
#
|
87
87
|
def render_partial(partial, options = {})
|
88
|
-
template = resolve_partial
|
88
|
+
template = resolve_partial partial
|
89
89
|
depend_on template
|
90
90
|
|
91
91
|
partial_locals = {}
|
@@ -98,16 +98,16 @@ module Machined
|
|
98
98
|
if object = options.delete(:object)
|
99
99
|
object_name = options.delete(:as) || template.to_s[/_?(\w+)(\.\w+)*$/, 1]
|
100
100
|
partial_locals[object_name] = object
|
101
|
-
partial_locals["#{object_name}_counter"] = options.delete
|
101
|
+
partial_locals["#{object_name}_counter"] = options.delete :counter
|
102
102
|
end
|
103
103
|
|
104
104
|
# Add locals from leftover options
|
105
105
|
if leftover_locals = options.delete(:locals) || options
|
106
|
-
partial_locals.merge!
|
106
|
+
partial_locals.merge! leftover_locals
|
107
107
|
end
|
108
108
|
|
109
109
|
# Now evaluate the partial
|
110
|
-
with_locals(partial_locals) { return evaluate
|
110
|
+
with_locals(partial_locals) { return evaluate template }
|
111
111
|
end
|
112
112
|
|
113
113
|
protected
|
@@ -116,7 +116,7 @@ module Machined
|
|
116
116
|
# while also looking for a version with a partial-style
|
117
117
|
# name (prefixed with an "_").
|
118
118
|
def resolve_partial(path) # :nodoc:
|
119
|
-
path = Pathname.new
|
119
|
+
path = Pathname.new path
|
120
120
|
path.absolute? and return path
|
121
121
|
|
122
122
|
# First look for the normal path
|
@@ -124,7 +124,7 @@ module Machined
|
|
124
124
|
|
125
125
|
# Then look for the partial-style version
|
126
126
|
unless path.basename.to_s =~ /^_/
|
127
|
-
partial = path.dirname.join
|
127
|
+
partial = path.dirname.join "_#{path.basename}"
|
128
128
|
machined.views.resolve(partial) { |found| return found }
|
129
129
|
end
|
130
130
|
|
data/lib/machined/server.rb
CHANGED
@@ -18,6 +18,9 @@ module Machined
|
|
18
18
|
# should handle the request and then...let it
|
19
19
|
# handle it.
|
20
20
|
def call(env)
|
21
|
+
if machined.config.environment == "development"
|
22
|
+
machined.sprockets.each(&:expire_index!)
|
23
|
+
end
|
21
24
|
response = @url_map.call(env)
|
22
25
|
response = @files.call(env) if response.first == 404
|
23
26
|
response
|
data/lib/machined/version.rb
CHANGED
@@ -4,16 +4,16 @@ describe Machined::Helpers::LocalsHelpers do
|
|
4
4
|
describe "#locals=" do
|
5
5
|
it "sets psuedo local variables" do
|
6
6
|
with_context do |context, output|
|
7
|
-
context.locals = { :
|
8
|
-
context.
|
7
|
+
context.locals = { :text => "Hello World", :body => nil }
|
8
|
+
context.text.should == "Hello World"
|
9
9
|
context.body.should be_nil
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
it "responds_to the local variable name" do
|
14
14
|
with_context do |context, output|
|
15
|
-
context.locals = { :
|
16
|
-
context.respond_to?(:
|
15
|
+
context.locals = { :text => "Hello World", :body => nil }
|
16
|
+
context.respond_to?(:text).should be_true
|
17
17
|
context.respond_to?(:body).should be_true
|
18
18
|
end
|
19
19
|
end
|
@@ -27,10 +27,10 @@ describe Machined::Helpers::LocalsHelpers do
|
|
27
27
|
|
28
28
|
it "clears local variables when set to nil" do
|
29
29
|
with_context do |context, output|
|
30
|
-
context.locals = { :
|
30
|
+
context.locals = { :text => "Hello World" }
|
31
31
|
context.locals = nil
|
32
|
-
expect { context.
|
33
|
-
context.respond_to?(:
|
32
|
+
expect { context.text }.to raise_error(NoMethodError)
|
33
|
+
context.respond_to?(:text).should be_false
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -38,13 +38,13 @@ describe Machined::Helpers::LocalsHelpers do
|
|
38
38
|
describe "#with_locals" do
|
39
39
|
it "temporarily changes the local variables" do
|
40
40
|
with_context do |context, output|
|
41
|
-
context.locals = { :
|
41
|
+
context.locals = { :text => "Hello World", :layout => "main" }
|
42
42
|
context.with_locals(:layout => false, :body => "...") do
|
43
|
-
context.
|
43
|
+
context.text.should == "Hello World"
|
44
44
|
context.body.should == "..."
|
45
45
|
context.layout.should be_false
|
46
46
|
end
|
47
|
-
context.
|
47
|
+
context.text.should == "Hello World"
|
48
48
|
context.layout.should == "main"
|
49
49
|
context.respond_to?(:body).should be_false
|
50
50
|
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Machined::Helpers::PageHelpers do
|
4
|
+
describe "#context_for" do
|
5
|
+
it "returns the context for the given path" do
|
6
|
+
within_construct do |c|
|
7
|
+
c.file "pages/index.html.erb", "<%= context_for('about').title %>"
|
8
|
+
c.file "pages/about.html", "---\ntitle: Hello World\n---\n"
|
9
|
+
|
10
|
+
machined.pages["index.html"].to_s.should == "Hello World"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
it "returns a self reference to avoid circular dependencies" do
|
15
|
+
within_construct do |c|
|
16
|
+
c.file "pages/index.html.erb", "<%= context_for('index') == self %>"
|
17
|
+
|
18
|
+
machined.pages["index.html"].to_s.should == "true"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
it "adds the found context as a dependency" do
|
23
|
+
within_construct do |c|
|
24
|
+
c.file "pages/index.html.erb", "<%= context_for('about').title %>"
|
25
|
+
dep = c.file "pages/about.html", "---\ntitle: Hello World\n---\n"
|
26
|
+
|
27
|
+
asset = machined.pages["index.html"]
|
28
|
+
asset.should be_fresh
|
29
|
+
|
30
|
+
dep.open("w") { |f| f.write("---\ntitle: This Changed!\n---\n") }
|
31
|
+
mtime = Time.now + 600
|
32
|
+
dep.utime mtime, mtime
|
33
|
+
|
34
|
+
asset.should be_stale
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "#layout" do
|
40
|
+
it "defaults to the default layout" do
|
41
|
+
within_construct do |c|
|
42
|
+
c.file "pages/index.html.erb", "<%= layout %>"
|
43
|
+
|
44
|
+
machined :layout => "application"
|
45
|
+
machined.pages["index.html"].to_s.should == "application"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
it "returns the layout set in the front matter" do
|
50
|
+
within_construct do |c|
|
51
|
+
c.file "pages/index.html.erb", "---\nlayout: application\n---\n<%= layout %>"
|
52
|
+
c.file "pages/about.html.erb", "---\nlayout: false\n---\n<%= layout %>"
|
53
|
+
|
54
|
+
machined.pages["index.html"].to_s.should == "application"
|
55
|
+
machined.pages["about.html"].to_s.should == "false"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "#title" do
|
61
|
+
it "returns a titleized version of the filename" do
|
62
|
+
within_construct do |c|
|
63
|
+
c.file "pages/about-us.html.erb", "<%= title %>"
|
64
|
+
c.file "pages/about/our-team.html.erb", "<%= title %>"
|
65
|
+
|
66
|
+
machined.pages["about-us"].to_s.should == "About Us"
|
67
|
+
machined.pages["about/our-team"].to_s.should == "Our Team"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
it "returns the local set in the front matter" do
|
72
|
+
within_construct do |c|
|
73
|
+
c.file "pages/index.html.erb", "---\ntitle: Homepage\n---\n<%= title %>"
|
74
|
+
|
75
|
+
machined.pages["index"].to_s.should == "Homepage"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "#url" do
|
81
|
+
it "returns the URL for the current page or asset" do
|
82
|
+
within_construct do |c|
|
83
|
+
c.file "assets/javascripts/main.js.erb", "<%= url %>"
|
84
|
+
c.file "assets/stylesheets/main.css.erb", "<%= url %>"
|
85
|
+
c.file "pages/index.html.erb", "<%= url %>"
|
86
|
+
c.file "pages/about.html.erb", "<%= url %>"
|
87
|
+
c.file "pages/about/team.html.erb", "<%= url %>"
|
88
|
+
|
89
|
+
machined.assets["main.js"].to_s.should == "/assets/main.js;\n"
|
90
|
+
machined.assets["main.css"].to_s.should == "/assets/main.css"
|
91
|
+
machined.pages["index.html"].to_s.should == "/"
|
92
|
+
machined.pages["about.html"].to_s.should == "/about"
|
93
|
+
machined.pages["about/team.html"].to_s.should == "/about/team"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -13,7 +13,6 @@ describe Machined::Helpers::RenderHelpers do
|
|
13
13
|
c.file "views/_partial2.haml", "%p Here's some Content..."
|
14
14
|
c.file "views/partials/_partial3.html", "<p>And some more</p>\n"
|
15
15
|
|
16
|
-
# puts machined.views.paths.inspect
|
17
16
|
machined.pages["index.html"].to_s.should == <<-CONTENT.unindent
|
18
17
|
<h1>Hello World</h1>
|
19
18
|
<p>Here's some Content...</p>
|
@@ -81,6 +80,22 @@ describe Machined::Helpers::RenderHelpers do
|
|
81
80
|
end
|
82
81
|
end
|
83
82
|
|
83
|
+
it "adds the partial as a dependency" do
|
84
|
+
within_construct do |c|
|
85
|
+
c.file "pages/index.html.erb", %(<%= render "partial" %>)
|
86
|
+
dep = c.file "views/partial.haml", "Hello World"
|
87
|
+
|
88
|
+
asset = machined.pages["index.html"]
|
89
|
+
asset.should be_fresh
|
90
|
+
|
91
|
+
dep.open("w") { |f| f.write("%h1 Hello World") }
|
92
|
+
mtime = Time.now + 600
|
93
|
+
dep.utime mtime, mtime
|
94
|
+
|
95
|
+
asset.should be_stale
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
84
99
|
it "raises a Sprockets::FileNotFound error if the partial is missing" do
|
85
100
|
within_construct do |c|
|
86
101
|
c.file "pages/index.html.erb", %(<%= render "partial" %>)
|
@@ -29,4 +29,20 @@ describe Machined::Processors::LayoutProcessor do
|
|
29
29
|
machined.pages["index.html"].to_s.should == "<h1>Hello World</h1>"
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
it "adds the layout file as a dependency" do
|
34
|
+
within_construct do |c|
|
35
|
+
c.file "pages/index.html", "<h1>Hello World</h1>"
|
36
|
+
dep = c.file "views/layouts/main.html.haml", "= yield"
|
37
|
+
|
38
|
+
asset = machined.pages["index.html"]
|
39
|
+
asset.should be_fresh
|
40
|
+
|
41
|
+
dep.open("w") { |f| f.write("#layout= yield") }
|
42
|
+
mtime = Time.now + 600
|
43
|
+
dep.utime mtime, mtime
|
44
|
+
|
45
|
+
asset.should be_stale
|
46
|
+
end
|
47
|
+
end
|
32
48
|
end
|
@@ -3,7 +3,12 @@ require "spec_helper"
|
|
3
3
|
describe Machined::Server do
|
4
4
|
include Rack::Test::Methods
|
5
5
|
|
6
|
-
let(:app)
|
6
|
+
let(:app) do
|
7
|
+
Rack::Builder.new.tap do |app|
|
8
|
+
app.use Rack::ShowExceptions
|
9
|
+
app.run machined
|
10
|
+
end.to_app
|
11
|
+
end
|
7
12
|
|
8
13
|
it "serves up assets at the asset url" do
|
9
14
|
within_construct do |c|
|
@@ -74,4 +79,19 @@ describe Machined::Server do
|
|
74
79
|
last_response.content_type.should == "text/html"
|
75
80
|
end
|
76
81
|
end
|
82
|
+
|
83
|
+
it "does not raise Sprockets::CircularDependency error after an error" do
|
84
|
+
within_construct do |c|
|
85
|
+
c.file "pages/index.html.haml", "%p Hello\n World"
|
86
|
+
|
87
|
+
get "/"
|
88
|
+
last_response.should_not be_ok
|
89
|
+
|
90
|
+
c.file "pages/index.html.erb", "<h1>Hello World</h1>\n"
|
91
|
+
|
92
|
+
get "/"
|
93
|
+
last_response.should be_ok
|
94
|
+
last_response.body.should == "<h1>Hello World</h1>\n"
|
95
|
+
end
|
96
|
+
end
|
77
97
|
end
|
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: machined
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- Pete Browne
|
@@ -10,206 +15,271 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-10 00:00:00 Z
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
|
-
|
17
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
21
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
18
22
|
none: false
|
19
23
|
requirements:
|
20
24
|
- - ~>
|
21
25
|
- !ruby/object:Gem::Version
|
26
|
+
hash: 3
|
27
|
+
segments:
|
28
|
+
- 2
|
29
|
+
- 0
|
22
30
|
version: "2.0"
|
23
|
-
|
31
|
+
requirement: *id001
|
32
|
+
name: sprockets
|
24
33
|
prerelease: false
|
25
|
-
|
34
|
+
type: :runtime
|
26
35
|
- !ruby/object:Gem::Dependency
|
27
|
-
|
28
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
29
37
|
none: false
|
30
38
|
requirements:
|
31
39
|
- - ~>
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
hash: 13
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
- 3
|
33
45
|
version: "0.3"
|
34
|
-
|
46
|
+
requirement: *id002
|
47
|
+
name: sprockets-sass
|
35
48
|
prerelease: false
|
36
|
-
|
49
|
+
type: :runtime
|
37
50
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
39
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
51
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
40
52
|
none: false
|
41
53
|
requirements:
|
42
54
|
- - ~>
|
43
55
|
- !ruby/object:Gem::Version
|
56
|
+
hash: 31
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
- 10
|
44
60
|
version: "0.10"
|
45
|
-
|
61
|
+
requirement: *id003
|
62
|
+
name: padrino-helpers
|
46
63
|
prerelease: false
|
47
|
-
|
64
|
+
type: :runtime
|
48
65
|
- !ruby/object:Gem::Dependency
|
49
|
-
|
50
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
51
67
|
none: false
|
52
68
|
requirements:
|
53
69
|
- - ~>
|
54
70
|
- !ruby/object:Gem::Version
|
71
|
+
hash: 5
|
72
|
+
segments:
|
73
|
+
- 3
|
74
|
+
- 1
|
55
75
|
version: "3.1"
|
56
|
-
|
76
|
+
requirement: *id004
|
77
|
+
name: activesupport
|
57
78
|
prerelease: false
|
58
|
-
|
79
|
+
type: :runtime
|
59
80
|
- !ruby/object:Gem::Dependency
|
60
|
-
|
61
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
81
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
62
82
|
none: false
|
63
83
|
requirements:
|
64
84
|
- - ~>
|
65
85
|
- !ruby/object:Gem::Version
|
86
|
+
hash: 7
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
- 6
|
66
90
|
version: "0.6"
|
67
|
-
|
91
|
+
requirement: *id005
|
92
|
+
name: i18n
|
68
93
|
prerelease: false
|
69
|
-
|
94
|
+
type: :runtime
|
70
95
|
- !ruby/object:Gem::Dependency
|
71
|
-
|
72
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
96
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
73
97
|
none: false
|
74
98
|
requirements:
|
75
99
|
- - ~>
|
76
100
|
- !ruby/object:Gem::Version
|
101
|
+
hash: 23
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
- 14
|
77
105
|
version: "0.14"
|
78
|
-
|
106
|
+
requirement: *id006
|
107
|
+
name: thor
|
79
108
|
prerelease: false
|
80
|
-
|
109
|
+
type: :runtime
|
81
110
|
- !ruby/object:Gem::Dependency
|
82
|
-
|
83
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
111
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
84
112
|
none: false
|
85
113
|
requirements:
|
86
114
|
- - ~>
|
87
115
|
- !ruby/object:Gem::Version
|
116
|
+
hash: 13
|
117
|
+
segments:
|
118
|
+
- 0
|
119
|
+
- 3
|
88
120
|
version: "0.3"
|
89
|
-
|
121
|
+
requirement: *id007
|
122
|
+
name: crush
|
90
123
|
prerelease: false
|
91
|
-
|
124
|
+
type: :runtime
|
92
125
|
- !ruby/object:Gem::Dependency
|
93
|
-
|
94
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
126
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
95
127
|
none: false
|
96
128
|
requirements:
|
97
129
|
- - ~>
|
98
130
|
- !ruby/object:Gem::Version
|
131
|
+
hash: 15
|
132
|
+
segments:
|
133
|
+
- 2
|
134
|
+
- 6
|
99
135
|
version: "2.6"
|
100
|
-
|
136
|
+
requirement: *id008
|
137
|
+
name: rspec
|
101
138
|
prerelease: false
|
102
|
-
|
139
|
+
type: :development
|
103
140
|
- !ruby/object:Gem::Dependency
|
104
|
-
|
105
|
-
requirement: &id009 !ruby/object:Gem::Requirement
|
141
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
106
142
|
none: false
|
107
143
|
requirements:
|
108
144
|
- - ~>
|
109
145
|
- !ruby/object:Gem::Version
|
146
|
+
hash: 7
|
147
|
+
segments:
|
148
|
+
- 0
|
149
|
+
- 6
|
110
150
|
version: "0.6"
|
111
|
-
|
151
|
+
requirement: *id009
|
152
|
+
name: rack-test
|
112
153
|
prerelease: false
|
113
|
-
|
154
|
+
type: :development
|
114
155
|
- !ruby/object:Gem::Dependency
|
115
|
-
|
116
|
-
requirement: &id010 !ruby/object:Gem::Requirement
|
156
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
117
157
|
none: false
|
118
158
|
requirements:
|
119
159
|
- - ~>
|
120
160
|
- !ruby/object:Gem::Version
|
161
|
+
hash: 11
|
162
|
+
segments:
|
163
|
+
- 1
|
164
|
+
- 2
|
121
165
|
version: "1.2"
|
122
|
-
|
166
|
+
requirement: *id010
|
167
|
+
name: test-construct
|
123
168
|
prerelease: false
|
124
|
-
|
169
|
+
type: :development
|
125
170
|
- !ruby/object:Gem::Dependency
|
126
|
-
|
127
|
-
requirement: &id011 !ruby/object:Gem::Requirement
|
171
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
128
172
|
none: false
|
129
173
|
requirements:
|
130
174
|
- - ~>
|
131
175
|
- !ruby/object:Gem::Version
|
176
|
+
hash: 15
|
177
|
+
segments:
|
178
|
+
- 1
|
179
|
+
- 0
|
132
180
|
version: "1.0"
|
133
|
-
|
181
|
+
requirement: *id011
|
182
|
+
name: unindent
|
134
183
|
prerelease: false
|
135
|
-
|
184
|
+
type: :development
|
136
185
|
- !ruby/object:Gem::Dependency
|
137
|
-
|
138
|
-
requirement: &id012 !ruby/object:Gem::Requirement
|
186
|
+
version_requirements: &id012 !ruby/object:Gem::Requirement
|
139
187
|
none: false
|
140
188
|
requirements:
|
141
189
|
- - ">="
|
142
190
|
- !ruby/object:Gem::Version
|
191
|
+
hash: 3
|
192
|
+
segments:
|
193
|
+
- 0
|
143
194
|
version: "0"
|
144
|
-
|
195
|
+
requirement: *id012
|
196
|
+
name: haml
|
145
197
|
prerelease: false
|
146
|
-
|
198
|
+
type: :development
|
147
199
|
- !ruby/object:Gem::Dependency
|
148
|
-
|
149
|
-
requirement: &id013 !ruby/object:Gem::Requirement
|
200
|
+
version_requirements: &id013 !ruby/object:Gem::Requirement
|
150
201
|
none: false
|
151
202
|
requirements:
|
152
203
|
- - ">="
|
153
204
|
- !ruby/object:Gem::Version
|
205
|
+
hash: 3
|
206
|
+
segments:
|
207
|
+
- 0
|
154
208
|
version: "0"
|
155
|
-
|
209
|
+
requirement: *id013
|
210
|
+
name: sass
|
156
211
|
prerelease: false
|
157
|
-
|
212
|
+
type: :development
|
158
213
|
- !ruby/object:Gem::Dependency
|
159
|
-
|
160
|
-
requirement: &id014 !ruby/object:Gem::Requirement
|
214
|
+
version_requirements: &id014 !ruby/object:Gem::Requirement
|
161
215
|
none: false
|
162
216
|
requirements:
|
163
217
|
- - ">="
|
164
218
|
- !ruby/object:Gem::Version
|
219
|
+
hash: 3
|
220
|
+
segments:
|
221
|
+
- 0
|
165
222
|
version: "0"
|
166
|
-
|
223
|
+
requirement: *id014
|
224
|
+
name: slim
|
167
225
|
prerelease: false
|
168
|
-
|
226
|
+
type: :development
|
169
227
|
- !ruby/object:Gem::Dependency
|
170
|
-
|
171
|
-
requirement: &id015 !ruby/object:Gem::Requirement
|
228
|
+
version_requirements: &id015 !ruby/object:Gem::Requirement
|
172
229
|
none: false
|
173
230
|
requirements:
|
174
231
|
- - ">="
|
175
232
|
- !ruby/object:Gem::Version
|
233
|
+
hash: 3
|
234
|
+
segments:
|
235
|
+
- 0
|
176
236
|
version: "0"
|
177
|
-
|
237
|
+
requirement: *id015
|
238
|
+
name: erubis
|
178
239
|
prerelease: false
|
179
|
-
|
240
|
+
type: :development
|
180
241
|
- !ruby/object:Gem::Dependency
|
181
|
-
|
182
|
-
requirement: &id016 !ruby/object:Gem::Requirement
|
242
|
+
version_requirements: &id016 !ruby/object:Gem::Requirement
|
183
243
|
none: false
|
184
244
|
requirements:
|
185
245
|
- - ">="
|
186
246
|
- !ruby/object:Gem::Version
|
247
|
+
hash: 3
|
248
|
+
segments:
|
249
|
+
- 0
|
187
250
|
version: "0"
|
188
|
-
|
251
|
+
requirement: *id016
|
252
|
+
name: rdiscount
|
189
253
|
prerelease: false
|
190
|
-
|
254
|
+
type: :development
|
191
255
|
- !ruby/object:Gem::Dependency
|
192
|
-
|
193
|
-
requirement: &id017 !ruby/object:Gem::Requirement
|
256
|
+
version_requirements: &id017 !ruby/object:Gem::Requirement
|
194
257
|
none: false
|
195
258
|
requirements:
|
196
259
|
- - ">="
|
197
260
|
- !ruby/object:Gem::Version
|
261
|
+
hash: 3
|
262
|
+
segments:
|
263
|
+
- 0
|
198
264
|
version: "0"
|
199
|
-
|
265
|
+
requirement: *id017
|
266
|
+
name: uglifier
|
200
267
|
prerelease: false
|
201
|
-
|
268
|
+
type: :development
|
202
269
|
- !ruby/object:Gem::Dependency
|
203
|
-
|
204
|
-
requirement: &id018 !ruby/object:Gem::Requirement
|
270
|
+
version_requirements: &id018 !ruby/object:Gem::Requirement
|
205
271
|
none: false
|
206
272
|
requirements:
|
207
273
|
- - ">="
|
208
274
|
- !ruby/object:Gem::Version
|
275
|
+
hash: 3
|
276
|
+
segments:
|
277
|
+
- 0
|
209
278
|
version: "0"
|
210
|
-
|
279
|
+
requirement: *id018
|
280
|
+
name: rake
|
211
281
|
prerelease: false
|
212
|
-
|
282
|
+
type: :development
|
213
283
|
description: Why another static site generator? Machined is for the developers who know and love the asset pipeline of Rails 3.1 and want to develop blazingly fast static websites. It's built from the ground up using Sprockets 2.0.
|
214
284
|
email:
|
215
285
|
- me@petebrowne.com
|
@@ -233,6 +303,7 @@ files:
|
|
233
303
|
- lib/machined/helpers/asset_tag_helpers.rb
|
234
304
|
- lib/machined/helpers/locals_helpers.rb
|
235
305
|
- lib/machined/helpers/output_helpers.rb
|
306
|
+
- lib/machined/helpers/page_helpers.rb
|
236
307
|
- lib/machined/helpers/render_helpers.rb
|
237
308
|
- lib/machined/processors/front_matter_processor.rb
|
238
309
|
- lib/machined/processors/layout_processor.rb
|
@@ -257,6 +328,7 @@ files:
|
|
257
328
|
- spec/machined/helpers/asset_tag_helpers_spec.rb
|
258
329
|
- spec/machined/helpers/locals_helper_spec.rb
|
259
330
|
- spec/machined/helpers/output_helpers_spec.rb
|
331
|
+
- spec/machined/helpers/page_helpers_spec.rb
|
260
332
|
- spec/machined/helpers/render_helpers_spec.rb
|
261
333
|
- spec/machined/processors/front_matter_processor_spec.rb
|
262
334
|
- spec/machined/processors/layout_processor_spec.rb
|
@@ -280,7 +352,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
280
352
|
requirements:
|
281
353
|
- - ">="
|
282
354
|
- !ruby/object:Gem::Version
|
283
|
-
hash:
|
355
|
+
hash: 3
|
284
356
|
segments:
|
285
357
|
- 0
|
286
358
|
version: "0"
|
@@ -289,14 +361,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
361
|
requirements:
|
290
362
|
- - ">="
|
291
363
|
- !ruby/object:Gem::Version
|
292
|
-
hash:
|
364
|
+
hash: 3
|
293
365
|
segments:
|
294
366
|
- 0
|
295
367
|
version: "0"
|
296
368
|
requirements: []
|
297
369
|
|
298
370
|
rubyforge_project: machined
|
299
|
-
rubygems_version: 1.8.
|
371
|
+
rubygems_version: 1.8.5
|
300
372
|
signing_key:
|
301
373
|
specification_version: 3
|
302
374
|
summary: A static site generator and Rack server built using Sprockets 2.0
|
@@ -307,6 +379,7 @@ test_files:
|
|
307
379
|
- spec/machined/helpers/asset_tag_helpers_spec.rb
|
308
380
|
- spec/machined/helpers/locals_helper_spec.rb
|
309
381
|
- spec/machined/helpers/output_helpers_spec.rb
|
382
|
+
- spec/machined/helpers/page_helpers_spec.rb
|
310
383
|
- spec/machined/helpers/render_helpers_spec.rb
|
311
384
|
- spec/machined/processors/front_matter_processor_spec.rb
|
312
385
|
- spec/machined/processors/layout_processor_spec.rb
|