onebox 1.8.52 → 1.8.53

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
- SHA256:
3
- metadata.gz: 8e67e33306ab42b410f3cc7e60c7386a115cf5c89a0cb9bff9b0372e16a9f804
4
- data.tar.gz: 519d0943971ed23040984349c0fa2a8a81839cee756a2ad8092cda63b3f3d5ba
2
+ SHA1:
3
+ metadata.gz: 79712de7f375aa40869b04c3b809e9fb9c6d37c0
4
+ data.tar.gz: 12ba093834341f495db6e3510af3ce485fb4cf09
5
5
  SHA512:
6
- metadata.gz: 9506f61294e986c4236a30258994d0aed6eb628cb225ab2dd8f14d7de770a35a4260494ed80527edfb6c25ad1887849e4a08c72049e12bc54780baad3c30a66b
7
- data.tar.gz: 6106b438bc66591dc3266856e5dfd68bf286180bb71a1a0d87d3f86b7d417e7e2c88193687126fb115b1116988e03b4ca352dc6cb96398656524c482fbe7a528
6
+ metadata.gz: 1de82c5dbd6f5f555479e8065e0b11d23a43c9cd2b731bd03d546ccd576532df9347437b2d6adb6abaa3493d2d60ca6b2bbf1148a98f9727c4947f523496130d
7
+ data.tar.gz: a618506ff98eed9082ba7061a6a697682924e7aa4019bdc191c1acafe6c088fb5176929e50ab64e865a0351c3f6c5b5ef2c57b33f3bd8ccd630df09acee25d45
data/lib/onebox/engine.rb CHANGED
@@ -161,7 +161,7 @@ require_relative "engine/slides_onebox"
161
161
  require_relative "engine/xkcd_onebox"
162
162
  require_relative "engine/giphy_onebox"
163
163
  require_relative "engine/gfycat_onebox"
164
- # require_relative "engine/typeform_onebox"
164
+ require_relative "engine/typeform_onebox"
165
165
  require_relative "engine/vimeo_onebox"
166
166
  require_relative "engine/steam_store_onebox"
167
167
  require_relative "engine/sketchfab_onebox"
@@ -2,27 +2,23 @@ module Onebox
2
2
  module Engine
3
3
  class TypeformOnebox
4
4
  include Engine
5
+ include StandardEmbed
5
6
 
6
7
  matches_regexp(/^https?:\/\/[a-z0-9]+\.typeform\.com\/to\/[a-zA-Z0-9]+/)
7
8
  always_https
8
9
 
9
10
  def placeholder_html
10
- escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)
11
-
12
- <<-HTML
13
- <iframe src="#{escaped_url}"
14
- width="100%"
15
- height="600px"
16
- scrolling="no"
17
- frameborder="0">
18
- </iframe>
19
- HTML
11
+ og = get_opengraph
12
+ escaped_src = ::Onebox::Helpers.normalize_url_for_output(og[:image])
13
+ "<img src='#{escaped_src}' #{Helpers.title_attr(og)}>"
20
14
  end
21
15
 
22
16
  def to_html
23
- escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)
17
+ og = get_opengraph
18
+ escaped_src = ::Onebox::Helpers.normalize_url_for_output(og[:url])
19
+
24
20
  <<-HTML
25
- <iframe src="#{escaped_url}"
21
+ <iframe src="#{escaped_src}"
26
22
  width="100%"
27
23
  height="600px"
28
24
  scrolling="no"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.8.52"
4
+ VERSION = "1.8.53"
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.52
4
+ version: 1.8.53
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-07-02 00:00:00.000000000 Z
13
+ date: 2018-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -414,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
414
414
  version: '0'
415
415
  requirements: []
416
416
  rubyforge_project:
417
- rubygems_version: 2.7.6
417
+ rubygems_version: 2.6.13
418
418
  signing_key:
419
419
  specification_version: 4
420
420
  summary: A gem for generating embeddable HTML previews from URLs.