short 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/.gitignore +4 -0
  2. data/README.md +9 -0
  3. data/Rakefile +3 -0
  4. data/bin/shortener +115 -0
  5. data/config.ru +2 -0
  6. data/lib/shortener/client.rb +69 -0
  7. data/lib/shortener/configuration.rb +76 -0
  8. data/lib/shortener/server/Gemfile +6 -0
  9. data/lib/shortener/server/Gemfile.lock +23 -0
  10. data/lib/shortener/server/config.ru.template +2 -0
  11. data/lib/shortener/server/public/delete-icon.png +0 -0
  12. data/lib/shortener/server/public/flash/Jplayer.swf +0 -0
  13. data/lib/shortener/server/public/flash/clippy.swf +0 -0
  14. data/lib/shortener/server/public/flash/swfupload.swf +0 -0
  15. data/lib/shortener/server/public/images/XPButtonUploadText_61x22.png +0 -0
  16. data/lib/shortener/server/public/jquery-swfupload-min.js +1 -0
  17. data/lib/shortener/server/public/jquery-swfupload.js +64 -0
  18. data/lib/shortener/server/public/jquery.jplayer.min.js +97 -0
  19. data/lib/shortener/server/public/jquery.min.js +18 -0
  20. data/lib/shortener/server/public/patched.bootstrap.min.css +370 -0
  21. data/lib/shortener/server/public/site.js +36 -0
  22. data/lib/shortener/server/public/skin/blue.monday/jplayer.blue.monday.css +623 -0
  23. data/lib/shortener/server/public/skin/blue.monday/jplayer.blue.monday.jpg +0 -0
  24. data/lib/shortener/server/public/skin/blue.monday/jplayer.blue.monday.seeking.gif +0 -0
  25. data/lib/shortener/server/public/skin/blue.monday/jplayer.blue.monday.video.play.png +0 -0
  26. data/lib/shortener/server/public/swfupload.js +980 -0
  27. data/lib/shortener/server/views/add.haml +22 -0
  28. data/lib/shortener/server/views/display.haml +5 -0
  29. data/lib/shortener/server/views/index.haml +25 -0
  30. data/lib/shortener/server/views/layout.haml +21 -0
  31. data/lib/shortener/server/views/s3/audio.haml +75 -0
  32. data/lib/shortener/server/views/s3/image.haml +27 -0
  33. data/lib/shortener/server/views/s3/layout.haml +23 -0
  34. data/lib/shortener/server/views/s3/video.haml +71 -0
  35. data/lib/shortener/server/views/upload.haml +130 -0
  36. data/lib/shortener/server.rb +346 -0
  37. data/lib/shortener/version.rb +6 -0
  38. data/lib/shortener.rb +9 -0
  39. data/tasks/heroku.rake +46 -0
  40. data/test/test_client.rb +26 -0
  41. data/test/test_configuration.rb +23 -0
  42. data/test/test_server.rb +0 -0
  43. metadata +102 -0
@@ -0,0 +1,623 @@
1
+ /*
2
+ * Skin for jPlayer Plugin (jQuery JavaScript Library)
3
+ * http://www.happyworm.com/jquery/jplayer
4
+ *
5
+ * Skin Name: Blue Monday
6
+ *
7
+ * Copyright (c) 2010-2011 Happyworm Ltd
8
+ * Dual licensed under the MIT and GPL licenses.
9
+ * - http://www.opensource.org/licenses/mit-license.php
10
+ * - http://www.gnu.org/copyleft/gpl.html
11
+ *
12
+ * Author: Silvia Benvenuti
13
+ * Skin Version: 4.0 (jPlayer 2.1.0)
14
+ * Date: 1st September 2011
15
+ */
16
+
17
+ div.jp-audio,
18
+ div.jp-video {
19
+
20
+ /* Edit the font-size to counteract inherited font sizing.
21
+ * Eg. 1.25em = 1 / 0.8em
22
+ */
23
+
24
+ font-size:1em; /* 1.25em for testing in site pages */ /* No parent CSS that can effect the size in the demos ZIP */
25
+
26
+ font-family:Verdana, Arial, sans-serif;
27
+ line-height:1.6;
28
+ color: #666;
29
+ border:1px solid #009be3;
30
+ background-color:#eee;
31
+ position:relative;
32
+ }
33
+ div.jp-audio {
34
+ width:420px;
35
+ }
36
+ div.jp-video-270p {
37
+ width:480px;
38
+ }
39
+ div.jp-video-360p {
40
+ width:640px;
41
+ }
42
+ div.jp-video-full {
43
+ /* Rules for IE6 (full-screen) */
44
+ width:480px;
45
+ height:270px;
46
+ /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */
47
+ position:static !important; position:relative
48
+ }
49
+
50
+ div.jp-video-full div.jp-jplayer {
51
+ top: 0;
52
+ left: 0;
53
+ position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */
54
+ overflow: hidden;
55
+ z-index:1000;
56
+ }
57
+
58
+ div.jp-video-full div.jp-gui {
59
+ position: fixed !important; position: static; /* Rules for IE6 (full-screen) */
60
+ top: 0;
61
+ left: 0;
62
+ width:100%;
63
+ height:100%;
64
+ z-index:1000;
65
+ }
66
+
67
+ div.jp-video-full div.jp-interface {
68
+ position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */
69
+ bottom: 0;
70
+ left: 0;
71
+ z-index:1000;
72
+ }
73
+
74
+ div.jp-interface {
75
+ position: relative;
76
+ background-color:#eee;
77
+ width:100%;
78
+ }
79
+
80
+ div.jp-audio div.jp-type-single div.jp-interface {
81
+ height:80px;
82
+ }
83
+ div.jp-audio div.jp-type-playlist div.jp-interface {
84
+ height:80px;
85
+ }
86
+
87
+ div.jp-video div.jp-interface {
88
+ border-top:1px solid #009be3;
89
+ }
90
+
91
+ /* @group CONTROLS */
92
+
93
+ div.jp-controls-holder {
94
+ clear: both;
95
+ width:440px;
96
+ margin:0 auto;
97
+ position: relative;
98
+ overflow:hidden;
99
+ top:-8px; /* This negative value depends on the size of the text in jp-currentTime and jp-duration */
100
+ }
101
+
102
+ div.jp-interface ul.jp-controls {
103
+ list-style-type:none;
104
+ margin:0;
105
+ padding: 0;
106
+ overflow:hidden;
107
+ }
108
+
109
+ div.jp-audio ul.jp-controls {
110
+ width: 380px;
111
+ padding:20px 20px 0 20px;
112
+ }
113
+
114
+ div.jp-video div.jp-type-single ul.jp-controls {
115
+ width: 78px;
116
+ margin-left: 200px;
117
+ }
118
+
119
+ div.jp-video div.jp-type-playlist ul.jp-controls {
120
+ width: 134px;
121
+ margin-left: 172px;
122
+ }
123
+ div.jp-video ul.jp-controls,
124
+ div.jp-interface ul.jp-controls li {
125
+ display:inline;
126
+ float: left;
127
+ }
128
+
129
+ div.jp-interface ul.jp-controls a {
130
+ display:block;
131
+ overflow:hidden;
132
+ text-indent:-9999px;
133
+ }
134
+ a.jp-play,
135
+ a.jp-pause {
136
+ width:40px;
137
+ height:40px;
138
+ }
139
+
140
+ a.jp-play {
141
+ background: url("jplayer.blue.monday.jpg") 0 0 no-repeat;
142
+ }
143
+ a.jp-play:hover {
144
+ background: url("jplayer.blue.monday.jpg") -41px 0 no-repeat;
145
+ }
146
+ a.jp-pause {
147
+ background: url("jplayer.blue.monday.jpg") 0 -42px no-repeat;
148
+ display: none;
149
+ }
150
+ a.jp-pause:hover {
151
+ background: url("jplayer.blue.monday.jpg") -41px -42px no-repeat;
152
+ }
153
+
154
+ a.jp-stop, a.jp-previous, a.jp-next {
155
+ width:28px;
156
+ height:28px;
157
+ margin-top:6px;
158
+ }
159
+
160
+ a.jp-stop {
161
+ background: url("jplayer.blue.monday.jpg") 0 -83px no-repeat;
162
+ margin-left:10px;
163
+ }
164
+
165
+ a.jp-stop:hover {
166
+ background: url("jplayer.blue.monday.jpg") -29px -83px no-repeat;
167
+ }
168
+
169
+ a.jp-previous {
170
+ background: url("jplayer.blue.monday.jpg") 0 -112px no-repeat;
171
+ }
172
+ a.jp-previous:hover {
173
+ background: url("jplayer.blue.monday.jpg") -29px -112px no-repeat;
174
+ }
175
+
176
+ a.jp-next {
177
+ background: url("jplayer.blue.monday.jpg") 0 -141px no-repeat;
178
+ }
179
+ a.jp-next:hover {
180
+ background: url("jplayer.blue.monday.jpg") -29px -141px no-repeat;
181
+ }
182
+
183
+ /* @end */
184
+
185
+ /* @group progress bar */
186
+
187
+ div.jp-progress {
188
+ overflow:hidden;
189
+ background-color: #ddd;
190
+ }
191
+ div.jp-audio div.jp-progress {
192
+ position: absolute;
193
+ top:32px;
194
+ height:15px;
195
+ }
196
+ div.jp-audio div.jp-type-single div.jp-progress {
197
+ left:110px;
198
+ width:186px;
199
+ }
200
+ div.jp-audio div.jp-type-playlist div.jp-progress {
201
+ left:166px;
202
+ width:130px;
203
+ }
204
+ div.jp-video div.jp-progress {
205
+ top:0px;
206
+ left:0px;
207
+ width:100%;
208
+ height:10px;
209
+ }
210
+ div.jp-seek-bar {
211
+ background: url("jplayer.blue.monday.jpg") 0 -202px repeat-x;
212
+ width:0px;
213
+ height:100%;
214
+ cursor: pointer;
215
+ }
216
+ div.jp-play-bar {
217
+ background: url("jplayer.blue.monday.jpg") 0 -218px repeat-x ;
218
+ width:0px;
219
+ height:100%;
220
+ }
221
+
222
+ /* The seeking class is added/removed inside jPlayer */
223
+ div.jp-seeking-bg {
224
+ background: url("jplayer.blue.monday.seeking.gif");
225
+ }
226
+
227
+ /* @end */
228
+
229
+ /* @group volume controls */
230
+
231
+
232
+ a.jp-mute,
233
+ a.jp-unmute,
234
+ a.jp-volume-max {
235
+ width:18px;
236
+ height:15px;
237
+ margin-top:12px;
238
+ }
239
+
240
+ div.jp-audio div.jp-type-single a.jp-mute,
241
+ div.jp-audio div.jp-type-single a.jp-unmute {
242
+ margin-left: 210px;
243
+ }
244
+
245
+ div.jp-audio div.jp-type-playlist a.jp-mute,
246
+ div.jp-audio div.jp-type-playlist a.jp-unmute {
247
+ margin-left: 154px;
248
+ }
249
+
250
+ div.jp-audio a.jp-volume-max {
251
+ margin-left: 56px;
252
+ }
253
+
254
+ div.jp-video a.jp-mute,
255
+ div.jp-video a.jp-unmute,
256
+ div.jp-video a.jp-volume-max {
257
+ position: absolute;
258
+ top:12px;
259
+ margin-top:0;
260
+ }
261
+
262
+ div.jp-video a.jp-mute,
263
+ div.jp-video a.jp-unmute {
264
+ left: 50px;
265
+ }
266
+
267
+ div.jp-video a.jp-volume-max {
268
+ left: 134px;
269
+ }
270
+
271
+ a.jp-mute {
272
+ background: url("jplayer.blue.monday.jpg") 0 -170px no-repeat;
273
+ }
274
+ a.jp-mute:hover {
275
+ background: url("jplayer.blue.monday.jpg") -19px -170px no-repeat;
276
+ }
277
+ a.jp-unmute {
278
+ background: url("jplayer.blue.monday.jpg") -60px -170px no-repeat;
279
+ display: none;
280
+ }
281
+ a.jp-unmute:hover {
282
+ background: url("jplayer.blue.monday.jpg") -79px -170px no-repeat;
283
+ }
284
+
285
+ background: url("jplayer.blue.monday.jpg") 0 -186px no-repeat;
286
+ }
287
+ a.jp-volume-max:hover {
288
+ background: url("jplayer.blue.monday.jpg") -19px -186px no-repeat;
289
+ }
290
+
291
+ div.jp-volume-bar {
292
+ position: absolute;
293
+ overflow:hidden;
294
+ background: url("jplayer.blue.monday.jpg") 0 -250px repeat-x;
295
+ width:46px;
296
+ height:5px;
297
+ cursor: pointer;
298
+ }
299
+ div.jp-audio div.jp-volume-bar {
300
+ top:37px;
301
+ left:330px;
302
+ }
303
+ div.jp-video div.jp-volume-bar {
304
+ top:17px;
305
+ left:72px;
306
+ }
307
+ div.jp-volume-bar-value {
308
+ background: url("jplayer.blue.monday.jpg") 0 -256px repeat-x;
309
+ width:0px;
310
+ height:5px;
311
+ }
312
+
313
+ /* @end */
314
+
315
+ /* @group current time and duration */
316
+
317
+ div.jp-audio div.jp-time-holder {
318
+ position:absolute;
319
+ top:50px;
320
+ }
321
+ div.jp-audio div.jp-type-single div.jp-time-holder {
322
+ left:110px;
323
+ width:186px;
324
+ }
325
+ div.jp-audio div.jp-type-playlist div.jp-time-holder {
326
+ left:166px;
327
+ width:130px;
328
+ }
329
+
330
+ div.jp-current-time,
331
+ div.jp-duration {
332
+ width:60px;
333
+ font-size:.64em;
334
+ font-style:oblique;
335
+ }
336
+ div.jp-current-time {
337
+ float: left;
338
+ display:inline;
339
+ }
340
+ div.jp-duration {
341
+ float: right;
342
+ display:inline;
343
+ text-align: right;
344
+ }
345
+
346
+ div.jp-video div.jp-current-time {
347
+ margin-left:20px;
348
+ }
349
+ div.jp-video div.jp-duration {
350
+ margin-right:20px;
351
+ }
352
+
353
+ /* @end */
354
+
355
+ /* @group playlist */
356
+
357
+ div.jp-title {
358
+ font-weight:bold;
359
+ text-align:center;
360
+ }
361
+
362
+ div.jp-title,
363
+ div.jp-playlist {
364
+ width:100%;
365
+ background-color:#ccc;
366
+ border-top:1px solid #009be3;
367
+ }
368
+ div.jp-type-single div.jp-title,
369
+ div.jp-type-playlist div.jp-title,
370
+ div.jp-type-single div.jp-playlist {
371
+ border-top:none;
372
+ }
373
+ div.jp-title ul,
374
+ div.jp-playlist ul {
375
+ list-style-type:none;
376
+ margin:0;
377
+ padding:0 20px;
378
+ font-size:.72em;
379
+ }
380
+
381
+ div.jp-title li {
382
+ padding:5px 0;
383
+ font-weight:bold;
384
+ }
385
+ div.jp-playlist li {
386
+ padding:5px 0 4px 20px;
387
+ border-bottom:1px solid #eee;
388
+ }
389
+
390
+ div.jp-playlist li div {
391
+ display:inline;
392
+ }
393
+
394
+ /* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */
395
+
396
+ div.jp-type-playlist div.jp-playlist li:last-child {
397
+ padding:5px 0 5px 20px;
398
+ border-bottom:none;
399
+ }
400
+ div.jp-type-playlist div.jp-playlist li.jp-playlist-current {
401
+ list-style-type:square;
402
+ list-style-position:inside;
403
+ padding-left:7px;
404
+ }
405
+ div.jp-type-playlist div.jp-playlist a {
406
+ color: #333;
407
+ text-decoration: none;
408
+ }
409
+ div.jp-type-playlist div.jp-playlist a:hover {
410
+ color:#0d88c1;
411
+ }
412
+ div.jp-type-playlist div.jp-playlist a.jp-playlist-current {
413
+ color:#0d88c1;
414
+ }
415
+
416
+ div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove {
417
+ float:right;
418
+ display:inline;
419
+ text-align:right;
420
+ margin-right:10px;
421
+ font-weight:bold;
422
+ color:#666;
423
+ }
424
+ div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover {
425
+ color:#0d88c1;
426
+ }
427
+ div.jp-type-playlist div.jp-playlist span.jp-free-media {
428
+ float:right;
429
+ display:inline;
430
+ text-align:right;
431
+ margin-right:10px;
432
+ }
433
+ div.jp-type-playlist div.jp-playlist span.jp-free-media a{
434
+ color:#666;
435
+ }
436
+ div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{
437
+ color:#0d88c1;
438
+ }
439
+ span.jp-artist {
440
+ font-size:.8em;
441
+ color:#666;
442
+ }
443
+
444
+ /* @end */
445
+
446
+ div.jp-video-play {
447
+ position:absolute;
448
+ top:0;
449
+ left:0;
450
+ width:100%;
451
+ cursor:pointer;
452
+ background-color:rgba(0,0,0,0); /* Makes IE9 work with the active area over the whole video area. IE6/7/8 only have the button as active area. */
453
+ }
454
+ div.jp-video-270p div.jp-video-play {
455
+ height:270px;
456
+ }
457
+ div.jp-video-360p div.jp-video-play {
458
+ height:360px;
459
+ }
460
+ div.jp-video-full div.jp-video-play {
461
+ height:100%;
462
+ z-index:1000;
463
+ }
464
+ a.jp-video-play-icon {
465
+ position:relative;
466
+ display:block;
467
+ width: 112px;
468
+ height: 100px;
469
+
470
+ margin-left:-56px;
471
+ margin-top:-50px;
472
+ left:50%;
473
+ top:50%;
474
+
475
+ background: url("jplayer.blue.monday.video.play.png") 0 0 no-repeat;
476
+ text-indent:-9999px;
477
+ }
478
+ div.jp-video-play:hover a.jp-video-play-icon {
479
+ background: url("jplayer.blue.monday.video.play.png") 0 -100px no-repeat;
480
+ }
481
+
482
+
483
+
484
+
485
+
486
+ div.jp-jplayer audio,
487
+ div.jp-jplayer {
488
+ width:0px;
489
+ height:0px;
490
+ }
491
+
492
+ div.jp-jplayer {
493
+ background-color: #000000;
494
+ }
495
+
496
+
497
+
498
+
499
+
500
+ /* @group TOGGLES */
501
+
502
+ /* The audio toggles are nested inside jp-time-holder */
503
+
504
+ ul.jp-toggles {
505
+ list-style-type:none;
506
+ padding:0;
507
+ margin:0 auto;
508
+ overflow:hidden;
509
+ }
510
+
511
+ div.jp-audio .jp-type-single ul.jp-toggles {
512
+ width:25px;
513
+ }
514
+ div.jp-audio .jp-type-playlist ul.jp-toggles {
515
+ width:55px;
516
+ margin: 0;
517
+ position: absolute;
518
+ left: 325px;
519
+ top: 50px;
520
+ }
521
+
522
+ div.jp-video ul.jp-toggles {
523
+ margin-top:10px;
524
+ width:100px;
525
+ }
526
+
527
+ ul.jp-toggles li {
528
+ display:block;
529
+ float:right;
530
+ }
531
+
532
+ ul.jp-toggles li a {
533
+ display:block;
534
+ width:25px;
535
+ height:18px;
536
+ text-indent:-9999px;
537
+ line-height:100%; /* need this for IE6 */
538
+ }
539
+
540
+ a.jp-full-screen {
541
+ background: url("jplayer.blue.monday.jpg") 0 -310px no-repeat;
542
+ margin-left: 20px;
543
+ }
544
+
545
+ a.jp-full-screen:hover {
546
+ background: url("jplayer.blue.monday.jpg") -30px -310px no-repeat;
547
+ }
548
+
549
+ a.jp-restore-screen {
550
+ background: url("jplayer.blue.monday.jpg") -60px -310px no-repeat;
551
+ margin-left: 20px;
552
+ }
553
+
554
+ a.jp-restore-screen:hover {
555
+ background: url("jplayer.blue.monday.jpg") -90px -310px no-repeat;
556
+ }
557
+
558
+ a.jp-repeat {
559
+ background: url("jplayer.blue.monday.jpg") 0 -290px no-repeat;
560
+ }
561
+
562
+ a.jp-repeat:hover {
563
+ background: url("jplayer.blue.monday.jpg") -30px -290px no-repeat;
564
+ }
565
+
566
+ a.jp-repeat-off {
567
+ background: url("jplayer.blue.monday.jpg") -60px -290px no-repeat;
568
+ }
569
+
570
+ a.jp-repeat-off:hover {
571
+ background: url("jplayer.blue.monday.jpg") -90px -290px no-repeat;
572
+ }
573
+
574
+ a.jp-shuffle {
575
+ background: url("jplayer.blue.monday.jpg") 0 -270px no-repeat;
576
+ margin-left: 5px;
577
+ }
578
+
579
+ a.jp-shuffle:hover {
580
+ background: url("jplayer.blue.monday.jpg") -30px -270px no-repeat;
581
+ }
582
+
583
+ a.jp-shuffle-off {
584
+ background: url("jplayer.blue.monday.jpg") -60px -270px no-repeat;
585
+ margin-left: 5px;
586
+ }
587
+
588
+ a.jp-shuffle-off:hover {
589
+ background: url("jplayer.blue.monday.jpg") -90px -270px no-repeat;
590
+ }
591
+
592
+
593
+ /* @end */
594
+
595
+ /* @group NO SOLUTION error feedback */
596
+
597
+ .jp-no-solution {
598
+ position:absolute;
599
+ width:390px;
600
+ margin-left:-202px;
601
+ left:50%;
602
+ top: 10px;
603
+
604
+ padding:5px;
605
+ font-size:.8em;
606
+ background-color:#eee;
607
+ border:2px solid #009be3;
608
+ color:#000;
609
+ display:none;
610
+ }
611
+
612
+ .jp-no-solution a {
613
+ color:#000;
614
+ }
615
+
616
+ .jp-no-solution span {
617
+ font-size:1em;
618
+ display:block;
619
+ text-align:center;
620
+ font-weight:bold;
621
+ }
622
+
623
+ /* @end */