diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-22 12:25:37 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-22 12:25:37 -0700 |
| commit | b49f5f2edc5593f9489edfdd5d20a488cf3325ea (patch) | |
| tree | c8b1519ef5cb0e33f51c3e7294d2a7e698aad7b1 | |
| parent | 71a2f279073d08e090bcee036cf0bbf54dde7e60 (diff) | |
move solution notes to a separate file.
| -rw-r--r-- | README.md | 40 | ||||
| -rw-r--r-- | SOLUTION.md | 35 |
2 files changed, 36 insertions, 39 deletions
@@ -1,4 +1,4 @@ -### Problem Description +### Problem Description [SOLUTION](SOLUTION.md) #### Background @@ -56,41 +56,3 @@ A typical well license has the following structure (all fields are required): 2. Your submission can be developed using any technology/language you like. 3. This private Github repo has been created just for you. Please push your code to it for review. - -### Solution - -This solution is hosted on heroku at: [http://infinite-atoll-2481.herokuapp.com](http://infinite-atoll-2481.herokuapp.com) - -#### Endpoints - -There are 3 different endpoints that serve these requirements. An -example of how to connect to the endpoints can be found in bin/acceptance.sh. - -* GET /licenses - list of all well licenses -* GET /licenses/:guid - details of a single license -* GET /companies/:guid/licenses - list of all active licences for company -* GET /companies/:guid/licenses?township=:township - list of active licenses for township, for company. -* GET /companies/:guid/licenses?status=expired&township=:township - list of expired licenses for township, for company. - -#### Design (Rough) - -##### Assumptions - -* Name of applicant is the name of the employee at the company that submitted the application. -* Date of license is the date the license was issued. -* Assume perf isn't the focus, so no need to over-engineer with a denorm read model. - -##### todo - -* rename license to well license -* move secret token to env variable. -* cache additional payload data. -* resolve n+1 issues -* figure out why location doesn't lazy load in jbuilder template. - -##### nice to haves - -* simplecov -* factory girl -* dotenv -* bullet diff --git a/SOLUTION.md b/SOLUTION.md new file mode 100644 index 0000000..0488b00 --- /dev/null +++ b/SOLUTION.md @@ -0,0 +1,35 @@ +### Solution + +This solution is hosted on heroku at: [http://infinite-atoll-2481.herokuapp.com](http://infinite-atoll-2481.herokuapp.com) + +#### Endpoints + +There are 3 different endpoints that serve these requirements. An +example of how to connect to the endpoints can be found in [bin/acceptance.sh](bin/acceptance.sh) + +* GET /licenses - list of all well licenses +* GET /licenses/:guid - details of a single license +* GET /companies/:guid/licenses - list of all active licences for company +* GET /companies/:guid/licenses?township=:township - list of active licenses for township, for company. +* GET /companies/:guid/licenses?status=expired&township=:township - list of expired licenses for township, for company. + +##### Assumptions + +* Name of applicant is the name of the employee at the company that submitted the application. +* Date of license is the date the license was issued. +* Assume perf isn't the focus, so no need to over-engineer with a denorm read model. + +##### TODO + +* move secret token to env variable. +* cache additional payload data. +* resolve n+1 issues +* figure out why location doesn't lazy load in jbuilder template. +* rename license to well license + +##### nice to haves + +* simplecov +* factory girl +* dotenv +* bullet |
