lib/link_thumbnailer/processor.rb in link_thumbnailer-2.0.1 vs lib/link_thumbnailer/processor.rb in link_thumbnailer-2.0.2
- old
+ new
@@ -1,6 +1,7 @@
require 'delegate'
+require 'uri'
require 'net/http/persistent'
module LinkThumbnailer
class Processor < ::SimpleDelegator
@@ -81,14 +82,14 @@
def too_many_redirections?
redirect_count > redirect_limit
end
def valid_url_format?
- url.is_a?(URI::HTTP)
+ url.is_a?(::URI::HTTP)
end
def url=(url)
- @url = URI(url)
+ @url = ::URI.parse(url.to_s)
end
end
end