slide-em-up 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ module SlideEmUp
20
20
  @meta = build_meta(infos["title"], dir)
21
21
  @theme = build_theme(infos["theme"])
22
22
  @common = build_theme("common")
23
- @parts = infos["sections"]
23
+ @parts = infos["sections"] || raise(Exception, "check your presentation.json or showoff.json file")
24
24
  @parts = Hash[@parts.zip @parts] if Array === @parts
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module SlideEmUp
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -96,6 +96,8 @@ var self = window.SlideShow = function(container, slide) {
96
96
  me.goto(location.hash.substr(1) || 0);
97
97
  };
98
98
  window.addEventListener('hashchange', this.onhashchange, false);
99
+
100
+ me.startEventSourceHandler('/remote/sub/events');
99
101
 
100
102
  if(window.name === 'projector') {
101
103
  document.body.classList.add('projector');
@@ -217,30 +219,6 @@ var self = window.SlideShow = function(container, slide) {
217
219
  }
218
220
  }, false);
219
221
 
220
- if (window['EventSource'] != undefined) {
221
- setTimeout(function() {
222
- var source = new EventSource('/remote/sub/events');
223
- source.onmessage = function(e) {
224
- switch(e.data){
225
- case 'next':
226
- me.next();
227
- break;
228
- case 'prev':
229
- me.prev();
230
- break;
231
- case 'up':
232
- me.next(true);
233
- break;
234
- case 'down':
235
- me.prev(true);
236
- break;
237
- default:
238
- console.log(e);
239
- };
240
- };
241
- }, 1000);
242
- }
243
-
244
222
  // Rudimentary style[scoped] polyfill
245
223
  var scoped = $$('style[scoped]', container);
246
224
 
@@ -464,7 +442,34 @@ self.prototype = {
464
442
  }
465
443
 
466
444
  return false;
467
- }
445
+ },
446
+
447
+ startEventSourceHandler: function(uri) {
448
+ if (window['EventSource'] == undefined) return ;
449
+
450
+ var source = new EventSource(uri);
451
+
452
+ var me = this;
453
+
454
+ source.onmessage = function(e) {
455
+ switch(e.data){
456
+ case 'next':
457
+ me.next();
458
+ break;
459
+ case 'prev':
460
+ me.previous();
461
+ break;
462
+ case 'up':
463
+ me.end();
464
+ break;
465
+ case 'down':
466
+ me.start();
467
+ break;
468
+ default:
469
+ console.log(e);
470
+ };
471
+ };
472
+ }
468
473
  };
469
474
 
