mint 0.2.9 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +45 -283
- data/bin/mint +10 -10
- data/bin/mint-epub +23 -0
- data/features/plugins/epub.feature +23 -0
- data/features/publish.feature +73 -0
- data/features/support/env.rb +1 -1
- data/lib/mint.rb +1 -0
- data/lib/mint/commandline.rb +3 -3
- data/lib/mint/document.rb +46 -5
- data/lib/mint/helpers.rb +65 -4
- data/lib/mint/mint.rb +6 -7
- data/lib/mint/plugin.rb +136 -0
- data/lib/mint/plugins/epub.rb +292 -0
- data/lib/mint/version.rb +1 -1
- data/plugins/templates/epub/container.haml +5 -0
- data/plugins/templates/epub/content.haml +36 -0
- data/plugins/templates/epub/layout.haml +6 -0
- data/plugins/templates/epub/title.haml +11 -0
- data/plugins/templates/epub/toc.haml +26 -0
- data/spec/commandline_spec.rb +91 -0
- data/spec/document_spec.rb +48 -9
- data/spec/helpers_spec.rb +231 -0
- data/spec/layout_spec.rb +6 -0
- data/spec/mint_spec.rb +94 -0
- data/spec/plugin_spec.rb +457 -0
- data/spec/plugins/epub_spec.rb +242 -0
- data/spec/resource_spec.rb +135 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/style_spec.rb +69 -0
- metadata +103 -34
- data/features/mint_document.feature +0 -48
- data/features/step_definitions/mint_steps.rb +0 -1
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-15 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: tilt
|
16
|
-
requirement: &
|
16
|
+
requirement: &70164764165920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70164764165920
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdiscount
|
27
|
-
requirement: &
|
27
|
+
requirement: &70164764165440 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70164764165440
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: erubis
|
38
|
-
requirement: &
|
38
|
+
requirement: &70164764165000 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70164764165000
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: haml
|
49
|
-
requirement: &
|
49
|
+
requirement: &70164764164560 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70164764164560
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: sass
|
60
|
-
requirement: &
|
60
|
+
requirement: &70164764164040 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70164764164040
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdiscount
|
71
|
-
requirement: &
|
71
|
+
requirement: &70164764163620 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70164764163620
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: liquid
|
82
|
-
requirement: &
|
82
|
+
requirement: &70164764163180 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70164764163180
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: less
|
93
|
-
requirement: &
|
93
|
+
requirement: &70164764162740 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70164764162740
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: radius
|
104
|
-
requirement: &
|
104
|
+
requirement: &70164764162300 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70164764162300
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: markaby
|
115
|
-
requirement: &
|
115
|
+
requirement: &70164764161880 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,54 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70164764161880
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: active_support
|
126
|
+
requirement: &70164764161460 !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: *70164764161460
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: nokogiri
|
137
|
+
requirement: &70164764161020 !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
type: :runtime
|
144
|
+
prerelease: false
|
145
|
+
version_requirements: *70164764161020
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: hashie
|
148
|
+
requirement: &70164764160600 !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ! '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
type: :runtime
|
155
|
+
prerelease: false
|
156
|
+
version_requirements: *70164764160600
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: rubyzip
|
159
|
+
requirement: &70164764160180 !ruby/object:Gem::Requirement
|
160
|
+
none: false
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
type: :runtime
|
166
|
+
prerelease: false
|
167
|
+
version_requirements: *70164764160180
|
124
168
|
- !ruby/object:Gem::Dependency
|
125
169
|
name: rspec
|
126
|
-
requirement: &
|
170
|
+
requirement: &70164764159760 !ruby/object:Gem::Requirement
|
127
171
|
none: false
|
128
172
|
requirements:
|
129
173
|
- - ! '>='
|
@@ -131,10 +175,10 @@ dependencies:
|
|
131
175
|
version: '0'
|
132
176
|
type: :development
|
133
177
|
prerelease: false
|
134
|
-
version_requirements: *
|
178
|
+
version_requirements: *70164764159760
|
135
179
|
- !ruby/object:Gem::Dependency
|
136
180
|
name: cucumber
|
137
|
-
requirement: &
|
181
|
+
requirement: &70164764155220 !ruby/object:Gem::Requirement
|
138
182
|
none: false
|
139
183
|
requirements:
|
140
184
|
- - ! '>='
|
@@ -142,10 +186,10 @@ dependencies:
|
|
142
186
|
version: '0'
|
143
187
|
type: :development
|
144
188
|
prerelease: false
|
145
|
-
version_requirements: *
|
189
|
+
version_requirements: *70164764155220
|
146
190
|
- !ruby/object:Gem::Dependency
|
147
191
|
name: aruba
|
148
|
-
requirement: &
|
192
|
+
requirement: &70164764154580 !ruby/object:Gem::Requirement
|
149
193
|
none: false
|
150
194
|
requirements:
|
151
195
|
- - ! '>='
|
@@ -153,16 +197,18 @@ dependencies:
|
|
153
197
|
version: '0'
|
154
198
|
type: :development
|
155
199
|
prerelease: false
|
156
|
-
version_requirements: *
|
200
|
+
version_requirements: *70164764154580
|
157
201
|
description:
|
158
202
|
email: david@wit.io
|
159
203
|
executables:
|
160
204
|
- mint
|
205
|
+
- mint-epub
|
161
206
|
extensions: []
|
162
207
|
extra_rdoc_files: []
|
163
208
|
files:
|
164
209
|
- README.md
|
165
210
|
- bin/mint
|
211
|
+
- bin/mint-epub
|
166
212
|
- lib/mint.rb
|
167
213
|
- lib/mint/helpers.rb
|
168
214
|
- lib/mint/exceptions.rb
|
@@ -174,17 +220,32 @@ files:
|
|
174
220
|
- lib/mint/version.rb
|
175
221
|
- lib/mint/css.rb
|
176
222
|
- lib/mint/commandline.rb
|
223
|
+
- lib/mint/plugin.rb
|
224
|
+
- lib/mint/plugins/epub.rb
|
177
225
|
- config/syntax.yaml
|
178
226
|
- templates/base/style.sass
|
179
227
|
- templates/default/layout.haml
|
180
228
|
- templates/default/style.sass
|
181
229
|
- templates/pro/layout.haml
|
182
230
|
- templates/pro/style.sass
|
183
|
-
-
|
184
|
-
-
|
231
|
+
- plugins/templates/epub/container.haml
|
232
|
+
- plugins/templates/epub/layout.haml
|
233
|
+
- plugins/templates/epub/title.haml
|
234
|
+
- plugins/templates/epub/toc.haml
|
235
|
+
- plugins/templates/epub/content.haml
|
185
236
|
- features/support/env.rb
|
186
|
-
-
|
237
|
+
- features/publish.feature
|
238
|
+
- features/plugins/epub.feature
|
187
239
|
- spec/spec_helper.rb
|
240
|
+
- spec/helpers_spec.rb
|
241
|
+
- spec/mint_spec.rb
|
242
|
+
- spec/resource_spec.rb
|
243
|
+
- spec/layout_spec.rb
|
244
|
+
- spec/style_spec.rb
|
245
|
+
- spec/document_spec.rb
|
246
|
+
- spec/commandline_spec.rb
|
247
|
+
- spec/plugin_spec.rb
|
248
|
+
- spec/plugins/epub_spec.rb
|
188
249
|
homepage: http://github.com/davejacobs/mint
|
189
250
|
licenses: []
|
190
251
|
post_install_message:
|
@@ -211,8 +272,16 @@ specification_version: 3
|
|
211
272
|
summary: Clean, simple library for maintaining and styling documents without a word
|
212
273
|
processor
|
213
274
|
test_files:
|
214
|
-
- features/mint_document.feature
|
215
|
-
- features/step_definitions/mint_steps.rb
|
216
275
|
- features/support/env.rb
|
217
|
-
-
|
276
|
+
- features/publish.feature
|
277
|
+
- features/plugins/epub.feature
|
218
278
|
- spec/spec_helper.rb
|
279
|
+
- spec/helpers_spec.rb
|
280
|
+
- spec/mint_spec.rb
|
281
|
+
- spec/resource_spec.rb
|
282
|
+
- spec/layout_spec.rb
|
283
|
+
- spec/style_spec.rb
|
284
|
+
- spec/document_spec.rb
|
285
|
+
- spec/commandline_spec.rb
|
286
|
+
- spec/plugin_spec.rb
|
287
|
+
- spec/plugins/epub_spec.rb
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# This is a test of the mint binary. It only covers named templates
|
2
|
-
# (layouts and styles) that are included with Mint or that are passed
|
3
|
-
# in via relative path on document creation. Further testing might include:
|
4
|
-
#
|
5
|
-
# - MINT_PATH & scope selection
|
6
|
-
# - File configuration
|
7
|
-
# - Header parsing
|
8
|
-
|
9
|
-
Feature: Mint document with varying options at the command line
|
10
|
-
As a writer
|
11
|
-
I want to create a document at the command line from plain text
|
12
|
-
So that I can view a typeset version in a web browser
|
13
|
-
|
14
|
-
Background:
|
15
|
-
Given a file named "content.md" with:
|
16
|
-
"""
|
17
|
-
Header
|
18
|
-
======
|
19
|
-
|
20
|
-
This is a test. It is theoretically formatted in
|
21
|
-
the Markdown templating language.
|
22
|
-
"""
|
23
|
-
Scenario: Mint document with defaults
|
24
|
-
When I run "mint content.md"
|
25
|
-
Then a file named "content.md" should exist
|
26
|
-
And a file named "content.html" should exist
|
27
|
-
|
28
|
-
Scenario Outline: Mint document with named template, layout & style
|
29
|
-
# Note: For all rendering, we're assuming Tilt is doing its own testing.
|
30
|
-
# Therefore, we're not testing anything except that our content made it
|
31
|
-
# into our destination file.
|
32
|
-
|
33
|
-
When I run "mint <template> <layout> <style> content.md"
|
34
|
-
Then a file named "content.html" should exist
|
35
|
-
And the file "content.html" should contain "This is a test"
|
36
|
-
And a file named "<style file>" should exist
|
37
|
-
And the file "content.html" should match /templates.*style.css/
|
38
|
-
And the file "content.html" should contain "<style file>"
|
39
|
-
|
40
|
-
Examples:
|
41
|
-
| template | layout | style | style file |
|
42
|
-
| | | | ../../templates/default/css/style.css |
|
43
|
-
| -t pro | | | ../../templates/pro/css/style.css |
|
44
|
-
| | -l pro | -s pro | ../../templates/pro/css/style.css |
|
45
|
-
|
46
|
-
Scenario: Mint document with non-existent template
|
47
|
-
When I run "mint -t nonexistent content.md"
|
48
|
-
Then the stdout should contain "Template 'nonexistent' does not exist."
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'mint'
|