diff --git a/project.clj b/project.clj index 0d92f58..e6af18d 100644 --- a/project.clj +++ b/project.clj @@ -1,9 +1,10 @@ -(defproject com.unbounce/clojure-dogstatsd-client "0.1.1" +(defproject com.unbounce/clojure-dogstatsd-client "0.1.2-SNAPSHOT" :description "A thin veneer over java-dogstatsd-client" :url "https://github.com/unbounce/clojure-dogstatsd-client" - :license {:name "The MIT License (MIT)" - :url "http://opensource.org/licenses/MIT" + :license {:name "The MIT License (MIT)" + :url "http://opensource.org/licenses/MIT" :comments "Copyright (c) 2018 Unbounce Marketing Solutions Inc."} + :profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}} :dependencies [[org.clojure/clojure "1.9.0"] [com.datadoghq/java-dogstatsd-client "2.5"]] :global-vars {*warn-on-reflection* true}) diff --git a/test/com/unbounce/dogstatsd/core_test.clj b/test/com/unbounce/dogstatsd/core_test.clj index 8958759..f9d4378 100644 --- a/test/com/unbounce/dogstatsd/core_test.clj +++ b/test/com/unbounce/dogstatsd/core_test.clj @@ -5,37 +5,32 @@ [clojure.spec.test.alpha :as stest])) (s/def ::sample-rate number?) -(s/def ::tags (s/coll-of string?)) +(s/def ::metric string?) +(s/def ::tags (s/coll-of string? :kind vector?)) (s/def ::opts (s/keys :req-un [::tags ::sample-rate])) +(s/def ::opts* (s/keys* :req-un [::tags ::sample-rate])) (s/fdef sut/str-array - :args (s/cat :tags ::tags) + :args (s/or :tags (s/cat :tags ::tags) + :no-tag (s/cat :tags nil?)) :ret #(instance? java.lang.Object %)) (s/fdef sut/increment - :args (s/cat :metric string? - :opts (s/* (s/alt :_ (s/cat :_ (partial = :tags) - :_ ::tags) - :_ (s/cat :_ (partial = :sample-rate) - :_ ::sample-rate)))) + :args (s/cat :metric ::metric + :opts ::opts*) :ret nil?) (s/fdef sut/decrement - :args (s/cat :metric string? - :opts (s/* (s/alt :_ (s/cat :_ (partial = :tags) - :_ ::tags) - :_ (s/cat :_ (partial = :sample-rate) - :_ ::sample-rate)))) + :args (s/cat :metric ::metric + :opts ::opts*) :ret nil?) - (s/fdef sut/gauge :args (s/cat :metric string? :value number? :opts ::opts) :ret nil?) - (s/fdef sut/histogram :args (s/cat :metric string? :value number? @@ -50,8 +45,6 @@ (stest/instrument `sut/gauge) (stest/instrument `sut/histogram) - (sut/setup!) - (stest/check `sut/str-array) (stest/check `sut/increment) (stest/check `sut/decrement)