Ruby on Rails app that allows the user to sign up and upload CSV files that import contacts.
This app makes use of ActiveRecord Encryption, so it's necessary to have a config/master.key
(provided externally)
ruby 3.1.2
config/master.key
(Provided externally)
- If it's the first time running the project, execute:
sh ./docker/initialize.sh
- Then only start the container when needed with:
docker compose up
bundle install
rails db:create db:migrate db:seed
brew update && brew install mailhog
(More info on: https://github.com/mailhog/MailHog#installation)
docker compose up
- You can use
foreman
:foreman start -f Procfile.dev
Or:
- To run the web server, run:
rails s
- To run the mail server, run the following on another tab:
mailhog
- To run sidekiq, execute:
sidekiq
- Execute:
rspec spec
- Email: admin@test.com
- Password: 123456
- example_happy_path.csv: Case when all contacts are imported successfully (if it's the first time)
- example_weird_headers.csv: Case when CSV has weird headers to pair to
- example_wrong_fields.csv: Case when the fields entered in the CSVs have format issues
- example_extra_headers.csv: Case when the there are more headers than expected