deckrb 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/deck/slide_deck.rb +1 -1
- data/lib/deck/version.rb +1 -1
- data/spec/slide_deck_spec.rb +19 -15
- data/spec/slide_spec.rb +13 -6
- metadata +24 -50
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: af7484f5aef4d69adf97919d4e8c9202275a4881
|
4
|
+
data.tar.gz: 1e857e4d5ac9c9ff6cf47d2ca18bc625fdf3923f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9a2ee9e89e8b95bacf4e0fef61466dab7110788d49619e1892f349f126f8eddff0d9bbb6e94d5fa7183a72df7090321c0c98d8c007abb24667c31bf3f3b8898c
|
7
|
+
data.tar.gz: 0cea5dca9554e9a226e217fda529c9bff557bf778a5fdd4597c726269669c3bc0cc873ff847caa37531355b0f2c439447d5c1efc431395a4b9f9ae4d7559274e
|
data/lib/deck/slide_deck.rb
CHANGED
data/lib/deck/version.rb
CHANGED
data/spec/slide_deck_spec.rb
CHANGED
@@ -8,20 +8,25 @@ module Deck
|
|
8
8
|
|
9
9
|
include Files
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
@html = deck_widget.to_html
|
14
|
-
noko_doc @html
|
15
|
-
end
|
16
|
-
end
|
11
|
+
let(:html) { deck_widget.to_html }
|
12
|
+
let(:doc) { noko_doc html }
|
17
13
|
|
18
14
|
def deck_widget options = {}
|
19
15
|
@deck_widget ||= SlideDeck.new options
|
20
16
|
end
|
21
17
|
|
18
|
+
def assert_html_like actual, expected
|
19
|
+
actual = actual.strip.gsub("\n\n", "\n")
|
20
|
+
expected = expected.strip.gsub("\n\n", "\n")
|
21
|
+
assert { actual == expected }
|
22
|
+
end
|
23
|
+
|
22
24
|
it "renders a basic deck.js HTML page" do
|
23
|
-
assert {
|
24
|
-
|
25
|
+
assert { html.include? '<link href="/deck.js/core/deck.core.css" rel="stylesheet" />' }
|
26
|
+
end
|
27
|
+
|
28
|
+
it "starts the deck script running" do
|
29
|
+
assert { html.include? "$.deck('.slide');" }
|
25
30
|
end
|
26
31
|
|
27
32
|
it "contains a single dummy slide" do
|
@@ -35,17 +40,17 @@ module Deck
|
|
35
40
|
assert { slides.size == 1 }
|
36
41
|
slide = slides.first
|
37
42
|
assert { slide["id"] == "hello" }
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}
|
43
|
+
|
44
|
+
slide_html = noko_html(slide)
|
45
|
+
slide_html.gsub!("\n", "") # WTF Nokogiri inconsistently outputs newlines between Ruby 1.9 and 2.0
|
46
|
+
assert { slide_html == "<section class=\"slide\" id=\"hello\">" + "<h1>hello</h1>" + "</section>" }
|
42
47
|
end
|
43
48
|
|
44
49
|
it "includes a table of contents" do
|
45
50
|
deck_widget :slides => Slide.split("# Foo\n\n# Bar\n")
|
46
51
|
toc = doc.css('.slide_toc')
|
47
52
|
assert { toc.size == 1 }
|
48
|
-
|
53
|
+
assert_html_like noko_html(toc.first), "<div class=\"slide_toc\">" +
|
49
54
|
"<div class=\"toggle\">[contents]</div>" +
|
50
55
|
"<div class=\"table\">" +
|
51
56
|
"<h2>deck.rb presentation</h2>" +
|
@@ -53,9 +58,8 @@ module Deck
|
|
53
58
|
"<li><a href=\"#foo\">Foo</a></li>" +
|
54
59
|
"<li><a href=\"#bar\">Bar</a></li>" +
|
55
60
|
"</ul>" +
|
61
|
+
"</div>" +
|
56
62
|
"</div>"
|
57
|
-
"</div>"
|
58
|
-
}
|
59
63
|
end
|
60
64
|
|
61
65
|
describe "themes" do
|
data/spec/slide_spec.rb
CHANGED
@@ -6,6 +6,13 @@ require "deck/slide"
|
|
6
6
|
module Deck
|
7
7
|
describe Slide do
|
8
8
|
|
9
|
+
def assert_html_like actual, expected
|
10
|
+
actual = actual.strip.gsub("\n\n", "\n")
|
11
|
+
expected = expected.strip.gsub("\n\n", "\n")
|
12
|
+
assert { actual == expected }
|
13
|
+
end
|
14
|
+
|
15
|
+
|
9
16
|
describe "classes" do
|
10
17
|
it "by default" do
|
11
18
|
assert {Slide.new.classes == ["slide"]}
|
@@ -246,7 +253,7 @@ Two
|
|
246
253
|
</ul>
|
247
254
|
</section>
|
248
255
|
HTML
|
249
|
-
|
256
|
+
assert_html_like html, expected_html
|
250
257
|
end
|
251
258
|
|
252
259
|
it "with only a underline-style header, leaving a solo H1 as an H1" do
|
@@ -259,7 +266,7 @@ foo
|
|
259
266
|
<h1>foo</h1>
|
260
267
|
</section>
|
261
268
|
HTML
|
262
|
-
|
269
|
+
assert_html_like html, expected_html
|
263
270
|
end
|
264
271
|
|
265
272
|
it "converts a non-solo underline-style H1 into an H2 for deck.js style compatibility)" do
|
@@ -279,7 +286,7 @@ foo
|
|
279
286
|
</ul>
|
280
287
|
</section>
|
281
288
|
HTML
|
282
|
-
|
289
|
+
assert_html_like html, expected_html
|
283
290
|
end
|
284
291
|
|
285
292
|
it "skips notes" do
|
@@ -291,7 +298,7 @@ baz</p>
|
|
291
298
|
</section>
|
292
299
|
HTML
|
293
300
|
|
294
|
-
|
301
|
+
assert_html_like slide_from(source).to_pretty, expected
|
295
302
|
end
|
296
303
|
|
297
304
|
end
|
@@ -314,7 +321,7 @@ baz</p>
|
|
314
321
|
</ul>
|
315
322
|
</section>
|
316
323
|
HTML
|
317
|
-
|
324
|
+
assert_html_like html, expected_html
|
318
325
|
end
|
319
326
|
end
|
320
327
|
|
@@ -336,7 +343,7 @@ baz</p>
|
|
336
343
|
</ul>
|
337
344
|
</section>
|
338
345
|
HTML
|
339
|
-
|
346
|
+
assert_html_like html, expected_html
|
340
347
|
end
|
341
348
|
end
|
342
349
|
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deckrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Alex Chaffee
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: erector
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.9.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
26
|
version: 0.9.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: redcarpet
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
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
|
@@ -46,113 +41,99 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rack
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 1.4.1
|
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
54
|
version: 1.4.1
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: thin
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
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
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: trollop
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
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
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: nokogiri
|
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'
|
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'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: coderay
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - '>='
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - '>='
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: json
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - '>='
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - '>='
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: rack-codehighlighter
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - '>='
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
type: :runtime
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - '>='
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: '0'
|
158
139
|
description: deck.js (http://imakewebthings.github.com/deck.js) is a JavaScript library
|
@@ -247,35 +228,28 @@ files:
|
|
247
228
|
- spec/slide_spec.rb
|
248
229
|
- spec/spec_helper.rb
|
249
230
|
- bin/deck
|
250
|
-
homepage: http://github.com/alexch/deck
|
231
|
+
homepage: http://github.com/alexch/deck.rb
|
251
232
|
licenses: []
|
233
|
+
metadata: {}
|
252
234
|
post_install_message:
|
253
235
|
rdoc_options: []
|
254
236
|
require_paths:
|
255
237
|
- lib
|
256
238
|
required_ruby_version: !ruby/object:Gem::Requirement
|
257
|
-
none: false
|
258
239
|
requirements:
|
259
|
-
- -
|
240
|
+
- - '>='
|
260
241
|
- !ruby/object:Gem::Version
|
261
242
|
version: '0'
|
262
|
-
segments:
|
263
|
-
- 0
|
264
|
-
hash: -3758130205388409749
|
265
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
|
-
none: false
|
267
244
|
requirements:
|
268
|
-
- -
|
245
|
+
- - '>='
|
269
246
|
- !ruby/object:Gem::Version
|
270
247
|
version: '0'
|
271
|
-
segments:
|
272
|
-
- 0
|
273
|
-
hash: -3758130205388409749
|
274
248
|
requirements: []
|
275
249
|
rubyforge_project:
|
276
|
-
rubygems_version:
|
250
|
+
rubygems_version: 2.0.5
|
277
251
|
signing_key:
|
278
|
-
specification_version:
|
252
|
+
specification_version: 4
|
279
253
|
summary: Make HTML slide shows; wraps deck.js
|
280
254
|
test_files:
|
281
255
|
- spec/javascripts/support/jasmine_config.rb
|