onebox 1.8.34 → 1.8.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/onebox/engine.rb +1 -0
- data/lib/onebox/engine/wistia_onebox.rb +34 -0
- data/lib/onebox/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6d5848d0ee780c4a34fe10fbfdc4757a25871b76ceaaf091182059d1f13e7ce0
|
4
|
+
data.tar.gz: 84ae7136ce2e5d2bd037ab5fae4bf193ca49bc36b35cbdeadd29ecf017c083b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5330e5b5e2e00186aa095aded82ba83f032da7d560f28a845dc51e4b249062869bb26e482d403b5f9f7a914e3c1dcadbc23ea5d5c75e6af0e42d0a2604ae186
|
7
|
+
data.tar.gz: 266fd2ef4906a5d96349c3e394bc0d82d72d1400a1f3575f8f5a70d7523548d5798dcae485c46ab9fa5f6bf006161aeaea7a08a8b4bfe1bd291a476a50b3d50f
|
data/lib/onebox/engine.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
module Onebox
|
2
|
+
module Engine
|
3
|
+
class WistiaOnebox
|
4
|
+
include Engine
|
5
|
+
include StandardEmbed
|
6
|
+
|
7
|
+
matches_regexp(/https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/.*/)
|
8
|
+
always_https
|
9
|
+
|
10
|
+
def placeholder_html
|
11
|
+
tw = get_twitter
|
12
|
+
escaped_src = ::Onebox::Helpers.normalize_url_for_output(tw[:image])
|
13
|
+
"<img src='#{escaped_src}' height='#{tw[:player_height]}' #{Helpers.title_attr(tw)}>"
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_html
|
17
|
+
tw = get_twitter
|
18
|
+
src = tw[:url].gsub("?twitter=true", "")
|
19
|
+
escaped_src = ::Onebox::Helpers.normalize_url_for_output(src)
|
20
|
+
|
21
|
+
<<-HTML
|
22
|
+
<iframe src="#{escaped_src}"
|
23
|
+
width="640"
|
24
|
+
height="360"
|
25
|
+
scrolling="no"
|
26
|
+
frameborder="0"
|
27
|
+
allowtransparency="true"
|
28
|
+
allowfullscreen>
|
29
|
+
</iframe>
|
30
|
+
HTML
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
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.35
|
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: 2018-01-
|
13
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -364,6 +364,7 @@ files:
|
|
364
364
|
- lib/onebox/engine/whitelisted_generic_onebox.rb
|
365
365
|
- lib/onebox/engine/wikimedia_onebox.rb
|
366
366
|
- lib/onebox/engine/wikipedia_onebox.rb
|
367
|
+
- lib/onebox/engine/wistia_onebox.rb
|
367
368
|
- lib/onebox/engine/xkcd_onebox.rb
|
368
369
|
- lib/onebox/engine/youku_onebox.rb
|
369
370
|
- lib/onebox/engine/youtube_onebox.rb
|
@@ -510,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
510
511
|
version: '0'
|
511
512
|
requirements: []
|
512
513
|
rubyforge_project:
|
513
|
-
rubygems_version: 2.
|
514
|
+
rubygems_version: 2.7.3
|
514
515
|
signing_key:
|
515
516
|
specification_version: 4
|
516
517
|
summary: A gem for turning URLs into previews.
|