media_embed 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/media_embed/handler.rb +10 -0
- data/lib/media_embed/podcast.rb +7 -0
- data/lib/media_embed/version.rb +1 -1
- data/lib/media_embed.rb +1 -0
- data/test/dummy/app/views/home/index.html.erb +9 -0
- data/test/dummy/log/development.log +354 -0
- data/test/dummy/log/test.log +125 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/media_embed/handler_test.rb +8 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a90e907b4cd3e650fc771df66cb3b58715974d90
|
4
|
+
data.tar.gz: 57cf3b73c7cfe00fa5698a7db20fd93a9939a709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 195eef0aa0b75c958f777f59b379830ab2104de578ce2a1db66d898a92eef972012bf3204fc13b8ab4ecf228d4f1f0600c8ce451ad678e9fa6fc3b384df9e6ea
|
7
|
+
data.tar.gz: c9190bfe497e911a109138e3d5e1731ca59d1f50d2f82668e51834b74e4d546964ba033fa3e6623a07fff7cb5c992c9e7637f86a33f74ac01cdcca48b1fb6588
|
data/lib/media_embed/handler.rb
CHANGED
@@ -11,6 +11,8 @@ module MediaEmbed
|
|
11
11
|
Video.youtube_template(match[CODE])
|
12
12
|
elsif match = vimeo?(url)
|
13
13
|
Video.vimeo_template(match[CODE])
|
14
|
+
elsif match = soundcloud?(url)
|
15
|
+
Podcast.soundcloud_template(match[CODE])
|
14
16
|
else
|
15
17
|
''
|
16
18
|
end
|
@@ -27,6 +29,10 @@ module MediaEmbed
|
|
27
29
|
url.match vimeo_regex
|
28
30
|
end
|
29
31
|
|
32
|
+
def soundcloud?(url)
|
33
|
+
url.match soundcloud_regex
|
34
|
+
end
|
35
|
+
|
30
36
|
def youtube_regex
|
31
37
|
/youtu(\.be|be\.com)\/(watch\?v=|embed\/|)([^?\s]*)/
|
32
38
|
end
|
@@ -34,6 +40,10 @@ module MediaEmbed
|
|
34
40
|
def vimeo_regex
|
35
41
|
/vimeo\.com\/(channels\/\D*|groups\/\D*|album\/\d*\/video\/|video\/|)([^?\s]*)/
|
36
42
|
end
|
43
|
+
|
44
|
+
def soundcloud_regex
|
45
|
+
/soundcloud.com\/(.*\/[a-zA-Z0-9\-\_]*)/
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
39
49
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
module MediaEmbed
|
2
|
+
class Podcast
|
3
|
+
def self.soundcloud_template(code)
|
4
|
+
%Q(<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//soundcloud.com/#{code}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>)
|
5
|
+
end
|
6
|
+
end
|
7
|
+
end
|
data/lib/media_embed/version.rb
CHANGED
data/lib/media_embed.rb
CHANGED
@@ -246,3 +246,357 @@ Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476b
|
|
246
246
|
|
247
247
|
|
248
248
|
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 14:53:58 -0400
|
249
|
+
|
250
|
+
|
251
|
+
Started GET "/" for ::1 at 2016-05-26 15:40:13 -0400
|
252
|
+
Processing by HomeController#index as HTML
|
253
|
+
Rendered home/index.html.erb within layouts/application (2.3ms)
|
254
|
+
Completed 200 OK in 323ms (Views: 323.0ms | ActiveRecord: 0.0ms)
|
255
|
+
|
256
|
+
|
257
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:40:13 -0400
|
258
|
+
|
259
|
+
|
260
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:40:13 -0400
|
261
|
+
|
262
|
+
|
263
|
+
Started GET "/" for ::1 at 2016-05-26 15:41:22 -0400
|
264
|
+
Processing by HomeController#index as HTML
|
265
|
+
Rendered home/index.html.erb within layouts/application (0.9ms)
|
266
|
+
Completed 200 OK in 13ms (Views: 13.1ms | ActiveRecord: 0.0ms)
|
267
|
+
|
268
|
+
|
269
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:41:22 -0400
|
270
|
+
|
271
|
+
|
272
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:41:22 -0400
|
273
|
+
|
274
|
+
|
275
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:41:22 -0400
|
276
|
+
|
277
|
+
|
278
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:41:22 -0400
|
279
|
+
|
280
|
+
|
281
|
+
Started GET "/" for ::1 at 2016-05-26 15:42:10 -0400
|
282
|
+
Processing by HomeController#index as HTML
|
283
|
+
Rendered home/index.html.erb within layouts/application (0.9ms)
|
284
|
+
Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms)
|
285
|
+
|
286
|
+
|
287
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:42:11 -0400
|
288
|
+
|
289
|
+
|
290
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:42:11 -0400
|
291
|
+
|
292
|
+
|
293
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:42:11 -0400
|
294
|
+
|
295
|
+
|
296
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:42:11 -0400
|
297
|
+
|
298
|
+
|
299
|
+
Started GET "/" for ::1 at 2016-05-26 15:42:21 -0400
|
300
|
+
Processing by HomeController#index as HTML
|
301
|
+
Rendered home/index.html.erb within layouts/application (57648.8ms)
|
302
|
+
Completed 500 Internal Server Error in 57658ms (ActiveRecord: 0.0ms)
|
303
|
+
|
304
|
+
ActionView::Template::Error (uninitialized constant MediaEmbed::Handler::Podcast):
|
305
|
+
63: <ul>
|
306
|
+
64: <li>
|
307
|
+
65: <h5>soundcloud.com/username/CODE</h5>
|
308
|
+
66: <% embed("https://soundcloud.com/liluzivert/money-longer-radio-rip").html_safe %>
|
309
|
+
67: </li>
|
310
|
+
68: </ul>
|
311
|
+
app/views/home/index.html.erb:66:in `_app_views_home_index_html_erb__13326962588793384_70216172096240'
|
312
|
+
|
313
|
+
|
314
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (8.4ms)
|
315
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.1ms)
|
316
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (10.5ms)
|
317
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (73.8ms)
|
318
|
+
|
319
|
+
|
320
|
+
Started GET "/" for ::1 at 2016-05-26 15:43:40 -0400
|
321
|
+
Processing by HomeController#index as HTML
|
322
|
+
Rendered home/index.html.erb within layouts/application (48783.2ms)
|
323
|
+
Completed 500 Internal Server Error in 48787ms (ActiveRecord: 0.0ms)
|
324
|
+
|
325
|
+
ActionView::Template::Error (uninitialized constant MediaEmbed::Handler::Podcast):
|
326
|
+
63: <ul>
|
327
|
+
64: <li>
|
328
|
+
65: <h5>soundcloud.com/username/CODE</h5>
|
329
|
+
66: <% embed("https://soundcloud.com/liluzivert/money-longer-radio-rip").html_safe %>
|
330
|
+
67: </li>
|
331
|
+
68: </ul>
|
332
|
+
app/views/home/index.html.erb:66:in `_app_views_home_index_html_erb__13326962588793384_70216172096240'
|
333
|
+
|
334
|
+
|
335
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (7.6ms)
|
336
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.0ms)
|
337
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)
|
338
|
+
Rendered /Users/wendybeth/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (61.5ms)
|
339
|
+
|
340
|
+
|
341
|
+
Started GET "/" for ::1 at 2016-05-26 15:44:40 -0400
|
342
|
+
Processing by HomeController#index as HTML
|
343
|
+
Rendered home/index.html.erb within layouts/application (2.0ms)
|
344
|
+
Completed 200 OK in 268ms (Views: 267.5ms | ActiveRecord: 0.0ms)
|
345
|
+
|
346
|
+
|
347
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:44:41 -0400
|
348
|
+
|
349
|
+
|
350
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:44:41 -0400
|
351
|
+
|
352
|
+
|
353
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:44:41 -0400
|
354
|
+
|
355
|
+
|
356
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:44:41 -0400
|
357
|
+
|
358
|
+
|
359
|
+
Started GET "/" for ::1 at 2016-05-26 15:46:03 -0400
|
360
|
+
Processing by HomeController#index as HTML
|
361
|
+
Rendered home/index.html.erb within layouts/application (0.2ms)
|
362
|
+
Completed 200 OK in 12ms (Views: 11.7ms | ActiveRecord: 0.0ms)
|
363
|
+
|
364
|
+
|
365
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:46:04 -0400
|
366
|
+
|
367
|
+
|
368
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:46:04 -0400
|
369
|
+
|
370
|
+
|
371
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:46:04 -0400
|
372
|
+
|
373
|
+
|
374
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:46:04 -0400
|
375
|
+
|
376
|
+
|
377
|
+
Started GET "/" for ::1 at 2016-05-26 15:46:17 -0400
|
378
|
+
Processing by HomeController#index as HTML
|
379
|
+
Rendered home/index.html.erb within layouts/application (45095.8ms)
|
380
|
+
Completed 200 OK in 45376ms (Views: 45376.8ms | ActiveRecord: 0.0ms)
|
381
|
+
|
382
|
+
|
383
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:47:02 -0400
|
384
|
+
|
385
|
+
|
386
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:47:02 -0400
|
387
|
+
|
388
|
+
|
389
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:47:02 -0400
|
390
|
+
|
391
|
+
|
392
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:47:02 -0400
|
393
|
+
|
394
|
+
|
395
|
+
Started GET "/" for ::1 at 2016-05-26 15:47:58 -0400
|
396
|
+
Processing by HomeController#index as HTML
|
397
|
+
Rendered home/index.html.erb within layouts/application (4666.5ms)
|
398
|
+
Completed 200 OK in 4679ms (Views: 4678.6ms | ActiveRecord: 0.0ms)
|
399
|
+
|
400
|
+
|
401
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:48:03 -0400
|
402
|
+
|
403
|
+
|
404
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:48:03 -0400
|
405
|
+
|
406
|
+
|
407
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:48:03 -0400
|
408
|
+
|
409
|
+
|
410
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:48:03 -0400
|
411
|
+
|
412
|
+
|
413
|
+
Started GET "/" for ::1 at 2016-05-26 15:49:44 -0400
|
414
|
+
Processing by HomeController#index as HTML
|
415
|
+
Rendered home/index.html.erb within layouts/application (42321.1ms)
|
416
|
+
Completed 200 OK in 56970ms (Views: 52874.9ms | ActiveRecord: 0.0ms)
|
417
|
+
|
418
|
+
|
419
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:50:41 -0400
|
420
|
+
|
421
|
+
|
422
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:50:41 -0400
|
423
|
+
|
424
|
+
|
425
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:50:41 -0400
|
426
|
+
|
427
|
+
|
428
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:50:41 -0400
|
429
|
+
|
430
|
+
|
431
|
+
Started GET "/" for ::1 at 2016-05-26 15:51:13 -0400
|
432
|
+
Processing by HomeController#index as HTML
|
433
|
+
Rendered home/index.html.erb within layouts/application (6475.9ms)
|
434
|
+
Completed 200 OK in 6487ms (Views: 6486.6ms | ActiveRecord: 0.0ms)
|
435
|
+
|
436
|
+
|
437
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:51:19 -0400
|
438
|
+
|
439
|
+
|
440
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:51:19 -0400
|
441
|
+
|
442
|
+
|
443
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:51:19 -0400
|
444
|
+
|
445
|
+
|
446
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:51:19 -0400
|
447
|
+
|
448
|
+
|
449
|
+
Started GET "/" for ::1 at 2016-05-26 15:53:22 -0400
|
450
|
+
Processing by HomeController#index as HTML
|
451
|
+
Rendered home/index.html.erb within layouts/application (20574.9ms)
|
452
|
+
Completed 200 OK in 20584ms (Views: 20584.8ms | ActiveRecord: 0.0ms)
|
453
|
+
|
454
|
+
|
455
|
+
Started GET "/" for ::1 at 2016-05-26 15:53:53 -0400
|
456
|
+
Processing by HomeController#index as HTML
|
457
|
+
Rendered home/index.html.erb within layouts/application (32909.8ms)
|
458
|
+
Completed 200 OK in 33177ms (Views: 33177.3ms | ActiveRecord: 0.0ms)
|
459
|
+
|
460
|
+
|
461
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:54:26 -0400
|
462
|
+
|
463
|
+
|
464
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:54:26 -0400
|
465
|
+
|
466
|
+
|
467
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:54:26 -0400
|
468
|
+
|
469
|
+
|
470
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:54:26 -0400
|
471
|
+
|
472
|
+
|
473
|
+
Started GET "/" for ::1 at 2016-05-26 15:54:31 -0400
|
474
|
+
Processing by HomeController#index as HTML
|
475
|
+
Rendered home/index.html.erb within layouts/application (48140.5ms)
|
476
|
+
Completed 200 OK in 48154ms (Views: 48155.6ms | ActiveRecord: 0.0ms)
|
477
|
+
|
478
|
+
|
479
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:55:19 -0400
|
480
|
+
|
481
|
+
|
482
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:55:19 -0400
|
483
|
+
|
484
|
+
|
485
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:55:19 -0400
|
486
|
+
|
487
|
+
|
488
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:55:19 -0400
|
489
|
+
|
490
|
+
|
491
|
+
Started GET "/" for ::1 at 2016-05-26 15:56:08 -0400
|
492
|
+
Processing by HomeController#index as HTML
|
493
|
+
Rendered home/index.html.erb within layouts/application (4559.6ms)
|
494
|
+
Completed in 4565ms (ActiveRecord: 0.0ms)
|
495
|
+
|
496
|
+
|
497
|
+
Started GET "/" for ::1 at 2016-05-26 15:56:21 -0400
|
498
|
+
Processing by HomeController#index as HTML
|
499
|
+
Rendered home/index.html.erb within layouts/application (27737.5ms)
|
500
|
+
Completed 200 OK in 28003ms (Views: 28003.1ms | ActiveRecord: 0.0ms)
|
501
|
+
|
502
|
+
|
503
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:56:49 -0400
|
504
|
+
|
505
|
+
|
506
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:56:49 -0400
|
507
|
+
|
508
|
+
|
509
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:56:49 -0400
|
510
|
+
|
511
|
+
|
512
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:56:49 -0400
|
513
|
+
|
514
|
+
|
515
|
+
Started GET "/" for ::1 at 2016-05-26 15:57:20 -0400
|
516
|
+
Processing by HomeController#index as HTML
|
517
|
+
Rendered home/index.html.erb within layouts/application (7584.7ms)
|
518
|
+
Completed 200 OK in 7596ms (Views: 7595.9ms | ActiveRecord: 0.0ms)
|
519
|
+
|
520
|
+
|
521
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:57:27 -0400
|
522
|
+
|
523
|
+
|
524
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:57:27 -0400
|
525
|
+
|
526
|
+
|
527
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:57:27 -0400
|
528
|
+
|
529
|
+
|
530
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:57:27 -0400
|
531
|
+
|
532
|
+
|
533
|
+
Started GET "/" for ::1 at 2016-05-26 15:57:38 -0400
|
534
|
+
Processing by HomeController#index as HTML
|
535
|
+
Rendered home/index.html.erb within layouts/application (2.3ms)
|
536
|
+
Completed 200 OK in 383ms (Views: 382.0ms | ActiveRecord: 0.0ms)
|
537
|
+
|
538
|
+
|
539
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:57:39 -0400
|
540
|
+
|
541
|
+
|
542
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:57:39 -0400
|
543
|
+
|
544
|
+
|
545
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:57:39 -0400
|
546
|
+
|
547
|
+
|
548
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:57:39 -0400
|
549
|
+
|
550
|
+
|
551
|
+
Started GET "/" for ::1 at 2016-05-26 15:57:45 -0400
|
552
|
+
Processing by HomeController#index as HTML
|
553
|
+
Rendered home/index.html.erb within layouts/application (1.0ms)
|
554
|
+
Completed 200 OK in 14ms (Views: 13.6ms | ActiveRecord: 0.0ms)
|
555
|
+
|
556
|
+
|
557
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 15:57:46 -0400
|
558
|
+
|
559
|
+
|
560
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 15:57:46 -0400
|
561
|
+
|
562
|
+
|
563
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 15:57:46 -0400
|
564
|
+
|
565
|
+
|
566
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 15:57:46 -0400
|
567
|
+
|
568
|
+
|
569
|
+
Started GET "/" for ::1 at 2016-05-26 16:09:22 -0400
|
570
|
+
Processing by HomeController#index as HTML
|
571
|
+
Rendered home/index.html.erb within layouts/application (2.6ms)
|
572
|
+
Completed 200 OK in 349ms (Views: 348.1ms | ActiveRecord: 0.0ms)
|
573
|
+
|
574
|
+
|
575
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 16:09:23 -0400
|
576
|
+
|
577
|
+
|
578
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 16:09:23 -0400
|
579
|
+
|
580
|
+
|
581
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 16:09:23 -0400
|
582
|
+
|
583
|
+
|
584
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 16:09:23 -0400
|
585
|
+
|
586
|
+
|
587
|
+
Started GET "/" for ::1 at 2016-05-26 16:11:14 -0400
|
588
|
+
Processing by HomeController#index as HTML
|
589
|
+
Rendered home/index.html.erb within layouts/application (2.1ms)
|
590
|
+
Completed 200 OK in 333ms (Views: 332.4ms | ActiveRecord: 0.0ms)
|
591
|
+
|
592
|
+
|
593
|
+
Started GET "/assets/application.self-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js?body=1" for ::1 at 2016-05-26 16:11:15 -0400
|
594
|
+
|
595
|
+
|
596
|
+
Started GET "/assets/application.self-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css?body=1" for ::1 at 2016-05-26 16:11:15 -0400
|
597
|
+
|
598
|
+
|
599
|
+
Started GET "/assets/home.self-b60acab5af8d245ed2b3012f77d11d8d207d8eada27756badaf4ef05770d60f6.css?body=1" for ::1 at 2016-05-26 16:11:15 -0400
|
600
|
+
|
601
|
+
|
602
|
+
Started GET "/assets/home.self-19a187bec6cdb96d6de80a61c16c857c613536adf9138476bd367db38d282635.js?body=1" for ::1 at 2016-05-26 16:11:15 -0400
|
data/test/dummy/log/test.log
CHANGED
@@ -76,5 +76,130 @@ MediaEmbedTest: test_it_has_a_version_number
|
|
76
76
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
77
77
|
--------------------------
|
78
78
|
MediaEmbedTest: test_truth
|
79
|
+
--------------------------
|
80
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
81
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
82
|
+
--------------------------------------------
|
83
|
+
MediaEmbedTest: test_it_has_a_version_number
|
84
|
+
--------------------------------------------
|
85
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
87
|
+
--------------------------
|
88
|
+
MediaEmbedTest: test_truth
|
89
|
+
--------------------------
|
90
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
92
|
+
------------------------------------------------------------
|
93
|
+
HandlerTest: test_it_extracts_code_from_all_vimeo_structures
|
94
|
+
------------------------------------------------------------
|
95
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
97
|
+
---------------------------------------------------------------
|
98
|
+
HandlerTest: test_it_extracts_codes_from_all_youtube_structures
|
99
|
+
---------------------------------------------------------------
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
102
|
+
-----------------------------------------------------------
|
103
|
+
HandlerTest: test_it_extracts_code_for_soundcloud_structure
|
104
|
+
-----------------------------------------------------------
|
105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
107
|
+
-----------------------------------------------------------
|
108
|
+
HandlerTest: test_it_extracts_code_for_soundcloud_structure
|
109
|
+
-----------------------------------------------------------
|
110
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
111
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
112
|
+
------------------------------------------------------------
|
113
|
+
HandlerTest: test_it_extracts_code_from_all_vimeo_structures
|
114
|
+
------------------------------------------------------------
|
115
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
116
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
117
|
+
---------------------------------------------------------------
|
118
|
+
HandlerTest: test_it_extracts_codes_from_all_youtube_structures
|
119
|
+
---------------------------------------------------------------
|
120
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
121
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
122
|
+
--------------------------------------------
|
123
|
+
MediaEmbedTest: test_it_has_a_version_number
|
124
|
+
--------------------------------------------
|
125
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
126
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
127
|
+
--------------------------
|
128
|
+
MediaEmbedTest: test_truth
|
129
|
+
--------------------------
|
130
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
131
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
132
|
+
---------------------------------------------------------------
|
133
|
+
HandlerTest: test_it_extracts_codes_from_all_youtube_structures
|
134
|
+
---------------------------------------------------------------
|
135
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
136
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
137
|
+
------------------------------------------------------------
|
138
|
+
HandlerTest: test_it_extracts_code_from_all_vimeo_structures
|
139
|
+
------------------------------------------------------------
|
140
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
141
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
142
|
+
-----------------------------------------------------------
|
143
|
+
HandlerTest: test_it_extracts_code_for_soundcloud_structure
|
144
|
+
-----------------------------------------------------------
|
145
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
146
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
147
|
+
--------------------------
|
148
|
+
MediaEmbedTest: test_truth
|
149
|
+
--------------------------
|
150
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
151
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
152
|
+
--------------------------------------------
|
153
|
+
MediaEmbedTest: test_it_has_a_version_number
|
154
|
+
--------------------------------------------
|
155
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
156
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
157
|
+
-----------------------------------------------------------
|
158
|
+
HandlerTest: test_it_extracts_code_for_soundcloud_structure
|
159
|
+
-----------------------------------------------------------
|
160
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
161
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
162
|
+
------------------------------------------------------------
|
163
|
+
HandlerTest: test_it_extracts_code_from_all_vimeo_structures
|
164
|
+
------------------------------------------------------------
|
165
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
166
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
167
|
+
---------------------------------------------------------------
|
168
|
+
HandlerTest: test_it_extracts_codes_from_all_youtube_structures
|
169
|
+
---------------------------------------------------------------
|
170
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
171
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
172
|
+
--------------------------------------------
|
173
|
+
MediaEmbedTest: test_it_has_a_version_number
|
174
|
+
--------------------------------------------
|
175
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
176
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
177
|
+
--------------------------
|
178
|
+
MediaEmbedTest: test_truth
|
179
|
+
--------------------------
|
180
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
181
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
182
|
+
------------------------------------------------------------
|
183
|
+
HandlerTest: test_it_extracts_code_from_all_vimeo_structures
|
184
|
+
------------------------------------------------------------
|
185
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
186
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
187
|
+
-----------------------------------------------------------
|
188
|
+
HandlerTest: test_it_extracts_code_for_soundcloud_structure
|
189
|
+
-----------------------------------------------------------
|
190
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
191
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
192
|
+
---------------------------------------------------------------
|
193
|
+
HandlerTest: test_it_extracts_codes_from_all_youtube_structures
|
194
|
+
---------------------------------------------------------------
|
195
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
196
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
197
|
+
--------------------------------------------
|
198
|
+
MediaEmbedTest: test_it_has_a_version_number
|
199
|
+
--------------------------------------------
|
200
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
201
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
202
|
+
--------------------------
|
203
|
+
MediaEmbedTest: test_truth
|
79
204
|
--------------------------
|
80
205
|
[1m[35m (0.0ms)[0m rollback transaction
|
@@ -0,0 +1 @@
|
|
1
|
+
72525
|
@@ -19,6 +19,8 @@ class HandlerTest < ActiveSupport::TestCase
|
|
19
19
|
vimeo.com/album/2222/video/8888
|
20
20
|
)
|
21
21
|
|
22
|
+
SOUNDCLOUD_URL = %w( soundcloud.com/username/code-for-podcast )
|
23
|
+
|
22
24
|
test "it extracts codes from all youtube structures" do
|
23
25
|
YOUTUBE_URLS.map { |url| "irrelevantinfo#{url}" }.each do |url|
|
24
26
|
match = youtube?(url)[CODE]
|
@@ -29,8 +31,13 @@ class HandlerTest < ActiveSupport::TestCase
|
|
29
31
|
test "it extracts code from all vimeo structures" do
|
30
32
|
VIMEO_URLS.map { |url| "irrelevantinfo#{url}" }.each do |url|
|
31
33
|
match = vimeo?(url)[CODE]
|
32
|
-
assert match
|
34
|
+
assert match == '8888', "#{url} does not return CODE, it returns #{match}"
|
33
35
|
end
|
34
36
|
end
|
37
|
+
|
38
|
+
test "it extracts code for soundcloud structure" do
|
39
|
+
match = soundcloud?("irrelevantinfo#{SOUNDCLOUD_URL}")[CODE]
|
40
|
+
assert match == 'username/code-for-podcast', "#{SOUNDCLOUD_URL} does not return 'username/code-for-podcast', it returns #{match}"
|
41
|
+
end
|
35
42
|
end
|
36
43
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: media_embed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WendyBeth
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- Rakefile
|
79
79
|
- lib/media_embed.rb
|
80
80
|
- lib/media_embed/handler.rb
|
81
|
+
- lib/media_embed/podcast.rb
|
81
82
|
- lib/media_embed/railtie.rb
|
82
83
|
- lib/media_embed/version.rb
|
83
84
|
- lib/media_embed/video.rb
|
@@ -156,6 +157,7 @@ files:
|
|
156
157
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/ss/ssS2x0Wl67rwXHaVHsh6CO7ayn9fQ5saIwATKN6O-nI.cache
|
157
158
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/xt/xtXpwJn_zdX4IYipCeokPBOCp4guNpM9V_ybPdFSDFA.cache
|
158
159
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/yi/yilpDoLbllD_EjIKIfMFuMgcFT-ypWu98nAxyNQ5xKc.cache
|
160
|
+
- test/dummy/tmp/pids/server.pid
|
159
161
|
- test/media_embed/handler_test.rb
|
160
162
|
- test/media_embed_test.rb
|
161
163
|
- test/test_helper.rb
|
@@ -258,6 +260,7 @@ test_files:
|
|
258
260
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/xt/xtXpwJn_zdX4IYipCeokPBOCp4guNpM9V_ybPdFSDFA.cache
|
259
261
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/yi/yilpDoLbllD_EjIKIfMFuMgcFT-ypWu98nAxyNQ5xKc.cache
|
260
262
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/Zx/Zx_pY8rr1nkaxuaXAyawN22ouXmPuf7ju8gMSZAuLME.cache
|
263
|
+
- test/dummy/tmp/pids/server.pid
|
261
264
|
- test/media_embed/handler_test.rb
|
262
265
|
- test/media_embed_test.rb
|
263
266
|
- test/test_helper.rb
|