trickster 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.rdoc +4 -0
- data/lib/trickster.rb +1 -0
- data/lib/trickster/renderer/freeform_renderer.rb +9 -0
- data/lib/trickster/slide_renderer.rb +1 -0
- data/lib/trickster/version.rb +1 -1
- data/test/slide_renderer_test.rb +19 -0
- data/test_slides +18 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cbd32e7bfd1f9179242368244df932da57a3e0f
|
4
|
+
data.tar.gz: 321ce664454f8351575baeee7fd82e1f193bdbb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5901ea211e0282e9b50a0dbd3ad54097246050b6e0d9b411ed109b070326285c963c5aeaeae5f47622154f66315689d73834c3895c8fd995d1fd01eee8cfc58
|
7
|
+
data.tar.gz: b2de674a15470b8ac4cc5098111683cc0fddaabc1952dc1d07e512425fd5eb58931baa0f033312f22c01f33e3b746a4487541e02dc14fd7ab579594ba1e8ddb4
|
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
@@ -59,6 +59,10 @@ The first line is the url to the image to show. Trickster will size the image d
|
|
59
59
|
|
60
60
|
If the first line starts with <tt>file://</tt>, the contents of this file is read in as the contents of the code block. Otherwise, the entire contents of the slide is verbatim put into a +pre+ and then +code+ block. Syntax highlighting is done using +highlight.js+.
|
61
61
|
|
62
|
+
== FREEFORM
|
63
|
+
|
64
|
+
The slide's content is passed through verbatim (keeping in mind that blank lines are slide delimiters). This allows you to do more sophisticated layouts like tables or floats.
|
65
|
+
|
62
66
|
=== Language
|
63
67
|
|
64
68
|
By default, no language is specified for highlighting, so +highlight.js+ will make a guess. If you'd like to be explicit, use the +language+ option, e.g.
|
data/lib/trickster.rb
CHANGED
@@ -21,6 +21,7 @@ module Trickster
|
|
21
21
|
hash["COMMANDLINE"] = Renderer::CommandlineRenderer.new
|
22
22
|
hash["BULLETS"] = Renderer::BulletsRenderer.new
|
23
23
|
hash["CODE"] = Renderer::CodeRenderer.new
|
24
|
+
hash["FREEFORM"] = Renderer::FreeformRenderer.new
|
24
25
|
}.freeze
|
25
26
|
|
26
27
|
def write_slide(slide_type,content,slide)
|
data/lib/trickster/version.rb
CHANGED
data/test/slide_renderer_test.rb
CHANGED
@@ -85,6 +85,25 @@ class SlideRendererTest < Clean::Test::TestCase
|
|
85
85
|
}
|
86
86
|
end
|
87
87
|
|
88
|
+
test_that "a free-form slide just passes through the HTML" do
|
89
|
+
Given {
|
90
|
+
@html = %{<h1>This is some stuff</h1>
|
91
|
+
<table>
|
92
|
+
<thead><tr><th>Name</th><th>Age</th></tr></thead>
|
93
|
+
<tbody>
|
94
|
+
<tr><td>Bob</td><td>24</td></tr>
|
95
|
+
<tr><td>Rudy</td><td>13</td></tr>
|
96
|
+
</tbody>
|
97
|
+
</table>}
|
98
|
+
}
|
99
|
+
When {
|
100
|
+
@renderer.render_slide("FREEFORM",@html.split("\n"))
|
101
|
+
}
|
102
|
+
Then {
|
103
|
+
assert_content("FREEFORM",@html,@renderer.content)
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
88
107
|
test_that "bullets get the first line as title, remainder as bullets, removing the bullet char" do
|
89
108
|
Given {
|
90
109
|
@title = any_string
|
data/test_slides
CHANGED
@@ -43,3 +43,21 @@ drwxr-xr-x 3 David staff 102 Sep 10 17:07 tmp
|
|
43
43
|
drwxr-xr-x 9 David staff 306 Sep 10 17:19 test
|
44
44
|
> rm *
|
45
45
|
|
46
|
+
!FREEFORM
|
47
|
+
<h1>This is a freeform slide</h1>
|
48
|
+
<table>
|
49
|
+
<thead><tr>
|
50
|
+
<th>Name</th><th>Age</th><th>Role</th>
|
51
|
+
</tr></thead>
|
52
|
+
<tbody>
|
53
|
+
<tr>
|
54
|
+
<td>Dave</td><td>40</td><td>Husband</td>
|
55
|
+
</tr>
|
56
|
+
<tr>
|
57
|
+
<td>Amy</td><td>One shouldn't ask</td><td>Wife</td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td>Rudy</td><td>13</td><td>Cat</td>
|
61
|
+
</tr>
|
62
|
+
</tbody>
|
63
|
+
</table>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trickster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Copeland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -207,6 +207,7 @@ files:
|
|
207
207
|
- lib/trickster/renderer/bullets_renderer.rb
|
208
208
|
- lib/trickster/renderer/code_renderer.rb
|
209
209
|
- lib/trickster/renderer/commandline_renderer.rb
|
210
|
+
- lib/trickster/renderer/freeform_renderer.rb
|
210
211
|
- lib/trickster/renderer/image_renderer.rb
|
211
212
|
- lib/trickster/renderer/normal_renderer.rb
|
212
213
|
- lib/trickster/slide_parser.rb
|