lib/livefyre/core.rb in livefyre-1.1.1 vs lib/livefyre/core.rb in livefyre-1.1.2
- old
+ new
@@ -1,11 +1,11 @@
require 'base64'
require 'digest'
require 'json'
require 'jwt'
require 'rest-client'
-require 'uri'
+require 'addressable/uri'
module Livefyre
class Network
DEFAULT_USER = 'system'
DEFAULT_EXPIRES = 86400
@@ -109,14 +109,14 @@
content['collectionSettings']['collectionId']
end
end
def uri?(string)
- uri = URI.parse(string)
- %w( http https ).include?(uri.scheme)
- rescue URI::BadURIError
+ uri = Addressable::URI.parse(string)
+ %w( ftp ftps http https ).include?(uri.scheme)
+ rescue Addressable::URI::BadURIError
false
- rescue URI::InvalidURIError
+ rescue Addressable::URI::InvalidURIError
false
end
end
end
end
\ No newline at end of file