slide_hero 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slide_hero/code.rb +1 -1
- data/lib/slide_hero/grouped_slides.rb +1 -1
- data/lib/slide_hero/list.rb +6 -3
- data/lib/slide_hero/list_point.rb +1 -1
- data/lib/slide_hero/presentation.rb +1 -2
- data/lib/slide_hero/slide.rb +1 -2
- data/lib/slide_hero/version.rb +1 -1
- data/lib/slide_hero/views/ordered_list.html.erb +1 -1
- data/lib/slide_hero/views/unordered_list.html.erb +1 -1
- data/lib/slide_hero.rb +9 -0
- data/slide_hero.gemspec +7 -7
- data/test/slide_hero/list_spec.rb +31 -9
- data/vendor/reveal.js/.gitignore +0 -0
- data/vendor/reveal.js/.travis.yml +0 -0
- data/vendor/reveal.js/Gruntfile.js +12 -7
- data/vendor/reveal.js/LICENSE +0 -0
- data/vendor/reveal.js/README.md +168 -33
- data/vendor/reveal.js/css/print/paper.css +0 -0
- data/vendor/reveal.js/css/print/pdf.css +1 -1
- data/vendor/reveal.js/css/reveal.css +248 -17
- data/vendor/reveal.js/css/reveal.min.css +1 -1
- data/vendor/reveal.js/css/theme/README.md +3 -1
- data/vendor/reveal.js/css/theme/beige.css +7 -1
- data/vendor/reveal.js/css/theme/blood.css +175 -0
- data/vendor/reveal.js/css/theme/default.css +7 -1
- data/vendor/reveal.js/css/theme/moon.css +7 -1
- data/vendor/reveal.js/css/theme/night.css +7 -1
- data/vendor/reveal.js/css/theme/serif.css +7 -1
- data/vendor/reveal.js/css/theme/simple.css +7 -1
- data/vendor/reveal.js/css/theme/sky.css +7 -1
- data/vendor/reveal.js/css/theme/solarized.css +7 -1
- data/vendor/reveal.js/css/theme/source/beige.scss +0 -0
- data/vendor/reveal.js/css/theme/source/blood.scss +91 -0
- data/vendor/reveal.js/css/theme/source/default.scss +0 -0
- data/vendor/reveal.js/css/theme/source/moon.scss +0 -0
- data/vendor/reveal.js/css/theme/source/night.scss +0 -0
- data/vendor/reveal.js/css/theme/source/serif.scss +0 -0
- data/vendor/reveal.js/css/theme/source/simple.scss +0 -0
- data/vendor/reveal.js/css/theme/source/sky.scss +0 -0
- data/vendor/reveal.js/css/theme/source/solarized.scss +0 -0
- data/vendor/reveal.js/css/theme/template/mixins.scss +0 -0
- data/vendor/reveal.js/css/theme/template/settings.scss +0 -0
- data/vendor/reveal.js/css/theme/template/theme.scss +8 -1
- data/vendor/reveal.js/index.html +388 -0
- data/vendor/reveal.js/js/reveal.js +887 -293
- data/vendor/reveal.js/js/reveal.min.js +3 -2
- data/vendor/reveal.js/lib/css/zenburn.css +16 -17
- data/vendor/reveal.js/lib/font/league_gothic-webfont.svg +0 -0
- data/vendor/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
- data/vendor/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
- data/vendor/reveal.js/lib/font/league_gothic_license +0 -0
- data/vendor/reveal.js/lib/js/classList.js +0 -0
- data/vendor/reveal.js/lib/js/head.min.js +0 -0
- data/vendor/reveal.js/lib/js/html5shiv.js +0 -0
- data/vendor/reveal.js/package.json +10 -9
- data/vendor/reveal.js/plugin/highlight/highlight.js +3 -2
- data/vendor/reveal.js/plugin/leap/leap.js +0 -0
- data/vendor/reveal.js/plugin/markdown/example.html +34 -3
- data/vendor/reveal.js/plugin/markdown/example.md +0 -0
- data/vendor/reveal.js/plugin/markdown/markdown.js +373 -201
- data/vendor/reveal.js/plugin/markdown/marked.js +0 -0
- data/vendor/reveal.js/plugin/multiplex/client.js +0 -0
- data/vendor/reveal.js/plugin/multiplex/index.js +0 -0
- data/vendor/reveal.js/plugin/multiplex/master.js +2 -1
- data/vendor/reveal.js/plugin/notes/notes.html +10 -2
- data/vendor/reveal.js/plugin/notes/notes.js +0 -0
- data/vendor/reveal.js/plugin/notes-server/client.js +0 -0
- data/vendor/reveal.js/plugin/notes-server/index.js +0 -0
- data/vendor/reveal.js/plugin/notes-server/notes.html +0 -0
- data/vendor/reveal.js/plugin/postmessage/example.html +0 -0
- data/vendor/reveal.js/plugin/postmessage/postmessage.js +0 -0
- data/vendor/reveal.js/plugin/print-pdf/print-pdf.js +0 -0
- data/vendor/reveal.js/plugin/remotes/remotes.js +4 -4
- data/vendor/reveal.js/plugin/search/search.js +0 -0
- data/vendor/reveal.js/plugin/zoom-js/zoom.js +3 -1
- data/vendor/reveal.js/{examples → test/examples}/assets/image1.png +0 -0
- data/vendor/reveal.js/{examples → test/examples}/assets/image2.png +0 -0
- data/vendor/reveal.js/{examples → test/examples}/barebones.html +2 -3
- data/vendor/reveal.js/{examples → test/examples}/embedded-media.html +4 -4
- data/vendor/reveal.js/{examples → test/examples}/math.html +6 -6
- data/vendor/reveal.js/{examples → test/examples}/slide-backgrounds.html +26 -5
- data/vendor/reveal.js/test/qunit-1.12.0.css +244 -0
- data/vendor/reveal.js/test/qunit-1.12.0.js +2212 -0
- data/vendor/reveal.js/test/test-markdown-element-attributes.html +134 -0
- data/vendor/reveal.js/test/test-markdown-element-attributes.js +46 -0
- data/vendor/reveal.js/test/test-markdown-slide-attributes.html +128 -0
- data/vendor/reveal.js/test/test-markdown-slide-attributes.js +47 -0
- data/vendor/reveal.js/test/test-markdown.html +52 -0
- data/vendor/reveal.js/test/test-markdown.js +15 -0
- data/vendor/reveal.js/test/test.html +81 -0
- data/vendor/reveal.js/test/test.js +438 -0
- metadata +58 -45
@@ -0,0 +1,438 @@
|
|
1
|
+
|
2
|
+
// These tests expect the DOM to contain a presentation
|
3
|
+
// with the following slide structure:
|
4
|
+
//
|
5
|
+
// 1
|
6
|
+
// 2 - Three sub-slides
|
7
|
+
// 3 - Three fragment elements
|
8
|
+
// 3 - Two fragments with same data-fragment-index
|
9
|
+
// 4
|
10
|
+
|
11
|
+
|
12
|
+
Reveal.addEventListener( 'ready', function() {
|
13
|
+
|
14
|
+
// ---------------------------------------------------------------
|
15
|
+
// DOM TESTS
|
16
|
+
|
17
|
+
QUnit.module( 'DOM' );
|
18
|
+
|
19
|
+
test( 'Initial slides classes', function() {
|
20
|
+
var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' )
|
21
|
+
|
22
|
+
strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
|
23
|
+
strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
|
24
|
+
strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );
|
25
|
+
|
26
|
+
strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );
|
27
|
+
|
28
|
+
ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
|
29
|
+
});
|
30
|
+
|
31
|
+
// ---------------------------------------------------------------
|
32
|
+
// API TESTS
|
33
|
+
|
34
|
+
QUnit.module( 'API' );
|
35
|
+
|
36
|
+
test( 'Reveal.isReady', function() {
|
37
|
+
strictEqual( Reveal.isReady(), true, 'returns true' );
|
38
|
+
});
|
39
|
+
|
40
|
+
test( 'Reveal.isOverview', function() {
|
41
|
+
strictEqual( Reveal.isOverview(), false, 'false by default' );
|
42
|
+
|
43
|
+
Reveal.toggleOverview();
|
44
|
+
strictEqual( Reveal.isOverview(), true, 'true after toggling on' );
|
45
|
+
|
46
|
+
Reveal.toggleOverview();
|
47
|
+
strictEqual( Reveal.isOverview(), false, 'false after toggling off' );
|
48
|
+
});
|
49
|
+
|
50
|
+
test( 'Reveal.isPaused', function() {
|
51
|
+
strictEqual( Reveal.isPaused(), false, 'false by default' );
|
52
|
+
|
53
|
+
Reveal.togglePause();
|
54
|
+
strictEqual( Reveal.isPaused(), true, 'true after pausing' );
|
55
|
+
|
56
|
+
Reveal.togglePause();
|
57
|
+
strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
58
|
+
});
|
59
|
+
|
60
|
+
test( 'Reveal.isFirstSlide', function() {
|
61
|
+
Reveal.slide( 0, 0 );
|
62
|
+
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
63
|
+
|
64
|
+
Reveal.slide( 1, 0 );
|
65
|
+
strictEqual( Reveal.isFirstSlide(), false, 'false after Reveal.slide( 1, 0 )' );
|
66
|
+
|
67
|
+
Reveal.slide( 0, 0 );
|
68
|
+
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
69
|
+
});
|
70
|
+
|
71
|
+
test( 'Reveal.isLastSlide', function() {
|
72
|
+
Reveal.slide( 0, 0 );
|
73
|
+
strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
74
|
+
|
75
|
+
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
76
|
+
|
77
|
+
Reveal.slide( lastSlideIndex, 0 );
|
78
|
+
strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( ', 0+ lastSlideIndex +' )' );
|
79
|
+
|
80
|
+
Reveal.slide( 0, 0 );
|
81
|
+
strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
82
|
+
});
|
83
|
+
|
84
|
+
test( 'Reveal.getIndices', function() {
|
85
|
+
var indices = Reveal.getIndices();
|
86
|
+
|
87
|
+
ok( typeof indices.hasOwnProperty( 'h' ), 'h exists' );
|
88
|
+
ok( typeof indices.hasOwnProperty( 'v' ), 'v exists' );
|
89
|
+
ok( typeof indices.hasOwnProperty( 'f' ), 'f exists' );
|
90
|
+
|
91
|
+
Reveal.slide( 1, 0 );
|
92
|
+
ok( Reveal.getIndices().h === 1 && Reveal.getIndices().v === 0, 'h 1, v 0' );
|
93
|
+
|
94
|
+
Reveal.slide( 1, 2 );
|
95
|
+
ok( Reveal.getIndices().h === 1 && Reveal.getIndices().v === 2, 'h 1, v 2' );
|
96
|
+
|
97
|
+
Reveal.slide( 0, 0 );
|
98
|
+
});
|
99
|
+
|
100
|
+
test( 'Reveal.getSlide', function() {
|
101
|
+
var firstSlide = document.querySelector( '.reveal .slides>section:first-child' );
|
102
|
+
|
103
|
+
equal( Reveal.getSlide( 0 ), firstSlide, 'gets correct first slide' );
|
104
|
+
|
105
|
+
strictEqual( Reveal.getSlide( 100 ), undefined, 'returns undefined when slide can\'t be found' );
|
106
|
+
});
|
107
|
+
|
108
|
+
test( 'Reveal.getPreviousSlide/getCurrentSlide', function() {
|
109
|
+
Reveal.slide( 0, 0 );
|
110
|
+
Reveal.slide( 1, 0 );
|
111
|
+
|
112
|
+
var firstSlide = document.querySelector( '.reveal .slides>section:first-child' );
|
113
|
+
var secondSlide = document.querySelector( '.reveal .slides>section:nth-child(2)>section' );
|
114
|
+
|
115
|
+
equal( Reveal.getPreviousSlide(), firstSlide, 'previous is slide #0' );
|
116
|
+
equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
|
117
|
+
});
|
118
|
+
|
119
|
+
test( 'Reveal.getScale', function() {
|
120
|
+
ok( typeof Reveal.getScale() === 'number', 'has scale' );
|
121
|
+
});
|
122
|
+
|
123
|
+
test( 'Reveal.getConfig', function() {
|
124
|
+
ok( typeof Reveal.getConfig() === 'object', 'has config' );
|
125
|
+
});
|
126
|
+
|
127
|
+
test( 'Reveal.configure', function() {
|
128
|
+
strictEqual( Reveal.getConfig().loop, false, '"loop" is false to start with' );
|
129
|
+
|
130
|
+
Reveal.configure({ loop: true });
|
131
|
+
strictEqual( Reveal.getConfig().loop, true, '"loop" has changed to true' );
|
132
|
+
|
133
|
+
Reveal.configure({ loop: false, customTestValue: 1 });
|
134
|
+
strictEqual( Reveal.getConfig().customTestValue, 1, 'supports custom values' );
|
135
|
+
});
|
136
|
+
|
137
|
+
test( 'Reveal.availableRoutes', function() {
|
138
|
+
Reveal.slide( 0, 0 );
|
139
|
+
deepEqual( Reveal.availableRoutes(), { left: false, up: false, down: false, right: true }, 'correct for first slide' );
|
140
|
+
|
141
|
+
Reveal.slide( 1, 0 );
|
142
|
+
deepEqual( Reveal.availableRoutes(), { left: true, up: false, down: true, right: true }, 'correct for vertical slide' );
|
143
|
+
});
|
144
|
+
|
145
|
+
test( 'Reveal.next', function() {
|
146
|
+
Reveal.slide( 0, 0 );
|
147
|
+
|
148
|
+
// Step through vertical child slides
|
149
|
+
Reveal.next();
|
150
|
+
deepEqual( Reveal.getIndices(), { h: 1, v: 0, f: undefined } );
|
151
|
+
|
152
|
+
Reveal.next();
|
153
|
+
deepEqual( Reveal.getIndices(), { h: 1, v: 1, f: undefined } );
|
154
|
+
|
155
|
+
Reveal.next();
|
156
|
+
deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined } );
|
157
|
+
|
158
|
+
// Step through fragments
|
159
|
+
Reveal.next();
|
160
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );
|
161
|
+
|
162
|
+
Reveal.next();
|
163
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );
|
164
|
+
|
165
|
+
Reveal.next();
|
166
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 } );
|
167
|
+
|
168
|
+
Reveal.next();
|
169
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
|
170
|
+
});
|
171
|
+
|
172
|
+
test( 'Reveal.next at end', function() {
|
173
|
+
Reveal.slide( 3 );
|
174
|
+
|
175
|
+
// We're at the end, this should have no effect
|
176
|
+
Reveal.next();
|
177
|
+
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
178
|
+
|
179
|
+
Reveal.next();
|
180
|
+
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
181
|
+
});
|
182
|
+
|
183
|
+
|
184
|
+
// ---------------------------------------------------------------
|
185
|
+
// FRAGMENT TESTS
|
186
|
+
|
187
|
+
QUnit.module( 'Fragments' );
|
188
|
+
|
189
|
+
test( 'Sliding to fragments', function() {
|
190
|
+
Reveal.slide( 2, 0, -1 );
|
191
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'Reveal.slide( 2, 0, -1 )' );
|
192
|
+
|
193
|
+
Reveal.slide( 2, 0, 0 );
|
194
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'Reveal.slide( 2, 0, 0 )' );
|
195
|
+
|
196
|
+
Reveal.slide( 2, 0, 2 );
|
197
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'Reveal.slide( 2, 0, 2 )' );
|
198
|
+
|
199
|
+
Reveal.slide( 2, 0, 1 );
|
200
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
|
201
|
+
});
|
202
|
+
|
203
|
+
test( 'Hiding all fragments', function() {
|
204
|
+
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
205
|
+
|
206
|
+
Reveal.slide( 2, 0, 0 );
|
207
|
+
strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 1, 'one fragment visible when index is 0' );
|
208
|
+
|
209
|
+
Reveal.slide( 2, 0, -1 );
|
210
|
+
strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when index is -1' );
|
211
|
+
});
|
212
|
+
|
213
|
+
test( 'Current fragment', function() {
|
214
|
+
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
215
|
+
|
216
|
+
Reveal.slide( 2, 0 );
|
217
|
+
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );
|
218
|
+
|
219
|
+
Reveal.slide( 2, 0, 0 );
|
220
|
+
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 1, 'one current fragment at index 0' );
|
221
|
+
|
222
|
+
Reveal.slide( 1, 0, 0 );
|
223
|
+
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to previous slide' );
|
224
|
+
|
225
|
+
Reveal.slide( 3, 0, 0 );
|
226
|
+
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to next slide' );
|
227
|
+
});
|
228
|
+
|
229
|
+
test( 'Stepping through fragments', function() {
|
230
|
+
Reveal.slide( 2, 0, -1 );
|
231
|
+
|
232
|
+
// forwards:
|
233
|
+
|
234
|
+
Reveal.next();
|
235
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );
|
236
|
+
|
237
|
+
Reveal.right();
|
238
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );
|
239
|
+
|
240
|
+
Reveal.down();
|
241
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );
|
242
|
+
|
243
|
+
Reveal.down(); // moves to f #3
|
244
|
+
|
245
|
+
// backwards:
|
246
|
+
|
247
|
+
Reveal.prev();
|
248
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );
|
249
|
+
|
250
|
+
Reveal.left();
|
251
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );
|
252
|
+
|
253
|
+
Reveal.up();
|
254
|
+
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'up() goes to prev fragment' );
|
255
|
+
});
|
256
|
+
|
257
|
+
test( 'Stepping past fragments', function() {
|
258
|
+
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
259
|
+
|
260
|
+
Reveal.slide( 0, 0, 0 );
|
261
|
+
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );
|
262
|
+
|
263
|
+
Reveal.slide( 3, 0, 0 );
|
264
|
+
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
|
265
|
+
});
|
266
|
+
|
267
|
+
test( 'Fragment indices', function() {
|
268
|
+
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(2)' );
|
269
|
+
|
270
|
+
Reveal.slide( 3, 0, 0 );
|
271
|
+
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
|
272
|
+
});
|
273
|
+
|
274
|
+
test( 'Index generation', function() {
|
275
|
+
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
276
|
+
|
277
|
+
// These have no indices defined to start with
|
278
|
+
equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
279
|
+
equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
280
|
+
equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '2' );
|
281
|
+
});
|
282
|
+
|
283
|
+
test( 'Index normalization', function() {
|
284
|
+
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(3)' );
|
285
|
+
|
286
|
+
// These start out as 1-4-4 and should normalize to 0-1-1
|
287
|
+
equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
288
|
+
equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
289
|
+
equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '1' );
|
290
|
+
});
|
291
|
+
|
292
|
+
asyncTest( 'fragmentshown event', function() {
|
293
|
+
expect( 2 );
|
294
|
+
|
295
|
+
var _onEvent = function( event ) {
|
296
|
+
ok( true, 'event fired' );
|
297
|
+
}
|
298
|
+
|
299
|
+
Reveal.addEventListener( 'fragmentshown', _onEvent );
|
300
|
+
|
301
|
+
Reveal.slide( 2, 0 );
|
302
|
+
Reveal.slide( 2, 0 ); // should do nothing
|
303
|
+
Reveal.slide( 2, 0, 0 ); // should do nothing
|
304
|
+
Reveal.next();
|
305
|
+
Reveal.next();
|
306
|
+
Reveal.prev(); // shouldn't fire fragmentshown
|
307
|
+
|
308
|
+
start();
|
309
|
+
|
310
|
+
Reveal.removeEventListener( 'fragmentshown', _onEvent );
|
311
|
+
});
|
312
|
+
|
313
|
+
asyncTest( 'fragmenthidden event', function() {
|
314
|
+
expect( 2 );
|
315
|
+
|
316
|
+
var _onEvent = function( event ) {
|
317
|
+
ok( true, 'event fired' );
|
318
|
+
}
|
319
|
+
|
320
|
+
Reveal.addEventListener( 'fragmenthidden', _onEvent );
|
321
|
+
|
322
|
+
Reveal.slide( 2, 0, 2 );
|
323
|
+
Reveal.slide( 2, 0, 2 ); // should do nothing
|
324
|
+
Reveal.prev();
|
325
|
+
Reveal.prev();
|
326
|
+
Reveal.next(); // shouldn't fire fragmenthidden
|
327
|
+
|
328
|
+
start();
|
329
|
+
|
330
|
+
Reveal.removeEventListener( 'fragmenthidden', _onEvent );
|
331
|
+
});
|
332
|
+
|
333
|
+
|
334
|
+
// ---------------------------------------------------------------
|
335
|
+
// CONFIGURATION VALUES
|
336
|
+
|
337
|
+
QUnit.module( 'Configuration' );
|
338
|
+
|
339
|
+
test( 'Controls', function() {
|
340
|
+
var controlsElement = document.querySelector( '.reveal>.controls' );
|
341
|
+
|
342
|
+
Reveal.configure({ controls: false });
|
343
|
+
equal( controlsElement.style.display, 'none', 'controls are hidden' );
|
344
|
+
|
345
|
+
Reveal.configure({ controls: true });
|
346
|
+
equal( controlsElement.style.display, 'block', 'controls are visible' );
|
347
|
+
});
|
348
|
+
|
349
|
+
test( 'Progress', function() {
|
350
|
+
var progressElement = document.querySelector( '.reveal>.progress' );
|
351
|
+
|
352
|
+
Reveal.configure({ progress: false });
|
353
|
+
equal( progressElement.style.display, 'none', 'progress are hidden' );
|
354
|
+
|
355
|
+
Reveal.configure({ progress: true });
|
356
|
+
equal( progressElement.style.display, 'block', 'progress are visible' );
|
357
|
+
});
|
358
|
+
|
359
|
+
test( 'Loop', function() {
|
360
|
+
Reveal.configure({ loop: true });
|
361
|
+
|
362
|
+
Reveal.slide( 0, 0 );
|
363
|
+
|
364
|
+
Reveal.left();
|
365
|
+
notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );
|
366
|
+
|
367
|
+
Reveal.right();
|
368
|
+
equal( Reveal.getIndices().h, 0, 'looped from end to start' );
|
369
|
+
|
370
|
+
Reveal.configure({ loop: false });
|
371
|
+
});
|
372
|
+
|
373
|
+
|
374
|
+
// ---------------------------------------------------------------
|
375
|
+
// EVENT TESTS
|
376
|
+
|
377
|
+
QUnit.module( 'Events' );
|
378
|
+
|
379
|
+
asyncTest( 'slidechanged', function() {
|
380
|
+
expect( 3 );
|
381
|
+
|
382
|
+
var _onEvent = function( event ) {
|
383
|
+
ok( true, 'event fired' );
|
384
|
+
}
|
385
|
+
|
386
|
+
Reveal.addEventListener( 'slidechanged', _onEvent );
|
387
|
+
|
388
|
+
Reveal.slide( 1, 0 ); // should trigger
|
389
|
+
Reveal.slide( 1, 0 ); // should do nothing
|
390
|
+
Reveal.next(); // should trigger
|
391
|
+
Reveal.slide( 3, 0 ); // should trigger
|
392
|
+
Reveal.next(); // should do nothing
|
393
|
+
|
394
|
+
start();
|
395
|
+
|
396
|
+
Reveal.removeEventListener( 'slidechanged', _onEvent );
|
397
|
+
|
398
|
+
});
|
399
|
+
|
400
|
+
asyncTest( 'paused', function() {
|
401
|
+
expect( 1 );
|
402
|
+
|
403
|
+
var _onEvent = function( event ) {
|
404
|
+
ok( true, 'event fired' );
|
405
|
+
}
|
406
|
+
|
407
|
+
Reveal.addEventListener( 'paused', _onEvent );
|
408
|
+
|
409
|
+
Reveal.togglePause();
|
410
|
+
Reveal.togglePause();
|
411
|
+
|
412
|
+
start();
|
413
|
+
|
414
|
+
Reveal.removeEventListener( 'paused', _onEvent );
|
415
|
+
});
|
416
|
+
|
417
|
+
asyncTest( 'resumed', function() {
|
418
|
+
expect( 1 );
|
419
|
+
|
420
|
+
var _onEvent = function( event ) {
|
421
|
+
ok( true, 'event fired' );
|
422
|
+
}
|
423
|
+
|
424
|
+
Reveal.addEventListener( 'resumed', _onEvent );
|
425
|
+
|
426
|
+
Reveal.togglePause();
|
427
|
+
Reveal.togglePause();
|
428
|
+
|
429
|
+
start();
|
430
|
+
|
431
|
+
Reveal.removeEventListener( 'resumed', _onEvent );
|
432
|
+
});
|
433
|
+
|
434
|
+
|
435
|
+
} );
|
436
|
+
|
437
|
+
Reveal.initialize();
|
438
|
+
|
metadata
CHANGED
@@ -1,127 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slide_hero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Nunez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.4
|
19
|
+
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.4
|
26
|
+
version: '1.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.18
|
33
|
+
version: '0.18'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.18
|
40
|
+
version: '0.18'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.5
|
47
|
+
version: '1.5'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.5
|
54
|
+
version: '1.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '10.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '10.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '5.2'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '5.2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: guard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '2.4'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '2.4'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: guard-minitest
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '2.2'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '2.2'
|
125
125
|
description: Used for creating slide decks backed by reveal.js
|
126
126
|
email:
|
127
127
|
- steven.nunez@gmail.com
|
@@ -130,10 +130,10 @@ executables:
|
|
130
130
|
extensions: []
|
131
131
|
extra_rdoc_files: []
|
132
132
|
files:
|
133
|
-
- .gitignore
|
134
|
-
- .ruby-gemset
|
135
|
-
- .ruby-version
|
136
|
-
- .travis.yml
|
133
|
+
- ".gitignore"
|
134
|
+
- ".ruby-gemset"
|
135
|
+
- ".ruby-version"
|
136
|
+
- ".travis.yml"
|
137
137
|
- Gemfile
|
138
138
|
- Guardfile
|
139
139
|
- LICENSE.txt
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- vendor/reveal.js/css/reveal.min.css
|
191
191
|
- vendor/reveal.js/css/theme/README.md
|
192
192
|
- vendor/reveal.js/css/theme/beige.css
|
193
|
+
- vendor/reveal.js/css/theme/blood.css
|
193
194
|
- vendor/reveal.js/css/theme/default.css
|
194
195
|
- vendor/reveal.js/css/theme/moon.css
|
195
196
|
- vendor/reveal.js/css/theme/night.css
|
@@ -198,6 +199,7 @@ files:
|
|
198
199
|
- vendor/reveal.js/css/theme/sky.css
|
199
200
|
- vendor/reveal.js/css/theme/solarized.css
|
200
201
|
- vendor/reveal.js/css/theme/source/beige.scss
|
202
|
+
- vendor/reveal.js/css/theme/source/blood.scss
|
201
203
|
- vendor/reveal.js/css/theme/source/default.scss
|
202
204
|
- vendor/reveal.js/css/theme/source/moon.scss
|
203
205
|
- vendor/reveal.js/css/theme/source/night.scss
|
@@ -208,12 +210,7 @@ files:
|
|
208
210
|
- vendor/reveal.js/css/theme/template/mixins.scss
|
209
211
|
- vendor/reveal.js/css/theme/template/settings.scss
|
210
212
|
- vendor/reveal.js/css/theme/template/theme.scss
|
211
|
-
- vendor/reveal.js/
|
212
|
-
- vendor/reveal.js/examples/assets/image2.png
|
213
|
-
- vendor/reveal.js/examples/barebones.html
|
214
|
-
- vendor/reveal.js/examples/embedded-media.html
|
215
|
-
- vendor/reveal.js/examples/math.html
|
216
|
-
- vendor/reveal.js/examples/slide-backgrounds.html
|
213
|
+
- vendor/reveal.js/index.html
|
217
214
|
- vendor/reveal.js/js/reveal.js
|
218
215
|
- vendor/reveal.js/js/reveal.min.js
|
219
216
|
- vendor/reveal.js/lib/css/zenburn.css
|
@@ -247,6 +244,22 @@ files:
|
|
247
244
|
- vendor/reveal.js/plugin/remotes/remotes.js
|
248
245
|
- vendor/reveal.js/plugin/search/search.js
|
249
246
|
- vendor/reveal.js/plugin/zoom-js/zoom.js
|
247
|
+
- vendor/reveal.js/test/examples/assets/image1.png
|
248
|
+
- vendor/reveal.js/test/examples/assets/image2.png
|
249
|
+
- vendor/reveal.js/test/examples/barebones.html
|
250
|
+
- vendor/reveal.js/test/examples/embedded-media.html
|
251
|
+
- vendor/reveal.js/test/examples/math.html
|
252
|
+
- vendor/reveal.js/test/examples/slide-backgrounds.html
|
253
|
+
- vendor/reveal.js/test/qunit-1.12.0.css
|
254
|
+
- vendor/reveal.js/test/qunit-1.12.0.js
|
255
|
+
- vendor/reveal.js/test/test-markdown-element-attributes.html
|
256
|
+
- vendor/reveal.js/test/test-markdown-element-attributes.js
|
257
|
+
- vendor/reveal.js/test/test-markdown-slide-attributes.html
|
258
|
+
- vendor/reveal.js/test/test-markdown-slide-attributes.js
|
259
|
+
- vendor/reveal.js/test/test-markdown.html
|
260
|
+
- vendor/reveal.js/test/test-markdown.js
|
261
|
+
- vendor/reveal.js/test/test.html
|
262
|
+
- vendor/reveal.js/test/test.js
|
250
263
|
homepage: ''
|
251
264
|
licenses:
|
252
265
|
- MIT
|
@@ -257,17 +270,17 @@ require_paths:
|
|
257
270
|
- lib
|
258
271
|
required_ruby_version: !ruby/object:Gem::Requirement
|
259
272
|
requirements:
|
260
|
-
- -
|
273
|
+
- - ">="
|
261
274
|
- !ruby/object:Gem::Version
|
262
275
|
version: '0'
|
263
276
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
277
|
requirements:
|
265
|
-
- -
|
278
|
+
- - ">="
|
266
279
|
- !ruby/object:Gem::Version
|
267
280
|
version: '0'
|
268
281
|
requirements: []
|
269
282
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.
|
283
|
+
rubygems_version: 2.2.2
|
271
284
|
signing_key:
|
272
285
|
specification_version: 4
|
273
286
|
summary: Used for creating slide decks backed by reveal.js
|