reveal-ck 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. data/.gitmodules +3 -0
  2. data/.rspec +2 -0
  3. data/.rvmrc +16 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +15 -0
  6. data/Gemfile.lock +52 -0
  7. data/LICENSE +20 -0
  8. data/README.md +103 -0
  9. data/Rakefile +16 -0
  10. data/VERSION +1 -0
  11. data/bin/reveal-ck +46 -0
  12. data/features/data/images/ruby100.png +0 -0
  13. data/features/generate.feature +63 -0
  14. data/features/help.feature +18 -0
  15. data/features/step_definitions/file_management_steps.rb +3 -0
  16. data/features/support/env.rb +15 -0
  17. data/features/support/file_management.rb +16 -0
  18. data/lib/reveal-ck.rb +4 -0
  19. data/lib/reveal-ck/file_slicer.rb +23 -0
  20. data/lib/reveal-ck/file_splicer.rb +39 -0
  21. data/lib/reveal-ck/haml_processor.rb +24 -0
  22. data/lib/reveal-ck/version.rb +4 -0
  23. data/rakelib/cucumber.rake +2 -0
  24. data/rakelib/jeweler.rake +12 -0
  25. data/rakelib/presentation.rake +40 -0
  26. data/rakelib/reveal.rake +15 -0
  27. data/rakelib/rspec.rake +5 -0
  28. data/reveal-ck.gemspec +152 -0
  29. data/reveal.js/LICENSE +19 -0
  30. data/reveal.js/README.md +374 -0
  31. data/reveal.js/css/print/paper.css +176 -0
  32. data/reveal.js/css/print/pdf.css +160 -0
  33. data/reveal.js/css/reveal.css +1312 -0
  34. data/reveal.js/css/reveal.min.css +7 -0
  35. data/reveal.js/css/shaders/tile-flip.fs +64 -0
  36. data/reveal.js/css/shaders/tile-flip.vs +141 -0
  37. data/reveal.js/css/theme/README.md +25 -0
  38. data/reveal.js/css/theme/beige.css +163 -0
  39. data/reveal.js/css/theme/default.css +163 -0
  40. data/reveal.js/css/theme/night.css +150 -0
  41. data/reveal.js/css/theme/serif.css +150 -0
  42. data/reveal.js/css/theme/simple.css +152 -0
  43. data/reveal.js/css/theme/sky.css +156 -0
  44. data/reveal.js/css/theme/source/beige.scss +50 -0
  45. data/reveal.js/css/theme/source/default.scss +42 -0
  46. data/reveal.js/css/theme/source/night.scss +35 -0
  47. data/reveal.js/css/theme/source/serif.scss +33 -0
  48. data/reveal.js/css/theme/source/simple.scss +38 -0
  49. data/reveal.js/css/theme/source/sky.scss +41 -0
  50. data/reveal.js/css/theme/template/mixins.scss +29 -0
  51. data/reveal.js/css/theme/template/settings.scss +33 -0
  52. data/reveal.js/css/theme/template/theme.scss +163 -0
  53. data/reveal.js/grunt.js +84 -0
  54. data/reveal.js/index.html +375 -0
  55. data/reveal.js/js/reveal.js +1796 -0
  56. data/reveal.js/js/reveal.min.js +8 -0
  57. data/reveal.js/lib/css/zenburn.css +115 -0
  58. data/reveal.js/lib/font/league_gothic-webfont.eot +0 -0
  59. data/reveal.js/lib/font/league_gothic-webfont.svg +230 -0
  60. data/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
  61. data/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
  62. data/reveal.js/lib/font/league_gothic_license +2 -0
  63. data/reveal.js/lib/js/classList.js +2 -0
  64. data/reveal.js/lib/js/head.min.js +8 -0
  65. data/reveal.js/lib/js/html5shiv.js +7 -0
  66. data/reveal.js/package.json +31 -0
  67. data/reveal.js/plugin/highlight/highlight.js +9 -0
  68. data/reveal.js/plugin/markdown/markdown.js +37 -0
  69. data/reveal.js/plugin/markdown/showdown.js +62 -0
  70. data/reveal.js/plugin/notes-server/client.js +57 -0
  71. data/reveal.js/plugin/notes-server/index.js +58 -0
  72. data/reveal.js/plugin/notes-server/notes.html +139 -0
  73. data/reveal.js/plugin/notes/notes.html +164 -0
  74. data/reveal.js/plugin/notes/notes.js +98 -0
  75. data/reveal.js/plugin/postmessage/example.html +39 -0
  76. data/reveal.js/plugin/postmessage/postmessage.js +42 -0
  77. data/reveal.js/plugin/print-pdf/print-pdf.js +39 -0
  78. data/reveal.js/plugin/remotes/remotes.js +30 -0
  79. data/reveal.js/plugin/zoom-js/zoom.js +251 -0
  80. data/spec/data/haml/basic.haml +7 -0
  81. data/spec/data/html/converted_basic_haml.html +10 -0
  82. data/spec/data/html/reveal-js-index.html +375 -0
  83. data/spec/data/slicer/after_remove +6 -0
  84. data/spec/data/slicer/before_remove +10 -0
  85. data/spec/data/splicer/abcd +4 -0
  86. data/spec/data/splicer/after_insert +14 -0
  87. data/spec/data/splicer/before_insert +10 -0
  88. data/spec/lib/reveal-ck/file_slicer_spec.rb +42 -0
  89. data/spec/lib/reveal-ck/file_splicer_spec.rb +41 -0
  90. data/spec/lib/reveal-ck/haml_processor_spec.rb +38 -0
  91. data/spec/spec_helper.rb +27 -0
  92. metadata +271 -0
