From a1b2e9080f53a3db984f4297d8f19892d6582d37 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 27 Aug 2013 22:28:58 -0300 Subject: Pass feed URL to ruby-feedparser This will make ruby-feedparser automatically calculate the full URL of feed items whose link is present in the feed with only a path and not hostname. ruby-feedparser will add the hostname where the feed came from. --- lib/feed2imap/feed2imap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb index f1bc9cd..7ec355c 100644 --- a/lib/feed2imap/feed2imap.rb +++ b/lib/feed2imap/feed2imap.rb @@ -223,7 +223,7 @@ class Feed2Imap next end begin - feed = FeedParser::Feed::new(f.body.force_encoding('UTF-8')) + feed = FeedParser::Feed::new(f.body.force_encoding('UTF-8'), f.url) rescue Exception n = @cache.parse_failed(f.name) m = "Error while parsing #{f.name}: #{$!} (failed #{n} times)" -- cgit v1.2.3