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 +5 -5
- data/lib/onebox/engine.rb +1 -1
- data/lib/onebox/engine/typeform_onebox.rb +8 -12
- data/lib/onebox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 79712de7f375aa40869b04c3b809e9fb9c6d37c0
|
4
|
+
data.tar.gz: 12ba093834341f495db6e3510af3ce485fb4cf09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
17
|
+
og = get_opengraph
|
18
|
+
escaped_src = ::Onebox::Helpers.normalize_url_for_output(og[:url])
|
19
|
+
|
24
20
|
<<-HTML
|
25
|
-
<iframe src="#{
|
21
|
+
<iframe src="#{escaped_src}"
|
26
22
|
width="100%"
|
27
23
|
height="600px"
|
28
24
|
scrolling="no"
|
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.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-
|
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.
|
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.
|