Adds a method for extracting MailHandler options from ENV.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11785 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+3
-27
@@ -55,15 +55,7 @@ Examples:
|
||||
END_DESC
|
||||
|
||||
task :read => :environment do
|
||||
options = { :issue => {} }
|
||||
%w(project status tracker category priority).each { |a| options[:issue][a.to_sym] = ENV[a] if ENV[a] }
|
||||
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
|
||||
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
|
||||
options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
|
||||
options[:no_account_notice] = ENV['no_account_notice'] if ENV['no_account_notice']
|
||||
options[:default_group] = ENV['default_group'] if ENV['default_group']
|
||||
|
||||
MailHandler.receive(STDIN.read, options)
|
||||
MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
|
||||
end
|
||||
|
||||
desc <<-END_DESC
|
||||
@@ -130,15 +122,7 @@ END_DESC
|
||||
:move_on_success => ENV['move_on_success'],
|
||||
:move_on_failure => ENV['move_on_failure']}
|
||||
|
||||
options = { :issue => {} }
|
||||
%w(project status tracker category priority).each { |a| options[:issue][a.to_sym] = ENV[a] if ENV[a] }
|
||||
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
|
||||
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
|
||||
options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
|
||||
options[:no_account_notice] = ENV['no_account_notice'] if ENV['no_account_notice']
|
||||
options[:default_group] = ENV['default_group'] if ENV['default_group']
|
||||
|
||||
Redmine::IMAP.check(imap_options, options)
|
||||
Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV))
|
||||
end
|
||||
|
||||
desc <<-END_DESC
|
||||
@@ -165,15 +149,7 @@ END_DESC
|
||||
:password => ENV['password'],
|
||||
:delete_unprocessed => ENV['delete_unprocessed']}
|
||||
|
||||
options = { :issue => {} }
|
||||
%w(project status tracker category priority).each { |a| options[:issue][a.to_sym] = ENV[a] if ENV[a] }
|
||||
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
|
||||
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
|
||||
options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
|
||||
options[:no_account_notice] = ENV['no_account_notice'] if ENV['no_account_notice']
|
||||
options[:default_group] = ENV['default_group'] if ENV['default_group']
|
||||
|
||||
Redmine::POP3.check(pop_options, options)
|
||||
Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV))
|
||||
end
|
||||
|
||||
desc "Send a test email to the user with the provided login name"
|
||||
|
||||
Reference in New Issue
Block a user