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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05ff8777e383e0ca7f85d0b6779042a368bf2b5eeded7d5649acee095687cab5
4
- data.tar.gz: edd3c4653a5574a5ad8f3720d340e1014cada9134d9f76145197a485dbc93f71
3
+ metadata.gz: ff3593d40207b16d72117e2f2168b6d9d23eed077451b05485b67c352bd9830f
4
+ data.tar.gz: 279ec2df559bc06984eea85e6e6238194ca7177e4085f19ee21059413828e6de
5
5
  SHA512:
6
- metadata.gz: 4bfd753abe8e3f406d729d23491bd86747b90a7e5ae125ae4ec7e7fc4205e16cfddd94355ea19536bed5371f2ad20001f86ef70b773c7f5f78a31390b03217f8
7
- data.tar.gz: 23f3dcff844057f1c54de48121e163f94a306779a0b4d7312e98aab2da36501ab5f687683c7d36713c05f754642ed3637659cd2024787bb86fba6becef5d5283
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
- matches_regexp(/^https?:\/\/(www\.)?vimeo\.com\/\d+(\/[^\/]+)?$/)
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}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.8.88"
4
+ VERSION = "1.8.89"
5
5
  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.8.88
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-06 00:00:00.000000000 Z
13
+ date: 2019-05-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json