middleman-core 3.1.6 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/features/asciidoc.feature +155 -0
- data/features/helpers_page_classes.feature +16 -1
- data/features/markdown_kramdown.feature +3 -1
- data/features/markdown_redcarpet.feature +2 -1
- data/features/queryable.feature +5 -1
- data/features/step_definitions/queryable_steps.rb +13 -1
- data/fixtures/asciidoc-app/config.rb +0 -0
- data/fixtures/asciidoc-app/source/_include.adoc +1 -0
- data/fixtures/asciidoc-app/source/code.adoc +3 -0
- data/fixtures/asciidoc-app/source/custom-attribute.adoc +3 -0
- data/fixtures/asciidoc-app/source/gallery.adoc +1 -0
- data/fixtures/asciidoc-app/source/hello-no-layout.adoc +2 -0
- data/fixtures/asciidoc-app/source/hello-with-front-matter.adoc +5 -0
- data/fixtures/asciidoc-app/source/hello-with-layout.adoc +2 -0
- data/fixtures/asciidoc-app/source/hello-with-title.adoc +4 -0
- data/fixtures/asciidoc-app/source/hello.adoc +4 -0
- data/fixtures/asciidoc-app/source/images/tiger.gif +0 -0
- data/fixtures/asciidoc-app/source/layouts/default.erb +10 -0
- data/fixtures/asciidoc-app/source/master.adoc +3 -0
- data/fixtures/markdown-app/source/mailto.html.markdown +1 -0
- data/fixtures/padrino-helpers-app/config.rb +7 -0
- data/fixtures/page-classes-app/source/1-folder/1-inside-with-numeric.html.erb +1 -0
- data/fixtures/page-classes-app/source/1-starts-with-numeric.html.erb +1 -0
- data/fixtures/page-classes-app/source/2-starts-with-numeric-custom.html.erb +1 -0
- data/lib/middleman-core/cli/build.rb +95 -118
- data/lib/middleman-core/core_extensions/rendering.rb +7 -0
- data/lib/middleman-core/core_extensions/request.rb +2 -0
- data/lib/middleman-core/logger.rb +5 -6
- data/lib/middleman-core/preview_server.rb +25 -11
- data/lib/middleman-core/renderers/asciidoc.rb +59 -0
- data/lib/middleman-core/renderers/kramdown.rb +7 -4
- data/lib/middleman-core/sitemap/queryable.rb +18 -11
- data/lib/middleman-core/sitemap/resource.rb +4 -5
- data/lib/middleman-core/templates/empty/Gemfile.tt +1 -6
- data/lib/middleman-core/templates/shared/Gemfile.tt +1 -6
- data/lib/middleman-core/util.rb +3 -0
- data/lib/middleman-core/version.rb +1 -1
- data/lib/middleman-more/core_extensions/default_helpers.rb +10 -13
- data/middleman-core.gemspec +2 -0
- metadata +42 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e72ec7118c675ea751825737b7d382670144035
|
4
|
+
data.tar.gz: 035a9102b513a809495a687a6cf11154a29d8842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 246c43b8e6372afe90cbd427d80135e8d72b1d5686f15b9fca2d773e023b6f54ebd20b53fd61374beea8d87951e6dd7a103384454c27f06b610ef4a5dc7acb06
|
7
|
+
data.tar.gz: 396268eda2f27bbf32d83b46dd87f2add1c26225f9af60df2b968359de40375487dd3fa8a405d0ace99b869233d00bec46f44f89cc546bb87ab1691f43e77667
|
@@ -0,0 +1,155 @@
|
|
1
|
+
Feature: AsciiDoc Support
|
2
|
+
In order to test included AsciiDoc support
|
3
|
+
|
4
|
+
Scenario: Rendering html
|
5
|
+
Given the Server is running at "asciidoc-app"
|
6
|
+
When I go to "/hello.html"
|
7
|
+
Then I should see:
|
8
|
+
"""
|
9
|
+
<div class="paragraph">
|
10
|
+
<p>Hello, AsciiDoc!
|
11
|
+
Middleman, I am in you.</p>
|
12
|
+
</div>
|
13
|
+
"""
|
14
|
+
|
15
|
+
Scenario: Rendering html with default layout
|
16
|
+
Given a fixture app "asciidoc-app"
|
17
|
+
And a file named "config.rb" with:
|
18
|
+
"""
|
19
|
+
set :layout, :default
|
20
|
+
"""
|
21
|
+
Given the Server is running at "asciidoc-app"
|
22
|
+
When I go to "/hello.html"
|
23
|
+
Then I should see:
|
24
|
+
"""
|
25
|
+
<!DOCTYPE html>
|
26
|
+
<html>
|
27
|
+
<head>
|
28
|
+
<title>Fallback</title>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div class="paragraph">
|
32
|
+
<p>Hello, AsciiDoc!
|
33
|
+
Middleman, I am in you.</p>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
37
|
+
"""
|
38
|
+
|
39
|
+
Scenario: Rendering html with explicit layout
|
40
|
+
Given the Server is running at "asciidoc-app"
|
41
|
+
When I go to "/hello-with-layout.html"
|
42
|
+
Then I should see:
|
43
|
+
"""
|
44
|
+
<!DOCTYPE html>
|
45
|
+
<html>
|
46
|
+
<head>
|
47
|
+
<title>Fallback</title>
|
48
|
+
</head>
|
49
|
+
<body>
|
50
|
+
<div class="paragraph">
|
51
|
+
<p>Hello, AsciiDoc!</p>
|
52
|
+
</div>
|
53
|
+
</body>
|
54
|
+
</html>
|
55
|
+
"""
|
56
|
+
|
57
|
+
Scenario: Rendering html with no layout
|
58
|
+
Given the Server is running at "asciidoc-app"
|
59
|
+
When I go to "/hello-no-layout.html"
|
60
|
+
Then I should see:
|
61
|
+
"""
|
62
|
+
<div class="paragraph">
|
63
|
+
<p>Hello, AsciiDoc!</p>
|
64
|
+
</div>
|
65
|
+
"""
|
66
|
+
|
67
|
+
Scenario: Rendering html using title from document
|
68
|
+
Given the Server is running at "asciidoc-app"
|
69
|
+
When I go to "/hello-with-title.html"
|
70
|
+
Then I should see:
|
71
|
+
"""
|
72
|
+
<!DOCTYPE html>
|
73
|
+
<html>
|
74
|
+
<head>
|
75
|
+
<title>Page Title</title>
|
76
|
+
</head>
|
77
|
+
<body>
|
78
|
+
<h1>Page Title</h1>
|
79
|
+
<div id="preamble">
|
80
|
+
<div class="sectionbody">
|
81
|
+
<div class="paragraph">
|
82
|
+
<p>Hello, AsciiDoc!</p>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</body>
|
87
|
+
</html>
|
88
|
+
"""
|
89
|
+
|
90
|
+
Scenario: Rendering html with title and layout from front matter
|
91
|
+
Given the Server is running at "asciidoc-app"
|
92
|
+
When I go to "/hello-with-front-matter.html"
|
93
|
+
Then I should see:
|
94
|
+
"""
|
95
|
+
<!DOCTYPE html>
|
96
|
+
<html>
|
97
|
+
<head>
|
98
|
+
<title>Page Title</title>
|
99
|
+
</head>
|
100
|
+
<body>
|
101
|
+
<div class="paragraph">
|
102
|
+
<p>Hello, AsciiDoc!</p>
|
103
|
+
</div>
|
104
|
+
</body>
|
105
|
+
</html>
|
106
|
+
"""
|
107
|
+
|
108
|
+
Scenario: Including a file relative to source root
|
109
|
+
Given the Server is running at "asciidoc-app"
|
110
|
+
When I go to "/master.html"
|
111
|
+
Then I should see:
|
112
|
+
"""
|
113
|
+
<div class="literalblock">
|
114
|
+
<div class="content">
|
115
|
+
<pre>I'm included content.</pre>
|
116
|
+
</div>
|
117
|
+
"""
|
118
|
+
|
119
|
+
Scenario: Linking to an image
|
120
|
+
Given the Server is running at "asciidoc-app"
|
121
|
+
When I go to "/gallery.html"
|
122
|
+
Then I should see:
|
123
|
+
"""
|
124
|
+
<div class="imageblock">
|
125
|
+
<div class="content">
|
126
|
+
<img src="/images/tiger.gif" alt="tiger">
|
127
|
+
</div>
|
128
|
+
"""
|
129
|
+
|
130
|
+
Scenario: Configuring custom AsciiDoc attributes
|
131
|
+
Given a fixture app "asciidoc-app"
|
132
|
+
And a file named "config.rb" with:
|
133
|
+
"""
|
134
|
+
set :asciidoc_attributes, %w(foo=bar)
|
135
|
+
"""
|
136
|
+
Given the Server is running at "asciidoc-app"
|
137
|
+
When I go to "/custom-attribute.html"
|
138
|
+
Then I should see "bar"
|
139
|
+
|
140
|
+
Scenario: Highlighting source code
|
141
|
+
Given a fixture app "asciidoc-app"
|
142
|
+
And a file named "config.rb" with:
|
143
|
+
"""
|
144
|
+
set :asciidoc_attributes, %w(source-highlighter=html-pipeline)
|
145
|
+
"""
|
146
|
+
Given the Server is running at "asciidoc-app"
|
147
|
+
When I go to "/code.html"
|
148
|
+
Then I should see:
|
149
|
+
"""
|
150
|
+
<div class="listingblock">
|
151
|
+
<div class="content">
|
152
|
+
<pre lang="ruby"><code>puts "Is this mic on?"</code></pre>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
"""
|
@@ -14,4 +14,19 @@ Feature: Built-in page_classes view helper
|
|
14
14
|
Scenario: Viewing a tier-2 path
|
15
15
|
Given the Server is running at "page-classes-app"
|
16
16
|
When I go to "/sub1/sub2/page-classes.html"
|
17
|
-
Then I should see "sub1 sub1_sub2 sub1_sub2_page-classes"
|
17
|
+
Then I should see "sub1 sub1_sub2 sub1_sub2_page-classes"
|
18
|
+
|
19
|
+
Scenario: The page starts with a number
|
20
|
+
Given the Server is running at "page-classes-app"
|
21
|
+
When I go to "/1-starts-with-numeric.html"
|
22
|
+
Then I should see "x1-starts-with-numeric"
|
23
|
+
|
24
|
+
Scenario: The folder starts with a number
|
25
|
+
Given the Server is running at "page-classes-app"
|
26
|
+
When I go to "/1-folder/1-inside-with-numeric.html"
|
27
|
+
Then I should see "x1-folder x1-folder_1-inside-with-numeric"
|
28
|
+
|
29
|
+
Scenario: Custom prefix for numeric
|
30
|
+
Given the Server is running at "page-classes-app"
|
31
|
+
When I go to "/2-starts-with-numeric-custom.html"
|
32
|
+
Then I should see "haaaaay2-starts-with-numeric-custom"
|
@@ -26,7 +26,7 @@ Feature: Markdown (Kramdown) support
|
|
26
26
|
|
27
27
|

