onebox 1.7.0 → 1.7.1

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: da1cb3e58693506b68988b477855a2058bf0b878
4
- data.tar.gz: 81f59c2fee6f69e6903a4d928d4eafa2ab784026
3
+ metadata.gz: 0eb554e8d0c9c9bd449b812203d44e7b8ebaf586
4
+ data.tar.gz: 93b23186d771f8f45c7934d3977613753ea8c6ef
5
5
  SHA512:
6
- metadata.gz: 5ccc65c55cf7a0b6b6caf8249db8c998e53eb27d40fe3f06e54a51977a8d3b7d856d6a058615f4e85c6e040fe3f8efe79abde319228a93a006b7bbc425ad8400
7
- data.tar.gz: 09cbb07a7b3275dffb6ddb076f07b04b806474e682c9aabd7311d9400fc280b0daa2bd4787d9be5a3f1970403aebb5c6c0baaf6f36e811e821b74454bf7e63ef
6
+ metadata.gz: 37463bc2dcd32dabba738c511cb1d4ee00a1f0a44e5dbf2aab04fe5c723cea3400d495d4c3fcc46d3a873c4100adddfb6be8e9a6e14bc1ed00812bfe3bd005ec
7
+ data.tar.gz: 283d61dd73d49e7e714806700ebc6297dfe96b9282062b6dbc7365b7aac64375370c8d6232f0df9389caab0f9d7068e9ec1d88c26278a78eb75dd3a4965c9e3d
@@ -209,7 +209,7 @@ module Onebox
209
209
 
210
210
  if !Onebox::Helpers.blank?(d[:domain])
211
211
  d[:domain] = "http://#{d[:domain]}" unless d[:domain] =~ /^https?:\/\//
212
- d[:domain] = URI(d[:domain]).host.to_s.sub(/^www\./, '')
212
+ d[:domain] = URI(d[:domain]).host.to_s.sub(/^www\./, '') rescue nil
213
213
  end
214
214
 
215
215
  # prefer secure URLs
@@ -238,7 +238,7 @@ module Onebox
238
238
  end
239
239
 
240
240
  def is_article?
241
- data[:type] =~ /article/ &&
241
+ (data[:type] =~ /article/ || data[:asset_type] =~ /article/) &&
242
242
  has_text?
243
243
  end
244
244
 
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.7.0"
2
+ VERSION = "1.7.1"
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.7.0
4
+ version: 1.7.1
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-01-04 00:00:00.000000000 Z
13
+ date: 2017-01-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -469,7 +469,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
469
  version: '0'
470
470
  requirements: []
471
471
  rubyforge_project:
472
- rubygems_version: 2.5.1
472
+ rubygems_version: 2.6.8
473
473
  signing_key:
474
474
  specification_version: 4
475
475
  summary: A gem for turning URLs into previews.