Bundle update rubocop and auto correct style issues
This commit is contained in:
parent
22fd814193
commit
9c9ebdf557
13 changed files with 42 additions and 37 deletions
|
|
@ -51,13 +51,13 @@ namespace :foodsoft do
|
|||
|
||||
desc "Parse incoming email on stdin (options: RECIPIENT=foodcoop.handling)"
|
||||
task :parse_reply_email => :environment do
|
||||
FoodsoftMailReceiver.received ENV['RECIPIENT'], STDIN.read
|
||||
FoodsoftMailReceiver.received ENV.fetch('RECIPIENT', nil), STDIN.read
|
||||
end
|
||||
|
||||
desc "Start STMP server for incoming email (options: SMTP_SERVER_PORT=2525, SMTP_SERVER_HOST=0.0.0.0)"
|
||||
task :reply_email_smtp_server => :environment do
|
||||
port = ENV['SMTP_SERVER_PORT'].present? ? ENV['SMTP_SERVER_PORT'].to_i : 2525
|
||||
host = ENV['SMTP_SERVER_HOST']
|
||||
host = ENV.fetch('SMTP_SERVER_HOST', nil)
|
||||
rake_say "Started SMTP server for incoming email on port #{port}."
|
||||
server = FoodsoftMailReceiver.new(ports: port, hosts: host, max_processings: 1, logger: Rails.logger)
|
||||
server.start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue