onebox 1.8.86 → 1.8.87
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feb212710bc29cb9f40fe3a693fa2f1da63b4c62ef45f95bf16dd5665b6f2ea7
|
4
|
+
data.tar.gz: 5d1f092e320bd28f3ee17feac0e7b91139e769b0b42a4aeecc20f5e99dab2a00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18bc5e6a7f72de373929ddbcbec7605135911a5126406cb98829f68986332a0d936da17dc0c219daa30619111cb29e1ba0a3c38d6db63d443cb3e83eea441365
|
7
|
+
data.tar.gz: 0406d24b43f94876bc127b44a5e268ef2a56c4ad6233781d8f9a2d465b0b56e044c96ffaca05f84f6e6623cdb0f7faef5fe047642f20a8d0fb89fab070ee1b39
|
data/Gemfile.lock
CHANGED
data/lib/onebox/engine.rb
CHANGED
@@ -182,6 +182,7 @@ require_relative "engine/trello_onebox"
|
|
182
182
|
require_relative "engine/wechat_mp_onebox"
|
183
183
|
require_relative "engine/cloudapp_onebox"
|
184
184
|
require_relative "engine/wistia_onebox"
|
185
|
+
require_relative "engine/simplecast_onebox"
|
185
186
|
require_relative "engine/instagram_onebox"
|
186
187
|
require_relative "engine/gitlab_blob_onebox"
|
187
188
|
require_relative "engine/google_photos_onebox"
|
@@ -7,7 +7,7 @@ module Onebox
|
|
7
7
|
include StandardEmbed
|
8
8
|
include LayoutSupport
|
9
9
|
|
10
|
-
matches_regexp(/^https?:\/\/(?:www\.)?(?:instagram\.com|instagr\.am)\/
|
10
|
+
matches_regexp(/^https?:\/\/(?:www\.)?(?:instagram\.com|instagr\.am)\/?(?:.*)\/p\//)
|
11
11
|
always_https
|
12
12
|
|
13
13
|
def data
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Onebox
|
2
|
+
module Engine
|
3
|
+
class SimplecastOnebox
|
4
|
+
include Engine
|
5
|
+
include StandardEmbed
|
6
|
+
|
7
|
+
matches_regexp(/https?:\/\/(.+)?simplecast.com\/(episodes|s)\/.*/)
|
8
|
+
always_https
|
9
|
+
|
10
|
+
def to_html
|
11
|
+
get_oembed.html
|
12
|
+
end
|
13
|
+
|
14
|
+
def placeholder_html
|
15
|
+
oembed = get_oembed
|
16
|
+
return if Onebox::Helpers.blank?(oembed.thumbnail_url)
|
17
|
+
"<img src='#{oembed.thumbnail_url}' #{oembed.title_attr}>"
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def get_oembed_url
|
23
|
+
if id = url.scan(/\A.*?-([a-zA-Z0-9]*)\Z/).flatten.first
|
24
|
+
oembed_url = "https://simplecast.com/s/#{id}"
|
25
|
+
else
|
26
|
+
oembed_url = url
|
27
|
+
end
|
28
|
+
|
29
|
+
"https://simplecast.com/oembed?url=#{oembed_url}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
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.87
|
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-04-
|
13
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -339,6 +339,7 @@ files:
|
|
339
339
|
- lib/onebox/engine/pubmed_onebox.rb
|
340
340
|
- lib/onebox/engine/reddit_image_onebox.rb
|
341
341
|
- lib/onebox/engine/replit_onebox.rb
|
342
|
+
- lib/onebox/engine/simplecast_onebox.rb
|
342
343
|
- lib/onebox/engine/sketchfab_onebox.rb
|
343
344
|
- lib/onebox/engine/slides_onebox.rb
|
344
345
|
- lib/onebox/engine/soundcloud_onebox.rb
|