onebox 1.8.71 → 1.8.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/lib/onebox/engine/whitelisted_generic_onebox.rb +19 -0
- data/lib/onebox/version.rb +1 -1
- data/onebox.gemspec +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33d3025cb9f8b3e27817b87357527810499cc595e12aa313e936f77a79b7931f
|
4
|
+
data.tar.gz: 3bf36d19666b22b45ca27111fc18ea488c2aec3e52f05a7c74a94ab8a31aa973
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3a8a2de0637e9e28d485ee9a819446d00ad85c612b0b387858f9edb6e563b71acdbb52a620e4cdd08be22e519efb99a91fac9f846a89ec807235af9e0dc57fa
|
7
|
+
data.tar.gz: 928ba4b367508c9c7c7261c9ba275370187dd4b6436a762a9aa4fc0d06329466e0b1d10c13bf5bf2b1f8dfbedc55bc99870773d80e4a1db76809847b9ac2a2f6
|
data/.travis.yml
CHANGED
@@ -96,6 +96,7 @@ module Onebox
|
|
96
96
|
samsung.com
|
97
97
|
screenr.com
|
98
98
|
scribd.com
|
99
|
+
simplecast.com
|
99
100
|
slideshare.net
|
100
101
|
sourceforge.net
|
101
102
|
speakerdeck.com
|
@@ -262,6 +263,7 @@ module Onebox
|
|
262
263
|
end
|
263
264
|
|
264
265
|
def generic_html
|
266
|
+
return card_html if is_card?
|
265
267
|
return article_html if is_article?
|
266
268
|
return video_html if is_video?
|
267
269
|
return image_html if is_image?
|
@@ -269,6 +271,10 @@ module Onebox
|
|
269
271
|
return article_html if has_text?
|
270
272
|
end
|
271
273
|
|
274
|
+
def is_card?
|
275
|
+
data[:card] == 'player' && data[:player] =~ URI::regexp
|
276
|
+
end
|
277
|
+
|
272
278
|
def is_article?
|
273
279
|
(data[:type] =~ /article/ || data[:asset_type] =~ /article/) &&
|
274
280
|
has_text?
|
@@ -302,6 +308,19 @@ module Onebox
|
|
302
308
|
)
|
303
309
|
end
|
304
310
|
|
311
|
+
def card_html
|
312
|
+
escaped_url = ::Onebox::Helpers.normalize_url_for_output(data[:player])
|
313
|
+
|
314
|
+
<<~RAW
|
315
|
+
<iframe src="#{escaped_url}"
|
316
|
+
width="#{data[:player_width] || "100%"}"
|
317
|
+
height="#{data[:player_height]}"
|
318
|
+
scrolling="no"
|
319
|
+
frameborder="0">
|
320
|
+
</iframe>
|
321
|
+
RAW
|
322
|
+
end
|
323
|
+
|
305
324
|
def article_html
|
306
325
|
layout.to_html
|
307
326
|
end
|
data/lib/onebox/version.rb
CHANGED
data/onebox.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_runtime_dependency 'htmlentities', '~> 4.3'
|
28
28
|
spec.add_runtime_dependency 'sanitize'
|
29
29
|
|
30
|
-
spec.add_development_dependency 'bundler', '~>
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
31
31
|
spec.add_development_dependency 'rake', '~> 10.4'
|
32
32
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
33
33
|
spec.add_development_dependency 'fakeweb', '~> 1.3'
|
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.72
|
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:
|
13
|
+
date: 2019-01-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -102,14 +102,14 @@ dependencies:
|
|
102
102
|
requirements:
|
103
103
|
- - "~>"
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: '
|
105
|
+
version: '2.0'
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '
|
112
|
+
version: '2.0'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rake
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -413,7 +413,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
413
413
|
- !ruby/object:Gem::Version
|
414
414
|
version: '0'
|
415
415
|
requirements: []
|
416
|
-
|
416
|
+
rubyforge_project:
|
417
|
+
rubygems_version: 2.7.6
|
417
418
|
signing_key:
|
418
419
|
specification_version: 4
|
419
420
|
summary: A gem for generating embeddable HTML previews from URLs.
|