Package list feed2imap / 9d37600
Merge tag 'upstream/1.2.2' Upstream version 1.2.2 # gpg: Signature made Sex 07 Fev 2014 09:56:12 BRT using RSA key ID CD460BDE # gpg: Good signature from "Antonio Terceiro <terceiro@softwarelivre.org>" # gpg: aka "Antonio Terceiro <terceiro@dcc.ufba.br>" # gpg: aka "Antonio Terceiro <terceiro@colivre.coop.br>" # gpg: aka "Antonio Terceiro <terceiro@debian.org>" # gpg: aka "Antonio Terceiro <antonio.terceiro@linaro.org>" # gpg: aka "Antonio Terceiro <terceiro@cs.ubc.ca>" Antonio Terceiro 7 years ago
5 changed file(s) with 20 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
66 task :default => [:test]
77
88 PKG_NAME = 'feed2imap'
9 PKG_VERSION = '1.2'
9 PKG_VERSION = `ruby -Ilib -rfeed2imap/feed2imap -e 'print F2I_VERSION'`
1010 PKG_FILES = [ 'ChangeLog', 'README', 'COPYING', 'setup.rb', 'Rakefile']
1111 Find.find('bin/', 'lib/', 'test/', 'data/') do |f|
1212 if FileTest.directory?(f) and f =~ /\.svn/
6868 maildir_account = MaildirAccount::new
6969 @conf['feeds'].each do |f|
7070 if f['disable'].nil?
71 uri = URI::parse(f['target'].to_s)
71 uri = URI::parse(Array(f['target']).join(''))
7272 path = URI::unescape(uri.path)
7373 if uri.scheme == 'maildir'
7474 @feeds.push(ConfigFeed::new(f, maildir_account, path, self))
1717 =end
1818
1919 # Feed2Imap version
20 F2I_VERSION = '1.0'
20 F2I_VERSION = '1.2.2'
2121 F2I_WARNFETCHTIME = 10
2222
2323 require 'feed2imap/config'
4444 url: http://something2
4545 target: imap://login:pasword@ezaezae/Feeds/B
4646 EOF
47 CONFARRAYTARGET = <<EOF
48 parts: text
49 include-images: false
50 prefix: &target "maildir:///tmp/Maildir/"
51 feeds:
52 - name: feed1
53 url: http://something
54 target: [ *target, "feed1" ]
55 EOF
4756
4857 class ConfigTest < Test::Unit::TestCase
4958 def test_cache
7887 assert conf.parts.include?('text')
7988 assert ! conf.parts.include?('html')
8089 end
90
91 def test_url_array
92 sio = StringIO::new CONFARRAYTARGET
93 conf = F2IConfig::new(sio)
94 assert_equal "/tmp/Maildir/feed1", conf.feeds.first.folder
95 end
96
8197 end
1010 @tmpdirs = []
1111 end
1212
13 def tear_down
13 def teardown
1414 @tmpdirs.each do |dir|
1515 FileUtils.rm_rf(dir)
1616 end