pith 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.markdown +1 -1
- data/cucumber.yml +1 -1
- data/features/layouts.feature +7 -7
- data/features/relative_linking.feature +2 -2
- data/features/step_definitions/build_steps.rb +1 -1
- data/features/textile.feature +11 -5
- data/lib/pith/input.rb +1 -0
- data/lib/pith/plugins/compass.rb +1 -1
- data/lib/pith/render_context.rb +0 -3
- data/lib/pith/version.rb +1 -1
- data/spec/pith/config_spec.rb +9 -9
- data/spec/pith/input_spec.rb +17 -9
- data/spec/pith/pathname_ext_spec.rb +5 -5
- data/spec/pith/plugins/publication_spec.rb +7 -7
- data/spec/pith/project_spec.rb +13 -13
- data/spec/pith/server_spec.rb +8 -9
- data/spec/spec_helper.rb +2 -0
- metadata +74 -140
- data/features/content_for.feature~ +0 -29
- data/features/haml.feature~ +0 -24
- data/features/helpers.feature~ +0 -23
- data/features/ignorance.feature~ +0 -37
- data/features/include.feature~ +0 -84
- data/features/incremental_rebuild.feature~ +0 -24
- data/features/layouts.feature~ +0 -63
- data/features/linking.feature~ +0 -79
- data/features/metadata.feature~ +0 -20
- data/features/relative_linking.feature~ +0 -109
- data/features/step_definitions/build_steps.rb~ +0 -66
- data/features/support/env.rb~ +0 -86
- data/features/support/rspec_matchers.rb~ +0 -5
- data/features/textile.feature~ +0 -29
- data/features/verbatim.feature~ +0 -32
- data/lib/pith.rb~ +0 -1
- data/lib/pith/console_logger.rb~ +0 -16
- data/lib/pith/input.rb~ +0 -20
- data/lib/pith/metadata.rb~ +0 -26
- data/lib/pith/pathname_ext.rb~ +0 -16
- data/lib/pith/plugins/publication.rb~ +0 -2
- data/lib/pith/plugins/publication/input.rb~ +0 -50
- data/lib/pith/plugins/publication/project.rb~ +0 -14
- data/lib/pith/project.rb~ +0 -143
- data/lib/pith/reference_error.rb~ +0 -5
- data/lib/pith/render_context.rb~ +0 -117
- data/lib/pith/server.rb~ +0 -46
- data/lib/pith/version.rb~ +0 -3
- data/lib/pith/watcher.rb~ +0 -32
- data/sample/_out/index.html +0 -14
- data/sample/_out/stylesheets/app.css +0 -38
data/spec/pith/server_spec.rb
CHANGED
@@ -5,10 +5,10 @@ require 'rack/mock'
|
|
5
5
|
describe Pith::Server::OutputFinder do
|
6
6
|
|
7
7
|
let(:output_path) { "dir/index.html" }
|
8
|
-
let(:output) {
|
8
|
+
let(:output) { double(:path => Pathname(output_path), :build => true) }
|
9
9
|
|
10
10
|
let(:project) do
|
11
|
-
|
11
|
+
double(:outputs => [output])
|
12
12
|
end
|
13
13
|
|
14
14
|
let(:app) do
|
@@ -51,12 +51,12 @@ describe Pith::Server::OutputFinder do
|
|
51
51
|
let(:request_uri) { "/bogus.html" }
|
52
52
|
|
53
53
|
it "does not build the output" do
|
54
|
-
output.
|
54
|
+
expect(output).not_to receive(:build)
|
55
55
|
result_path
|
56
56
|
end
|
57
57
|
|
58
58
|
it "passes on the env unchanged" do
|
59
|
-
result_path.
|
59
|
+
expect(result_path).to eq("/bogus.html")
|
60
60
|
end
|
61
61
|
|
62
62
|
end
|
@@ -68,12 +68,12 @@ describe Pith::Server::OutputFinder do
|
|
68
68
|
let(:request_uri) { uri }
|
69
69
|
|
70
70
|
it "builds the output" do
|
71
|
-
output.
|
71
|
+
expect(output).to receive(:build)
|
72
72
|
result_path
|
73
73
|
end
|
74
74
|
|
75
75
|
it "passes on request" do
|
76
|
-
result_path.
|
76
|
+
expect(result_path).to eq("/dir/index.html")
|
77
77
|
end
|
78
78
|
|
79
79
|
end
|
@@ -91,11 +91,10 @@ describe Pith::Server::OutputFinder do
|
|
91
91
|
let(:request_uri) { "/dir" }
|
92
92
|
|
93
93
|
it "redirects" do
|
94
|
-
result_status.
|
95
|
-
result_headers["Location"].
|
94
|
+
expect(result_status).to eq(302)
|
95
|
+
expect(result_headers["Location"]).to eq("/dir/")
|
96
96
|
end
|
97
97
|
|
98
98
|
end
|
99
99
|
|
100
100
|
end
|
101
|
-
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,113 +1,100 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mike Williams
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: tilt
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '2.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '2.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rack
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: '2.0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
version: '2.0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: thin
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
47
|
+
version: 1.7.0
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
54
|
+
version: 1.7.0
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: clamp
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
61
|
+
version: 1.2.1
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
68
|
+
version: 1.2.1
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: listen
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
|
-
version: '1
|
75
|
+
version: '3.1'
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
|
-
version: '1
|
82
|
+
version: '3.1'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: rack-livejs
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: 0.2.1
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: 0.2.1
|
110
|
-
description:
|
97
|
+
description: 'Pith builds static websites, using markup/template languages including
|
111
98
|
Haml, Sass, ERb, Liquid, Markdown and Textile.
|
112
99
|
|
113
100
|
'
|
@@ -117,46 +104,52 @@ executables:
|
|
117
104
|
extensions: []
|
118
105
|
extra_rdoc_files: []
|
119
106
|
files:
|
107
|
+
- LICENSE
|
108
|
+
- README.markdown
|
109
|
+
- Rakefile
|
110
|
+
- bin/pith
|
111
|
+
- cucumber.yml
|
112
|
+
- features/cleanup.feature
|
113
|
+
- features/compass.feature
|
114
|
+
- features/content_for.feature
|
115
|
+
- features/error_handling.feature
|
116
|
+
- features/haml.feature
|
117
|
+
- features/helpers.feature
|
118
|
+
- features/ignorance.feature
|
119
|
+
- features/include.feature
|
120
|
+
- features/incremental_rebuild.feature
|
121
|
+
- features/layouts.feature
|
122
|
+
- features/link_attributes.feature
|
123
|
+
- features/markdown.feature
|
124
|
+
- features/metadata.feature
|
125
|
+
- features/pipeline.feature
|
126
|
+
- features/relative_linking.feature
|
127
|
+
- features/resources.feature
|
128
|
+
- features/step_definitions/build_steps.rb
|
129
|
+
- features/support/env.rb
|
130
|
+
- features/support/rspec_matchers.rb
|
131
|
+
- features/textile.feature
|
132
|
+
- lib/pith.rb
|
120
133
|
- lib/pith/config.rb
|
121
134
|
- lib/pith/config_provider.rb
|
122
135
|
- lib/pith/console_logger.rb
|
123
|
-
- lib/pith/console_logger.rb~
|
124
136
|
- lib/pith/input.rb
|
125
|
-
- lib/pith/input.rb~
|
126
|
-
- lib/pith/metadata.rb~
|
127
137
|
- lib/pith/observable.rb
|
128
138
|
- lib/pith/output.rb
|
129
139
|
- lib/pith/pathname_ext.rb
|
130
|
-
- lib/pith/pathname_ext.rb~
|
131
140
|
- lib/pith/plugins/compass.rb
|
141
|
+
- lib/pith/plugins/publication.rb
|
132
142
|
- lib/pith/plugins/publication/input.rb
|
133
|
-
- lib/pith/plugins/publication/input.rb~
|
134
143
|
- lib/pith/plugins/publication/project.rb
|
135
|
-
- lib/pith/plugins/publication/project.rb~
|
136
|
-
- lib/pith/plugins/publication.rb
|
137
|
-
- lib/pith/plugins/publication.rb~
|
138
144
|
- lib/pith/project.rb
|
139
|
-
- lib/pith/project.rb~
|
140
145
|
- lib/pith/reference_error.rb
|
141
|
-
- lib/pith/reference_error.rb~
|
142
146
|
- lib/pith/render_context.rb
|
143
|
-
- lib/pith/render_context.rb~
|
144
147
|
- lib/pith/server.rb
|
145
|
-
- lib/pith/server.rb~
|
146
148
|
- lib/pith/version.rb
|
147
|
-
- lib/pith/version.rb~
|
148
149
|
- lib/pith/watcher.rb
|
149
|
-
- lib/pith/watcher.rb~
|
150
|
-
- lib/pith.rb
|
151
|
-
- lib/pith.rb~
|
152
150
|
- sample/_layouts/standard.haml
|
153
|
-
- sample/_out/index.html
|
154
|
-
- sample/_out/stylesheets/app.css
|
155
151
|
- sample/index.html.haml
|
156
152
|
- sample/stylesheets/app.css.sass
|
157
|
-
- README.markdown
|
158
|
-
- LICENSE
|
159
|
-
- Rakefile
|
160
153
|
- spec/pith/config_spec.rb
|
161
154
|
- spec/pith/input_spec.rb
|
162
155
|
- spec/pith/pathname_ext_spec.rb
|
@@ -164,116 +157,57 @@ files:
|
|
164
157
|
- spec/pith/project_spec.rb
|
165
158
|
- spec/pith/server_spec.rb
|
166
159
|
- spec/spec_helper.rb
|
167
|
-
- features/cleanup.feature
|
168
|
-
- features/compass.feature
|
169
|
-
- features/content_for.feature
|
170
|
-
- features/content_for.feature~
|
171
|
-
- features/error_handling.feature
|
172
|
-
- features/haml.feature
|
173
|
-
- features/haml.feature~
|
174
|
-
- features/helpers.feature
|
175
|
-
- features/helpers.feature~
|
176
|
-
- features/ignorance.feature
|
177
|
-
- features/ignorance.feature~
|
178
|
-
- features/include.feature
|
179
|
-
- features/include.feature~
|
180
|
-
- features/incremental_rebuild.feature
|
181
|
-
- features/incremental_rebuild.feature~
|
182
|
-
- features/layouts.feature
|
183
|
-
- features/layouts.feature~
|
184
|
-
- features/link_attributes.feature
|
185
|
-
- features/linking.feature~
|
186
|
-
- features/markdown.feature
|
187
|
-
- features/metadata.feature
|
188
|
-
- features/metadata.feature~
|
189
|
-
- features/pipeline.feature
|
190
|
-
- features/relative_linking.feature
|
191
|
-
- features/relative_linking.feature~
|
192
|
-
- features/resources.feature
|
193
|
-
- features/step_definitions/build_steps.rb
|
194
|
-
- features/step_definitions/build_steps.rb~
|
195
|
-
- features/support/env.rb
|
196
|
-
- features/support/env.rb~
|
197
|
-
- features/support/rspec_matchers.rb
|
198
|
-
- features/support/rspec_matchers.rb~
|
199
|
-
- features/textile.feature
|
200
|
-
- features/textile.feature~
|
201
|
-
- features/verbatim.feature~
|
202
|
-
- cucumber.yml
|
203
|
-
- bin/pith
|
204
160
|
homepage: http://github.com/mdub/pith
|
205
161
|
licenses:
|
206
162
|
- MIT
|
163
|
+
metadata: {}
|
207
164
|
post_install_message:
|
208
165
|
rdoc_options: []
|
209
166
|
require_paths:
|
210
167
|
- lib
|
211
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
212
|
-
none: false
|
213
169
|
requirements:
|
214
|
-
- -
|
170
|
+
- - ">="
|
215
171
|
- !ruby/object:Gem::Version
|
216
172
|
version: '0'
|
217
|
-
segments:
|
218
|
-
- 0
|
219
|
-
hash: -2482242163062205897
|
220
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
-
none: false
|
222
174
|
requirements:
|
223
|
-
- -
|
175
|
+
- - ">="
|
224
176
|
- !ruby/object:Gem::Version
|
225
177
|
version: '0'
|
226
|
-
segments:
|
227
|
-
- 0
|
228
|
-
hash: -2482242163062205897
|
229
178
|
requirements: []
|
230
179
|
rubyforge_project:
|
231
|
-
rubygems_version:
|
180
|
+
rubygems_version: 2.6.13
|
232
181
|
signing_key:
|
233
|
-
specification_version:
|
182
|
+
specification_version: 4
|
234
183
|
summary: A static website generator
|
235
184
|
test_files:
|
236
185
|
- Rakefile
|
237
|
-
- spec/
|
238
|
-
- spec/pith/input_spec.rb
|
186
|
+
- spec/spec_helper.rb
|
239
187
|
- spec/pith/pathname_ext_spec.rb
|
240
|
-
- spec/pith/
|
241
|
-
- spec/pith/project_spec.rb
|
188
|
+
- spec/pith/config_spec.rb
|
242
189
|
- spec/pith/server_spec.rb
|
243
|
-
- spec/
|
244
|
-
-
|
190
|
+
- spec/pith/project_spec.rb
|
191
|
+
- spec/pith/plugins/publication_spec.rb
|
192
|
+
- spec/pith/input_spec.rb
|
245
193
|
- features/compass.feature
|
246
|
-
- features/
|
247
|
-
- features/content_for.feature~
|
194
|
+
- features/markdown.feature
|
248
195
|
- features/error_handling.feature
|
196
|
+
- features/resources.feature
|
197
|
+
- features/link_attributes.feature
|
249
198
|
- features/haml.feature
|
250
|
-
- features/haml.feature~
|
251
|
-
- features/helpers.feature
|
252
|
-
- features/helpers.feature~
|
253
199
|
- features/ignorance.feature
|
254
|
-
- features/
|
255
|
-
- features/include.feature
|
256
|
-
- features/include.feature~
|
257
|
-
- features/incremental_rebuild.feature
|
258
|
-
- features/incremental_rebuild.feature~
|
200
|
+
- features/pipeline.feature
|
259
201
|
- features/layouts.feature
|
260
|
-
- features/
|
261
|
-
- features/link_attributes.feature
|
262
|
-
- features/linking.feature~
|
263
|
-
- features/markdown.feature
|
202
|
+
- features/include.feature
|
264
203
|
- features/metadata.feature
|
265
|
-
- features/
|
266
|
-
- features/pipeline.feature
|
267
|
-
- features/relative_linking.feature
|
268
|
-
- features/relative_linking.feature~
|
269
|
-
- features/resources.feature
|
270
|
-
- features/step_definitions/build_steps.rb
|
271
|
-
- features/step_definitions/build_steps.rb~
|
272
|
-
- features/support/env.rb
|
273
|
-
- features/support/env.rb~
|
204
|
+
- features/cleanup.feature
|
274
205
|
- features/support/rspec_matchers.rb
|
275
|
-
- features/support/
|
206
|
+
- features/support/env.rb
|
207
|
+
- features/content_for.feature
|
208
|
+
- features/step_definitions/build_steps.rb
|
209
|
+
- features/relative_linking.feature
|
276
210
|
- features/textile.feature
|
277
|
-
- features/
|
278
|
-
- features/
|
211
|
+
- features/helpers.feature
|
212
|
+
- features/incremental_rebuild.feature
|
279
213
|
- cucumber.yml
|
@@ -1,29 +0,0 @@
|
|
1
|
-
Feature: templates can be used as layouts
|
2
|
-
|
3
|
-
I want to encapsulate a chunk of content
|
4
|
-
So that I can use it inside a layout
|
5
|
-
|
6
|
-
Scenario: Haml template with a layout
|
7
|
-
|
8
|
-
Given input file "index.html.haml" contains
|
9
|
-
"""
|
10
|
-
= include "_layout.haml" do
|
11
|
-
- content_for[:sidebar] = capture_haml do
|
12
|
-
%p SIDEBAR
|
13
|
-
%p MAIN
|
14
|
-
"""
|
15
|
-
And input file "_layout.haml" contains
|
16
|
-
"""
|
17
|
-
#sidebar
|
18
|
-
= content_for[:sidebar]
|
19
|
-
= yield
|
20
|
-
"""
|
21
|
-
|
22
|
-
When I build the site
|
23
|
-
Then output file "index.html" should contain
|
24
|
-
"""
|
25
|
-
<div id='sidebar'>
|
26
|
-
<p>SIDEBAR</p>
|
27
|
-
</div>
|
28
|
-
<p>MAIN</p>
|
29
|
-
"""
|
data/features/haml.feature~
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
Feature: support for Haml
|
2
|
-
|
3
|
-
I want to build pages using Haml
|
4
|
-
So that I can express markup succintly
|
5
|
-
|
6
|
-
Scenario: simple Haml page
|
7
|
-
|
8
|
-
Given input file "index.html.haml" contains
|
9
|
-
"""
|
10
|
-
%h1 Header
|
11
|
-
|
12
|
-
%p
|
13
|
-
Some text
|
14
|
-
"""
|
15
|
-
|
16
|
-
When I build the site
|
17
|
-
|
18
|
-
Then output file "index.html" should contain
|
19
|
-
"""
|
20
|
-
<h1>Header</h1>
|
21
|
-
<p>
|
22
|
-
Some text
|
23
|
-
</p>
|
24
|
-
"""
|