onebox 2.2.6 → 2.2.8
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5899faff4b0c2e96d766892a810e866e28a188dbd7b9e8b2c7bdd6bc5a7d7490
|
4
|
+
data.tar.gz: 7d739d48349f32dc3f0675d85b29446d6f758f276b845543cc9f9d359c9eb664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 790964df42c83ea05ff052727a7ad4b567f6064be1a25bf974eeac661a6f7daa3696c64686f21bb83df30ad280caffc36b2039e3c0b799a3171713d61c88eff2
|
7
|
+
data.tar.gz: de30b5e5e6110fd72c0aa792aebffa7571c50f04604efedac648e754a527f4945a784328eb43ce0352e9b06eeac908ea23ff0dcdf3ce4d84ecb5e8c3dd64dfd6
|
data/.github/workflows/ci.yml
CHANGED
@@ -227,8 +227,10 @@ module Onebox
|
|
227
227
|
d[:image] = d[:image_secure_url] || d[:image_url] || d[:thumbnail_url] || d[:image]
|
228
228
|
d[:image] = Onebox::Helpers::get_absolute_image_url(d[:image], @url)
|
229
229
|
d[:image] = Onebox::Helpers::normalize_url_for_output(html_entities.decode(d[:image]))
|
230
|
+
d[:image] = nil if Onebox::Helpers.blank?(d[:image])
|
230
231
|
|
231
232
|
d[:video] = d[:video_secure_url] || d[:video_url] || d[:video]
|
233
|
+
d[:video] = nil if Onebox::Helpers.blank?(d[:video])
|
232
234
|
|
233
235
|
d[:published_time] = d[:article_published_time] unless Onebox::Helpers.blank?(d[:article_published_time])
|
234
236
|
if !Onebox::Helpers.blank?(d[:published_time])
|
@@ -28,7 +28,7 @@ module Onebox
|
|
28
28
|
def http_params
|
29
29
|
{
|
30
30
|
'User-Agent' =>
|
31
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
31
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
data/lib/onebox/helpers.rb
CHANGED
data/lib/onebox/open_graph.rb
CHANGED
@@ -32,7 +32,8 @@ module Onebox
|
|
32
32
|
if method_name.end_with?(*integer_suffixes)
|
33
33
|
value.to_i
|
34
34
|
elsif method_name.end_with?(*url_suffixes)
|
35
|
-
|
35
|
+
result = Onebox::Helpers.normalize_url_for_output(value)
|
36
|
+
result unless Onebox::Helpers::blank?(result)
|
36
37
|
else
|
37
38
|
value
|
38
39
|
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: 2.2.
|
4
|
+
version: 2.2.8
|
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: 2021-
|
13
|
+
date: 2021-03-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|