Permalink
Browse files

add support for Clojure 1.3.0

  • Loading branch information...
1 parent cb1d00f commit 23f5dce316216b78e4df2bc7adc72c0c2f02897c @cemerick committed Aug 18, 2011
View
@@ -12,3 +12,4 @@
target
classes
+it-repo
View
25 pom.xml
@@ -62,6 +62,31 @@
<warnOnReflection>true</warnOnReflection>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.5</version>
+ <configuration>
+ <projectsDirectory>src/integration</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/integration</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <streamLogs>true</streamLogs>
+ <localRepositoryPath>it-repo</localRepositoryPath>
+ <goals><goal>clojure:test</goal></goals>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>install</goal>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
@@ -0,0 +1,44 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.cemerick</groupId>
+ <version>0.0.2-SNAPSHOT</version>
+ <artifactId>rummage-test-clojure-1.2.0</artifactId>
+ <name>rummage (Clojure 1.2.0 tests)</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>clojure</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.theoryinpractise</groupId>
+ <artifactId>clojure-maven-plugin</artifactId>
+ <version>1.3.7</version>
+ <configuration>
+ <baseTestSourceDirectory>@basedir@/src/test/clojure</baseTestSourceDirectory>
+ <clojureOptions>-Daws.id=@aws.id@ -Daws.secret-key=@aws.secret-key@</clojureOptions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test-clojure</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
@@ -188,8 +188,8 @@
(client client-config)
(BatchDeleteAttributesRequest. domain batch)))))
-(def ^{:private true} *select-encode-fn*)
-(def ^{:private true} *select-encode-id-fn*)
+(def ^{:private true :dynamic true} *select-encode-fn*)
+(def ^{:private true :dynamic true} *select-encode-id-fn*)
(defn- escape
[^String name-quote ^String value-quote]
@@ -223,7 +223,7 @@
:else (apply encode-fn args))))
-(defn- where-str
+(defn- ^{:dynamic true} where-str
[where-expansions expr]
(binding [where-str (partial where-str where-expansions)]
(let [expr-op (-> expr first strip-symbol-ns)
@@ -73,15 +73,14 @@
(encode v)
(throw (IllegalArgumentException. (str "No formatter available for prefix " prefix))))))
-(def ^{:tag 'java.lang.Long
- :doc "The largest absolute value integer that can be encoded (/ Long/MAX_VALUE 2)."}
+(def ^{:doc "The largest absolute value integer that can be encoded (/ Long/MAX_VALUE 2)."}
max-abs-integer (Long. (long (/ Long/MAX_VALUE 2))))
(defn encode-integer
[i]
(when (> (Math/abs (long i)) max-abs-integer)
(throw (IllegalArgumentException. (format "encode-integer can support only integers between %s and -%s" max-abs-integer max-abs-integer))))
- (DataUtils/encodeRealNumberRange (long i) 19 max-abs-integer))
+ (DataUtils/encodeRealNumberRange (long i) (int 19) (long max-abs-integer)))
(defn decode-integer
[istr]
@@ -3,6 +3,8 @@
clojure.test)
(:require [cemerick.rummage.encoding :as enc]))
+(println (format "Testing with Clojure v%s" (clojure-version)))
+
#_(do
(System/setProperty "aws.id" "")
(System/setProperty "aws.secret-key" ""))
@@ -21,7 +23,7 @@
[]
(str (java.util.UUID/randomUUID)))
-(def *test-domain-name* nil)
+(def ^{:dynamic true} *test-domain-name* nil)
(def test-domain-name-prefix "rummage-test-")

0 comments on commit 23f5dce

Please sign in to comment.