Around this time last year I was on the search for a new car, after many hours on the forecourt looking at various options I finally decided to go down the leasing route and choose a new Audi A3 which I have falling in love with! The only thing that concerned me was my mileage, may cars these days comes with mileage restrictions and I wanted a easy and simple way to track my usage to keep in inline.
Shortly after this I spent a few months creating a web application I named ‘Car Mileager’, fully written in Ruby on Rails along with the awesome looking Materialize CSS framework that borrows inspiration from Google’s Material Design, the most important thing was to try out new things, importance was placed on TDD, mobile-first and code that follows good style guides.
To give a general overview of the features from a developer point of view, if you want to look at the client features feel free to visit mileager.io.
Continuous Integration and Deployments
Once the integration tests have been ran and the pull request have been accepted Heroku has an new(ish) feature for automatically deploying code from Github when a selected branch (In my case master) has been changed, providing a truly continuous deployment scenario.
I spend a lot of time investigating methods of authenticating users against an API, I didn’t want to introduce a full blown oAuth2 provider, and didn’t fancy utilising existing providers such as Facebook or GitHub. I choose to implement a simple Token authentication solution, one of the main issues encountered was that devise, the ruby gem that I use for user and session management removed token authentication, lucky it was trivial to implement a custom method.
Ember Integration Tests
Wow, I was amazed at how easy writing integration tests in ember was!
Ember has some awesome documentation on testing, I wrote them using qUnit and ran using the testem runner under CI mode. For mocking the API responses on the client side ember-cli-mirage was used. Over all when developing in Ember everything ‘just worked’ as expected, although finding what the right way of doing things could be challenging on occasions, this is where the documentation helped a great deal.
Looking to the future
For an idea on what I have planned for Mileager.io - both big and small, here is some tasks on my Kanban board:
- iOS/Apple Watch Application written in swift
- Rewrite in Rails API when Rails 5 gets released
- Full user management functionality - delete profile, change password etc
- Export data to CSV
- API documentation in Slate
Both projects can be found on GitHub: