urifetch 0.1.1.rc1 → 0.1.1.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -66,7 +66,7 @@ module Urifetch
66
66
  end
67
67
 
68
68
  favicon = doc.css('link[rel="shortcut icon"], link[rel="icon shortcut"], link[rel="shortcut"], link[rel="icon"]').first
69
- favicon = favicon.nil? ? nil : favicon['href'].strip
69
+ favicon = favicon.nil? ? nil : favicon['href'].try(:strip)
70
70
  if favicon
71
71
  if favicon.match(/^https?:\/\//i).nil?
72
72
  favicon = uri.scheme + "://" + uri.host.sub(/\/$/,"") + "/" + favicon.sub(/^\//,"")
@@ -76,12 +76,12 @@ module Urifetch
76
76
 
77
77
  # Fallback Image
78
78
  image = doc.css('img').first
79
- image = image.present? ? image['src'].strip : nil
79
+ image = image.nil? ? nil : image['src'].try(:strip)
80
80
  if image
81
81
  if image.match(/^https?:\/\//i).nil?
82
82
  image = uri.scheme + "://" + uri.host.sub(/\/$/,"") + "/" + image.sub(/^\//,"")
83
83
  end
84
- set :image, image unless get(:image).present?
84
+ set :image, image
85
85
  end
86
86
 
87
87
  end
@@ -5,7 +5,7 @@ module Urifetch
5
5
  MAJOR = 0
6
6
  MINOR = 1
7
7
  PATCH = 1
8
- BUILD = 'rc1'
8
+ BUILD = 'rc2'
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
11
11
 
data/urifetch.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "urifetch"
8
- s.version = "0.1.1.rc1"
8
+ s.version = "0.1.1.rc2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Philip Vieira"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urifetch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.rc1
4
+ version: 0.1.1.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -249,7 +249,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  segments:
251
251
  - 0
252
- hash: -4509478852959216994
252
+ hash: -2471685244619805773
253
253
  required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  none: false
255
255
  requirements: