It’s been a while since a new version of Ruby/AWS was released. In fact, it’s been more than eight months since version 0.7.0 first saw the light of day. I often don’t even mention new releases here, because they’re of such limited interest.
To prove there’s still life in this old coder’s brain, however, I’ve been working on version 0.8.0 for the better part of the last week.
That work has involved my least favourite type of coding: rewriting from scratch. Specifically, the implementation of batched requests and multiple operations had become unmaintainable. I could no longer read my own code, even with plenty of comments. Worse, there were bugs that needed fixing and it was impossible to set to work for fear of introducing new gremlins.
So, there was really no way around it. I kicked a new approach around in the back of my head for a couple of days and, when I was ready to commit some time to coding, sat down at the computer, deleted the methods related to the old implementation (to prevent them from negatively influencing me) and set about reimplementing the features from scratch.
The work was quite painful, but I’d expected that, which is why the rewrite had been postponed for as long as it had. In the course of writing the new implementation and producing unit tests for it, bugs came to light that had gone undetected in the old implementation. These have now been dutifully squashed.
If you need programmatic access to Amazon’s catalogue and shopping cart facility, I urge you to look at Ruby/AWS. It’s almost two years old, maturing well and takes a lot of the headaches out of querying for Amazon’s products.
Cool! About to try it. You should put this on Github and opensource it! I really have to put my key_id, etc in a separate file pointed to by an environment variable?? That means if I host my project on a place like Heroku I’m SOL because I can’t do that? I’m hoping to find a way around that, otherwise that’s a really bummer. Anyway, nice work!
You can set environment variables on Heroku: http://docs.heroku.com/config-vars
I’m planning to deploy an app that uses Ruby/AWS on Heroku soon so I’ll report back with my experience 🙂