onebox 1.8.27 → 1.8.28

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: '08ae08abe8fd51a365cbd459c4e4f278ea150263'
4
- data.tar.gz: 9bf91c3aaf8a4752b834758df951fdb15803490e
3
+ metadata.gz: f3b06747361df6311e25e403c106292537b5499f
4
+ data.tar.gz: c7fa7b328a6d65c1cd354a5d2e1fbbf3c7d71e41
5
5
  SHA512:
6
- metadata.gz: 28ef6d769b53b73850a805c714ac50d7da17c0057141a4b427700f8eec7e00de2c42eafc78259bdf20ab2168c6878cdf4d48ec82c82862aed911de5d52086d92
7
- data.tar.gz: 9afca78a39e27f4cb0551c68dad859ac3063ee0ba7d7796798187fc9efd979b97dd7c0efb14f22001f475faf8efc11701f3137c279931139950b81bddb90c3f3
6
+ metadata.gz: cbf3cc825463f1c8f8a06797fb97697d2b3994f86bbb595b33fa50f7d4bd56f4d815f010eeaa605c8ea2981e28ec1fba280601003e638d1db78604f0d3aba324
7
+ data.tar.gz: 3f4dd5f712b602a54ca6f2bf3d5387bff3040cb6e95c1a1b11f7c235f933195a1247bdecf4b28280e1a0f909a5213ad5b9c0fbdaacccbbf2946f505e648fa8f0
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.2
3
3
  DisabledByDefault: true
4
- Includes:
4
+ Include:
5
5
  - '**/*.gemspec'
6
6
  - '**/Rakefile'
7
- Excludes: []
7
+ Exclude: []
8
8
 
9
9
 
10
10
  # Prefer &&/|| over and/or.
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - 2.2
4
5
  - 2.3
@@ -9,3 +10,4 @@ notifications:
9
10
  on_failure: change
10
11
  script:
11
12
  - bundle exec rubocop
13
+ - bundle exec rspec
@@ -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']&.strip
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
@@ -39,7 +39,7 @@ module Onebox
39
39
  og
40
40
  end
41
41
 
42
- def self.fetch_html_doc(url, headers=nil)
42
+ def self.fetch_html_doc(url, headers = nil)
43
43
  response = (fetch_response(url, nil, nil, headers) rescue nil)
44
44
  doc = Nokogiri::HTML(response)
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.8.27"
2
+ VERSION = "1.8.28"
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.8.27
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-25 00:00:00.000000000 Z
13
+ date: 2017-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json