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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 63ead6ef3212dc746ab8c743709533ecc8cd6733
4
- data.tar.gz: 948d90c8e83ee3408198a9d76c1218bb223dd63f
2
+ SHA256:
3
+ metadata.gz: 6d5848d0ee780c4a34fe10fbfdc4757a25871b76ceaaf091182059d1f13e7ce0
4
+ data.tar.gz: 84ae7136ce2e5d2bd037ab5fae4bf193ca49bc36b35cbdeadd29ecf017c083b1
5
5
  SHA512:
6
- metadata.gz: 2d36659f8bf15846171d81b385d030385dc9faba028d7ed016a0f0bd195d8ffeeeb2fc87a858905b7547e7873eb99e99e4e59d533cf4b06b6072acf5c54e21a3
7
- data.tar.gz: cc3cd263c1f00479d1c874846b0b6285859ab8db256ab6001f2ec235b4b7a66747829f9220b3e67833622e4f61162bc60617f8db872dd4ba4593c87739c7dfb0
6
+ metadata.gz: d5330e5b5e2e00186aa095aded82ba83f032da7d560f28a845dc51e4b249062869bb26e482d403b5f9f7a914e3c1dcadbc23ea5d5c75e6af0e42d0a2604ae186
7
+ data.tar.gz: 266fd2ef4906a5d96349c3e394bc0d82d72d1400a1f3575f8f5a70d7523548d5798dcae485c46ab9fa5f6bf006161aeaea7a08a8b4bfe1bd291a476a50b3d50f
data/lib/onebox/engine.rb CHANGED
@@ -181,3 +181,4 @@ require_relative "engine/twitch_video_onebox"
181
181
  require_relative "engine/trello_onebox"
182
182
  require_relative "engine/wechat_mp_onebox"
183
183
  require_relative "engine/cloudapp_onebox"
184
+ require_relative "engine/wistia_onebox"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.8.34"
2
+ VERSION = "1.8.35"
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.8.34
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-07 00:00:00.000000000 Z
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.6.11
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.