reveal-ck 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +24 -129
- data/bin/reveal-ck +3 -2
- data/lib/reveal-ck.rb +1 -1
- data/lib/reveal-ck/presentation_builder.rb +5 -5
- data/lib/reveal-ck/template_processor.rb +29 -0
- data/lib/reveal-ck/version.rb +1 -1
- data/reveal.js/Gruntfile.js +6 -2
- data/reveal.js/README.md +139 -31
- data/reveal.js/css/print/paper.css +1 -1
- data/reveal.js/css/print/pdf.css +1 -1
- data/reveal.js/css/reveal.css +134 -88
- data/reveal.js/css/reveal.min.css +1 -1
- data/reveal.js/css/theme/template/settings.scss +1 -0
- data/reveal.js/css/theme/template/theme.scss +1 -1
- data/reveal.js/index.html +7 -6
- data/reveal.js/js/reveal.js +496 -299
- data/reveal.js/js/reveal.min.js +2 -2
- data/reveal.js/lib/css/zenburn.css +16 -17
- data/reveal.js/package.json +10 -9
- data/reveal.js/plugin/leap/leap.js +157 -0
- data/reveal.js/plugin/markdown/example.html +3 -2
- data/reveal.js/plugin/markdown/example.md +2 -0
- data/reveal.js/plugin/markdown/markdown.js +273 -143
- data/reveal.js/plugin/math/math.js +64 -0
- data/reveal.js/plugin/notes/notes.html +27 -17
- data/reveal.js/plugin/notes/notes.js +25 -47
- data/reveal.js/{examples → test/examples}/assets/image1.png +0 -0
- data/reveal.js/{examples → test/examples}/assets/image2.png +0 -0
- data/reveal.js/{examples → test/examples}/barebones.html +3 -3
- data/reveal.js/{examples → test/examples}/embedded-media.html +4 -4
- data/reveal.js/test/examples/math.html +185 -0
- data/reveal.js/{examples → test/examples}/slide-backgrounds.html +4 -4
- data/reveal.js/test/qunit-1.12.0.css +244 -0
- data/reveal.js/test/qunit-1.12.0.js +2212 -0
- data/reveal.js/test/test-markdown.html +52 -0
- data/reveal.js/test/test-markdown.js +15 -0
- data/reveal.js/test/test.html +62 -0
- data/reveal.js/test/test.js +353 -0
- data/spec/data/haml/basic.haml +2 -2
- data/spec/data/html/converted_basic_slim.html +10 -0
- data/spec/data/slim/basic.slim +5 -0
- data/spec/lib/reveal-ck/template_processor_spec.rb +29 -0
- metadata +50 -9
- data/lib/reveal-ck/haml_processor.rb +0 -26
- data/spec/lib/reveal-ck/haml_processor_spec.rb +0 -40
data/spec/data/haml/basic.haml
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module RevealCK
|
4
|
+
describe TemplateProcessor do
|
5
|
+
|
6
|
+
let :slim_file do
|
7
|
+
File.join Dir.pwd, 'spec', 'data', 'slim', 'basic.slim'
|
8
|
+
end
|
9
|
+
|
10
|
+
let :haml_file do
|
11
|
+
File.join Dir.pwd, 'spec', 'data', 'haml', 'basic.haml'
|
12
|
+
end
|
13
|
+
|
14
|
+
let :pretty_printed_basic do
|
15
|
+
/<p>\s+This is basic (Slim|Haml)\s+<\/p>/
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'can process a slim template' do
|
19
|
+
processor = TemplateProcessor.open slim_file
|
20
|
+
processor.output.should match pretty_printed_basic
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'can process a haml template' do
|
24
|
+
processor = TemplateProcessor.open haml_file
|
25
|
+
processor.output.should match pretty_printed_basic
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reveal-ck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jed Northridge
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: slim
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tilt
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.4'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.4'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: redcarpet
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,11 +187,6 @@ files:
|
|
159
187
|
- reveal.js/css/theme/template/mixins.scss
|
160
188
|
- reveal.js/css/theme/template/settings.scss
|
161
189
|
- reveal.js/css/theme/template/theme.scss
|
162
|
-
- reveal.js/examples/assets/image1.png
|
163
|
-
- reveal.js/examples/assets/image2.png
|
164
|
-
- reveal.js/examples/barebones.html
|
165
|
-
- reveal.js/examples/embedded-media.html
|
166
|
-
- reveal.js/examples/slide-backgrounds.html
|
167
190
|
- reveal.js/Gruntfile.js
|
168
191
|
- reveal.js/index.html
|
169
192
|
- reveal.js/js/reveal.js
|
@@ -180,10 +203,12 @@ files:
|
|
180
203
|
- reveal.js/LICENSE
|
181
204
|
- reveal.js/package.json
|
182
205
|
- reveal.js/plugin/highlight/highlight.js
|
206
|
+
- reveal.js/plugin/leap/leap.js
|
183
207
|
- reveal.js/plugin/markdown/example.html
|
184
208
|
- reveal.js/plugin/markdown/example.md
|
185
209
|
- reveal.js/plugin/markdown/markdown.js
|
186
210
|
- reveal.js/plugin/markdown/marked.js
|
211
|
+
- reveal.js/plugin/math/math.js
|
187
212
|
- reveal.js/plugin/multiplex/client.js
|
188
213
|
- reveal.js/plugin/multiplex/index.js
|
189
214
|
- reveal.js/plugin/multiplex/master.js
|
@@ -199,6 +224,18 @@ files:
|
|
199
224
|
- reveal.js/plugin/search/search.js
|
200
225
|
- reveal.js/plugin/zoom-js/zoom.js
|
201
226
|
- reveal.js/README.md
|
227
|
+
- reveal.js/test/examples/assets/image1.png
|
228
|
+
- reveal.js/test/examples/assets/image2.png
|
229
|
+
- reveal.js/test/examples/barebones.html
|
230
|
+
- reveal.js/test/examples/embedded-media.html
|
231
|
+
- reveal.js/test/examples/math.html
|
232
|
+
- reveal.js/test/examples/slide-backgrounds.html
|
233
|
+
- reveal.js/test/qunit-1.12.0.css
|
234
|
+
- reveal.js/test/qunit-1.12.0.js
|
235
|
+
- reveal.js/test/test-markdown.html
|
236
|
+
- reveal.js/test/test-markdown.js
|
237
|
+
- reveal.js/test/test.html
|
238
|
+
- reveal.js/test/test.js
|
202
239
|
- lib/reveal-ck.rb
|
203
240
|
- lib/reveal-ck/build_task.rb
|
204
241
|
- lib/reveal-ck/builder.rb
|
@@ -206,9 +243,9 @@ files:
|
|
206
243
|
- lib/reveal-ck/file_slicer.rb
|
207
244
|
- lib/reveal-ck/file_splicer.rb
|
208
245
|
- lib/reveal-ck/file_string_replacer.rb
|
209
|
-
- lib/reveal-ck/haml_processor.rb
|
210
246
|
- lib/reveal-ck/presentation_builder.rb
|
211
247
|
- lib/reveal-ck/slide_builder.rb
|
248
|
+
- lib/reveal-ck/template_processor.rb
|
212
249
|
- lib/reveal-ck/version.rb
|
213
250
|
- rakelib/cucumber.rake
|
214
251
|
- rakelib/rspec.rake
|
@@ -220,9 +257,11 @@ files:
|
|
220
257
|
- spec/data/config/config.toml
|
221
258
|
- spec/data/haml/basic.haml
|
222
259
|
- spec/data/html/converted_basic_haml.html
|
260
|
+
- spec/data/html/converted_basic_slim.html
|
223
261
|
- spec/data/html/reveal-js-index.html
|
224
262
|
- spec/data/slicer/after_remove
|
225
263
|
- spec/data/slicer/before_remove
|
264
|
+
- spec/data/slim/basic.slim
|
226
265
|
- spec/data/splicer/abcd
|
227
266
|
- spec/data/splicer/after_insert
|
228
267
|
- spec/data/splicer/before_insert
|
@@ -232,7 +271,7 @@ files:
|
|
232
271
|
- spec/lib/reveal-ck/file_slicer_spec.rb
|
233
272
|
- spec/lib/reveal-ck/file_splicer_spec.rb
|
234
273
|
- spec/lib/reveal-ck/file_string_replacer_spec.rb
|
235
|
-
- spec/lib/reveal-ck/
|
274
|
+
- spec/lib/reveal-ck/template_processor_spec.rb
|
236
275
|
- bin/reveal-ck
|
237
276
|
homepage: https://github.com/jedcn/reveal-ck
|
238
277
|
licenses:
|
@@ -267,9 +306,11 @@ test_files:
|
|
267
306
|
- spec/data/config/config.toml
|
268
307
|
- spec/data/haml/basic.haml
|
269
308
|
- spec/data/html/converted_basic_haml.html
|
309
|
+
- spec/data/html/converted_basic_slim.html
|
270
310
|
- spec/data/html/reveal-js-index.html
|
271
311
|
- spec/data/slicer/after_remove
|
272
312
|
- spec/data/slicer/before_remove
|
313
|
+
- spec/data/slim/basic.slim
|
273
314
|
- spec/data/splicer/abcd
|
274
315
|
- spec/data/splicer/after_insert
|
275
316
|
- spec/data/splicer/before_insert
|
@@ -279,4 +320,4 @@ test_files:
|
|
279
320
|
- spec/lib/reveal-ck/file_slicer_spec.rb
|
280
321
|
- spec/lib/reveal-ck/file_splicer_spec.rb
|
281
322
|
- spec/lib/reveal-ck/file_string_replacer_spec.rb
|
282
|
-
- spec/lib/reveal-ck/
|
323
|
+
- spec/lib/reveal-ck/template_processor_spec.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'haml'
|
2
|
-
require 'ostruct'
|
3
|
-
|
4
|
-
module RevealCK
|
5
|
-
class HamlProcessor
|
6
|
-
|
7
|
-
attr_reader :html
|
8
|
-
|
9
|
-
def initialize(haml)
|
10
|
-
render_context = ::OpenStruct.new({})
|
11
|
-
engine = ::Haml::Engine.new haml
|
12
|
-
@html = engine.render render_context
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.open(path)
|
16
|
-
haml_file = if File.exists? path
|
17
|
-
path
|
18
|
-
else
|
19
|
-
File.expand_path(File.join(Dir.pwd, path))
|
20
|
-
end
|
21
|
-
haml = File.open(haml_file).read
|
22
|
-
HamlProcessor.new haml
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
module RevealCK
|
4
|
-
describe HamlProcessor do
|
5
|
-
|
6
|
-
it 'can convert haml to html' do
|
7
|
-
p = HamlProcessor.new "%p hi"
|
8
|
-
p.html.should =~ %r{<p>hi</p>}
|
9
|
-
end
|
10
|
-
|
11
|
-
describe '.open' do
|
12
|
-
|
13
|
-
let :abs_haml_file do
|
14
|
-
spec_dir = File.expand_path(File.join(__FILE__, '..', '..', '..'))
|
15
|
-
File.join spec_dir, 'data', 'haml', 'basic.haml'
|
16
|
-
end
|
17
|
-
|
18
|
-
let :rel_haml_file do
|
19
|
-
'spec/data/haml/basic.haml'
|
20
|
-
end
|
21
|
-
|
22
|
-
let :html_version do
|
23
|
-
spec_dir = File.expand_path(File.join(__FILE__, '..', '..', '..'))
|
24
|
-
html = File.join spec_dir, 'data', 'html', 'converted_basic_haml.html'
|
25
|
-
File.open(html).read
|
26
|
-
end
|
27
|
-
|
28
|
-
it 'converts an entire file via absolute path' do
|
29
|
-
processor = HamlProcessor.open abs_haml_file
|
30
|
-
processor.html.should == html_version
|
31
|
-
end
|
32
|
-
|
33
|
-
it 'converts an entire file via relative path' do
|
34
|
-
processor = HamlProcessor.open rel_haml_file
|
35
|
-
processor.html.should == html_version
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|