restebanez/agi — pull request #12 by harryw (2012-06-01 19:44:02+00:00)
Title: Refactor deployment model and PDF classes

The changes in these commits probably look a lot more drastic than they are. The app code is almost the same, I've just moved bits of code to different places to make them more well-factored and testable.

The significant change is the RSpec tests - I've added near-full coverage for the Deployment class, PirDeployment class and the new S3Storage class. I've tried to make sure the tests do not require credentials to access S3, because we need to be able to run them independently. A side-effect of that is that we're not actually testing the access to S3 completely, which is something we should consider for the future for more of a 'full validation' type of test.

You might prefer to review without an whitespace changes - you can add ?w=0 to the URL to do that, although you can't add line-by-line comments that way.

@restebanez I believe this is mostly your code, so I'd appreciate some review from you primarily.

@benton please also feel free to take a look and pitch in with comments. I'm open to ideas to improve the clarity or efficacy of the tests.