This is a Diff Challenge repository. If you don't know what Diff Challenge is (and you don't, because this is the first one in existence!), read this first.
From the technical point of view, your task is to build an API which will pass the tests from this repository. From the business point of view, your task is to build an app for group food ordering.
API has to be written in Ruby, but besides that there are no other technical requirements. You can use whatever framework you want (or write your own).
There are 7 endpoints to implement which can be grouped in three categories:
- User registration and authentication (very basic).
- Creating Groups, i.e. collection of Users which can order food from a restaurant together.
- Creating Orders. Order can be assigned to an existing Group or to a collection of individuals created ad hoc by entering their emails.
You have to submit your solution to 3.04.2017, 3pm.
After the Codebase Part all participants who submitted their solution will receive a new specification in form of updated tests. Diff created to meet these new requirements will be evaluated. It will show us how easy your code can adapt to new business needs. For example, a few small changes in a few files are probably better than huge changes in many files.
Notes
- This is not about creating fully functional app. You'll implement very limited and simple features, so don't be surprise by the fact that there are no tests for validations, that authentication is very basic or that there is no endpoint for choosing meals.
- This is the first iteration of Diff Challenge ever. Please be patient, share your feedback, and most of all don't treat final results very seriously - we are not even sure how to measure diffs yet!
- Install requirements:
- Ruby 2.4.
- Bundler.
- Fork this repository.
- Install gems with
bundle install
. - Modify
spec/endpoints.rb
if you need. Remember to commit your changes! - Start building your app in
my_app
directory. - When you're done, create
my_app/start.sh
script (see How do we verify your app section below). Remember to commit your changes, again! - Send us link to your repository. Use ssh (it starts with "git", for example
git@github.com:kv109/diff-challenge-1.git
). - Wait for the new requirements.
- Apply changes in
diff
branch. - Push
diff
branch.
- Modify
spec/endpoints.rb
if you need. This is the only file you can modify outsidemy_app
directory. It contains API hostname and its endpoints. You might want to use different ones. - Clear your app database, tests need database with no data.
- Launch your app (i.e. start your server).
- Run tests:
bundle exec rspec --format=doc --color
Tests will hit your API according to the configuration in spec/endpoints.rb
file.
- We clone your repo:
git clone {link-you-sent-us}
. - We go to the repo directory:
cd {repo-name}
. - We execute
cd my_app && ./start.sh
and wait for server to start. - We execute
bundle exec rspec --format=doc --color
. There can be no test failures.
Well... We don't know yet. We hope that diffs from this first iteration will help us to create some basic measurement tools. But for now we will just try to choose the best diffs collectively based on our knowledge and experience.
After the assessment we plan to meet with all participants and talk about the best diffs. We'll try to explain our choice and, using chosen diffs as examples, dig into practices and techniques which made codebase easily adaptable in form of open discussion. We consider this last part to be the most valuable.
-
spec/requests/user_registration_spec.rb
-
spec/requests/groups_management_spec.rb
- create
- index
-
spec/requests/orders_management_spec.rb
- create
- index
- Orders with Group
- Orders with Users