hubReport: progress update
It’s been a while since I mentioned my personal little side project called “hubReport”, aka “Project suck github api data up and fart something pretty out”. I’m providing a little update for anyone interested.
The alpha
Well I made it pretty far. The collection process was grabbing all the information I needed and storing it away in a MongoDB powered database. I had also started work on the AngularJS powered front end that worked entirely off daily generated json files, just so I could run it statically off the github pages service.
Here’s my last (very rough) alpha release: http://github.yougeezer.co.uk/alpha/#/
Now?
I went back to the drawing board, already. Originally I was using AppFog, but had a requirement for using git so ended up looking into Heroku. One of the things that I liked about Heroku was the worker dyno feature, being able to schedule the collection process just for that task was exactly what I needed.
Looking into the collection script, it had some teething problems. It wasn’t testable, it wouldn’t gracefully handle errors and it was a pain in the arse to modify and trail without harassing the github API. It needed to be stripped apart and started again but at least now I knew all the tasks that needed to be performed.
So I’m currently trying to restructure the code so it’s testable and take advantage of stuff like nock (record URL responses). Trying out Heroku’s scheduling feature for worker dynos and testing deployments from Heroku to github for the static files.
Anyone who has tips on writing easily testable code that mostly just chats with an API, feel free to share ;)