- Docker Compose
- Ruby 2.5.8
- MySQL
- Sinatra
- ActiveRecord
- Rake tasks
- VCR
- Create a brand new
.envfile:
cp -a .env.development .env- In a unix terminal tab run:
docker-compose up --build- In another terminal tab prepare the database with:
docker-compose exec visit_statistic_service bundle exec rake db:create RUBY_ENV=development --trace
docker-compose exec visit_statistic_service bundle exec rake db:migrate RUBY_ENV=development --tracedocker-compose exec visits_statistic_service bundle exec rake -Tdocker-compose exec -e RUBY_ENV=development visit_statistic_service ruby -r './app.rb' -e 'call'- In a terminal tab run the rspec tests:
docker-compose exec -e RUBY_ENV=test visit_statistic_service bundle exec rake db:create --tracedocker-compose exec -e RUBY_ENV=test visit_statistic_service bundle exec rake db:migrate --tracedocker-compose exec -e RUBY_ENV=test visit_statistic_service bundle exec rspec -fdoc