File tree 4 files changed +14
-10
lines changed
4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 14
14
:extra-deps {io.github.clojure/tools.build {:git/tag " v0.9.6"
15
15
:git/sha " 8e78bcc"
16
16
:exclusions [org.slf4j/slf4j-nop]}}}
17
+
17
18
; ; Run all tests
18
19
; ; clj -M:test
19
20
; ; Run specific test
Original file line number Diff line number Diff line change 1
1
(ns com.moclojer.tools.build
2
2
(:refer-clojure :exclude [test])
3
- (:require [clojure.string :as string]
4
- [clojure.tools.build.api :as b]
5
- [com.moclojer.rq :as rq]))
3
+ (:require
4
+ [clojure.string :as string]
5
+ [clojure.tools.build.api :as b]
6
+ [com.moclojer.rq :as rq]))
6
7
7
8
(def class-dir " target/classes" )
8
9
(def jar-file " target/com.moclojer.rq.jar" )
36
37
:main 'com.moclojer.rq
37
38
:version rq/version
38
39
:basis basis
39
- :ns-compile '[com.moclojer.rq]
40
+ :ns-compile '[com.moclojer.rq com.moclojer.rq.queue ]
40
41
:uber-file jar-file
41
42
:jar-file jar-file
42
43
:target " target"
Original file line number Diff line number Diff line change 46
46
function itself, options like key pattern and encoding/decoding."
47
47
[method parameters allowmap]
48
48
(let [wrapped-method (clojure.string/replace method #"[`0-9]" " " )
49
- base-doc (str " Wraps redis.clients.jedis.JedisPooled." wrapped-method)
50
49
param-syms (map #(-> % :name symbol) parameters)
51
- [doc _ enc dec] (get allowmap method [" " nil :none :none ])]
52
- `(defn ~(symbol method)
53
- ~(str base-doc \newline doc)
54
-
50
+ [_ _ enc dec] (get allowmap method [" " nil :none :none ])]
51
+ `(fn
55
52
~(-> (into ['client] param-syms)
56
53
(conj '& 'options))
57
54
Original file line number Diff line number Diff line change 1
1
(ns com.moclojer.rq.queue
2
2
(:refer-clojure :exclude [pop! range])
3
3
(:require
4
+ [clojure.string :as str]
4
5
[com.moclojer.internal.reflection :as reflection]
5
6
[com.moclojer.rq.adapters :as adapters]))
6
7
41
42
(doseq [[method parameters] (reflection/get-klazz-methods
42
43
redis.clients.jedis.JedisPooled
43
44
allowmap)]
44
- (eval `(reflection/->wrap-method ~method ~parameters ~allowmap)))
45
+ (let [method' (str/replace method #"[`0-9]" " " )
46
+ _base-doc (str " Wraps redis.clients.jedis.JedisPooled." method')]
47
+ (intern
48
+ *ns* (symbol method')
49
+ (eval `(reflection/->wrap-method ~method ~parameters ~allowmap)))))
45
50
46
51
; ; --- directional ---
47
52
You can’t perform that action at this time.
0 commit comments