470
475
  /**********************************************
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slide-em-up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-14 00:00:00.000000000 Z
12
+ date: 2011-10-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: goliath
16
- requirement: &79322510 !ruby/object:Gem::Requirement
16
+ requirement: &86023220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.9'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *79322510
24
+ version_requirements: *86023220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redcarpet
27
- requirement: &79369210 !ruby/object:Gem::Requirement
27
+ requirement: &86022920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.17'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *79369210
35
+ version_requirements: *86022920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: erubis
38
- requirement: &79368850 !ruby/object:Gem::Requirement
38
+ requirement: &86022620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.7'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *79368850
46
+ version_requirements: *86022620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yajl-ruby
49
- requirement: &79368530 !ruby/object:Gem::Requirement
49
+ requirement: &86022270 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0.8'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *79368530
57
+ version_requirements: *86022270
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: albino
60
- requirement: &79367970 !ruby/object:Gem::Requirement
60
+ requirement: &86021940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1.3'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *79367970
68
+ version_requirements: *86021940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
- requirement: &79367480 !ruby/object:Gem::Requirement
71
+ requirement: &86021710 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '2.3'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *79367480
79
+ version_requirements: *86021710
80
80
  description: Slide'em up is a presentation tool that displays markdown-formatted slides
81
81
  email: bruno.michel@af83.com
82
82
  executables:
@@ -89,50 +89,50 @@ files:
89
89
  - README.md
90
90
  - Gemfile
91
91
  - bin/slide-em-up
92
- - lib/slide-em-up/presentation.rb
92
+ - lib/slide-em-up.rb
93
93
  - lib/slide-em-up/slides_api.rb
94
- - lib/slide-em-up/version.rb
95
94
  - lib/slide-em-up/remote_api.rb
96
95
  - lib/slide-em-up/routes.rb
97
- - lib/slide-em-up.rb
96
+ - lib/slide-em-up/presentation.rb
97
+ - lib/slide-em-up/version.rb
98
+ - themes/shower/index.erb
99
+ - themes/shower/js/script.js
100
+ - themes/shower/css/fonts.css
101
+ - themes/shower/css/reset.css
102
+ - themes/shower/css/style.css
98
103
  - themes/shower/images/ribbon.svg
99
- - themes/shower/images/linen.png
100
104
  - themes/shower/images/grid.png
101
- - themes/shower/css/style.css
102
- - themes/shower/css/reset.css
103
- - themes/shower/css/fonts.css
105
+ - themes/shower/images/linen.png
104
106
  - themes/shower/README
105
- - themes/shower/index.erb
106
- - themes/shower/js/script.js
107
- - themes/html5rocks/css/sea_wave.css
108
- - themes/html5rocks/css/moon.css
109
- - themes/html5rocks/css/sand.css
110
- - themes/html5rocks/css/default.css
111
- - themes/html5rocks/README
112
- - themes/html5rocks/index.erb
113
- - themes/html5rocks/js/slides.js
114
- - themes/common/css/pygments/colorful.css
115
- - themes/common/css/pygments/native.css
116
- - themes/common/fonts/TargetBlank.otf
117
- - themes/common/fonts/crimson_text_bold.ttf
118
- - themes/common/fonts/DroidSansMono.ttf
119
- - themes/common/fonts/crimson_text_semibold.ttf
120
107
  - themes/common/fonts/league_gothic-webfont.ttf
121
108
  - themes/common/fonts/crimson_text.ttf
109
+ - themes/common/fonts/DroidSansMono.ttf
110
+ - themes/common/fonts/TargetBlank.otf
122
111
  - themes/common/fonts/DroidSansMono.svg
123
112
  - themes/common/fonts/TargetBlank.svg
124
- - themes/CSSS/images/rainbow-wood.jpg
113
+ - themes/common/fonts/crimson_text_bold.ttf
114
+ - themes/common/fonts/crimson_text_semibold.ttf
115
+ - themes/common/css/pygments/colorful.css
116
+ - themes/common/css/pygments/native.css
117
+ - themes/3d_slideshow/index.erb
118
+ - themes/3d_slideshow/js/slideshow.js
119
+ - themes/3d_slideshow/css/main.css
120
+ - themes/3d_slideshow/css/reset.css
121
+ - themes/3d_slideshow/README
122
+ - themes/html5rocks/index.erb
123
+ - themes/html5rocks/js/slides.js
124
+ - themes/html5rocks/css/sand.css
125
+ - themes/html5rocks/css/moon.css
126
+ - themes/html5rocks/css/default.css
127
+ - themes/html5rocks/css/sea_wave.css
128
+ - themes/html5rocks/README
129
+ - themes/CSSS/index.erb
130
+ - themes/CSSS/js/classList.js
131
+ - themes/CSSS/js/slideshow.js
125
132
  - themes/CSSS/css/slideshow.css
126
133
  - themes/CSSS/css/theme.css
134
+ - themes/CSSS/images/rainbow-wood.jpg
127
135
  - themes/CSSS/README
128
- - themes/CSSS/index.erb
129
- - themes/CSSS/js/slideshow.js
130
- - themes/CSSS/js/classList.js
131
- - themes/3d_slideshow/css/reset.css
132
- - themes/3d_slideshow/css/main.css
133
- - themes/3d_slideshow/README
134
- - themes/3d_slideshow/index.erb
135
- - themes/3d_slideshow/js/slideshow.js
136
136
  homepage: http://github.com/nono/slide-em-up
137
137
  licenses: []
138
138
  post_install_message:
@@ -153,8 +153,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 1.8.10
156
+ rubygems_version: 1.8.11
157
157
  signing_key:
158
158
  specification_version: 3
159
159
  summary: Slide'em up is a presentation tool that displays markdown-formatted slides
160
160
  test_files: []
161
+ has_rdoc: