From d55dbb0590c9646312b79f985850f35de6b738cb Mon Sep 17 00:00:00 2001 From: Chas Emerick Date: Fri, 24 Feb 2012 10:10:44 -0500 Subject: [PATCH] Clojure 1.3.0 compatibility; use it as the default dependency, fixes gh-1 --- pom.xml | 8 +------- src/main/clojure/cemerick/bandalore.clj | 4 ++-- src/test/clojure/cemerick/bandalore_test.clj | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 38d885a..39f1bb4 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ - 1.2.0 + 1.3.0 @@ -38,12 +38,6 @@ aws-java-sdk 1.1.5 - - org.clojure - clojure-contrib - 1.2.0 - test - diff --git a/src/main/clojure/cemerick/bandalore.clj b/src/main/clojure/cemerick/bandalore.clj index 0b525a5..b5443d4 100644 --- a/src/main/clojure/cemerick/bandalore.clj +++ b/src/main/clojure/cemerick/bandalore.clj @@ -113,9 +113,9 @@ :or {limit 1 attributes #{}}}] (let [req (-> (ReceiveMessageRequest. queue-url) - (.withMaxNumberOfMessages (-> limit (min 10) (max 1))) + (.withMaxNumberOfMessages (-> limit (min 10) (max 1) Integer.)) (.withAttributeNames attributes)) - req (if visibility (.withVisibilityTimeout req visibility) req)] + req (if visibility (.withVisibilityTimeout req (Integer. visibility)) req)] (->> (.receiveMessage client req) .getMessages (map (partial message-map queue-url))))) diff --git a/src/test/clojure/cemerick/bandalore_test.clj b/src/test/clojure/cemerick/bandalore_test.clj index b7fd029..2d36309 100644 --- a/src/test/clojure/cemerick/bandalore_test.clj +++ b/src/test/clojure/cemerick/bandalore_test.clj @@ -13,7 +13,7 @@ (assert (and id secret-key)) (create-client id secret-key))) -(def *test-queue-url* nil) +(def ^{:dynamic true} *test-queue-url* nil) (defn- uuid []