Welcome to the coding challenge.
This challenge will give us an idea about your coding skills. Don't worry if you can't finish all requirements in time. Just tell us how you would proceed.
We're using Rails 4, RSpec 3.5 etc.
In the csv
folder you find some data files.
To get HTML page with users:
GET /users/
To access to the JSON endpoint:
GET /api/v1/users/
To import from csv use rake tasks:
To import users data:
bundle exec rake import_from_csv:import_users
To import mp3 data:
bundle exec rake import_from_csv:import_mp3
To import playlists (import users and mp3 data first):
bundle exec rake import_from_csv:import_playlist
- Created rails application using Rails 5, pg 1.0.0, rspec-rails 3.7
- Created User model and migration
- Created rake task for importing User model from CSV
- Created controller/view to show a list of users
- Created REST API endpoint to show a list of users
- Implemented Playlist, Mp3Entity models and migrations. Also PlaylistEntity for many-to-many relationship
- Created rake task for importing Playlist and Mp3 models from CSV
Testing
bundle exec rspec
or
bin/rspec
Code Quality Use
bin/quality
to run rubocop and rails_best_practices for code quality checking
For CI use
bin/ci
- Create a rails application within this repo and commit as usual
- Update the README inside with information on how to work with it if you think that some information might be helpful
- Set up an appropriate data model for the data in the csv files
- Create an import for the users
- Create a simple controller/view to show a list of users
- Create a simple REST API endpoint that returns a list of users as json. The REST API can be treated as internal only so no authentication/authorization is needed here.
- Create an import for the playlists and mp3
- Extend the users view to also show the playlists each user has