onebox 1.8.88 → 1.8.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/engine/vimeo_onebox.rb +6 -1
- data/lib/onebox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff3593d40207b16d72117e2f2168b6d9d23eed077451b05485b67c352bd9830f
|
4
|
+
data.tar.gz: 279ec2df559bc06984eea85e6e6238194ca7177e4085f19ee21059413828e6de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: feb3e7659ccf513d3d260c6c94b9a391546132f688a0f5cb50e833f6bf3adb1ea5979185e1352d10db0c5a6fad58ac66aac0c8b6ffd7e1b4f1c4f7bc9b89e7a4
|
7
|
+
data.tar.gz: 79f0b1cd301079caea91c04233d20a96656bef05e1862aeba34659dab892a836d2d1099981c16968e1e953f89e44f31852157452fd18af59a7ed7336809fcb92
|
@@ -4,7 +4,8 @@ module Onebox
|
|
4
4
|
include Engine
|
5
5
|
include StandardEmbed
|
6
6
|
|
7
|
-
|
7
|
+
# only match private Vimeo video links
|
8
|
+
matches_regexp(/^https?:\/\/(www\.)?vimeo\.com\/\d+\/[^\/]+?$/)
|
8
9
|
always_https
|
9
10
|
|
10
11
|
WIDTH ||= 640
|
@@ -17,6 +18,10 @@ module Onebox
|
|
17
18
|
|
18
19
|
def to_html
|
19
20
|
video_src = og_data.video_secure_url || og_data.video_url
|
21
|
+
if video_src.nil?
|
22
|
+
id = uri.path[/\/(\d+)/, 1]
|
23
|
+
video_src = "https://player.vimeo.com/video/#{id}"
|
24
|
+
end
|
20
25
|
video_src = video_src.gsub('autoplay=1', '').chomp("?")
|
21
26
|
<<-HTML
|
22
27
|
<iframe width="#{WIDTH}"
|
data/lib/onebox/version.rb
CHANGED
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.8.
|
4
|
+
version: 1.8.89
|
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: 2019-05-
|
13
|
+
date: 2019-05-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|