File tree 2 files changed +13
-17
lines changed
test/com/unbounce/dogstatsd
2 files changed +13
-17
lines changed Original file line number Diff line number Diff line change 1
- (defproject com.unbounce /clojure-dogstatsd-client " 0.1.1 "
1
+ (defproject com.unbounce /clojure-dogstatsd-client " 0.1.2-SNAPSHOT "
2
2
:description " A thin veneer over java-dogstatsd-client"
3
3
:url " https://github.com/unbounce/clojure-dogstatsd-client"
4
- :license {:name " The MIT License (MIT)"
5
- :url " http://opensource.org/licenses/MIT"
4
+ :license {:name " The MIT License (MIT)"
5
+ :url " http://opensource.org/licenses/MIT"
6
6
:comments " Copyright (c) 2018 Unbounce Marketing Solutions Inc." }
7
+ :profiles {:dev {:dependencies [[org.clojure/test.check " 0.9.0" ]]}}
7
8
:dependencies [[org.clojure/clojure " 1.9.0" ]
8
9
[com.datadoghq/java-dogstatsd-client " 2.5" ]]
9
10
:global-vars {*warn-on-reflection* true })
Original file line number Diff line number Diff line change 5
5
[clojure.spec.test.alpha :as stest]))
6
6
7
7
(s/def ::sample-rate number? )
8
- (s/def ::tags (s/coll-of string?))
8
+ (s/def ::metric string? )
9
+ (s/def ::tags (s/coll-of string? :kind vector?))
9
10
(s/def ::opts (s/keys :req-un [::tags ::sample-rate ]))
11
+ (s/def ::opts* (s/keys* :req-un [::tags ::sample-rate ]))
10
12
11
13
(s/fdef sut/str-array
12
- :args (s/cat :tags ::tags )
14
+ :args (s/or :tags (s/cat :tags ::tags )
15
+ :no-tag (s/cat :tags nil?))
13
16
:ret #(instance? java.lang.Object %))
14
17
15
18
(s/fdef sut/increment
16
- :args (s/cat :metric string?
17
- :opts (s/* (s/alt :_ (s/cat :_ (partial = :tags )
18
- :_ ::tags )
19
- :_ (s/cat :_ (partial = :sample-rate )
20
- :_ ::sample-rate ))))
19
+ :args (s/cat :metric ::metric
20
+ :opts ::opts* )
21
21
:ret nil?)
22
22
23
23
(s/fdef sut/decrement
24
- :args (s/cat :metric string?
25
- :opts (s/* (s/alt :_ (s/cat :_ (partial = :tags )
26
- :_ ::tags )
27
- :_ (s/cat :_ (partial = :sample-rate )
28
- :_ ::sample-rate ))))
24
+ :args (s/cat :metric ::metric
25
+ :opts ::opts* )
29
26
:ret nil?)
30
27
31
-
32
28
(s/fdef sut/gauge
33
29
:args (s/cat :metric string?
34
30
:value number?
35
31
:opts ::opts )
36
32
:ret nil?)
37
33
38
-
39
34
(s/fdef sut/histogram
40
35
:args (s/cat :metric string?
41
36
:value number?
You can’t perform that action at this time.
0 commit comments