Add support for ActiveStorage (PR #852)

This commit is contained in:
Patrick Gansterer 2022-01-31 08:44:53 +01:00 committed by GitHub
parent 7574f4eb07
commit 19efd68c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 122 additions and 0 deletions

View file

@ -33,6 +33,7 @@ namespace :foodsoft do
setup_app_config
setup_development
setup_database
setup_storage
start_mailcatcher
puts yellow "All done! Your foodsoft setup should be running smoothly."
start_server
@ -43,6 +44,7 @@ namespace :foodsoft do
puts yellow "This task will help you get your foodcoop running in development via docker."
setup_app_config
setup_development
setup_storage
setup_run_rake_db_setup
puts yellow "All done! Your foodsoft setup should be running smoothly via docker."
end
@ -112,6 +114,15 @@ def setup_development
reminder(file)
end
def setup_storage
file = 'config/storage.yml'
return nil if skip?(file)
puts yellow "Copying #{file}..."
%x(cp -p #{Rails.root.join("#{file}.SAMPLE")} #{Rails.root.join(file)})
reminder(file)
end
def start_mailcatcher
return nil if ENV['MAILCATCHER_PORT'] # skip when it has an existing Docker container