update config.
This commit is contained in:
parent
27e954adc2
commit
81a13d208f
|
@ -0,0 +1,15 @@
|
||||||
|
default: &default
|
||||||
|
short_name: '# TODO: Change in config/app.yml'
|
||||||
|
title: '# TODO: Change in config/app.yml'
|
||||||
|
|
||||||
|
development:
|
||||||
|
<<: *default
|
||||||
|
|
||||||
|
test:
|
||||||
|
<<: *default
|
||||||
|
|
||||||
|
staging:
|
||||||
|
<<: *default
|
||||||
|
|
||||||
|
production:
|
||||||
|
<<: *default
|
|
@ -22,8 +22,9 @@ require 'sprockets/railtie'
|
||||||
Bundler.require(*Rails.groups)
|
Bundler.require(*Rails.groups)
|
||||||
|
|
||||||
module App
|
module App
|
||||||
SHORT_NAME = 'app' # TODO: Update name
|
CONFIG = Application.configuration.x.app = config_for(:app)
|
||||||
TITLE = 'TODO: Update in config/application.rb'
|
SHORT_NAME = CONFIG.short_name
|
||||||
|
TITLE = CONFIG.title
|
||||||
|
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
config.x.redis = config_for(:redis)
|
config.x.redis = config_for(:redis)
|
||||||
|
|
|
@ -42,6 +42,8 @@ Rails.application.configure do
|
||||||
# Print deprecation notices to the stderr.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
|
config.log_level = :warn
|
||||||
|
|
||||||
# Raises error for missing translations.
|
# Raises error for missing translations.
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
end
|
end
|
||||||
|
|
20
script/test
20
script/test
|
@ -10,20 +10,8 @@ cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
export PROJECT_NAME="app_test" RAILS_ENV="test" RACK_ENV="test"
|
export PROJECT_NAME="app_test" RAILS_ENV="test" RACK_ENV="test"
|
||||||
|
|
||||||
# setup test database
|
printf "\n===> Migrating database ...\n";
|
||||||
printf "\n===> Migrating $RAILS_ENV database ...\n"
|
docker-compose run -e RAILS_ENV=$RAILS_ENV app rails db:create db:schema:load db:migrate
|
||||||
printf "\n*************************************************************"
|
|
||||||
printf "\n********************** MIGRATION NOTE ***********************"
|
|
||||||
printf "\n** Script assumes database is already created **"
|
|
||||||
printf "\n** **"
|
|
||||||
printf "\n** Run the following command if error encountered **"
|
|
||||||
printf "\n** **"
|
|
||||||
printf "\n** docker-compose run -e RAILS_ENV=$RAILS_ENV app rake db:create **"
|
|
||||||
printf "\n** **"
|
|
||||||
printf "\n*************************************************************"
|
|
||||||
printf "\n*************************************************************\n"
|
|
||||||
|
|
||||||
docker-compose run -e RAILS_ENV=$RAILS_ENV app rails db:environment:set
|
|
||||||
|
|
||||||
printf "\n===> Running tests ...\n";
|
printf "\n===> Running tests ...\n";
|
||||||
|
|
||||||
|
@ -33,4 +21,6 @@ else
|
||||||
docker-compose run -e RAILS_ENV=$RAILS_ENV app rspec
|
docker-compose run -e RAILS_ENV=$RAILS_ENV app rspec
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker-compose down
|
printf "\n===> Removing app instances ...\n";
|
||||||
|
docker-compose stop
|
||||||
|
docker rm $(docker ps -a -q --filter="name=*_app_run*")
|
||||||
|
|
Loading…
Reference in New Issue