summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--lib/feed2imap/config.rb1
-rwxr-xr-xtest/tc_config.rb16
3 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 51a4a42..be85722 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
Feed2Imap 0.4 (date unknown)
============================
-* IMAPS now works thanks to a bug fixed in ruby 1.9.
+* You can now use WordPress's feed:http://something urls in feed2imaprc.
* Switched to a real SGML parser for the text version.
* Much better output for the text version of emails.
* New feed2imap-cleaner to remove old mails seen but not flagged
diff --git a/lib/feed2imap/config.rb b/lib/feed2imap/config.rb
index a784b91..d61d415 100644
--- a/lib/feed2imap/config.rb
+++ b/lib/feed2imap/config.rb
@@ -74,5 +74,6 @@ class ConfigFeed
def initialize(name, url, imapaccount, folder)
@name, @url, @imapaccount, @folder = name, url, imapaccount, folder
+ url.sub!(/^feed:/, '')
end
end
diff --git a/test/tc_config.rb b/test/tc_config.rb
index ba70b33..ce910e9 100755
--- a/test/tc_config.rb
+++ b/test/tc_config.rb
@@ -25,6 +25,15 @@ feeds:
url: http://something2
target: imaps://login:pasword@ezaezae/Feeds/B
EOF
+CONFFEED = <<EOF
+feeds:
+ - name: feed1
+ url: feed:http://something
+ target: imap://login:pasword@ezaezae/Feeds/A
+ - name: feed2
+ url: http://something2
+ target: imaps://login:pasword@ezaezae/Feeds/B
+EOF
class ConfigTest < Test::Unit::TestCase
def test_cache
@@ -45,4 +54,11 @@ class ConfigTest < Test::Unit::TestCase
conf = F2IConfig::new(sio)
assert_equal(2, conf.imap_accounts.length)
end
+
+ def test_feedurls
+ sio = StringIO::new CONFFEED
+ conf = F2IConfig::new(sio)
+ assert_equal('http://something', conf.feeds[0].url)
+ assert_equal('http://something2', conf.feeds[1].url)
+ end
end