diff --git a/README.md b/README.md index 76e068a..8f2da43 100644 --- a/README.md +++ b/README.md @@ -76,11 +76,8 @@ nippy/stress-data :bigdec (bigdec 3.1415926535897932384626433832795) :ratio 22/7 - - ;; Clojure 1.4+ - ;; :tagged-uuid (java.util.UUID/randomUUID) - ;; :tagged-date (java.util.Date.) - } + :tagged-uuid (java.util.UUID/randomUUID) + :tagged-date (java.util.Date.)} ``` Serialize it: diff --git a/project.clj b/project.clj index 0d236b5..7451f11 100644 --- a/project.clj +++ b/project.clj @@ -3,15 +3,14 @@ :url "https://github.com/ptaoussanis/nippy" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} - :dependencies [[org.clojure/clojure "1.3.0"] + :dependencies [[org.clojure/clojure "1.4.0"] [expectations "1.4.43"] [org.iq80.snappy/snappy "0.3"]] - :profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} - :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]} + :profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]} :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} :dev {:dependencies []} :test {:dependencies [[org.xerial.snappy/snappy-java "1.0.5-M3"]]}} - :aliases {"test-all" ["with-profile" "test,1.3:test,1.4:test,1.5" "expectations"] + :aliases {"test-all" ["with-profile" "test,1.4:test,1.5" "expectations"] "test-auto" ["with-profile" "test" "autoexpect"] "start-dev" ["with-profile" "dev,test" "repl" ":headless"]} :plugins [[lein-expectations "0.0.7"] diff --git a/src/taoensso/nippy.clj b/src/taoensso/nippy.clj index e005e1c..931b0ff 100644 --- a/src/taoensso/nippy.clj +++ b/src/taoensso/nippy.clj @@ -278,11 +278,8 @@ (-> (freeze-to-bytes "my data" :compress? true) (thaw-from-bytes :compressed? false))) -(def stress-data - "Reference data used for tests & benchmarks." - (let [support-tagged-literals? - (utils/version-sufficient? (clojure-version) "1.4.0")] - +(def stress-data "Reference data used for tests & benchmarks." + (let [] {:bytes (byte-array [(byte 1) (byte 2) (byte 3)]) :nil nil :boolean true @@ -323,6 +320,6 @@ :ratio 22/7 - ;; Clojure 1.4+ - :tagged-uuid (when support-tagged-literals? (java.util.UUID/randomUUID)) - :tagged-date (when support-tagged-literals? (java.util.Date.))})) \ No newline at end of file + ;; Clojure 1.4+ tagged literals + :tagged-uuid (java.util.UUID/randomUUID) + :tagged-date (java.util.Date.)})) \ No newline at end of file diff --git a/src/taoensso/nippy/benchmarks.clj b/src/taoensso/nippy/benchmarks.clj index 64c5012..d004c36 100644 --- a/src/taoensso/nippy/benchmarks.clj +++ b/src/taoensso/nippy/benchmarks.clj @@ -1,7 +1,7 @@ (ns taoensso.nippy.benchmarks {:author "Peter Taoussanis"} - (:use [taoensso.nippy :as nippy :only (freeze-to-bytes thaw-from-bytes)]) - (:require [taoensso.nippy.utils :as utils])) + (:require [taoensso.nippy :as nippy :refer (freeze-to-bytes thaw-from-bytes)] + [taoensso.nippy.utils :as utils])) ;; Remove stuff from stress-data that breaks reader (def data (dissoc nippy/stress-data :queue :queue-empty :bytes)) diff --git a/test/taoensso/nippy/tests/main.clj b/test/taoensso/nippy/tests/main.clj index aa1ff62..47625ca 100644 --- a/test/taoensso/nippy/tests/main.clj +++ b/test/taoensso/nippy/tests/main.clj @@ -1,6 +1,6 @@ (ns taoensso.nippy.tests.main - (:use [expectations :as test]) - (:require [taoensso.nippy :as nippy] + (:require [expectations :as test :refer :all] + [taoensso.nippy :as nippy] [taoensso.nippy.benchmarks :as benchmarks])) ;; Remove stuff from stress-data that breaks roundtrip equality