rssable 0.0.0.3 → 0.0.4

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
  SHA256:
3
- metadata.gz: 65a1a0488da89d2ee4c82e61f0d1bdad60899bf841d12948362bf7bbcffe4f0f
4
- data.tar.gz: 797f26bd27de4649140f4d63e2ac9c4260e90c574c4cd4f6df0f11a048a914a8
3
+ metadata.gz: 05c91964c4d9737319d7c90e5e02a35b5594f29fee24a6bcdb0a8d3646e93078
4
+ data.tar.gz: 8f09282bb9d57977be0f1f555c472a44baa1c1d43f6b0b4f0927cb2114e99437
5
5
  SHA512:
6
- metadata.gz: 2f9d973a26d35a6ccfa375fd66ccbb5db197e22db9c84181e2c2e9cea4fe678e3d03f60569095fc4cdb4ccd9185ed3c598bf3f4733775379d3d98be14ab4a2b8
7
- data.tar.gz: ed5ce1cb94b7aa0ad854ca10734a19818383ec0f46b6975508a8b5919dd1a30f0b972c58e375fe9e303260bd0b88a598c37a2c752448f94865804be29d5a6a4b
6
+ metadata.gz: 937fc356b85a348bd981d5fb9b7e610d01aa72472d433f33f4c4855cf3dba9f57da6c53cde5b3eea7afbd3ee0f550a3d392774ed435575cd3ed846675b69a704
7
+ data.tar.gz: cf1906df67cda8e658239df03db7ef8f529de920d5d84bb5e1391bbd683f49bf441389950593a5fed0e561b2d2d6b016cc1c5ba08916effce8acf88555cc4e69
@@ -8,7 +8,11 @@ module RSSable
8
8
  response = RestClient.get(url)
9
9
  html = Nokogiri::HTML(response.body)
10
10
 
11
- html.css("link[type='application/rss+xml']").map { |node| node[:href] }
11
+ links = html.css("link[type='application/rss+xml']").map { |node| node[:href] }
12
+
13
+ return links if links.size > 0
14
+
15
+ url.end_with?('/') ? ["#{url}feed/"] : ["#{url}/feed/"]
12
16
  end
13
17
  end
14
18
  end
@@ -17,6 +17,7 @@ module RSSable
17
17
  RSSable::Parsers::Channel.new(
18
18
  feed: response.body, driver: driver
19
19
  )
20
+ rescue RestClient::NotFound
20
21
  end
21
22
  end
22
23
  end
@@ -6,7 +6,7 @@ module RSSable
6
6
  #
7
7
  # @return [String]
8
8
  def to_s
9
- "0.0.0.3"
9
+ "0.0.4"
10
10
  end
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rssable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Dąbrowski