feedium 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/feedium/version.rb +1 -1
- data/lib/feedium.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ec2276acccb807bb6b7c6770ff633b917e9e046
|
4
|
+
data.tar.gz: cf9fd980c6d2bedba3fb07445339193e9b1bb855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5019a68a590f23cbc911492686b1b9fb6df7b6708d8939a6fd2489f6683708e55b7d141651451613dc4df2bce25867b6343fa05b65a56cf9b91c1b9f1d57557
|
7
|
+
data.tar.gz: ee365e55e7c7cc62840f567c628502eecc22780db133c25a55551238f71f408c094ac3a416687a467db751a8fc0ee8d11483b4a42b5ffc465279ae5a466bab7c
|
data/lib/feedium/version.rb
CHANGED
data/lib/feedium.rb
CHANGED
@@ -20,6 +20,14 @@ module Feedium
|
|
20
20
|
).freeze
|
21
21
|
|
22
22
|
def self.find(url)
|
23
|
+
begin
|
24
|
+
uri = URI.parse(url.index('http') ? url : "http://#{url}")
|
25
|
+
query = uri.query.nil? ? '' : "?#{uri.query}"
|
26
|
+
url = "#{uri.scheme}://#{uri.host}#{uri.path}#{query}"
|
27
|
+
rescue URI::InvalidURIError => e
|
28
|
+
raise Feedium::RequestError.new(e.message)
|
29
|
+
end
|
30
|
+
|
23
31
|
return @request.url if self.feed?(url)
|
24
32
|
|
25
33
|
@body = @body || @request.io.read
|