mcohen01/amazonica — pull request #14 by cemerick (2013-09-04 20:35:23+00:00)
Title: Miscellaneous enhancements

A couple of things I did on the way towards adding support for e.g. bucket lifecycle configurations; doing so without adding manual coercion impls ended up being reasonably straightforward. I think the same thing could

Note that the s3 tests are failing, though they're failing on upstream master as well, without these changes:

```
expected: nil
actual: com.amazonaws.services.s3.model.AmazonS3Exception: The specified bucket does not exist
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse (AmazonHttpClient.java:679)
com.amazonaws.http.AmazonHttpClient.executeHelper (AmazonHttpClient.java:350)
com.amazonaws.http.AmazonHttpClient.execute (AmazonHttpClient.java:202)
com.amazonaws.services.s3.AmazonS3Client.invoke (AmazonS3Client.java:3037)
com.amazonaws.services.s3.AmazonS3Client.invoke (AmazonS3Client.java:3008)
com.amazonaws.services.s3.AmazonS3Client.listObjects (AmazonS3Client.java:531)
com.amazonaws.services.s3.AmazonS3Client.listObjects (AmazonS3Client.java:515)
sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke (Method.java:616)
sun.reflect.GeneratedMethodAccessor12.invoke (:-1)
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke (Method.java:616)
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:28)
amazonica.core$fn_call$fn__1338.invoke (core.clj:604)
amazonica.core$intern_function$fn__1353.doInvoke (core.clj:645)
clojure.lang.RestFn.invoke (RestFn.java:436)
amazonica.test.s3/fn (s3.clj:197)
```

Given the way method resolution/selection works currently, I think it might be tough for the `(list-objects cred :bucket-name bucket1)` call to be resolved as intended (since arity is the only criterion). Commenting that line out leaves the test clean. I haven't done a bisect (yet?), sorry.