onebox 1.8.31 → 1.8.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/engine/standard_embed.rb +5 -2
- data/lib/onebox/version.rb +1 -1
- data/templates/amazon.mustache +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: 3e49ab7f828cf41a7445feb4526258d894765d98
|
4
|
+
data.tar.gz: dad7b82956c8e34edb9963190494ceab97af2e43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24510f07b4ed9ae577c9201722409ea956c1de9d835c6cf06ee4958303c91a41d1e1dfc072cc8ba8930683aea34a43f416fcdbb759a19b2f0c28ec34f6483081
|
7
|
+
data.tar.gz: c268644571d29f8ab3f2df61db3a7fc1c33e99a52caead8fc25b895debf7c8871e3d4de42f7844f953145e032537aa75d2e9d27e026f6ada29355267104ac05a
|
@@ -122,9 +122,12 @@ module Onebox
|
|
122
122
|
favicon = html_doc.css('link[rel="shortcut icon"], link[rel="icon shortcut"], link[rel="shortcut"], link[rel="icon"]').first
|
123
123
|
favicon = favicon.nil? ? nil : (favicon['href'].nil? ? nil : favicon['href'].strip)
|
124
124
|
|
125
|
-
if favicon && favicon
|
125
|
+
if favicon && !!(favicon =~ /^\/\//)
|
126
126
|
uri = URI(url)
|
127
|
-
favicon = uri.scheme
|
127
|
+
favicon = "#{uri.scheme}:#{favicon}"
|
128
|
+
elsif favicon && favicon.match(/^https?:\/\//i).nil?
|
129
|
+
uri = URI(url)
|
130
|
+
favicon = "#{uri.scheme}://#{uri.host.sub(/\/$/, '')}/#{favicon.sub(/^\//, '')}"
|
128
131
|
end
|
129
132
|
|
130
133
|
favicon
|
data/lib/onebox/version.rb
CHANGED
data/templates/amazon.mustache
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.32
|
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-12-
|
13
|
+
date: 2017-12-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|