|
28
28
|
|
29
|
-
|
29
|
+
(mailto:mail@mail.com)
|
30
30
|
"""
|
31
31
|
Given the Server is running at "markdown-app"
|
32
32
|
When I go to "/link_and_image/"
|
@@ -34,3 +34,5 @@ Feature: Markdown (Kramdown) support
|
|
34
34
|
Then I should see 'width="1"'
|
35
35
|
And I should see 'height="1"'
|
36
36
|
And I should see 'src="/images/blank.gif"'
|
37
|
+
And I should see 'src="/images/blank.gif"'
|
38
|
+
And I should see "mail@mail.com"
|
@@ -34,8 +34,9 @@ Feature: Markdown (Redcarpet) support
|
|
34
34
|
Then I should see "<sup>"
|
35
35
|
When I go to "/lax_spacing.html"
|
36
36
|
Then I should see "<p>hello</p>"
|
37
|
+
When I go to "/mailto.html"
|
38
|
+
Then I should see '<h1>✉ <a href="mailto:mail@mail.com">Mail</a></h1>'
|
37
39
|
|
38
|
-
@no18
|
39
40
|
Scenario: Redcarpet 3 extensions
|
40
41
|
Given a fixture app "markdown-app"
|
41
42
|
And a file named "config.rb" with:
|
data/features/queryable.feature
CHANGED
@@ -28,4 +28,8 @@ Feature: Queryable Selector
|
|
28
28
|
Then should support ordering by attribute ascending
|
29
29
|
Then should support ordering by attribute descending
|
30
30
|
Then should order by attribute ascending by default
|
31
|
-
Then should exclude documents that do not own the attribute
|
31
|
+
Then should exclude documents that do not own the attribute
|
32
|
+
Scenario: Passing queries around
|
33
|
+
Given a simple 'where' query
|
34
|
+
When I chain a where clause onto that query
|
35
|
+
Then the original query should remain unchanged
|
@@ -1,3 +1,15 @@
|
|
1
|
+
Given /^a simple 'where' query$/ do
|
2
|
+
@query = Middleman::Sitemap::Queryable::Query.new({}).where(:foo => 'bar')
|
3
|
+
end
|
4
|
+
|
5
|
+
When /^I chain a where clause onto that query$/ do
|
6
|
+
@new_query = @query.where(:baz => 'foo')
|
7
|
+
end
|
8
|
+
|
9
|
+
Then /^the original query should remain unchanged$/ do
|
10
|
+
@query.opts({}).should_not eql @new_query.opts({})
|
11
|
+
end
|
12
|
+
|
1
13
|
Then /^should initialize with an attribute and an operator$/ do
|
2
14
|
selector = ::Middleman::Sitemap::Queryable::Selector.new :attribute => :author, :operator => 'equal'
|
3
15
|
:author.should == selector.attribute
|
@@ -120,4 +132,4 @@ end
|
|
120
132
|
Then /^should exclude documents that do not own the attribute$/ do
|
121
133
|
found_documents = @server_inst.sitemap.order_by(:status).all
|
122
134
|
found_documents.map { |r| r.raw_data[:id] }.to_set.should == [1,2].to_set
|
123
|
-
end
|
135
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm included content.
|
@@ -0,0 +1 @@
|
|
1
|
+
image::tiger.gif[]
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
# ✉ [Mail](mailto:mail@mail.com)
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= page_classes %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= page_classes %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= page_classes :numeric_prefix => "haaaaay" %>
|
@@ -1,14 +1,18 @@
|
|
1
1
|
require "middleman-core"
|
2
2
|
require "fileutils"
|
3
|
+
require 'set'
|
3
4
|
|
4
5
|
# CLI Module
|
5
6
|
module Middleman::Cli
|
7
|
+
# Alias "b" to "build"
|
8
|
+
Base.map({ "b" => "build" })
|
6
9
|
|
7
10
|
# The CLI Build class
|
8
11
|
class Build < Thor
|
9
12
|
include Thor::Actions
|
10
13
|
|
11
14
|
attr_reader :debugging
|
15
|
+
attr_accessor :had_errors
|
12
16
|
|
13
17
|
check_unknown_options!
|
14
18
|
|
@@ -51,21 +55,19 @@ module Middleman::Cli
|
|
51
55
|
require 'find'
|
52
56
|
|
53
57
|
@debugging = Middleman::Cli::Base.respond_to?(:debugging) && Middleman::Cli::Base.debugging
|
54
|
-
|
58
|
+
self.had_errors = false
|
55
59
|
|
56
60
|
self.class.shared_instance(options["verbose"], options["instrument"])
|
57
61
|
|
58
|
-
self.class.shared_rack
|
59
|
-
|
60
62
|
opts = {}
|
61
|
-
opts[:glob] = options["glob"]
|
62
|
-
opts[:clean] = options["clean"]
|
63
|
+
opts[:glob] = options["glob"] if options.has_key?("glob")
|
64
|
+
opts[:clean] = options["clean"]
|
63
65
|
|
64
|
-
action
|
66
|
+
action BuildAction.new(self, opts)
|
65
67
|
|
66
68
|
self.class.shared_instance.run_hook :after_build, self
|
67
69
|
|
68
|
-
if
|
70
|
+
if self.had_errors && !self.debugging
|
69
71
|
msg = "There were errors during this build"
|
70
72
|
unless options["verbose"]
|
71
73
|
msg << ", re-run with `middleman build --verbose` to see the full exception."
|
@@ -73,7 +75,7 @@ module Middleman::Cli
|
|
73
75
|
self.shell.say msg, :red
|
74
76
|
end
|
75
77
|
|
76
|
-
exit(1) if
|
78
|
+
exit(1) if self.had_errors
|
77
79
|
end
|
78
80
|
|
79
81
|
# Static methods
|
@@ -91,88 +93,11 @@ module Middleman::Cli
|
|
91
93
|
logger(verbose ? 0 : 1, instrument)
|
92
94
|
end
|
93
95
|
end
|
94
|
-
|
95
|
-
# Middleman::Application class singleton
|
96
|
-
#
|
97
|
-
# @return [Middleman::Application]
|
98
|
-
def shared_server
|
99
|
-
@_shared_server ||= shared_instance.class
|
100
|
-
end
|
101
|
-
|
102
|
-
# Rack::Test::Session singleton
|
103
|
-
#
|
104
|
-
# @return [Rack::Test::Session]
|
105
|
-
def shared_rack
|
106
|
-
@_shared_rack ||= ::Rack::Test::Session.new(shared_server.to_rack_app)
|
107
|
-
end
|
108
|
-
|
109
|
-
# Set the root path to the Middleman::Application's root
|
110
|
-
def source_root
|
111
|
-
shared_instance.root
|
112
|
-
end
|
113
96
|
end
|
114
|
-
|
115
|
-
no_tasks {
|
116
|
-
# Render a resource to a file.
|
117
|
-
#
|
118
|
-
# @param [Middleman::Sitemap::Resource] resource
|
119
|
-
# @return [String] The full path of the file that was written
|
120
|
-
def render_to_file(resource)
|
121
|
-
build_dir = self.class.shared_instance.config[:build_dir]
|
122
|
-
output_file = File.join(build_dir, resource.destination_path.gsub('%20', ' '))
|
123
|
-
|
124
|
-
if resource.binary?
|
125
|
-
if !File.exists?(output_file)
|
126
|
-
say_status :create, output_file, :green
|
127
|
-
elsif FileUtils.compare_file(resource.source_file, output_file)
|
128
|
-
say_status :identical, output_file, :blue
|
129
|
-
return output_file
|
130
|
-
else
|
131
|
-
say_status :update, output_file, :yellow
|
132
|
-
end
|
133
|
-
|
134
|
-
FileUtils.mkdir_p(File.dirname(output_file))
|
135
|
-
FileUtils.cp(resource.source_file, output_file)
|
136
|
-
else
|
137
|
-
begin
|
138
|
-
response = self.class.shared_rack.get(URI.escape(resource.request_path))
|
139
|
-
|
140
|
-
if response.status == 200
|
141
|
-
create_file(output_file, binary_encode(response.body))
|
142
|
-
else
|
143
|
-
handle_error(output_file, response.body)
|
144
|
-
end
|
145
|
-
rescue => e
|
146
|
-
handle_error(output_file, "#{e}\n#{e.backtrace.join("\n")}", e)
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
output_file
|
151
|
-
end
|
152
|
-
|
153
|
-
def handle_error(file_name, response, e=Thor::Error.new(response))
|
154
|
-
@had_errors = true
|
155
|
-
|
156
|
-
say_status :error, file_name, :red
|
157
|
-
if self.debugging
|
158
|
-
raise e
|
159
|
-
exit(1)
|
160
|
-
elsif options["verbose"]
|
161
|
-
self.shell.say response, :red
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
def binary_encode(string)
|
166
|
-
if string.respond_to?(:force_encoding)
|
167
|
-
string.force_encoding("ascii-8bit")
|
168
|
-
end
|
169
|
-
string
|
170
|
-
end
|
171
|
-
}
|
172
97
|
end
|
173
98
|
|
174
99
|
# A Thor Action, modular code, which does the majority of the work.
|
175
|
-
class
|
100
|
+
class BuildAction < ::Thor::Actions::EmptyDirectory
|
176
101
|
attr_reader :source
|
177
102
|
attr_reader :logger
|
178
103
|
|
@@ -181,23 +106,23 @@ module Middleman::Cli
|
|
181
106
|
# @param [Middleman::Cli::Build] base
|
182
107
|
# @param [Hash] config
|
183
108
|
def initialize(base, config={})
|
184
|
-
@app
|
185
|
-
|
186
|
-
@
|
109
|
+
@app = base.class.shared_instance
|
110
|
+
@source_dir = Pathname(@app.source_dir)
|
111
|
+
@build_dir = Pathname(@app.build_dir)
|
112
|
+
@to_clean = Set.new
|
187
113
|
|
188
|
-
@
|
114
|
+
@logger = @app.logger
|
115
|
+
@rack = ::Rack::Test::Session.new(@app.class.to_rack_app)
|
189
116
|
|
190
|
-
@
|
191
|
-
|
192
|
-
super(base, @destination, config)
|
117
|
+
super(base, @build_dir, config)
|
193
118
|
end
|
194
119
|
|
195
120
|
# Execute the action
|
196
121
|
# @return [void]
|
197
122
|
def invoke!
|
198
|
-
queue_current_paths if
|
123
|
+
queue_current_paths if should_clean?
|
199
124
|
execute!
|
200
|
-
clean! if
|
125
|
+
clean! if should_clean?
|
201
126
|
end
|
202
127
|
|
203
128
|
protected
|
@@ -205,39 +130,36 @@ module Middleman::Cli
|
|
205
130
|
# Remove files which were not built in this cycle
|
206
131
|
# @return [void]
|
207
132
|
def clean!
|
208
|
-
@
|
133
|
+
@to_clean.each do |f|
|
209
134
|
base.remove_file f, :force => true
|
210
135
|
end
|
211
136
|
|
212
|
-
Dir[
|
213
|
-
|
214
|
-
}.each do |d|
|
215
|
-
base.remove_file d, :force => true if directory_empty? Pathname(d)
|
137
|
+
Dir[@build_dir.join("**", "*")].select {|d| File.directory?(d) }.each do |d|
|
138
|
+
base.remove_file d, :force => true if directory_empty? d
|
216
139
|
end
|
217
140
|
end
|
218
141
|
|
219
142
|
# Whether we should clean the build
|
220
143
|
# @return [Boolean]
|
221
|
-
def
|
222
|
-
@config
|
144
|
+
def should_clean?
|
145
|
+
@config[:clean]
|
223
146
|
end
|
224
147
|
|
225
148
|
# Whether the given directory is empty
|
226
|
-
# @param [String] directory
|
149
|
+
# @param [String, Pathname] directory
|
227
150
|
# @return [Boolean]
|
228
151
|
def directory_empty?(directory)
|
229
|
-
directory.children.empty?
|
152
|
+
Pathname(directory).children.empty?
|
230
153
|
end
|
231
154
|
|
232
|
-
# Get a list of all the paths in the destination folder and save them
|
155
|
+
# Get a list of all the file paths in the destination folder and save them
|
233
156
|
# for comparison against the files we build in this cycle
|
234
157
|
# @return [void]
|
235
158
|
def queue_current_paths
|
236
|
-
|
237
|
-
return unless File.exist?(@destination)
|
159
|
+
return unless File.exist?(@build_dir)
|
238
160
|
|
239
|
-
paths = ::Middleman::Util.all_files_under(@
|
240
|
-
@
|
161
|
+
paths = ::Middleman::Util.all_files_under(@build_dir).map(&:realpath).select(&:file?)
|
162
|
+
@to_clean += paths.select do |path|
|
241
163
|
path.to_s !~ /\/\./ || path.to_s =~ /\.(htaccess|htpasswd)/
|
242
164
|
end
|
243
165
|
end
|
@@ -254,13 +176,13 @@ module Middleman::Cli
|
|
254
176
|
@app.sitemap.resources.select do |resource|
|
255
177
|
resource.ext == ".css"
|
256
178
|
end.each do |resource|
|
257
|
-
|
179
|
+
@rack.get(URI.escape(resource.destination_path))
|
258
180
|
end
|
259
181
|
|
260
182
|
logger.debug "== Checking for Compass sprites"
|
261
183
|
|
262
184
|
# Double-check for compass sprites
|
263
|
-
@app.files.find_new_files((
|
185
|
+
@app.files.find_new_files((@source_dir + @app.images_dir).relative_path_from(@app.root_path))
|
264
186
|
@app.sitemap.ensure_resource_list_updated!
|
265
187
|
|
266
188
|
# Sort paths to be built by the above order. This is primarily so Compass can
|
@@ -273,24 +195,79 @@ module Middleman::Cli
|
|
273
195
|
sort_order.index(r.ext) || 100
|
274
196
|
end
|
275
197
|
|
198
|
+
if @build_dir.expand_path.relative_path_from(@source_dir).to_s =~ /\A[.\/]+\Z/
|
199
|
+
raise ":build_dir (#{@build_dir}) cannot be a parent of :source_dir (#{@source_dir})"
|
200
|
+
end
|
201
|
+
|
276
202
|
# Loop over all the paths and build them.
|
277
203
|
resources.each do |resource|
|
278
204
|
next if @config[:glob] && !File.fnmatch(@config[:glob], resource.destination_path)
|
279
205
|
|
280
|
-
output_path =
|
206
|
+
output_path = render_to_file(resource)
|
281
207
|
|
282
|
-
if
|
283
|
-
|
284
|
-
@cleaning_queue.delete(pn.realpath) if pn.exist?
|
208
|
+
if should_clean?
|
209
|
+
@to_clean.delete(output_path.realpath) if output_path.exist?
|
285
210
|
end
|
286
211
|
end
|
287
212
|
|
288
213
|
::Middleman::Profiling.report("build")
|
289
214
|
end
|
290
|
-
end
|
291
215
|
|
292
|
-
|
293
|
-
|
216
|
+
# Render a resource to a file.
|
217
|
+
#
|
218
|
+
# @param [Middleman::Sitemap::Resource] resource
|
219
|
+
# @return [Pathname] The full path of the file that was written
|
220
|
+
def render_to_file(resource)
|
221
|
+
output_file = @build_dir + resource.destination_path.gsub('%20', ' ')
|
222
|
+
|
223
|
+
if resource.binary?
|
224
|
+
if !output_file.exist?
|
225
|
+
base.say_status :create, output_file, :green
|
226
|
+
elsif FileUtils.compare_file(resource.source_file, output_file)
|
227
|
+
base.say_status :identical, output_file, :blue
|
228
|
+
return output_file
|
229
|
+
else
|
230
|
+
base.say_status :update, output_file, :yellow
|
231
|
+
end
|
232
|
+
|
233
|
+
output_file.dirname.mkpath
|
234
|
+
FileUtils.cp(resource.source_file, output_file)
|
235
|
+
else
|
236
|
+
begin
|
237
|
+
response = @rack.get(URI.escape(resource.request_path))
|
238
|
+
|
239
|
+
if response.status == 200
|
240
|
+
base.create_file(output_file, binary_encode(response.body))
|
241
|
+
else
|
242
|
+
handle_error(output_file, response.body)
|
243
|
+
end
|
244
|
+
rescue => e
|
245
|
+
handle_error(output_file, "#{e}\n#{e.backtrace.join("\n")}", e)
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
output_file
|
250
|
+
end
|
251
|
+
|
252
|
+
def handle_error(file_name, response, e=Thor::Error.new(response))
|
253
|
+
base.had_errors = true
|
254
|
+
|
255
|
+
base.say_status :error, file_name, :red
|
256
|
+
if base.debugging
|
257
|
+
raise e
|
258
|
+
exit(1)
|
259
|
+
elsif base.options["verbose"]
|
260
|
+
base.shell.say response, :red
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
def binary_encode(string)
|
265
|
+
if string.respond_to?(:force_encoding)
|
266
|
+
string.force_encoding("ascii-8bit")
|
267
|
+
end
|
268
|
+
string
|
269
|
+
end
|
270
|
+
end
|
294
271
|
end
|
295
272
|
|
296
273
|
# Quiet down create file
|
@@ -56,6 +56,13 @@ module Middleman
|
|
56
56
|
require "middleman-core/renderers/markdown"
|
57
57
|
app.register Middleman::Renderers::Markdown
|
58
58
|
|
59
|
+
# AsciiDoc Support
|
60
|
+
begin
|
61
|
+
require "middleman-core/renderers/asciidoc"
|
62
|
+
app.register Middleman::Renderers::AsciiDoc
|
63
|
+
rescue LoadError
|
64
|
+
end
|
65
|
+
|
59
66
|
# Liquid Support
|
60
67
|
begin
|
61
68
|
require "middleman-core/renderers/liquid"
|
@@ -2,6 +2,7 @@
|
|
2
2
|
require "rack"
|
3
3
|
require "rack/file"
|
4
4
|
require "rack/lint"
|
5
|
+
require "rack/head"
|
5
6
|
|
6
7
|
module Middleman
|
7
8
|
module CoreExtensions
|
@@ -69,6 +70,7 @@ module Middleman
|
|
69
70
|
@rack_app ||= begin
|
70
71
|
app = ::Rack::Builder.new
|
71
72
|
app.use Rack::Lint
|
73
|
+
app.use Rack::Head
|
72
74
|
|
73
75
|
Array(@middleware).each do |klass, options, block|
|
74
76
|
app.use(klass, *options, &block)
|
@@ -1,15 +1,14 @@
|
|
1
1
|
# Use the Ruby/Rails logger
|
2
|
-
require 'active_support/
|
2
|
+
require 'active_support/notifications'
|
3
|
+
require 'active_support/buffered_logger'
|
3
4
|
require 'thread'
|
4
5
|
|
5
6
|
module Middleman
|
6
7
|
|
7
8
|
# The Middleman Logger
|
8
|
-
class Logger < ::
|
9
|
-
|
10
|
-
|
11
|
-
def initialize(log_level=1, is_instrumenting=false, target=STDOUT)
|
12
|
-
super(STDOUT)
|
9
|
+
class Logger < ActiveSupport::BufferedLogger
|
10
|
+
def initialize(log_level=1, is_instrumenting=false, target=$stdout)
|
11
|
+
super(target)
|
13
12
|
|
14
13
|
self.level = log_level
|
15
14
|
@instrumenting = is_instrumenting
|
@@ -17,7 +17,7 @@ module Middleman
|
|
17
17
|
@host = @options[:host] || Socket.gethostname
|
18
18
|
@port = @options[:port] || DEFAULT_PORT
|
19
19
|
|
20
|
-
mount_instance
|
20
|
+
mount_instance(new_app)
|
21
21
|
logger.info "== The Middleman is standing watch at http://#{host}:#{port}"
|
22
22
|
logger.info "== Inspect your site configuration at http://#{host}:#{port}/__middleman/"
|
23
23
|
|
@@ -31,12 +31,17 @@ module Middleman
|
|
31
31
|
# reloading later on.
|
32
32
|
::Middleman::Profiling.report("server_start")
|
33
33
|
|
34
|
-
|
34
|
+
loop do
|
35
|
+
@webrick.start
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
# $mm_shutdown is set by the signal handler
|
38
|
+
if $mm_shutdown
|
39
|
+
shutdown
|
40
|
+
exit
|
41
|
+
elsif $mm_reload
|
42
|
+
$mm_reload = false
|
43
|
+
reload
|
44
|
+
end
|
40
45
|
end
|
41
46
|
end
|
42
47
|
end
|
@@ -62,10 +67,18 @@ module Middleman
|
|
62
67
|
def reload
|
63
68
|
logger.info "== The Middleman is reloading"
|
64
69
|
|
70
|
+
begin
|
71
|
+
app = new_app
|
72
|
+
rescue Exception => e
|
73
|
+
logger.error "Error reloading Middleman: #{e}\n#{e.backtrace.join("\n")}"
|
74
|
+
logger.info "== The Middleman is still running the application from before the error"
|
75
|
+
return
|
76
|
+
end
|
77
|
+
|
65
78
|
unmount_instance
|
66
|
-
mount_instance
|
79
|
+
mount_instance(app)
|
67
80
|
|
68
|
-
logger.info "== The Middleman
|
81
|
+
logger.info "== The Middleman has reloaded"
|
69
82
|
end
|
70
83
|
|
71
84
|
# Stop the current instance, exit Webrick
|
@@ -112,7 +125,8 @@ module Middleman
|
|
112
125
|
|
113
126
|
# See if the changed file is config.rb or lib/*.rb
|
114
127
|
if needs_to_reload?(added_and_modified + removed)
|
115
|
-
|
128
|
+
$mm_reload = true
|
129
|
+
@webrick.stop
|
116
130
|
else
|
117
131
|
added_and_modified.each do |path|
|
118
132
|
app.files.did_change(path)
|
@@ -168,8 +182,8 @@ module Middleman
|
|
168
182
|
# Attach a new Middleman::Application instance
|
169
183
|
# @param [Middleman::Application] app
|
170
184
|
# @return [void]
|
171
|
-
def mount_instance
|
172
|
-
@app =
|
185
|
+
def mount_instance(app)
|
186
|
+
@app = app
|
173
187
|
|
174
188
|
@webrick ||= setup_webrick(@options[:debug] || false)
|
175
189
|
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'asciidoctor'
|
2
|
+
|
3
|
+
module Middleman
|
4
|
+
module Renderers
|
5
|
+
module AsciiDoc
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def registered(app)
|
9
|
+
app.config.define_setting :asciidoc, {
|
10
|
+
:safe => :safe,
|
11
|
+
:backend => :html5,
|
12
|
+
:attributes => %W(showtitle env=middleman env-middleman middleman-version=#{::Middleman::VERSION})
|
13
|
+
}, 'AsciiDoc engine options (Hash)'
|
14
|
+
app.config.define_setting :asciidoc_attributes, [], 'AsciiDoc custom attributes (Array)'
|
15
|
+
app.before_configuration do
|
16
|
+
template_extensions :adoc => :html
|
17
|
+
end
|
18
|
+
|
19
|
+
app.after_configuration do
|
20
|
+
# QUESTION should base_dir be equal to docdir instead?
|
21
|
+
config[:asciidoc][:base_dir] = source_dir
|
22
|
+
config[:asciidoc][:attributes].concat(config[:asciidoc_attributes] || [])
|
23
|
+
config[:asciidoc][:attributes] << %(imagesdir=#{File.join((config[:http_prefix] || '/').chomp('/'), config[:images_dir])})
|
24
|
+
sitemap.provides_metadata(/\.adoc$/) do |path|
|
25
|
+
# read the AsciiDoc header only to set page options and data
|
26
|
+
# header values can be accessed via app.data.page.<name> in the layout
|
27
|
+
doc = Asciidoctor.load_file path, :safe => :safe, :parse_header_only => true
|
28
|
+
|
29
|
+
opts = {}
|
30
|
+
if doc.attr? 'page-layout'
|
31
|
+
case (layout = (doc.attr 'page-layout'))
|
32
|
+
when '', 'false'
|
33
|
+
opts[:layout] = false
|
34
|
+
else
|
35
|
+
opts[:layout] = layout
|
36
|
+
end
|
37
|
+
end
|
38
|
+
opts[:layout_engine] = (doc.attr 'page-layout-engine') if (doc.attr? 'page-layout-engine')
|
39
|
+
# TODO override attributes to set docfile, docdir, docname, etc
|
40
|
+
# alternative is to set :renderer_options, which get merged into options by the rendering extension
|
41
|
+
#opts[:attributes] = config[:asciidoc][:attributes].dup
|
42
|
+
#opts[:attributes].concat %W(docfile=#{path} docdir=#{File.dirname path} docname=#{(File.basename path).sub(/\.adoc$/, '')})
|
43
|
+
|
44
|
+
page = {}
|
45
|
+
page[:title] = doc.doctitle
|
46
|
+
page[:date] = (doc.attr 'date') unless (doc.attr 'date').nil?
|
47
|
+
# TODO grab all the author information
|
48
|
+
page[:author] = (doc.attr 'author') unless (doc.attr 'author').nil?
|
49
|
+
|
50
|
+
{:options => opts, :page => ::Middleman::Util.recursively_enhance(page)}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
alias :included :registered
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -20,19 +20,22 @@ module Middleman
|
|
20
20
|
|
21
21
|
def convert_img(el, indent)
|
22
22
|
attrs = el.attr.dup
|
23
|
+
|
23
24
|
link = attrs.delete('src')
|
24
25
|
middleman_app.image_tag(link, attrs)
|
25
26
|
end
|
26
27
|
|
27
28
|
def convert_a(el, indent)
|
28
29
|
content = inner(el, indent)
|
29
|
-
|
30
|
-
if attr['href'] =~ /\Amailto:/
|
31
|
-
mail_addr = attr['href'].sub(/\Amailto:/, '')
|
32
|
-
|
30
|
+
|
31
|
+
if el.attr['href'] =~ /\Amailto:/
|
32
|
+
mail_addr = el.attr['href'].sub(/\Amailto:/, '')
|
33
|
+
href = obfuscate('mailto') << ":" << obfuscate(mail_addr)
|
33
34
|
content = obfuscate(content) if content == mail_addr
|
35
|
+
return %Q{<a href="#{href}">#{content}</a>}
|
34
36
|
end
|
35
37
|
|
38
|
+
attr = el.attr.dup
|
36
39
|
link = attr.delete('href')
|
37
40
|
middleman_app.link_to(content, link, attr)
|
38
41
|
end
|
@@ -65,9 +65,12 @@ module Middleman
|
|
65
65
|
end
|
66
66
|
|
67
67
|
class Query
|
68
|
-
def initialize(model)
|
68
|
+
def initialize(model, opts={})
|
69
69
|
@model = model
|
70
|
-
@where = {}
|
70
|
+
@where = opts[:where] || {}
|
71
|
+
@order_by = opts[:order_by]
|
72
|
+
@offset = opts[:offset]
|
73
|
+
@limit = opts[:limit]
|
71
74
|
end
|
72
75
|
|
73
76
|
def where(constraints_hash)
|
@@ -77,23 +80,27 @@ module Middleman
|
|
77
80
|
selector = Selector.new(:attribute => attribute, :operator => 'equal')
|
78
81
|
selector_hash.update({ selector => value })
|
79
82
|
end
|
80
|
-
@where.merge
|
81
|
-
|
83
|
+
Query.new @model, opts(:where => @where.merge(selector_hash))
|
84
|
+
end
|
85
|
+
|
86
|
+
def opts new_opts
|
87
|
+
{ :where => {}.merge(@where),
|
88
|
+
:order_by => @order_by,
|
89
|
+
:offset => @offset,
|
90
|
+
:limit => @limit
|
91
|
+
}.merge(new_opts)
|
82
92
|
end
|
83
93
|
|
84
94
|
def order_by(field)
|
85
|
-
@order_by
|
86
|
-
self
|
95
|
+
Query.new @model, opts(:order_by => field.is_a?(Symbol) ? {field => :asc} : field)
|
87
96
|
end
|
88
97
|
|
89
98
|
def offset(number)
|
90
|
-
@offset
|
91
|
-
self
|
99
|
+
Query.new @model, opts(:offset => number)
|
92
100
|
end
|
93
101
|
|
94
102
|
def limit(number)
|
95
|
-
@limit
|
96
|
-
self
|
103
|
+
Query.new @model, opts(:limit => number)
|
97
104
|
end
|
98
105
|
|
99
106
|
def first
|
@@ -145,4 +152,4 @@ class Symbol
|
|
145
152
|
self.to_s <=> other.to_s
|
146
153
|
end
|
147
154
|
end
|
148
|
-
end
|
155
|
+
end
|
@@ -60,18 +60,17 @@ module Middleman
|
|
60
60
|
|
61
61
|
file_meta = store.metadata_for_file(source_file).dup
|
62
62
|
if file_meta.has_key?(:blocks)
|
63
|
-
result[:blocks]
|
63
|
+
result[:blocks] += file_meta.delete(:blocks)
|
64
64
|
end
|
65
65
|
result.deep_merge!(file_meta)
|
66
66
|
|
67
67
|
local_meta = @local_metadata.dup
|
68
68
|
if local_meta.has_key?(:blocks)
|
69
|
-
result[:blocks]
|
69
|
+
result[:blocks] += local_meta.delete(:blocks)
|
70
70
|
end
|
71
71
|
result.deep_merge!(local_meta)
|
72
72
|
|
73
73
|
result[:blocks] = result[:blocks].flatten.compact
|
74
|
-
|
75
74
|
result
|
76
75
|
end
|
77
76
|
|
@@ -80,10 +79,10 @@ module Middleman
|
|
80
79
|
def add_metadata(metadata={}, &block)
|
81
80
|
metadata = metadata.dup
|
82
81
|
if metadata.has_key?(:blocks)
|
83
|
-
@local_metadata[:blocks]
|
82
|
+
@local_metadata[:blocks] += metadata.delete(:blocks)
|
84
83
|
end
|
85
84
|
@local_metadata.deep_merge!(metadata)
|
86
|
-
@local_metadata[:blocks]
|
85
|
+
@local_metadata[:blocks] += [ block ] if block_given?
|
87
86
|
end
|
88
87
|
|
89
88
|
# Get the output/preview URL for this resource
|
@@ -3,9 +3,4 @@ source 'https://rubygems.org'
|
|
3
3
|
gem "middleman", "~><%= Middleman::VERSION %>"
|
4
4
|
|
5
5
|
# For faster file watcher updates on Windows:
|
6
|
-
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
7
|
-
|
8
|
-
# Cross-templating language block fix for Ruby 1.8
|
9
|
-
platforms :mri_18 do
|
10
|
-
gem "ruby18_source_location"
|
11
|
-
end
|
6
|
+
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
@@ -8,9 +8,4 @@ gem "middleman", "~><%= Middleman::VERSION %>"
|
|
8
8
|
gem "middleman-livereload", "~> 3.1.0"
|
9
9
|
|
10
10
|
# For faster file watcher updates on Windows:
|
11
|
-
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
12
|
-
|
13
|
-
# Cross-templating language block fix for Ruby 1.8
|
14
|
-
platforms :mri_18 do
|
15
|
-
gem "ruby18_source_location"
|
16
|
-
end
|
11
|
+
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
data/lib/middleman-core/util.rb
CHANGED
@@ -48,6 +48,9 @@ module Middleman
|
|
48
48
|
# @return [Middleman::Logger] The logger
|
49
49
|
def self.logger(*args)
|
50
50
|
if !@_logger || args.length > 0
|
51
|
+
if args.length == 1 && (args.first.is_a?(::String) || args.first.respond_to?(:write))
|
52
|
+
args = [0, false, args.first]
|
53
|
+
end
|
51
54
|
@_logger = ::Middleman::Logger.new(*args)
|
52
55
|
end
|
53
56
|
|
@@ -1,14 +1,3 @@
|
|
1
|
-
# Required to hack around Padrino blocks within different template types.
|
2
|
-
require 'rbconfig'
|
3
|
-
if RUBY_VERSION =~ /1.8/ && RbConfig::CONFIG['ruby_install_name'] == 'ruby'
|
4
|
-
begin
|
5
|
-
require 'ruby18_source_location'
|
6
|
-
rescue LoadError
|
7
|
-
$stderr.puts "Ruby 1.8 requires the 'ruby18_source_location' gem be added to your Gemfile"
|
8
|
-
exit(1)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
1
|
if !defined?(::Padrino::Helpers)
|
13
2
|
require 'vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/support_lite'
|
14
3
|
require 'vendored-middleman-deps/padrino-helpers-0.11.2/lib/padrino-helpers'
|
@@ -132,7 +121,7 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
|
132
121
|
# Generate body css classes based on the current path
|
133
122
|
#
|
134
123
|
# @return [String]
|
135
|
-
def page_classes
|
124
|
+
def page_classes(options={})
|
136
125
|
path = current_path.dup
|
137
126
|
path << index_file if path.end_with?('/')
|
138
127
|
path = ::Middleman::Util.strip_leading_slash(path)
|
@@ -141,7 +130,15 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
|
141
130
|
parts = path.split('.').first.split('/')
|
142
131
|
parts.each_with_index { |path, i| classes << parts.first(i+1).join('_') }
|
143
132
|
|
144
|
-
|
133
|
+
prefix = options[:numeric_prefix] || "x"
|
134
|
+
classes.map do |c|
|
135
|
+
# Replace weird class name characters
|
136
|
+
c = c.gsub(/[^a-zA-Z0-9\-_]/, '-')
|
137
|
+
|
138
|
+
# Class names can't start with a digit
|
139
|
+
c = "#{prefix}#{c}" if c =~ /\A\d/
|
140
|
+
c
|
141
|
+
end.join(' ')
|
145
142
|
end
|
146
143
|
|
147
144
|
# Get the path of a file of a given type
|
data/middleman-core.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Reynolds
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- Rakefile
|
146
146
|
- bin/middleman
|
147
147
|
- features/3rd_party_cli.feature
|
148
|
+
- features/asciidoc.feature
|
148
149
|
- features/asset_hash.feature
|
149
150
|
- features/asset_host.feature
|
150
151
|
- features/auto_layout.feature
|
@@ -239,6 +240,19 @@ files:
|
|
239
240
|
- features/v3_extensions.feature
|
240
241
|
- features/v4_extension_callbacks.feature
|
241
242
|
- features/wildcard_page_helper.feature
|
243
|
+
- fixtures/asciidoc-app/config.rb
|
244
|
+
- fixtures/asciidoc-app/source/_include.adoc
|
245
|
+
- fixtures/asciidoc-app/source/code.adoc
|
246
|
+
- fixtures/asciidoc-app/source/custom-attribute.adoc
|
247
|
+
- fixtures/asciidoc-app/source/gallery.adoc
|
248
|
+
- fixtures/asciidoc-app/source/hello-no-layout.adoc
|
249
|
+
- fixtures/asciidoc-app/source/hello-with-front-matter.adoc
|
250
|
+
- fixtures/asciidoc-app/source/hello-with-layout.adoc
|
251
|
+
- fixtures/asciidoc-app/source/hello-with-title.adoc
|
252
|
+
- fixtures/asciidoc-app/source/hello.adoc
|
253
|
+
- fixtures/asciidoc-app/source/images/tiger.gif
|
254
|
+
- fixtures/asciidoc-app/source/layouts/default.erb
|
255
|
+
- fixtures/asciidoc-app/source/master.adoc
|
242
256
|
- fixtures/asset-hash-app/config.rb
|
243
257
|
- fixtures/asset-hash-app/lib/middleware.rb
|
244
258
|
- fixtures/asset-hash-app/source/apple-touch-icon.png
|
@@ -592,6 +606,7 @@ files:
|
|
592
606
|
- fixtures/markdown-app/source/index.html.markdown
|
593
607
|
- fixtures/markdown-app/source/lax_spacing.html.markdown
|
594
608
|
- fixtures/markdown-app/source/link.html.markdown
|
609
|
+
- fixtures/markdown-app/source/mailto.html.markdown
|
595
610
|
- fixtures/markdown-app/source/no_intra_emphasis.html.markdown
|
596
611
|
- fixtures/markdown-app/source/prettify.html.markdown
|
597
612
|
- fixtures/markdown-app/source/quote.html.markdown
|
@@ -717,6 +732,9 @@ files:
|
|
717
732
|
- fixtures/padrino-helpers-app/config.rb
|
718
733
|
- fixtures/padrino-helpers-app/source/former_padrino_test.html.erb
|
719
734
|
- fixtures/page-classes-app/config.rb
|
735
|
+
- fixtures/page-classes-app/source/1-folder/1-inside-with-numeric.html.erb
|
736
|
+
- fixtures/page-classes-app/source/1-starts-with-numeric.html.erb
|
737
|
+
- fixtures/page-classes-app/source/2-starts-with-numeric-custom.html.erb
|
720
738
|
- fixtures/page-classes-app/source/page-classes.html.erb
|
721
739
|
- fixtures/page-classes-app/source/sub1/page-classes.html.erb
|
722
740
|
- fixtures/page-classes-app/source/sub1/sub2/page-classes.html.erb
|
@@ -956,6 +974,7 @@ files:
|
|
956
974
|
- lib/middleman-core/meta_pages/templates/sitemap.html.erb
|
957
975
|
- lib/middleman-core/preview_server.rb
|
958
976
|
- lib/middleman-core/profiling.rb
|
977
|
+
- lib/middleman-core/renderers/asciidoc.rb
|
959
978
|
- lib/middleman-core/renderers/coffee_script.rb
|
960
979
|
- lib/middleman-core/renderers/erb.rb
|
961
980
|
- lib/middleman-core/renderers/haml.rb
|
@@ -1348,7 +1367,8 @@ homepage: http://middlemanapp.com
|
|
1348
1367
|
licenses:
|
1349
1368
|
- MIT
|
1350
1369
|
metadata: {}
|
1351
|
-
post_install_message:
|
1370
|
+
post_install_message: 'NOTICE: Middleman v3.2.x and greater no longer support Ruby
|
1371
|
+
1.8'
|
1352
1372
|
rdoc_options: []
|
1353
1373
|
require_paths:
|
1354
1374
|
- lib
|
@@ -1364,12 +1384,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1364
1384
|
version: '0'
|
1365
1385
|
requirements: []
|
1366
1386
|
rubyforge_project:
|
1367
|
-
rubygems_version: 2.0.
|
1387
|
+
rubygems_version: 2.0.3
|
1368
1388
|
signing_key:
|
1369
1389
|
specification_version: 4
|
1370
1390
|
summary: Hand-crafted frontend development
|
1371
1391
|
test_files:
|
1372
1392
|
- features/3rd_party_cli.feature
|
1393
|
+
- features/asciidoc.feature
|
1373
1394
|
- features/asset_hash.feature
|
1374
1395
|
- features/asset_host.feature
|
1375
1396
|
- features/auto_layout.feature
|
@@ -1464,6 +1485,19 @@ test_files:
|
|
1464
1485
|
- features/v3_extensions.feature
|
1465
1486
|
- features/v4_extension_callbacks.feature
|
1466
1487
|
- features/wildcard_page_helper.feature
|
1488
|
+
- fixtures/asciidoc-app/config.rb
|
1489
|
+
- fixtures/asciidoc-app/source/_include.adoc
|
1490
|
+
- fixtures/asciidoc-app/source/code.adoc
|
1491
|
+
- fixtures/asciidoc-app/source/custom-attribute.adoc
|
1492
|
+
- fixtures/asciidoc-app/source/gallery.adoc
|
1493
|
+
- fixtures/asciidoc-app/source/hello-no-layout.adoc
|
1494
|
+
- fixtures/asciidoc-app/source/hello-with-front-matter.adoc
|
1495
|
+
- fixtures/asciidoc-app/source/hello-with-layout.adoc
|
1496
|
+
- fixtures/asciidoc-app/source/hello-with-title.adoc
|
1497
|
+
- fixtures/asciidoc-app/source/hello.adoc
|
1498
|
+
- fixtures/asciidoc-app/source/images/tiger.gif
|
1499
|
+
- fixtures/asciidoc-app/source/layouts/default.erb
|
1500
|
+
- fixtures/asciidoc-app/source/master.adoc
|
1467
1501
|
- fixtures/asset-hash-app/config.rb
|
1468
1502
|
- fixtures/asset-hash-app/lib/middleware.rb
|
1469
1503
|
- fixtures/asset-hash-app/source/apple-touch-icon.png
|
@@ -1817,6 +1851,7 @@ test_files:
|
|
1817
1851
|
- fixtures/markdown-app/source/index.html.markdown
|
1818
1852
|
- fixtures/markdown-app/source/lax_spacing.html.markdown
|
1819
1853
|
- fixtures/markdown-app/source/link.html.markdown
|
1854
|
+
- fixtures/markdown-app/source/mailto.html.markdown
|
1820
1855
|
- fixtures/markdown-app/source/no_intra_emphasis.html.markdown
|
1821
1856
|
- fixtures/markdown-app/source/prettify.html.markdown
|
1822
1857
|
- fixtures/markdown-app/source/quote.html.markdown
|
@@ -1942,6 +1977,9 @@ test_files:
|
|
1942
1977
|
- fixtures/padrino-helpers-app/config.rb
|
1943
1978
|
- fixtures/padrino-helpers-app/source/former_padrino_test.html.erb
|
1944
1979
|
- fixtures/page-classes-app/config.rb
|
1980
|
+
- fixtures/page-classes-app/source/1-folder/1-inside-with-numeric.html.erb
|
1981
|
+
- fixtures/page-classes-app/source/1-starts-with-numeric.html.erb
|
1982
|
+
- fixtures/page-classes-app/source/2-starts-with-numeric-custom.html.erb
|
1945
1983
|
- fixtures/page-classes-app/source/page-classes.html.erb
|
1946
1984
|
- fixtures/page-classes-app/source/sub1/page-classes.html.erb
|
1947
1985
|
- fixtures/page-classes-app/source/sub1/sub2/page-classes.html.erb
|