@@ -0,0 +1,42 @@
1
+ require 'spec_helper'
2
+ require 'fileutils'
3
+ require 'tmpdir'
4
+
5
+ describe FileSlicer do
6
+
7
+ describe '.remove!' do
8
+
9
+ let :before_remove do
10
+ File.join spec_dir, 'data', 'slicer', 'before_remove'
11
+ end
12
+
13
+ let :after_remove do
14
+ File.join spec_dir, 'data', 'slicer', 'after_remove'
15
+ end
16
+
17
+ it 'removes a range of lines from a file' do
18
+ Dir.mktmpdir do |tmp_dir|
19
+ FileUtils.cp before_remove, tmp_dir
20
+ test_file = File.join tmp_dir, 'before_remove'
21
+ FileSlicer.remove! test_file, 3..6
22
+ test_file_contents = File.open(test_file).read
23
+ after_remove_contents = File.open(after_remove).read
24
+ test_file_contents.should == after_remove_contents
25
+ end
26
+ end
27
+ end
28
+
29
+ describe '#remove' do
30
+
31
+ it 'returns lines with the range removed' do
32
+ lines = [
33
+ 'a',
34
+ 'b',
35
+ 'c',
36
+ 'd'
37
+ ]
38
+ slicer = FileSlicer.new lines
39
+ slicer.remove(1..2).should == ['a', 'd']
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+ require 'fileutils'
3
+ require 'tmpdir'
4
+
5
+ describe FileSplicer do
6
+
7
+ describe '.insert!' do
8
+
9
+ let :before_insert do
10
+ File.join spec_dir, 'data', 'splicer', 'before_insert'
11
+ end
12
+
13
+ let :abcd do
14
+ File.join spec_dir, 'data', 'splicer', 'abcd'
15
+ end
16
+
17
+ let :after_insert do
18
+ File.join spec_dir, 'data', 'splicer', 'after_insert'
19
+ end
20
+
21
+ it 'inserts one file into another' do
22
+ Dir.mktmpdir do |tmp_dir|
23
+ FileUtils.cp before_insert, tmp_dir
24
+ test_file = File.join tmp_dir, 'before_insert'
25
+ FileSplicer.insert! abcd, into: test_file, after: '3'
26
+ test_file_contents = File.open(test_file).read
27
+ after_insert_contents = File.open(after_insert).read
28
+ test_file_contents.should == after_insert_contents
29
+ end
30
+ end
31
+ end
32
+
33
+ describe '#insert' do
34
+ it 'inserts lines after a match' do
35
+ original = ['0', '1', '2', '3']
36
+ splicer = FileSplicer.new original
37
+ result = splicer.insert ['a', 'b', 'c'], after: '2'
38
+ result.should == ['0', '1', '2', 'a', 'b', 'c', '3']
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,38 @@
1
+ require 'spec_helper'
2
+
3
+ describe HamlProcessor do
4
+
5
+ it 'can convert haml to html' do
6
+ p = HamlProcessor.new "%p hi"
7
+ p.html.should =~ %r{<p>hi</p>}
8
+ end
9
+
10
+ describe '.open' do
11
+
12
+ let :abs_haml_file do
13
+ spec_dir = File.expand_path(File.join(__FILE__, '..', '..', '..'))
14
+ File.join spec_dir, 'data', 'haml', 'basic.haml'
15
+ end
16
+
17
+ let :rel_haml_file do
18
+ 'spec/data/haml/basic.haml'
19
+ end
20
+
21
+ let :html_version do
22
+ spec_dir = File.expand_path(File.join(__FILE__, '..', '..', '..'))
23
+ html = File.join spec_dir, 'data', 'html', 'converted_basic_haml.html'
24
+ File.open(html).read
25
+ end
26
+
27
+ it 'converts an entire file via absolute path' do
28
+ processor = HamlProcessor.open abs_haml_file
29
+ processor.html.should == html_version
30
+ end
31
+
32
+ it 'converts an entire file via relative path' do
33
+ processor = HamlProcessor.open rel_haml_file
34
+ processor.html.should == html_version
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,27 @@
1
+ require_relative '../lib/reveal-ck'
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # Require this file using `require "spec_helper"` to ensure that it is only
6
+ # loaded once.
7
+ #
8
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
9
+ RSpec.configure do |config|
10
+ config.treat_symbols_as_metadata_keys_with_true_values = true
11
+ config.run_all_when_everything_filtered = true
12
+ config.filter_run :focus
13
+
14
+ # Run specs in random order to surface order dependencies. If you find an
15
+ # order dependency and want to debug it, you can fix the order by providing
16
+ # the seed, which is printed after each run.
17
+ # --seed 1234
18
+ config.order = 'random'
19
+ end
20
+
21
+ # Utility function: returns the reveal-ck/spec directory
22
+ def spec_dir
23
+ invoking_spec = caller[0].split(':')[0]
24
+ parent_dir_of_spec = File.dirname invoking_spec
25
+ spec_index = parent_dir_of_spec.rindex 'spec'
26
+ parent_dir_of_spec[0...(spec_index + 'spec'.size)]
27
+ end
metadata ADDED
@@ -0,0 +1,271 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: reveal-ck
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jed Northridge
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: haml
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: gli
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: jeweler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: bundler
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: cucumber
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: aruba
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ description: A reveal.js construction kit
143
+ email: northridge@gmail.com
144
+ executables:
145
+ - reveal-ck
146
+ extensions: []
147
+ extra_rdoc_files:
148
+ - LICENSE
149
+ - README.md
150
+ files:
151
+ - .gitmodules
152
+ - .rspec
153
+ - .rvmrc
154
+ - .travis.yml
155
+ - Gemfile
156
+ - Gemfile.lock
157
+ - LICENSE
158
+ - README.md
159
+ - Rakefile
160
+ - VERSION
161
+ - bin/reveal-ck
162
+ - features/data/images/ruby100.png
163
+ - features/generate.feature
164
+ - features/help.feature
165
+ - features/step_definitions/file_management_steps.rb
166
+ - features/support/env.rb
167
+ - features/support/file_management.rb
168
+ - lib/reveal-ck.rb
169
+ - lib/reveal-ck/file_slicer.rb
170
+ - lib/reveal-ck/file_splicer.rb
171
+ - lib/reveal-ck/haml_processor.rb
172
+ - lib/reveal-ck/version.rb
173
+ - rakelib/cucumber.rake
174
+ - rakelib/jeweler.rake
175
+ - rakelib/presentation.rake
176
+ - rakelib/reveal.rake
177
+ - rakelib/rspec.rake
178
+ - reveal-ck.gemspec
179
+ - reveal.js/LICENSE
180
+ - reveal.js/README.md
181
+ - reveal.js/css/print/paper.css
182
+ - reveal.js/css/print/pdf.css
183
+ - reveal.js/css/reveal.css
184
+ - reveal.js/css/reveal.min.css
185
+ - reveal.js/css/shaders/tile-flip.fs
186
+ - reveal.js/css/shaders/tile-flip.vs
187
+ - reveal.js/css/theme/README.md
188
+ - reveal.js/css/theme/beige.css
189
+ - reveal.js/css/theme/default.css
190
+ - reveal.js/css/theme/night.css
191
+ - reveal.js/css/theme/serif.css
192
+ - reveal.js/css/theme/simple.css
193
+ - reveal.js/css/theme/sky.css
194
+ - reveal.js/css/theme/source/beige.scss
195
+ - reveal.js/css/theme/source/default.scss
196
+ - reveal.js/css/theme/source/night.scss
197
+ - reveal.js/css/theme/source/serif.scss
198
+ - reveal.js/css/theme/source/simple.scss
199
+ - reveal.js/css/theme/source/sky.scss
200
+ - reveal.js/css/theme/template/mixins.scss
201
+ - reveal.js/css/theme/template/settings.scss
202
+ - reveal.js/css/theme/template/theme.scss
203
+ - reveal.js/grunt.js
204
+ - reveal.js/index.html
205
+ - reveal.js/js/reveal.js
206
+ - reveal.js/js/reveal.min.js
207
+ - reveal.js/lib/css/zenburn.css
208
+ - reveal.js/lib/font/league_gothic-webfont.eot
209
+ - reveal.js/lib/font/league_gothic-webfont.svg
210
+ - reveal.js/lib/font/league_gothic-webfont.ttf
211
+ - reveal.js/lib/font/league_gothic-webfont.woff
212
+ - reveal.js/lib/font/league_gothic_license
213
+ - reveal.js/lib/js/classList.js
214
+ - reveal.js/lib/js/head.min.js
215
+ - reveal.js/lib/js/html5shiv.js
216
+ - reveal.js/package.json
217
+ - reveal.js/plugin/highlight/highlight.js
218
+ - reveal.js/plugin/markdown/markdown.js
219
+ - reveal.js/plugin/markdown/showdown.js
220
+ - reveal.js/plugin/notes-server/client.js
221
+ - reveal.js/plugin/notes-server/index.js
222
+ - reveal.js/plugin/notes-server/notes.html
223
+ - reveal.js/plugin/notes/notes.html
224
+ - reveal.js/plugin/notes/notes.js
225
+ - reveal.js/plugin/postmessage/example.html
226
+ - reveal.js/plugin/postmessage/postmessage.js
227
+ - reveal.js/plugin/print-pdf/print-pdf.js
228
+ - reveal.js/plugin/remotes/remotes.js
229
+ - reveal.js/plugin/zoom-js/zoom.js
230
+ - spec/data/haml/basic.haml
231
+ - spec/data/html/converted_basic_haml.html
232
+ - spec/data/html/reveal-js-index.html
233
+ - spec/data/slicer/after_remove
234
+ - spec/data/slicer/before_remove
235
+ - spec/data/splicer/abcd
236
+ - spec/data/splicer/after_insert
237
+ - spec/data/splicer/before_insert
238
+ - spec/lib/reveal-ck/file_slicer_spec.rb
239
+ - spec/lib/reveal-ck/file_splicer_spec.rb
240
+ - spec/lib/reveal-ck/haml_processor_spec.rb
241
+ - spec/spec_helper.rb
242
+ homepage: https://github.com/jedcn/reveal-ck
243
+ licenses:
244
+ - MIT
245
+ post_install_message:
246
+ rdoc_options: []
247
+ require_paths:
248
+ - lib
249
+ required_ruby_version: !ruby/object:Gem::Requirement
250
+ none: false
251
+ requirements:
252
+ - - ! '>='
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ segments:
256
+ - 0
257
+ hash: 2970207072739408718
258
+ required_rubygems_version: !ruby/object:Gem::Requirement
259
+ none: false
260
+ requirements:
261
+ - - ! '>='
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ requirements: []
265
+ rubyforge_project:
266
+ rubygems_version: 1.8.24
267
+ signing_key:
268
+ specification_version: 3
269
+ summary: A toolkit that takes a minimal description of slides and builds a reveal.js
270
+ presentation
271
+ test_files: []