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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
namespace :multicoops do
|
||||
desc 'Runs a specific rake task for each registered foodcoop, use rake multicoops:run TASK=db:migrate'
|
||||
task :run => :environment do
|
||||
task_to_run = ENV['TASK']
|
||||
task_to_run = ENV.fetch('TASK', nil)
|
||||
last_error = nil
|
||||
FoodsoftConfig.each_coop do |coop|
|
||||
begin
|
||||
|
|
@ -21,9 +21,9 @@ namespace :multicoops do
|
|||
|
||||
desc 'Runs a specific rake task for a single coop, use rake mutlicoops:run_single TASK=db:migrate FOODCOOP=demo'
|
||||
task :run_single => :environment do
|
||||
task_to_run = ENV['TASK']
|
||||
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
|
||||
rake_say "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
|
||||
task_to_run = ENV.fetch('TASK', nil)
|
||||
FoodsoftConfig.select_foodcoop ENV.fetch('FOODCOOP', nil)
|
||||
rake_say "Run '#{task_to_run}' for #{ENV.fetch('FOODCOOP', nil)}"
|
||||
Rake::Task[task_to_run].execute
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ require 'pathname'
|
|||
|
||||
namespace :db do
|
||||
namespace :seed do
|
||||
Dir.glob(Rails.root.join('db/seeds/*.seeds.rb')).each do |seedfile|
|
||||
Dir.glob(Rails.root.join('db/seeds/*.seeds.rb')).sort.each do |seedfile|
|
||||
desc "Load the seed data from #{Pathname.new(seedfile).relative_path_from(Rails.root)}"
|
||||
task File.basename(seedfile, '.seeds.rb') => :environment do
|
||||
require_relative seedfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue