onebox 1.5.29 → 1.5.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a71d37f0f18224ffa7a1161bb5fc58c53f42fc75
4
- data.tar.gz: 90800a259664e555697a877640a2ac8df6808c4f
3
+ metadata.gz: a4878ec1dc9d22c57ca8d519f0cb25197bd44556
4
+ data.tar.gz: 072619a5da444658a108e8883cf0c94f96af7581
5
5
  SHA512:
6
- metadata.gz: 458dcddb5eff58050b98c494d91d07bf374c9bf93fe74885e7bd367c76e52cef590bb2d52ea9636e8d03017b16746fd1621d692e537b0ed23d98afadd9c8a4a7
7
- data.tar.gz: bf58d969638057be027a8e4f87dd7fea74cf4bc5886d588e64e616b7cd2e413f8d0eba3f0408410f45b0fbbc46795a05e40db68acbefdf57e5112afdfd2e4e19
6
+ metadata.gz: dafe65f344abfd5fd1fea36bd05d004a4d83fd9296e8cf94336d6ef0d7fa3f50996730c897d48bd88cba05efeb8f003e98a8df1cf2e3e610ad184320543b96c9
7
+ data.tar.gz: c4abced39688318fa9cf30280f8f2b0ab09831571f790a4cef99141f2cf19d05e1da7f79e1bed7bb54b20898c2c95e4e6e1f629512d3353d9175646b3324092e
@@ -166,7 +166,7 @@ module Onebox
166
166
  end
167
167
 
168
168
  def self.probable_wordpress(uri)
169
- !!(uri.path =~ /\d{4}\/\d{2}\/\d{2}/)
169
+ !!(uri.path =~ /\d{4}\/\d{2}\//)
170
170
  end
171
171
 
172
172
  def self.===(other)
@@ -19,7 +19,7 @@ module Onebox
19
19
  end
20
20
 
21
21
  if uri.path =~ /\/embed\//
22
- # A slash, then embed, then anotther slash, then capture all remaining non-slash characters
22
+ # A slash, then embed, then another slash, then capture all remaining non-slash characters
23
23
  match = uri.path.match(/\/embed\/([^\/]+)/)
24
24
  return match[1] if match && match[1]
25
25
  end
@@ -46,6 +46,10 @@ module Onebox
46
46
  # Avoid making HTTP requests if we are able to get the video ID from the
47
47
  # URL.
48
48
  html = "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/#{video_id}?#{embed_params}\" frameborder=\"0\" allowfullscreen></iframe>"
49
+ elsif params['list']
50
+ # YouTube Playlist URL (https://www.youtube.com/playlist?list=PLBsP89CPrMeOwWHwmD6FzkKIca-GjAD_f)
51
+ # in case of cast_sender.js console errors, see: http://stackoverflow.com/q/25814914
52
+ html = "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/videoseries?list=#{params['list']}&wmode=transparent&rel=0&autohide=1&showinfo=1&enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe>"
49
53
  else
50
54
  # for channel pages
51
55
  html = Onebox::Engine::WhitelistedGenericOnebox.new(@url, @cache, @timeout).to_html
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.5.29"
2
+ VERSION = "1.5.30"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.29
4
+ version: 1.5.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joanna Zeta
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-11 00:00:00.000000000 Z
13
+ date: 2015-12-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json