onebox 1.3.5 → 1.3.6

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
  SHA1:
3
- metadata.gz: a2fd6f8d2e4bae8fb9b2cdc34a5926bfb7a0d933
4
- data.tar.gz: d28f32d3c1007902967c3a29d499ffb8ae94a5bc
3
+ metadata.gz: 508c2c0050946f9540e3b3738fc4338d675ee30f
4
+ data.tar.gz: 632a6f4a74e9ecddcbd61c6cb8fbe167033f7af2
5
5
  SHA512:
6
- metadata.gz: f6cbc44f26e2eb709937db4233e033de53326e80ebafbfc04e86eaadb218f93f8f6bfe3fbe0d86183f102a817fe43ff6544ed8a52fbe063a9a445d82988aa977
7
- data.tar.gz: 9f8bcdcdea07104b3f1966cc99c5fc1a24eaef4af3744880595f7fdbdd5811ff9ce848caa9d23c515eba2090ef9c00ea87b13561e0571eef55cd308d8c1bbf0f
6
+ metadata.gz: 49d9482a146d3fce50c301537df28eaf6b2a03386480735d8a6a64bc6c6abb035e41ea23cf8ece9294b73bdc43020d76c7b388bcfe49737a819d98d4ddcc1ff6
7
+ data.tar.gz: 2f159656943c1a5e480c5838f7a4e07b7f6a1ab90eb867fb8a4e6a62b0f90e5a628565820feaccdfcf1b490668ae628ffd0ab26350375407a3b5c80149a0c8f4
@@ -45,11 +45,13 @@ module Onebox
45
45
  og.metadata[m_name.to_sym] ||= []
46
46
  og.metadata[m_name.to_sym].push m_content
47
47
  if m_name == "image"
48
- image_uri = URI.parse(m_content)
49
- if image_uri.host.nil?
50
- image_uri.host = URI.parse(url).host
48
+ image_uri = URI.parse(m_content) rescue nil
49
+ if image_uri
50
+ if image_uri.host.nil?
51
+ image_uri.host = URI.parse(url).host
52
+ end
53
+ og.images.push image_uri.to_s
51
54
  end
52
- og.images.push image_uri.to_s
53
55
  elsif attrs_list.include? m_name
54
56
  og.send("#{m_name}=", m_content) unless m_content.empty?
55
57
  end
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
3
3
  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.3.5
4
+ version: 1.3.6
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: 2014-06-05 00:00:00.000000000 Z
13
+ date: 2014-06-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json