reveal-ck 3.5.1 → 3.6.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/Rakefile +1 -1
- data/bin/reveal-ck +6 -6
- data/files/reveal-ck/Guardfile +1 -1
- data/files/reveal-ck/templates/index.html/head.html.erb +8 -0
- data/files/reveal-ck/templates/index.html/index.html.erb +1 -1
- data/lib/reveal-ck/builders/create_index_html.rb +1 -0
- data/lib/reveal-ck/builders/index_html.rb +4 -2
- data/lib/reveal-ck/config.rb +14 -8
- data/lib/reveal-ck/presentation.rb +1 -1
- data/lib/reveal-ck/version.rb +1 -1
- data/rakelib/ci.rake +1 -1
- data/spec/lib/reveal-ck/builders/create_slides_html_spec.rb +1 -1
- data/spec/lib/reveal-ck/builders/creation_task_spec.rb +1 -1
- data/spec/lib/reveal-ck/builders/index_html_spec.rb +10 -0
- data/spec/lib/reveal-ck/config_spec.rb +5 -0
- data/spec/lib/reveal-ck/markdown/post_processor_spec.rb +143 -143
- data/spec/lib/reveal-ck/markdown/pre_processor_spec.rb +179 -179
- data/spec/lib/reveal-ck/markdown/slide_markdown_template_spec.rb +33 -33
- metadata +17 -4
@@ -5,35 +5,35 @@ module RevealCK
|
|
5
5
|
describe PreProcessor do
|
6
6
|
describe 'handling ```notes' do
|
7
7
|
let :notes_input do
|
8
|
-
<<-
|
9
|
-
```notes
|
10
|
-
This is a note
|
11
|
-
```
|
12
|
-
|
8
|
+
<<-EOS.strip_heredoc
|
9
|
+
```notes
|
10
|
+
This is a note
|
11
|
+
```
|
12
|
+
EOS
|
13
13
|
end
|
14
14
|
|
15
15
|
let :note_input do
|
16
|
-
<<-
|
17
|
-
```note
|
18
|
-
This is a note
|
19
|
-
```
|
20
|
-
|
16
|
+
<<-EOS.strip_heredoc
|
17
|
+
```note
|
18
|
+
This is a note
|
19
|
+
```
|
20
|
+
EOS
|
21
21
|
end
|
22
22
|
|
23
23
|
let :transformed_notes do
|
24
|
-
<<-
|
25
|
-
<div>DIVIDER</div>
|
24
|
+
<<-EOS.strip_heredoc
|
25
|
+
<div>DIVIDER</div>
|
26
26
|
|
27
27
|
|
28
|
-
<div>NOTES_OPEN</div>
|
28
|
+
<div>NOTES_OPEN</div>
|
29
29
|
|
30
|
-
This is a note
|
30
|
+
This is a note
|
31
31
|
|
32
|
-
<div>NOTES_CLOSE</div>
|
32
|
+
<div>NOTES_CLOSE</div>
|
33
33
|
|
34
34
|
|
35
|
-
<div>DIVIDER</div>
|
36
|
-
|
35
|
+
<div>DIVIDER</div>
|
36
|
+
EOS
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'transforms ```notes into <div>NOTES_OPEN</div>' do
|
@@ -72,13 +72,13 @@ eos
|
|
72
72
|
end
|
73
73
|
|
74
74
|
let :standard_result do
|
75
|
-
<<-
|
76
|
-
<div>DIVIDER</div>
|
75
|
+
<<-EOS.strip_heredoc
|
76
|
+
<div>DIVIDER</div>
|
77
77
|
|
78
|
-
First
|
78
|
+
First
|
79
79
|
|
80
|
-
<div>DIVIDER</div>
|
81
|
-
|
80
|
+
<div>DIVIDER</div>
|
81
|
+
EOS
|
82
82
|
end
|
83
83
|
|
84
84
|
context 'without vertical slides' do
|
@@ -89,59 +89,59 @@ eos
|
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'is consistent when starting+ending separators are used' do
|
92
|
-
input =
|
93
|
-
---
|
94
|
-
First
|
95
|
-
---
|
96
|
-
|
92
|
+
input = <<-EOS.strip_heredoc
|
93
|
+
---
|
94
|
+
First
|
95
|
+
---
|
96
|
+
EOS
|
97
97
|
output = PreProcessor.new(input).process
|
98
98
|
expect(output).to eq standard_result
|
99
99
|
end
|
100
100
|
|
101
101
|
it 'is consistent when only starting separators are used' do
|
102
|
-
input = <<-
|
103
|
-
---
|
104
|
-
First
|
105
|
-
|
102
|
+
input = <<-EOS.strip_heredoc
|
103
|
+
---
|
104
|
+
First
|
105
|
+
EOS
|
106
106
|
output = PreProcessor.new(input).process
|
107
107
|
expect(output).to eq standard_result
|
108
108
|
end
|
109
109
|
|
110
110
|
it 'is consistent when only ending separators are used' do
|
111
|
-
input = <<-
|
112
|
-
First
|
113
|
-
---
|
114
|
-
|
111
|
+
input = <<-EOS.strip_heredoc
|
112
|
+
First
|
113
|
+
---
|
114
|
+
EOS
|
115
115
|
output = PreProcessor.new(input).process
|
116
116
|
expect(output).to eq standard_result
|
117
117
|
end
|
118
118
|
|
119
119
|
let :three_slides_input do
|
120
|
-
<<-
|
121
|
-
First
|
122
|
-
---
|
123
|
-
Second
|
124
|
-
---
|
125
|
-
Third
|
126
|
-
|
120
|
+
<<-EOS.strip_heredoc
|
121
|
+
First
|
122
|
+
---
|
123
|
+
Second
|
124
|
+
---
|
125
|
+
Third
|
126
|
+
EOS
|
127
127
|
end
|
128
128
|
|
129
129
|
let :three_slides_output do
|
130
|
-
<<-
|
131
|
-
<div>DIVIDER</div>
|
130
|
+
<<-EOS.strip_heredoc
|
131
|
+
<div>DIVIDER</div>
|
132
132
|
|
133
|
-
First
|
133
|
+
First
|
134
134
|
|
135
|
-
<div>DIVIDER</div>
|
135
|
+
<div>DIVIDER</div>
|
136
136
|
|
137
|
-
Second
|
137
|
+
Second
|
138
138
|
|
139
|
-
<div>DIVIDER</div>
|
139
|
+
<div>DIVIDER</div>
|
140
140
|
|
141
|
-
Third
|
141
|
+
Third
|
142
142
|
|
143
|
-
<div>DIVIDER</div>
|
144
|
-
|
143
|
+
<div>DIVIDER</div>
|
144
|
+
EOS
|
145
145
|
end
|
146
146
|
|
147
147
|
it 'can handle three slides' do
|
@@ -153,47 +153,47 @@ eos
|
|
153
153
|
|
154
154
|
context 'with vertical slides' do
|
155
155
|
let :single_vertical_output do
|
156
|
-
<<-
|
157
|
-
<div>VERTICAL_START</div>
|
156
|
+
<<-EOS.strip_heredoc
|
157
|
+
<div>VERTICAL_START</div>
|
158
158
|
|
159
|
-
First
|
159
|
+
First
|
160
160
|
|
161
|
-
<div>DIVIDER</div>
|
161
|
+
<div>DIVIDER</div>
|
162
162
|
|
163
|
-
Second
|
163
|
+
Second
|
164
164
|
|
165
|
-
<div>DIVIDER</div>
|
165
|
+
<div>DIVIDER</div>
|
166
166
|
|
167
|
-
Third
|
167
|
+
Third
|
168
168
|
|
169
|
-
<div>VERTICAL_END</div>
|
170
|
-
|
169
|
+
<div>VERTICAL_END</div>
|
170
|
+
EOS
|
171
171
|
end
|
172
172
|
|
173
173
|
context 'single vertical slide' do
|
174
174
|
it 'handles situation with no "closing" vertical' do
|
175
|
-
unbalanced_vertical_markdown = <<-
|
176
|
-
***
|
177
|
-
First
|
178
|
-
---
|
179
|
-
Second
|
180
|
-
---
|
181
|
-
Third
|
182
|
-
|
175
|
+
unbalanced_vertical_markdown = <<-EOS.strip_heredoc
|
176
|
+
***
|
177
|
+
First
|
178
|
+
---
|
179
|
+
Second
|
180
|
+
---
|
181
|
+
Third
|
182
|
+
EOS
|
183
183
|
output = PreProcessor.new(unbalanced_vertical_markdown).process
|
184
184
|
expect(output).to eq single_vertical_output
|
185
185
|
end
|
186
186
|
|
187
187
|
it 'handles situation with a "closing" vertical' do
|
188
|
-
balanced_vertical_markdown = <<-
|
189
|
-
***
|
190
|
-
First
|
191
|
-
---
|
192
|
-
Second
|
193
|
-
---
|
194
|
-
Third
|
195
|
-
***
|
196
|
-
|
188
|
+
balanced_vertical_markdown = <<-EOS.strip_heredoc
|
189
|
+
***
|
190
|
+
First
|
191
|
+
---
|
192
|
+
Second
|
193
|
+
---
|
194
|
+
Third
|
195
|
+
***
|
196
|
+
EOS
|
197
197
|
|
198
198
|
output = PreProcessor.new(balanced_vertical_markdown).process
|
199
199
|
expect(output).to eq single_vertical_output
|
@@ -202,163 +202,163 @@ eos
|
|
202
202
|
|
203
203
|
context 'horizontal and vertical combinations' do
|
204
204
|
it 'handles vertical slides surrounded by horizontals' do
|
205
|
-
vertical_surrounded_by_horizontal = <<-
|
206
|
-
First
|
207
|
-
***
|
208
|
-
Vertical 1
|
209
|
-
---
|
210
|
-
Vertical 2
|
211
|
-
---
|
212
|
-
Vertical 3
|
213
|
-
***
|
214
|
-
Last
|
215
|
-
|
205
|
+
vertical_surrounded_by_horizontal = <<-EOS.strip_heredoc
|
206
|
+
First
|
207
|
+
***
|
208
|
+
Vertical 1
|
209
|
+
---
|
210
|
+
Vertical 2
|
211
|
+
---
|
212
|
+
Vertical 3
|
213
|
+
***
|
214
|
+
Last
|
215
|
+
EOS
|
216
216
|
output = PreProcessor.new(vertical_surrounded_by_horizontal).process
|
217
|
-
expect(output).to eq <<-
|
218
|
-
<div>DIVIDER</div>
|
217
|
+
expect(output).to eq <<-EOS.strip_heredoc
|
218
|
+
<div>DIVIDER</div>
|
219
219
|
|
220
|
-
First
|
220
|
+
First
|
221
221
|
|
222
|
-
<div>VERTICAL_START</div>
|
222
|
+
<div>VERTICAL_START</div>
|
223
223
|
|
224
|
-
Vertical 1
|
224
|
+
Vertical 1
|
225
225
|
|
226
|
-
<div>DIVIDER</div>
|
226
|
+
<div>DIVIDER</div>
|
227
227
|
|
228
|
-
Vertical 2
|
228
|
+
Vertical 2
|
229
229
|
|
230
|
-
<div>DIVIDER</div>
|
230
|
+
<div>DIVIDER</div>
|
231
231
|
|
232
|
-
Vertical 3
|
232
|
+
Vertical 3
|
233
233
|
|
234
|
-
<div>VERTICAL_END</div>
|
234
|
+
<div>VERTICAL_END</div>
|
235
235
|
|
236
|
-
Last
|
236
|
+
Last
|
237
237
|
|
238
|
-
<div>DIVIDER</div>
|
239
|
-
|
238
|
+
<div>DIVIDER</div>
|
239
|
+
EOS
|
240
240
|
end
|
241
241
|
|
242
242
|
it 'handles back-to-back vertical slides surrounded by horizontals' do
|
243
|
-
vertical_surrounded_by_horizontal = <<-
|
244
|
-
First
|
245
|
-
***
|
246
|
-
Vertical A1
|
247
|
-
---
|
248
|
-
Vertical A2
|
249
|
-
---
|
250
|
-
Vertical A3
|
251
|
-
***
|
252
|
-
***
|
253
|
-
Vertical B1
|
254
|
-
---
|
255
|
-
Vertical B2
|
256
|
-
---
|
257
|
-
Vertical B3
|
258
|
-
***
|
259
|
-
Last
|
260
|
-
|
243
|
+
vertical_surrounded_by_horizontal = <<-EOS.strip_heredoc
|
244
|
+
First
|
245
|
+
***
|
246
|
+
Vertical A1
|
247
|
+
---
|
248
|
+
Vertical A2
|
249
|
+
---
|
250
|
+
Vertical A3
|
251
|
+
***
|
252
|
+
***
|
253
|
+
Vertical B1
|
254
|
+
---
|
255
|
+
Vertical B2
|
256
|
+
---
|
257
|
+
Vertical B3
|
258
|
+
***
|
259
|
+
Last
|
260
|
+
EOS
|
261
261
|
output = PreProcessor.new(vertical_surrounded_by_horizontal).process
|
262
|
-
expect(output).to eq <<-
|
263
|
-
<div>DIVIDER</div>
|
262
|
+
expect(output).to eq <<-EOS.strip_heredoc
|
263
|
+
<div>DIVIDER</div>
|
264
264
|
|
265
|
-
First
|
265
|
+
First
|
266
266
|
|
267
|
-
<div>VERTICAL_START</div>
|
267
|
+
<div>VERTICAL_START</div>
|
268
268
|
|
269
|
-
Vertical A1
|
269
|
+
Vertical A1
|
270
270
|
|
271
|
-
<div>DIVIDER</div>
|
271
|
+
<div>DIVIDER</div>
|
272
272
|
|
273
|
-
Vertical A2
|
273
|
+
Vertical A2
|
274
274
|
|
275
|
-
<div>DIVIDER</div>
|
275
|
+
<div>DIVIDER</div>
|
276
276
|
|
277
|
-
Vertical A3
|
277
|
+
Vertical A3
|
278
278
|
|
279
|
-
<div>VERTICAL_END</div>
|
279
|
+
<div>VERTICAL_END</div>
|
280
280
|
|
281
281
|
|
282
|
-
<div>VERTICAL_START</div>
|
282
|
+
<div>VERTICAL_START</div>
|
283
283
|
|
284
|
-
Vertical B1
|
284
|
+
Vertical B1
|
285
285
|
|
286
|
-
<div>DIVIDER</div>
|
286
|
+
<div>DIVIDER</div>
|
287
287
|
|
288
|
-
Vertical B2
|
288
|
+
Vertical B2
|
289
289
|
|
290
|
-
<div>DIVIDER</div>
|
290
|
+
<div>DIVIDER</div>
|
291
291
|
|
292
|
-
Vertical B3
|
292
|
+
Vertical B3
|
293
293
|
|
294
|
-
<div>VERTICAL_END</div>
|
294
|
+
<div>VERTICAL_END</div>
|
295
295
|
|
296
|
-
Last
|
296
|
+
Last
|
297
297
|
|
298
|
-
<div>DIVIDER</div>
|
299
|
-
|
298
|
+
<div>DIVIDER</div>
|
299
|
+
EOS
|
300
300
|
end
|
301
301
|
|
302
302
|
it 'handles multiple vertical slides surrounded by horizontals' do
|
303
|
-
vertical_surrounded_by_horizontal = <<-
|
304
|
-
First
|
305
|
-
***
|
306
|
-
Vertical A1
|
307
|
-
---
|
308
|
-
Vertical A2
|
309
|
-
---
|
310
|
-
Vertical A3
|
311
|
-
***
|
312
|
-
Middle
|
313
|
-
***
|
314
|
-
Vertical B1
|
315
|
-
---
|
316
|
-
Vertical B2
|
317
|
-
---
|
318
|
-
Vertical B3
|
319
|
-
***
|
320
|
-
Last
|
321
|
-
|
303
|
+
vertical_surrounded_by_horizontal = <<-EOS.strip_heredoc
|
304
|
+
First
|
305
|
+
***
|
306
|
+
Vertical A1
|
307
|
+
---
|
308
|
+
Vertical A2
|
309
|
+
---
|
310
|
+
Vertical A3
|
311
|
+
***
|
312
|
+
Middle
|
313
|
+
***
|
314
|
+
Vertical B1
|
315
|
+
---
|
316
|
+
Vertical B2
|
317
|
+
---
|
318
|
+
Vertical B3
|
319
|
+
***
|
320
|
+
Last
|
321
|
+
EOS
|
322
322
|
output = PreProcessor.new(vertical_surrounded_by_horizontal).process
|
323
|
-
expect(output).to eq <<-
|
324
|
-
<div>DIVIDER</div>
|
323
|
+
expect(output).to eq <<-EOS.strip_heredoc
|
324
|
+
<div>DIVIDER</div>
|
325
325
|
|
326
|
-
First
|
326
|
+
First
|
327
327
|
|
328
|
-
<div>VERTICAL_START</div>
|
328
|
+
<div>VERTICAL_START</div>
|
329
329
|
|
330
|
-
Vertical A1
|
330
|
+
Vertical A1
|
331
331
|
|
332
|
-
<div>DIVIDER</div>
|
332
|
+
<div>DIVIDER</div>
|
333
333
|
|
334
|
-
Vertical A2
|
334
|
+
Vertical A2
|
335
335
|
|
336
|
-
<div>DIVIDER</div>
|
336
|
+
<div>DIVIDER</div>
|
337
337
|
|
338
|
-
Vertical A3
|
338
|
+
Vertical A3
|
339
339
|
|
340
|
-
<div>VERTICAL_END</div>
|
340
|
+
<div>VERTICAL_END</div>
|
341
341
|
|
342
|
-
Middle
|
342
|
+
Middle
|
343
343
|
|
344
|
-
<div>VERTICAL_START</div>
|
344
|
+
<div>VERTICAL_START</div>
|
345
345
|
|
346
|
-
Vertical B1
|
346
|
+
Vertical B1
|
347
347
|
|
348
|
-
<div>DIVIDER</div>
|
348
|
+
<div>DIVIDER</div>
|
349
349
|
|
350
|
-
Vertical B2
|
350
|
+
Vertical B2
|
351
351
|
|
352
|
-
<div>DIVIDER</div>
|
352
|
+
<div>DIVIDER</div>
|
353
353
|
|
354
|
-
Vertical B3
|
354
|
+
Vertical B3
|
355
355
|
|
356
|
-
<div>VERTICAL_END</div>
|
356
|
+
<div>VERTICAL_END</div>
|
357
357
|
|
358
|
-
Last
|
358
|
+
Last
|
359
359
|
|
360
|
-
<div>DIVIDER</div>
|
361
|
-
|
360
|
+
<div>DIVIDER</div>
|
361
|
+
EOS
|
362
362
|
end
|
363
363
|
end
|
364
364
|
end
|