onebox 1.8.27 → 1.8.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.travis.yml +2 -0
- data/lib/onebox/engine/standard_embed.rb +2 -2
- data/lib/onebox/helpers.rb +1 -1
- data/lib/onebox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3b06747361df6311e25e403c106292537b5499f
|
|
4
|
+
data.tar.gz: c7fa7b328a6d65c1cd354a5d2e1fbbf3c7d71e41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cbf3cc825463f1c8f8a06797fb97697d2b3994f86bbb595b33fa50f7d4bd56f4d815f010eeaa605c8ea2981e28ec1fba280601003e638d1db78604f0d3aba324
|
|
7
|
+
data.tar.gz: 3f4dd5f712b602a54ca6f2bf3d5387bff3040cb6e95c1a1b11f7c235f933195a1247bdecf4b28280e1a0f909a5213ad5b9c0fbdaacccbbf2946f505e648fa8f0
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
|
@@ -119,11 +119,11 @@ module Onebox
|
|
|
119
119
|
return nil unless html_doc
|
|
120
120
|
|
|
121
121
|
favicon = html_doc.css('link[rel="shortcut icon"], link[rel="icon shortcut"], link[rel="shortcut"], link[rel="icon"]').first
|
|
122
|
-
favicon = favicon.nil? ? nil : favicon['href']
|
|
122
|
+
favicon = favicon.nil? ? nil : (favicon['href'].nil? ? nil : favicon['href'].strip)
|
|
123
123
|
|
|
124
124
|
if favicon && favicon.match(/^https?:\/\//i).nil?
|
|
125
125
|
uri = URI(url)
|
|
126
|
-
favicon = uri.scheme + "://" + uri.host.sub(/\/$/,"") + "/" + favicon.sub(/^\//,"")
|
|
126
|
+
favicon = uri.scheme + "://" + uri.host.sub(/\/$/, "") + "/" + favicon.sub(/^\//, "")
|
|
127
127
|
end
|
|
128
128
|
|
|
129
129
|
favicon
|
data/lib/onebox/helpers.rb
CHANGED
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.28
|
|
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: 2017-11-
|
|
13
|
+
date: 2017-11-27 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: multi_json
|