middleman-asciidoc 1.0.0.rc.3 → 1.0.0.rc.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +8 -5
- data/README.adoc +2 -2
- data/features/asciidoc-blog.feature +122 -0
- data/features/{asciidoc.feature → asciidoc-pages.feature} +105 -91
- data/features/support/env.rb +2 -2
- data/fixtures/asciidoc-blog-app/config-asciidoc-layout.rb +9 -0
- data/fixtures/asciidoc-blog-app/config-date-in-filename.rb +9 -0
- data/fixtures/asciidoc-blog-app/config-published-only.rb +10 -0
- data/fixtures/asciidoc-blog-app/config.rb +9 -0
- data/fixtures/asciidoc-blog-app/source/blog-2/2017-09-01-a-fresh-start.adoc +5 -0
- data/fixtures/asciidoc-blog-app/source/blog/custom-layout.adoc +6 -0
- data/fixtures/asciidoc-blog-app/source/blog/ignored.adoc +6 -0
- data/fixtures/asciidoc-blog-app/source/blog/joint-effort.adoc +5 -0
- data/fixtures/asciidoc-blog-app/source/blog/more-tags.adoc +6 -0
- data/fixtures/asciidoc-blog-app/source/blog/not-published.adoc +6 -0
- data/fixtures/asciidoc-blog-app/source/blog/say-my-name.adoc +6 -0
- data/fixtures/asciidoc-blog-app/source/blog/tags-tags-tags.adoc +6 -0
- data/fixtures/asciidoc-blog-app/source/blog/welcome.adoc +5 -0
- data/fixtures/asciidoc-blog-app/source/index.html.erb +5 -0
- data/fixtures/asciidoc-blog-app/source/layouts/article.erb +25 -0
- data/fixtures/asciidoc-blog-app/source/layouts/asciidoc_page.erb +9 -0
- data/fixtures/asciidoc-pages-app/config-default-layout.rb +2 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/config.rb +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/_include.adoc +0 -0
- data/fixtures/asciidoc-pages-app/source/backend.adoc +5 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/code.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/custom-attribute.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/custom-imagesdir.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/gallery.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/hello-with-extension.html.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/hello-with-front-matter.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/hello-with-mixed-page-data.adoc +0 -0
- data/fixtures/{asciidoc-app/source/hello-with-title.adoc → asciidoc-pages-app/source/hello-with-title-and-tags.adoc} +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/hello.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/ignored.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/images/tiger.gif +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/inspect-standard-page-data.html.erb +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/layouts/default.erb +0 -0
- data/fixtures/asciidoc-pages-app/source/layouts/inspect-page-data.erb +9 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/layouts/showdate.erb +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/link-to-page.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/manual/_chapters/ch01.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/manual/index.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/master.adoc +0 -0
- data/fixtures/asciidoc-pages-app/source/page-data.adoc +12 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/page-with-date-at-zone.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/page-with-date.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/safe-mode.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/site-information.adoc +0 -0
- data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/standard-page-data.adoc +0 -0
- data/lib/middleman-asciidoc/extension.rb +2 -2
- data/lib/middleman-asciidoc/version.rb +1 -1
- metadata +97 -55
data/features/support/env.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
PROJECT_ROOT_PATH = File.
|
1
|
+
PROJECT_ROOT_PATH = File.expand_path '../../..', __FILE__
|
2
2
|
ENV['TEST'] = 'true'
|
3
3
|
require 'middleman-core'
|
4
4
|
require 'middleman-core/step_definitions'
|
5
|
-
require File.join
|
5
|
+
require File.join PROJECT_ROOT_PATH, 'lib', 'middleman-asciidoc'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= current_article.title %></title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<% if is_blog_article? %>
|
8
|
+
<article>
|
9
|
+
<header>
|
10
|
+
<span>by <%= current_article.data.authors * ', ' %></span>
|
11
|
+
<time datetime="<%= current_article.date.getutc.iso8601 %>"><%= current_article.date.strftime '%b %e, %Y' %></time>
|
12
|
+
<% unless current_article.tags.empty? %>
|
13
|
+
<span class="tags">
|
14
|
+
<% current_article.tags.sort.each do |tag| %>
|
15
|
+
<span class="tag"><%= tag %></span>
|
16
|
+
<% end %>
|
17
|
+
</span>
|
18
|
+
<% end %>
|
19
|
+
</header>
|
20
|
+
<h1><%= current_article.title %></h1>
|
21
|
+
<%= yield %>
|
22
|
+
</article>
|
23
|
+
<% end %>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/fixtures/{asciidoc-app → asciidoc-pages-app}/source/inspect-standard-page-data.html.erb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= Page Data
|
2
|
+
:page-layout: inspect-page-data
|
3
|
+
:page-v-empty:
|
4
|
+
:page-v-quote: '
|
5
|
+
:page-v-dblquote: "
|
6
|
+
:page-v-null: ~
|
7
|
+
:page-v-num: 1
|
8
|
+
:page-v-true: true
|
9
|
+
:page-v-false: false
|
10
|
+
:page-v-numarray: [1, 2, 3]
|
11
|
+
:page-v-chrarray: [a, b, c]
|
12
|
+
:page-v-hash: { a: a, b: b, c: c }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -129,7 +129,7 @@ module Middleman
|
|
129
129
|
opts[:layout_engine] = doc.attr 'page-layout-engine' if doc.attr? 'page-layout-engine'
|
130
130
|
else
|
131
131
|
case (layout = layout.to_sym)
|
132
|
-
when
|
132
|
+
when :~, :null
|
133
133
|
opts[:layout] = false
|
134
134
|
when :false
|
135
135
|
opts[:layout] = false
|
@@ -217,7 +217,7 @@ module Middleman
|
|
217
217
|
def derive_page_variable_name attribute_name
|
218
218
|
if attribute_name != 'page-layout' && attribute_name != 'page-layout-engine' && attribute_name != 'page-ignored' &&
|
219
219
|
(attribute_name.start_with? 'page-')
|
220
|
-
attribute_name.slice 5, attribute_name.length
|
220
|
+
(attribute_name.slice 5, attribute_name.length).to_sym
|
221
221
|
end
|
222
222
|
end
|
223
223
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-asciidoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.rc.
|
4
|
+
version: 1.0.0.rc.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Allen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -53,33 +53,54 @@ files:
|
|
53
53
|
- LICENSE.adoc
|
54
54
|
- README.adoc
|
55
55
|
- Rakefile
|
56
|
-
- features/asciidoc.feature
|
56
|
+
- features/asciidoc-blog.feature
|
57
|
+
- features/asciidoc-pages.feature
|
57
58
|
- features/support/env.rb
|
58
|
-
- fixtures/asciidoc-app/config.rb
|
59
|
-
- fixtures/asciidoc-app/
|
60
|
-
- fixtures/asciidoc-app/
|
61
|
-
- fixtures/asciidoc-app/
|
62
|
-
- fixtures/asciidoc-app/source/
|
63
|
-
- fixtures/asciidoc-app/source/
|
64
|
-
- fixtures/asciidoc-app/source/
|
65
|
-
- fixtures/asciidoc-app/source/
|
66
|
-
- fixtures/asciidoc-app/source/
|
67
|
-
- fixtures/asciidoc-app/source/
|
68
|
-
- fixtures/asciidoc-app/source/
|
69
|
-
- fixtures/asciidoc-app/source/
|
70
|
-
- fixtures/asciidoc-app/source/
|
71
|
-
- fixtures/asciidoc-app/source/
|
72
|
-
- fixtures/asciidoc-app/source/layouts/
|
73
|
-
- fixtures/asciidoc-app/source/layouts/
|
74
|
-
- fixtures/asciidoc-app/
|
75
|
-
- fixtures/asciidoc-app/
|
76
|
-
- fixtures/asciidoc-app/source/
|
77
|
-
- fixtures/asciidoc-app/source/
|
78
|
-
- fixtures/asciidoc-app/source/
|
79
|
-
- fixtures/asciidoc-app/source/
|
80
|
-
- fixtures/asciidoc-app/source/
|
81
|
-
- fixtures/asciidoc-app/source/
|
82
|
-
- fixtures/asciidoc-app/source/
|
59
|
+
- fixtures/asciidoc-blog-app/config-asciidoc-layout.rb
|
60
|
+
- fixtures/asciidoc-blog-app/config-date-in-filename.rb
|
61
|
+
- fixtures/asciidoc-blog-app/config-published-only.rb
|
62
|
+
- fixtures/asciidoc-blog-app/config.rb
|
63
|
+
- fixtures/asciidoc-blog-app/source/blog-2/2017-09-01-a-fresh-start.adoc
|
64
|
+
- fixtures/asciidoc-blog-app/source/blog/custom-layout.adoc
|
65
|
+
- fixtures/asciidoc-blog-app/source/blog/ignored.adoc
|
66
|
+
- fixtures/asciidoc-blog-app/source/blog/joint-effort.adoc
|
67
|
+
- fixtures/asciidoc-blog-app/source/blog/more-tags.adoc
|
68
|
+
- fixtures/asciidoc-blog-app/source/blog/not-published.adoc
|
69
|
+
- fixtures/asciidoc-blog-app/source/blog/say-my-name.adoc
|
70
|
+
- fixtures/asciidoc-blog-app/source/blog/tags-tags-tags.adoc
|
71
|
+
- fixtures/asciidoc-blog-app/source/blog/welcome.adoc
|
72
|
+
- fixtures/asciidoc-blog-app/source/index.html.erb
|
73
|
+
- fixtures/asciidoc-blog-app/source/layouts/article.erb
|
74
|
+
- fixtures/asciidoc-blog-app/source/layouts/asciidoc_page.erb
|
75
|
+
- fixtures/asciidoc-pages-app/config-default-layout.rb
|
76
|
+
- fixtures/asciidoc-pages-app/config.rb
|
77
|
+
- fixtures/asciidoc-pages-app/source/_include.adoc
|
78
|
+
- fixtures/asciidoc-pages-app/source/backend.adoc
|
79
|
+
- fixtures/asciidoc-pages-app/source/code.adoc
|
80
|
+
- fixtures/asciidoc-pages-app/source/custom-attribute.adoc
|
81
|
+
- fixtures/asciidoc-pages-app/source/custom-imagesdir.adoc
|
82
|
+
- fixtures/asciidoc-pages-app/source/gallery.adoc
|
83
|
+
- fixtures/asciidoc-pages-app/source/hello-with-extension.html.adoc
|
84
|
+
- fixtures/asciidoc-pages-app/source/hello-with-front-matter.adoc
|
85
|
+
- fixtures/asciidoc-pages-app/source/hello-with-mixed-page-data.adoc
|
86
|
+
- fixtures/asciidoc-pages-app/source/hello-with-title-and-tags.adoc
|
87
|
+
- fixtures/asciidoc-pages-app/source/hello.adoc
|
88
|
+
- fixtures/asciidoc-pages-app/source/ignored.adoc
|
89
|
+
- fixtures/asciidoc-pages-app/source/images/tiger.gif
|
90
|
+
- fixtures/asciidoc-pages-app/source/inspect-standard-page-data.html.erb
|
91
|
+
- fixtures/asciidoc-pages-app/source/layouts/default.erb
|
92
|
+
- fixtures/asciidoc-pages-app/source/layouts/inspect-page-data.erb
|
93
|
+
- fixtures/asciidoc-pages-app/source/layouts/showdate.erb
|
94
|
+
- fixtures/asciidoc-pages-app/source/link-to-page.adoc
|
95
|
+
- fixtures/asciidoc-pages-app/source/manual/_chapters/ch01.adoc
|
96
|
+
- fixtures/asciidoc-pages-app/source/manual/index.adoc
|
97
|
+
- fixtures/asciidoc-pages-app/source/master.adoc
|
98
|
+
- fixtures/asciidoc-pages-app/source/page-data.adoc
|
99
|
+
- fixtures/asciidoc-pages-app/source/page-with-date-at-zone.adoc
|
100
|
+
- fixtures/asciidoc-pages-app/source/page-with-date.adoc
|
101
|
+
- fixtures/asciidoc-pages-app/source/safe-mode.adoc
|
102
|
+
- fixtures/asciidoc-pages-app/source/site-information.adoc
|
103
|
+
- fixtures/asciidoc-pages-app/source/standard-page-data.adoc
|
83
104
|
- lib/middleman-asciidoc.rb
|
84
105
|
- lib/middleman-asciidoc/extension.rb
|
85
106
|
- lib/middleman-asciidoc/middleman_extension.rb
|
@@ -105,35 +126,56 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
126
|
version: 1.3.1
|
106
127
|
requirements: []
|
107
128
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.7.
|
129
|
+
rubygems_version: 2.7.3
|
109
130
|
signing_key:
|
110
131
|
specification_version: 4
|
111
132
|
summary: AsciiDoc support for Middleman
|
112
133
|
test_files:
|
113
|
-
- features/asciidoc.feature
|
134
|
+
- features/asciidoc-blog.feature
|
135
|
+
- features/asciidoc-pages.feature
|
114
136
|
- features/support/env.rb
|
115
|
-
- fixtures/asciidoc-app/config.rb
|
116
|
-
- fixtures/asciidoc-app/
|
117
|
-
- fixtures/asciidoc-app/
|
118
|
-
- fixtures/asciidoc-app/
|
119
|
-
- fixtures/asciidoc-app/source/
|
120
|
-
- fixtures/asciidoc-app/source/
|
121
|
-
- fixtures/asciidoc-app/source/
|
122
|
-
- fixtures/asciidoc-app/source/
|
123
|
-
- fixtures/asciidoc-app/source/
|
124
|
-
- fixtures/asciidoc-app/source/
|
125
|
-
- fixtures/asciidoc-app/source/
|
126
|
-
- fixtures/asciidoc-app/source/
|
127
|
-
- fixtures/asciidoc-app/source/
|
128
|
-
- fixtures/asciidoc-app/source/
|
129
|
-
- fixtures/asciidoc-app/source/layouts/
|
130
|
-
- fixtures/asciidoc-app/source/layouts/
|
131
|
-
- fixtures/asciidoc-app/
|
132
|
-
- fixtures/asciidoc-app/
|
133
|
-
- fixtures/asciidoc-app/source/
|
134
|
-
- fixtures/asciidoc-app/source/
|
135
|
-
- fixtures/asciidoc-app/source/
|
136
|
-
- fixtures/asciidoc-app/source/
|
137
|
-
- fixtures/asciidoc-app/source/
|
138
|
-
- fixtures/asciidoc-app/source/
|
139
|
-
- fixtures/asciidoc-app/source/
|
137
|
+
- fixtures/asciidoc-blog-app/config-asciidoc-layout.rb
|
138
|
+
- fixtures/asciidoc-blog-app/config-date-in-filename.rb
|
139
|
+
- fixtures/asciidoc-blog-app/config-published-only.rb
|
140
|
+
- fixtures/asciidoc-blog-app/config.rb
|
141
|
+
- fixtures/asciidoc-blog-app/source/blog-2/2017-09-01-a-fresh-start.adoc
|
142
|
+
- fixtures/asciidoc-blog-app/source/blog/custom-layout.adoc
|
143
|
+
- fixtures/asciidoc-blog-app/source/blog/ignored.adoc
|
144
|
+
- fixtures/asciidoc-blog-app/source/blog/joint-effort.adoc
|
145
|
+
- fixtures/asciidoc-blog-app/source/blog/more-tags.adoc
|
146
|
+
- fixtures/asciidoc-blog-app/source/blog/not-published.adoc
|
147
|
+
- fixtures/asciidoc-blog-app/source/blog/say-my-name.adoc
|
148
|
+
- fixtures/asciidoc-blog-app/source/blog/tags-tags-tags.adoc
|
149
|
+
- fixtures/asciidoc-blog-app/source/blog/welcome.adoc
|
150
|
+
- fixtures/asciidoc-blog-app/source/index.html.erb
|
151
|
+
- fixtures/asciidoc-blog-app/source/layouts/article.erb
|
152
|
+
- fixtures/asciidoc-blog-app/source/layouts/asciidoc_page.erb
|
153
|
+
- fixtures/asciidoc-pages-app/config-default-layout.rb
|
154
|
+
- fixtures/asciidoc-pages-app/config.rb
|
155
|
+
- fixtures/asciidoc-pages-app/source/_include.adoc
|
156
|
+
- fixtures/asciidoc-pages-app/source/backend.adoc
|
157
|
+
- fixtures/asciidoc-pages-app/source/code.adoc
|
158
|
+
- fixtures/asciidoc-pages-app/source/custom-attribute.adoc
|
159
|
+
- fixtures/asciidoc-pages-app/source/custom-imagesdir.adoc
|
160
|
+
- fixtures/asciidoc-pages-app/source/gallery.adoc
|
161
|
+
- fixtures/asciidoc-pages-app/source/hello-with-extension.html.adoc
|
162
|
+
- fixtures/asciidoc-pages-app/source/hello-with-front-matter.adoc
|
163
|
+
- fixtures/asciidoc-pages-app/source/hello-with-mixed-page-data.adoc
|
164
|
+
- fixtures/asciidoc-pages-app/source/hello-with-title-and-tags.adoc
|
165
|
+
- fixtures/asciidoc-pages-app/source/hello.adoc
|
166
|
+
- fixtures/asciidoc-pages-app/source/ignored.adoc
|
167
|
+
- fixtures/asciidoc-pages-app/source/images/tiger.gif
|
168
|
+
- fixtures/asciidoc-pages-app/source/inspect-standard-page-data.html.erb
|
169
|
+
- fixtures/asciidoc-pages-app/source/layouts/default.erb
|
170
|
+
- fixtures/asciidoc-pages-app/source/layouts/inspect-page-data.erb
|
171
|
+
- fixtures/asciidoc-pages-app/source/layouts/showdate.erb
|
172
|
+
- fixtures/asciidoc-pages-app/source/link-to-page.adoc
|
173
|
+
- fixtures/asciidoc-pages-app/source/manual/_chapters/ch01.adoc
|
174
|
+
- fixtures/asciidoc-pages-app/source/manual/index.adoc
|
175
|
+
- fixtures/asciidoc-pages-app/source/master.adoc
|
176
|
+
- fixtures/asciidoc-pages-app/source/page-data.adoc
|
177
|
+
- fixtures/asciidoc-pages-app/source/page-with-date-at-zone.adoc
|
178
|
+
- fixtures/asciidoc-pages-app/source/page-with-date.adoc
|
179
|
+
- fixtures/asciidoc-pages-app/source/safe-mode.adoc
|
180
|
+
- fixtures/asciidoc-pages-app/source/site-information.adoc
|
181
|
+
- fixtures/asciidoc-pages-app/source/standard-page-data.adoc
|