mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove references to deprecated application.yml config file.
Point to .env and other .env.* config files.
This commit is contained in:
@@ -81,7 +81,7 @@ The tests of all custom engines can be run with:
|
||||
|
||||
Note: If your OS is not explicitly supported in the setup guides then not all tests may pass. However, you may still be able to develop.
|
||||
|
||||
Note: The time zone on your machine should match the one defined in `config/application.yml`.
|
||||
Note: The time zone on your machine should match the one defined in the `.env[.*]` file.
|
||||
|
||||
Once [npm dependencies are installed][karma], AngularJS tests can be run with:
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ Openfoodnetwork::Application.configure do
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
#
|
||||
# To override this, set the appropriate locale in application.yml
|
||||
# To override this, set the appropriate locale in .env[.*] file.
|
||||
config.time_zone = ENV.fetch("TIMEZONE", "UTC")
|
||||
|
||||
config.i18n.fallbacks = [:en]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Google requires an API key with a billing account to use their API.
|
||||
# The key is stored in config/application.yml.
|
||||
# The key is stored in .env[.*] files.
|
||||
|
||||
Geocoder.configure(
|
||||
timeout: ENV.fetch('GEOCODER_TIMEOUT', 6).to_i,
|
||||
|
||||
@@ -3,9 +3,7 @@ require 'yaml'
|
||||
|
||||
# Learn more: http://github.com/javan/whenever
|
||||
|
||||
app_config = YAML.load_file(File.join(__dir__, 'application.yml'))
|
||||
|
||||
env "MAILTO", app_config["SCHEDULE_NOTIFICATIONS"] if app_config["SCHEDULE_NOTIFICATIONS"]
|
||||
env "MAILTO", ENV["SCHEDULE_NOTIFICATIONS"] if ENV["SCHEDULE_NOTIFICATIONS"]
|
||||
|
||||
# If we use -e with a file containing specs, rspec interprets it and filters out our examples
|
||||
job_type :run_file, "cd :path; :environment_variable=:environment bundle exec script/rails runner :task :output"
|
||||
@@ -15,9 +13,9 @@ every 1.month, at: '4:30am' do
|
||||
end
|
||||
|
||||
every 1.day, at: '2:45am' do
|
||||
rake 'db2fog:clean' if app_config['S3_BACKUPS_BUCKET']
|
||||
rake 'db2fog:clean' if ENV['S3_BACKUPS_BUCKET']
|
||||
end
|
||||
|
||||
every 4.hours do
|
||||
rake 'db2fog:backup' if app_config['S3_BACKUPS_BUCKET']
|
||||
rake 'db2fog:backup' if ENV['S3_BACKUPS_BUCKET']
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module OpenFoodNetwork
|
||||
# Provides access to the language settings.
|
||||
# Currently, language settings are read from the environment.
|
||||
# See: config/application.yml
|
||||
# See: .env[.*] files.
|
||||
class I18nConfig
|
||||
# Users don't need to select the already selected locale.
|
||||
def self.locale_options
|
||||
|
||||
@@ -34,12 +34,6 @@ fi
|
||||
bundle check || bundle install
|
||||
yarn install
|
||||
|
||||
# Set up configurable environment variables
|
||||
if [ ! -f config/application.yml ]; then
|
||||
cp config/application.yml.example config/application.yml
|
||||
printf "${YELLOW}Copied config/application.yml Make sure to fill it with the appropriate configuration values.\n\n${NO_COLOR}"
|
||||
fi
|
||||
|
||||
# Set up the database for both development and test
|
||||
# Confirming the default user and password
|
||||
printf '\n\n' | bundle exec rake db:setup db:test:prepare
|
||||
|
||||
Reference in New Issue
Block a user