summaryrefslogtreecommitdiff
path: root/lib/feed2imap/config.rb
diff options
context:
space:
mode:
authorLucas Nussbaum <lucas@lucas-nussbaum.net>2012-04-26 10:21:33 +0200
committerLucas Nussbaum <lucas@lucas-nussbaum.net>2012-04-26 10:21:33 +0200
commitc8c32eea5d329773bda8ce0a073266ab498507c5 (patch)
tree1f6bd5bf62b826c51ed7912e9e7f3c3c5bf70694 /lib/feed2imap/config.rb
parent04db76a10d2f26e124731f7601722bfa2de61dfe (diff)
parentd3ac1f64a5ba90d755e58bd0f3ff2813baca510b (diff)
downloadfeed2imap-c8c32eea5d329773bda8ce0a073266ab498507c5.tar.gz
feed2imap-c8c32eea5d329773bda8ce0a073266ab498507c5.tar.bz2
feed2imap-c8c32eea5d329773bda8ce0a073266ab498507c5.zip
Merge remote-tracking branch 'chimrod/master'
Diffstat (limited to 'lib/feed2imap/config.rb')
-rw-r--r--lib/feed2imap/config.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/feed2imap/config.rb b/lib/feed2imap/config.rb
index 74d5507..fd4e94f 100644
--- a/lib/feed2imap/config.rb
+++ b/lib/feed2imap/config.rb
@@ -34,7 +34,7 @@ LOGNAME = Etc.getlogin
# Feed2imap configuration
class F2IConfig
- attr_reader :imap_accounts, :cache, :feeds, :dumpdir, :updateddebug, :max_failures, :include_images, :default_email, :hostname, :reupload_if_updated, :parts
+ attr_reader :imap_accounts, :cache, :feeds, :dumpdir, :updateddebug, :max_failures, :include_images, :default_email, :hostname, :reupload_if_updated, :parts, :timeout
# Load the configuration from the IO stream
# TODO should do some sanity check on the data read.
@@ -60,6 +60,8 @@ class F2IConfig
@reupload_if_updated = true
@reupload_if_updated = @conf['reupload-if-updated'] if @conf.has_key?('reupload-if-updated')
+ @timeout = if @conf['timeout'] == nil then 30 else @conf['timeout'].to_i end
+
@default_email = (@conf['default-email'] || "#{LOGNAME}@#{HOSTNAME}")
ImapAccount.no_ssl_verify = (@conf.has_key?('disable-ssl-verification') and @conf['disable-ssl-verification'] == true)
@hostname = HOSTNAME # FIXME: should this be configurable as well?
@@ -137,6 +139,7 @@ class ConfigFeed
@reupload_if_updated = f2iconfig.reupload_if_updated
@reupload_if_updated = f['reupload-if-updated'] if f.has_key?('reupload-if-updated')
+
end
def needfetch(lastcheck)