diff --git a/.gitignore b/.gitignore index c234578..cb73043 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .*.sw* *~ *.class +lib/ diff --git a/project.clj b/project.clj index 31981cd..02403ec 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,3 @@ -(defproject com.twinql.clojure/clj-conneg "1.1.0" +(defproject com.twinql.clojure/clj-conneg "1.1.1-SNAPSHOT" :description "Clojure content negotiation library." - :dependencies [[org.clojure/clojure "1.2.0"] - [org.clojure/clojure-contrib "1.2.0"]]) + :dependencies [[org.clojure/clojure "1.4.0"]]) diff --git a/src/com/twinql/clojure/conneg.clj b/src/com/twinql/clojure/conneg.clj index 278832b..b229323 100644 --- a/src/com/twinql/clojure/conneg.clj +++ b/src/com/twinql/clojure/conneg.clj @@ -9,7 +9,7 @@ (ns com.twinql.clojure.conneg (:refer-clojure) - (:require [clojure.contrib.str-utils :as str-utils])) + (:require [clojure.string :as string])) (def accept-fragment-re #"^(\*|[^()<>@,;:\"/\[\]?={} ]+)/(\*|[^()<>@,;:\"/\[\]?={} ]+)$") @@ -66,7 +66,7 @@ weight to a format." ([f] - (let [parts (str-utils/re-split #"\s*;\s*" f)] + (let [parts (string/split f #"\s*;\s*")] (when (not (empty? parts)) ;; First part will be a type. (let [type-str (first parts) @@ -84,7 +84,7 @@ (defn sorted-accept [h] (sort-by-q (map accept-fragment - (str-utils/re-split #"\s*,\s*" h)))) + (string/split h #"\s*,\s*")))) (defn acceptable-type "Compare two type pairs. If the pairing is acceptable,