summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2005-07-22 08:19:56 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2005-07-22 08:19:56 +0000
commit6941a59386d4d7d6de2c505dda54912e9a163f71 (patch)
tree130d51d18f1bc1c216bb53d3409d0a4acfd478c8
parent15b8590c7958499740523e49dc85d5f23aec9f5d (diff)
downloadfeed2imap-6941a59386d4d7d6de2c505dda54912e9a163f71.tar.gz
feed2imap-6941a59386d4d7d6de2c505dda54912e9a163f71.tar.bz2
feed2imap-6941a59386d4d7d6de2c505dda54912e9a163f71.zip
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@38 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to '')
-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