onebox 1.8.47 → 1.8.48

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: b1da36e4c46599b388a55095975c29207c0a051b7ca154763388c1cb5454309e
4
- data.tar.gz: 7c1a66a0cde86ab10e9e775480d22283a60d7f25c68bf8021ae2594d2b95d688
2
+ SHA1:
3
+ metadata.gz: 319f3450c49287a7f6312aa8c3918598733842c4
4
+ data.tar.gz: edcf4b559680c3ec4ef6890e76bc5d85bf3b5ac2
5
5
  SHA512:
6
- metadata.gz: 5fd8552e14d4695d626f969ee2f29687860d5b79adbddfb0dc7cd4a577a2a0770168bc8cd0f5accc6f207e14ac024ef16b560ca3f05ba02489763db5949d8e56
7
- data.tar.gz: 832e3cfae3cf9de9bb114d309b076db3458ed0882b29f659a166b4645fc1f9a9288bbc4a389d483a935caefd05782c8ffb72567d18e1619a3ac4dc0b6ff65cc2
6
+ metadata.gz: 8fdbb3e178829506c73a1592bc4454740098aef5cd54a663f7e40be9a19619d5fc921222b3c6c73013f25e721795e4f2051b528b707a40a1bf63901c1aedaa1c
7
+ data.tar.gz: a6c90441855225401490337e0597833b6280bce0a8a9248c71a2074122130913f26e896f8c08da294163a066e2ccce9a9d4d45d353815d7638a2600d9a568dc5
@@ -127,9 +127,12 @@ module Onebox
127
127
  favicon = "#{uri.scheme}:#{favicon}"
128
128
  elsif favicon && favicon.match(/^https?:\/\//i).nil?
129
129
  uri = URI(url)
130
- favicon = "#{uri.scheme}://#{uri.host.sub(/\/$/, '')}/#{favicon.sub(/^\//, '')}"
130
+ favicon = if !(favicon =~ /^\//) && uri.path.present?
131
+ "#{uri.scheme}://#{uri.host.sub(/\/$/, '')}#{uri.path.sub(/\/$/, '')}/#{favicon.sub(/^\//, '')}"
132
+ else
133
+ "#{uri.scheme}://#{uri.host.sub(/\/$/, '')}/#{favicon.sub(/^\//, '')}"
134
+ end
131
135
  end
132
-
133
136
  favicon
134
137
  end
135
138
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.8.47"
4
+ VERSION = "1.8.48"
5
5
  end
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.47
4
+ version: 1.8.48
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-05-03 00:00:00.000000000 Z
13
+ date: 2018-05-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -411,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
411
411
  version: '0'
412
412
  requirements: []
413
413
  rubyforge_project:
414
- rubygems_version: 2.7.6
414
+ rubygems_version: 2.6.13
415
415
  signing_key:
416
416
  specification_version: 4
417
417
  summary: A gem for generating embeddable HTML previews from URLs.