network_executive 0.0.4 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +53 -24
- data/app/assets/fonts/network_executive/league_gothic.css +13 -0
- data/app/assets/fonts/network_executive/league_gothic.svg +148 -0
- data/app/assets/fonts/network_executive/league_gothic.ttf +0 -0
- data/app/assets/fonts/network_executive/league_gothic.woff +0 -0
- data/app/assets/javascripts/network_executive/components/iframe_notifier.coffee +14 -0
- data/app/assets/javascripts/network_executive/components/namespace.coffee +1 -0
- data/app/assets/javascripts/network_executive/components/osd.coffee +65 -0
- data/app/assets/javascripts/network_executive/components/photo_player.coffee +55 -0
- data/app/assets/javascripts/network_executive/components/postman.coffee +23 -0
- data/app/assets/javascripts/network_executive/components/set_top_box.coffee +81 -0
- data/app/assets/javascripts/network_executive/components/tweet_player.coffee +95 -0
- data/app/assets/javascripts/network_executive/components/you_tube_player.coffee +85 -0
- data/app/assets/javascripts/network_executive/slideshow.coffee +6 -0
- data/app/assets/javascripts/network_executive/twitter.coffee +7 -0
- data/app/assets/javascripts/network_executive/you_tube.coffee +8 -0
- data/app/assets/javascripts/network_executive.coffee +10 -0
- data/app/assets/stylesheets/network_executive/{gui_components.css → components/gui_components.css} +0 -0
- data/app/assets/stylesheets/network_executive/{normalize.css → components/normalize.css} +0 -0
- data/app/assets/stylesheets/network_executive/{osd.css → components/osd.css} +6 -34
- data/app/assets/stylesheets/network_executive/components/osd_guide.css +43 -0
- data/app/assets/stylesheets/network_executive/components/photo_player.css +61 -0
- data/app/assets/stylesheets/network_executive/{smpte.css → components/smpte.css} +0 -0
- data/app/assets/stylesheets/network_executive/components/tweet_player.css +60 -0
- data/app/assets/stylesheets/network_executive/components/you_tube_player.css +12 -0
- data/app/assets/stylesheets/network_executive/off_air.css +5 -0
- data/app/assets/stylesheets/network_executive/slideshow.css +4 -0
- data/app/assets/stylesheets/network_executive/twitter.css +5 -0
- data/app/assets/stylesheets/network_executive/you_tube.css +3 -0
- data/app/assets/stylesheets/{network_executive/application.css → network_executive.css} +5 -5
- data/app/controllers/network_executive/components_controller.rb +4 -0
- data/app/controllers/network_executive/guide_controller.rb +41 -0
- data/app/controllers/network_executive/programs_controller.rb +9 -0
- data/app/helpers/network_executive/network_helper.rb +6 -0
- data/app/models/network_executive/channel.rb +15 -14
- data/app/models/network_executive/guide.rb +65 -0
- data/app/models/network_executive/program.rb +69 -5
- data/app/models/network_executive/viewer.rb +4 -0
- data/app/programs/network_executive/off_air.rb +18 -0
- data/app/views/network_executive/components/slideshow.html.erb +20 -0
- data/app/views/network_executive/components/twitter.html.erb +16 -0
- data/app/views/network_executive/components/you_tube.html.erb +13 -0
- data/app/views/network_executive/guide/index.html.erb +30 -0
- data/app/views/network_executive/network/index.html.erb +3 -3
- data/app/views/network_executive/programs/off_air.html.erb +13 -0
- data/config/routes.rb +7 -1
- data/lib/network_executive/channel_schedule.rb +65 -0
- data/lib/network_executive/components/photo_player.rb +48 -0
- data/lib/network_executive/components/tweet_player.rb +48 -0
- data/lib/network_executive/components/you_tube_player.rb +15 -0
- data/lib/network_executive/components.rb +3 -0
- data/lib/network_executive/engine.rb +29 -3
- data/lib/network_executive/off_air_schedule.rb +18 -0
- data/lib/network_executive/producer.rb +3 -3
- data/lib/network_executive/program_schedule.rb +96 -0
- data/lib/network_executive/program_schedule_proxy.rb +55 -0
- data/lib/network_executive/scheduled_program.rb +26 -0
- data/lib/network_executive/scheduling.rb +15 -21
- data/lib/network_executive/time_calculations.rb +10 -0
- data/lib/network_executive/version.rb +1 -1
- data/lib/network_executive.rb +2 -1
- data/network_executive.gemspec +5 -0
- data/spec/models/channel_spec.rb +30 -12
- data/spec/models/{lineup_spec.rb → guide_spec.rb} +28 -6
- data/spec/models/program_spec.rb +46 -3
- data/spec/models/viewer_spec.rb +9 -1
- data/spec/programs/off_air_spec.rb +9 -0
- data/spec/spec_helper.rb +3 -2
- data/spec/unit/channel_schedule_spec.rb +67 -0
- data/spec/unit/components/photo_player_spec.rb +76 -0
- data/spec/unit/components/tweet_player_spec.rb +68 -0
- data/spec/unit/components/you_tube_player_spec.rb +17 -0
- data/spec/unit/off_air_schedule_spec.rb +28 -0
- data/spec/unit/producer_spec.rb +2 -4
- data/spec/unit/program_schedule_proxy_spec.rb +102 -0
- data/spec/unit/program_schedule_spec.rb +191 -0
- data/spec/unit/scheduled_program_spec.rb +57 -0
- data/spec/unit/scheduling_spec.rb +61 -72
- data/vendor/assets/javascripts/bigtext.js +264 -0
- metadata +185 -44
- data/app/assets/javascripts/application.js +0 -13
- data/app/assets/javascripts/network_executive/osd.js +0 -62
- data/app/assets/javascripts/network_executive/set_top_box.js +0 -45
- data/app/controllers/network_executive/lineup_controller.rb +0 -11
- data/app/models/network_executive/channel_schedule.rb +0 -13
- data/app/models/network_executive/lineup.rb +0 -74
- data/app/models/network_executive/lineup_range.rb +0 -34
- data/app/models/network_executive/program_schedule.rb +0 -148
- data/app/views/network_executive/lineup/index.html.erb +0 -26
- data/spec/models/channel_schedule_spec.rb +0 -29
- data/spec/models/lineup_range_spec.rb +0 -65
- data/spec/models/program_schedule_spec.rb +0 -399
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: network_executive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
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: 2012-
|
12
|
+
date: 2012-10-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,21 +21,63 @@ dependencies:
|
|
21
21
|
version: 3.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.0
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: faye-websocket
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.4.6
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
41
|
none: false
|
29
42
|
requirements:
|
30
43
|
- - ~>
|
31
44
|
- !ruby/object:Gem::Version
|
32
45
|
version: 0.4.6
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: ice_cube
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.8.1
|
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.8.1
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: twitter
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 4.0.0
|
33
70
|
type: :runtime
|
34
71
|
prerelease: false
|
35
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 4.0.0
|
36
78
|
- !ruby/object:Gem::Dependency
|
37
79
|
name: sass-rails
|
38
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
39
81
|
none: false
|
40
82
|
requirements:
|
41
83
|
- - ! '>='
|
@@ -43,10 +85,31 @@ dependencies:
|
|
43
85
|
version: '0'
|
44
86
|
type: :runtime
|
45
87
|
prerelease: false
|
46
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
47
94
|
- !ruby/object:Gem::Dependency
|
48
95
|
name: uglifier
|
49
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
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: coffee-rails
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
50
113
|
none: false
|
51
114
|
requirements:
|
52
115
|
- - ! '>='
|
@@ -54,10 +117,15 @@ dependencies:
|
|
54
117
|
version: '0'
|
55
118
|
type: :runtime
|
56
119
|
prerelease: false
|
57
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
58
126
|
- !ruby/object:Gem::Dependency
|
59
127
|
name: awesome_print
|
60
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
61
129
|
none: false
|
62
130
|
requirements:
|
63
131
|
- - ! '>='
|
@@ -65,10 +133,15 @@ dependencies:
|
|
65
133
|
version: '0'
|
66
134
|
type: :development
|
67
135
|
prerelease: false
|
68
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
69
142
|
- !ruby/object:Gem::Dependency
|
70
143
|
name: rails
|
71
|
-
requirement:
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
72
145
|
none: false
|
73
146
|
requirements:
|
74
147
|
- - ~>
|
@@ -76,10 +149,15 @@ dependencies:
|
|
76
149
|
version: 3.2.8
|
77
150
|
type: :development
|
78
151
|
prerelease: false
|
79
|
-
version_requirements:
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ~>
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 3.2.8
|
80
158
|
- !ruby/object:Gem::Dependency
|
81
159
|
name: rspec-rails
|
82
|
-
requirement:
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
83
161
|
none: false
|
84
162
|
requirements:
|
85
163
|
- - ~>
|
@@ -87,10 +165,15 @@ dependencies:
|
|
87
165
|
version: '2.11'
|
88
166
|
type: :development
|
89
167
|
prerelease: false
|
90
|
-
version_requirements:
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '2.11'
|
91
174
|
- !ruby/object:Gem::Dependency
|
92
175
|
name: fakefs
|
93
|
-
requirement:
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
94
177
|
none: false
|
95
178
|
requirements:
|
96
179
|
- - ~>
|
@@ -98,10 +181,15 @@ dependencies:
|
|
98
181
|
version: 0.4.0
|
99
182
|
type: :development
|
100
183
|
prerelease: false
|
101
|
-
version_requirements:
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ~>
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: 0.4.0
|
102
190
|
- !ruby/object:Gem::Dependency
|
103
191
|
name: timecop
|
104
|
-
requirement:
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
105
193
|
none: false
|
106
194
|
requirements:
|
107
195
|
- - ~>
|
@@ -109,7 +197,12 @@ dependencies:
|
|
109
197
|
version: 0.4.5
|
110
198
|
type: :development
|
111
199
|
prerelease: false
|
112
|
-
version_requirements:
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ~>
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: 0.4.5
|
113
206
|
description: An experimental application used to drive displays hung around an office.
|
114
207
|
email:
|
115
208
|
- dlindahl@customink.com
|
@@ -125,40 +218,75 @@ files:
|
|
125
218
|
- LICENSE.txt
|
126
219
|
- README.md
|
127
220
|
- Rakefile
|
128
|
-
- app/assets/
|
129
|
-
- app/assets/
|
130
|
-
- app/assets/
|
131
|
-
- app/assets/
|
132
|
-
- app/assets/
|
133
|
-
- app/assets/
|
134
|
-
- app/assets/
|
135
|
-
- app/assets/
|
221
|
+
- app/assets/fonts/network_executive/league_gothic.css
|
222
|
+
- app/assets/fonts/network_executive/league_gothic.svg
|
223
|
+
- app/assets/fonts/network_executive/league_gothic.ttf
|
224
|
+
- app/assets/fonts/network_executive/league_gothic.woff
|
225
|
+
- app/assets/javascripts/network_executive.coffee
|
226
|
+
- app/assets/javascripts/network_executive/components/iframe_notifier.coffee
|
227
|
+
- app/assets/javascripts/network_executive/components/namespace.coffee
|
228
|
+
- app/assets/javascripts/network_executive/components/osd.coffee
|
229
|
+
- app/assets/javascripts/network_executive/components/photo_player.coffee
|
230
|
+
- app/assets/javascripts/network_executive/components/postman.coffee
|
231
|
+
- app/assets/javascripts/network_executive/components/set_top_box.coffee
|
232
|
+
- app/assets/javascripts/network_executive/components/tweet_player.coffee
|
233
|
+
- app/assets/javascripts/network_executive/components/you_tube_player.coffee
|
234
|
+
- app/assets/javascripts/network_executive/slideshow.coffee
|
235
|
+
- app/assets/javascripts/network_executive/twitter.coffee
|
236
|
+
- app/assets/javascripts/network_executive/you_tube.coffee
|
237
|
+
- app/assets/stylesheets/network_executive.css
|
238
|
+
- app/assets/stylesheets/network_executive/components/gui_components.css
|
239
|
+
- app/assets/stylesheets/network_executive/components/normalize.css
|
240
|
+
- app/assets/stylesheets/network_executive/components/osd.css
|
241
|
+
- app/assets/stylesheets/network_executive/components/osd_guide.css
|
242
|
+
- app/assets/stylesheets/network_executive/components/photo_player.css
|
243
|
+
- app/assets/stylesheets/network_executive/components/smpte.css
|
244
|
+
- app/assets/stylesheets/network_executive/components/tweet_player.css
|
245
|
+
- app/assets/stylesheets/network_executive/components/you_tube_player.css
|
246
|
+
- app/assets/stylesheets/network_executive/off_air.css
|
247
|
+
- app/assets/stylesheets/network_executive/slideshow.css
|
248
|
+
- app/assets/stylesheets/network_executive/twitter.css
|
249
|
+
- app/assets/stylesheets/network_executive/you_tube.css
|
136
250
|
- app/controllers/network_executive/application_controller.rb
|
137
|
-
- app/controllers/network_executive/
|
251
|
+
- app/controllers/network_executive/components_controller.rb
|
252
|
+
- app/controllers/network_executive/guide_controller.rb
|
138
253
|
- app/controllers/network_executive/network_controller.rb
|
254
|
+
- app/controllers/network_executive/programs_controller.rb
|
139
255
|
- app/helpers/network_executive/network_helper.rb
|
140
256
|
- app/models/network_executive/channel.rb
|
141
|
-
- app/models/network_executive/
|
142
|
-
- app/models/network_executive/lineup.rb
|
143
|
-
- app/models/network_executive/lineup_range.rb
|
257
|
+
- app/models/network_executive/guide.rb
|
144
258
|
- app/models/network_executive/network.rb
|
145
259
|
- app/models/network_executive/program.rb
|
146
|
-
- app/models/network_executive/program_schedule.rb
|
147
260
|
- app/models/network_executive/viewer.rb
|
148
|
-
- app/
|
261
|
+
- app/programs/network_executive/off_air.rb
|
262
|
+
- app/views/network_executive/components/slideshow.html.erb
|
263
|
+
- app/views/network_executive/components/twitter.html.erb
|
264
|
+
- app/views/network_executive/components/you_tube.html.erb
|
265
|
+
- app/views/network_executive/guide/index.html.erb
|
149
266
|
- app/views/network_executive/network/index.html.erb
|
267
|
+
- app/views/network_executive/programs/off_air.html.erb
|
150
268
|
- bin/net_exec
|
151
269
|
- config/routes.rb
|
152
270
|
- lib/generators/network_executive/install_generator.rb
|
153
271
|
- lib/generators/network_executive/templates/initializer.erb
|
154
272
|
- lib/generators/network_executive/uninstall_generator.rb
|
155
273
|
- lib/network_executive.rb
|
274
|
+
- lib/network_executive/channel_schedule.rb
|
275
|
+
- lib/network_executive/components.rb
|
276
|
+
- lib/network_executive/components/photo_player.rb
|
277
|
+
- lib/network_executive/components/tweet_player.rb
|
278
|
+
- lib/network_executive/components/you_tube_player.rb
|
156
279
|
- lib/network_executive/configuration.rb
|
157
280
|
- lib/network_executive/engine.rb
|
281
|
+
- lib/network_executive/off_air_schedule.rb
|
158
282
|
- lib/network_executive/producer.rb
|
283
|
+
- lib/network_executive/program_schedule.rb
|
284
|
+
- lib/network_executive/program_schedule_proxy.rb
|
285
|
+
- lib/network_executive/scheduled_program.rb
|
159
286
|
- lib/network_executive/scheduling.rb
|
160
287
|
- lib/network_executive/station.rb
|
161
288
|
- lib/network_executive/station/local_affiliate.rb
|
289
|
+
- lib/network_executive/time_calculations.rb
|
162
290
|
- lib/network_executive/version.rb
|
163
291
|
- network_executive.gemspec
|
164
292
|
- spec/dummy/README.rdoc
|
@@ -196,21 +324,28 @@ files:
|
|
196
324
|
- spec/generators/install_generator_spec.rb
|
197
325
|
- spec/generators/uninstall_generator_spec.rb
|
198
326
|
- spec/helpers/network_helper_spec.rb
|
199
|
-
- spec/models/channel_schedule_spec.rb
|
200
327
|
- spec/models/channel_spec.rb
|
201
|
-
- spec/models/
|
202
|
-
- spec/models/lineup_spec.rb
|
328
|
+
- spec/models/guide_spec.rb
|
203
329
|
- spec/models/network_spec.rb
|
204
|
-
- spec/models/program_schedule_spec.rb
|
205
330
|
- spec/models/program_spec.rb
|
206
331
|
- spec/models/viewer_spec.rb
|
207
332
|
- spec/network_executive_spec.rb
|
333
|
+
- spec/programs/off_air_spec.rb
|
208
334
|
- spec/spec_helper.rb
|
335
|
+
- spec/unit/channel_schedule_spec.rb
|
336
|
+
- spec/unit/components/photo_player_spec.rb
|
337
|
+
- spec/unit/components/tweet_player_spec.rb
|
338
|
+
- spec/unit/components/you_tube_player_spec.rb
|
209
339
|
- spec/unit/configuration_spec.rb
|
340
|
+
- spec/unit/off_air_schedule_spec.rb
|
210
341
|
- spec/unit/producer_spec.rb
|
342
|
+
- spec/unit/program_schedule_proxy_spec.rb
|
343
|
+
- spec/unit/program_schedule_spec.rb
|
344
|
+
- spec/unit/scheduled_program_spec.rb
|
211
345
|
- spec/unit/scheduling_spec.rb
|
212
346
|
- spec/unit/station/local_affiliate_spec.rb
|
213
347
|
- tasks/network_executive_tasks.rake
|
348
|
+
- vendor/assets/javascripts/bigtext.js
|
214
349
|
homepage: https://github.com/dlindahl/network_executive
|
215
350
|
licenses: []
|
216
351
|
post_install_message:
|
@@ -231,10 +366,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
366
|
version: '0'
|
232
367
|
segments:
|
233
368
|
- 0
|
234
|
-
hash:
|
369
|
+
hash: -2106451608601115387
|
235
370
|
requirements: []
|
236
371
|
rubyforge_project:
|
237
|
-
rubygems_version: 1.8.
|
372
|
+
rubygems_version: 1.8.24
|
238
373
|
signing_key:
|
239
374
|
specification_version: 3
|
240
375
|
summary: An experimental application used to drive displays hung around an office.
|
@@ -274,17 +409,23 @@ test_files:
|
|
274
409
|
- spec/generators/install_generator_spec.rb
|
275
410
|
- spec/generators/uninstall_generator_spec.rb
|
276
411
|
- spec/helpers/network_helper_spec.rb
|
277
|
-
- spec/models/channel_schedule_spec.rb
|
278
412
|
- spec/models/channel_spec.rb
|
279
|
-
- spec/models/
|
280
|
-
- spec/models/lineup_spec.rb
|
413
|
+
- spec/models/guide_spec.rb
|
281
414
|
- spec/models/network_spec.rb
|
282
|
-
- spec/models/program_schedule_spec.rb
|
283
415
|
- spec/models/program_spec.rb
|
284
416
|
- spec/models/viewer_spec.rb
|
285
417
|
- spec/network_executive_spec.rb
|
418
|
+
- spec/programs/off_air_spec.rb
|
286
419
|
- spec/spec_helper.rb
|
420
|
+
- spec/unit/channel_schedule_spec.rb
|
421
|
+
- spec/unit/components/photo_player_spec.rb
|
422
|
+
- spec/unit/components/tweet_player_spec.rb
|
423
|
+
- spec/unit/components/you_tube_player_spec.rb
|
287
424
|
- spec/unit/configuration_spec.rb
|
425
|
+
- spec/unit/off_air_schedule_spec.rb
|
288
426
|
- spec/unit/producer_spec.rb
|
427
|
+
- spec/unit/program_schedule_proxy_spec.rb
|
428
|
+
- spec/unit/program_schedule_spec.rb
|
429
|
+
- spec/unit/scheduled_program_spec.rb
|
289
430
|
- spec/unit/scheduling_spec.rb
|
290
431
|
- spec/unit/station/local_affiliate_spec.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
//= require_tree ./network_executive
|
@@ -1,62 +0,0 @@
|
|
1
|
-
;(function($) {
|
2
|
-
var autoHideTimer = null;
|
3
|
-
|
4
|
-
var osd = document.getElementById('osd');
|
5
|
-
|
6
|
-
var autoHide = function() {
|
7
|
-
if( osd.classList.contains('active') ) {
|
8
|
-
osd.classList.remove('active');
|
9
|
-
}
|
10
|
-
};
|
11
|
-
|
12
|
-
// detect mouse movement and scale display
|
13
|
-
document.addEventListener('mousemove', function(e) {
|
14
|
-
clearTimeout( autoHideTimer );
|
15
|
-
|
16
|
-
if( !osd.classList.contains('active') ) {
|
17
|
-
osd.classList.add('active');
|
18
|
-
|
19
|
-
renderGuide();
|
20
|
-
}
|
21
|
-
|
22
|
-
autoHideTimer = setTimeout(autoHide, 1000);
|
23
|
-
});
|
24
|
-
|
25
|
-
// Fetch and display Guide Data
|
26
|
-
function renderGuide() {
|
27
|
-
var xhr = new XMLHttpRequest();
|
28
|
-
|
29
|
-
xhr.addEventListener('readystatechange', function(e) {
|
30
|
-
if( xhr.readyState == 4 && xhr.status == 200) {
|
31
|
-
document.getElementById('lineup').innerHTML = xhr.responseText;
|
32
|
-
}
|
33
|
-
});
|
34
|
-
|
35
|
-
xhr.open('GET', 'lineup.html', true);
|
36
|
-
xhr.send();
|
37
|
-
}
|
38
|
-
|
39
|
-
// Update the timestamp
|
40
|
-
var months = 'January February March April May June July August September October November December'.split(' ');
|
41
|
-
setInterval(function() {
|
42
|
-
var time,
|
43
|
-
date,
|
44
|
-
now = new Date(),
|
45
|
-
mon = now.getMonth(),
|
46
|
-
d = now.getDate(),
|
47
|
-
y = now.getFullYear(),
|
48
|
-
h = now.getHours(),
|
49
|
-
min = now.getMinutes(),
|
50
|
-
a = h > 12 ? 'pm' : 'am';
|
51
|
-
|
52
|
-
h = h > 12 ? h - 12 : h;
|
53
|
-
min = min < 10 ? '0'+min : min;
|
54
|
-
time = h + ':' + min + a;
|
55
|
-
|
56
|
-
date = months[mon] + ' ' + d + ', ' + y;
|
57
|
-
|
58
|
-
$('.osd-now-time')[0].innerHTML = time;
|
59
|
-
$('.osd-now-date')[0].innerHTML = date;
|
60
|
-
}, 1000);
|
61
|
-
|
62
|
-
})( document.querySelectorAll.bind(document) );
|
@@ -1,45 +0,0 @@
|
|
1
|
-
;(function() {
|
2
|
-
|
3
|
-
var paths = window.location.pathname.split('/'),
|
4
|
-
channel = paths[ paths.length - 1];
|
5
|
-
|
6
|
-
if( channel ) {
|
7
|
-
console.log( 'tune in to channel:', channel );
|
8
|
-
|
9
|
-
document.getElementById('smpte_message').innerHTML = 'Establishing uplink...';
|
10
|
-
|
11
|
-
var source = new EventSource('tune_in/' + channel);
|
12
|
-
|
13
|
-
source.addEventListener('open', function(e) {
|
14
|
-
document.getElementById('smpte_message').innerHTML = 'Awaiting transmission...';
|
15
|
-
// Connection was opened.
|
16
|
-
console.log('[open]', e);
|
17
|
-
}, false);
|
18
|
-
|
19
|
-
source.addEventListener('message', function(e) {
|
20
|
-
console.log( '[message]', e.data );
|
21
|
-
|
22
|
-
var payload = JSON.parse( e.data );
|
23
|
-
|
24
|
-
document.getElementById('smpte').style.display = 'none';
|
25
|
-
|
26
|
-
document.getElementById('program').setAttribute('src', payload.url);
|
27
|
-
}, false);
|
28
|
-
|
29
|
-
source.addEventListener('error', function(e) {
|
30
|
-
if (e.eventPhase == EventSource.CLOSED) {
|
31
|
-
console.log('[closed]', e);
|
32
|
-
document.getElementById('smpte_message').innerHTML = 'Transmission lost...';
|
33
|
-
document.getElementById('program').setAttribute('src', 'about:blank');
|
34
|
-
// Move this functionality to a class for better cross-browser support
|
35
|
-
document.getElementById('smpte').style.display = '-webkit-box';
|
36
|
-
// Connection was closed.
|
37
|
-
} else {
|
38
|
-
console.log('[closed]', e);
|
39
|
-
}
|
40
|
-
}, false);
|
41
|
-
} else {
|
42
|
-
document.getElementById('smpte_message').innerHTML = 'No signal';
|
43
|
-
}
|
44
|
-
|
45
|
-
})();
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# Represents a channel's programming line up for a given time span.
|
2
|
-
module NetworkExecutive
|
3
|
-
# TODO: Why does this subclass Hash?
|
4
|
-
# TODO: This is an ugly data structure. Refactor.
|
5
|
-
class Lineup < Hash
|
6
|
-
|
7
|
-
Interval = 15 # In minutes.
|
8
|
-
Range = 1.5 # In hours.
|
9
|
-
|
10
|
-
def initialize( start = Time.now, stop = nil )
|
11
|
-
self.start_time = start || Time.now
|
12
|
-
self.stop_time = stop || Time.now + Range.hours
|
13
|
-
|
14
|
-
self[:channels] = generate
|
15
|
-
end
|
16
|
-
|
17
|
-
def generate
|
18
|
-
with_each_channel do |channel, lineup|
|
19
|
-
lineup << {
|
20
|
-
channel: channel,
|
21
|
-
schedule: whats_on?( channel )
|
22
|
-
}
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def start_time=( time )
|
27
|
-
@start_time = floor time
|
28
|
-
end
|
29
|
-
|
30
|
-
def start_time
|
31
|
-
@start_time
|
32
|
-
end
|
33
|
-
|
34
|
-
def stop_time=( time )
|
35
|
-
@stop_time = floor time
|
36
|
-
end
|
37
|
-
|
38
|
-
def stop_time
|
39
|
-
@stop_time
|
40
|
-
end
|
41
|
-
|
42
|
-
# TODO: Add test
|
43
|
-
def times
|
44
|
-
self[:channels].first[:schedule].collect { |s| s[:time] }
|
45
|
-
end
|
46
|
-
|
47
|
-
private
|
48
|
-
|
49
|
-
# Rounds the specific time to the nearest interval
|
50
|
-
def floor( time, nearest = nil )
|
51
|
-
nearest ||= Interval.minutes
|
52
|
-
|
53
|
-
Time.at((time.to_f / nearest.to_i).floor * nearest.to_i)
|
54
|
-
end
|
55
|
-
|
56
|
-
# TODO: Decouple
|
57
|
-
def with_each_channel
|
58
|
-
Network.channels.each_with_object([]) do |channel, lu|
|
59
|
-
yield channel, lu
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# TODO: Decouple
|
64
|
-
def whats_on?( channel )
|
65
|
-
channel.whats_on?( start_time, stop_time, interval:Interval ) do |show|
|
66
|
-
if block_given?
|
67
|
-
yield show
|
68
|
-
else
|
69
|
-
show
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module NetworkExecutive
|
2
|
-
class LineupRange
|
3
|
-
|
4
|
-
def initialize( start, stop, options = {} )
|
5
|
-
@start, @stop, @options = start, stop, options
|
6
|
-
|
7
|
-
@options[:interval] ||= 15
|
8
|
-
end
|
9
|
-
|
10
|
-
def each
|
11
|
-
showtime = @start.dup
|
12
|
-
|
13
|
-
while showtime < @stop
|
14
|
-
yield showtime
|
15
|
-
|
16
|
-
showtime += @options[:interval].minutes
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def each_with_object( obj )
|
21
|
-
each do |showtime|
|
22
|
-
yield showtime, obj
|
23
|
-
end
|
24
|
-
|
25
|
-
obj
|
26
|
-
end
|
27
|
-
|
28
|
-
# Divides a time span into segments specified by the 'interval' option
|
29
|
-
def segments
|
30
|
-
( ( (@stop - @start) / 1.hour ) / @options[:interval] ).minutes.to_i
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|