mirror of https://github.com/apache/jclouds.git
Added passing of constucted modules to compute-service options
This commit is contained in:
parent
887bb7adfe
commit
2fd0ac55b5
|
@ -57,7 +57,11 @@ Ensure the module is on the classpath. You are maybe missing a dependency on
|
|||
(reduce #(.add #^com.google.common.collect.ImmutableSet$Builder %1 %2)
|
||||
(com.google.common.collect.ImmutableSet/builder)
|
||||
(filter (complement nil?)
|
||||
(map (comp instantiate module-lookup) modules)))))
|
||||
(map #(cond
|
||||
(keyword? %) (-> % module-lookup instantiate)
|
||||
(symbol? %) (instantiate %)
|
||||
:else %)
|
||||
modules)))))
|
||||
|
||||
(defn dashed [a]
|
||||
(apply str (interpose "-" (map string/lower-case (re-seq #"[A-Z][^A-Z]*" a)))))
|
||||
|
|
|
@ -38,7 +38,11 @@ list, Alan Dipert and MeikelBrandmeyer."
|
|||
(assoc module-lookup
|
||||
:string 'java.lang.String)]
|
||||
(is (instance? String (first (modules :string))))
|
||||
(is (= 1 (count (modules :string))))))
|
||||
(is (= 1 (count (modules :string)))))
|
||||
(testing "pre-instantiated"
|
||||
(is (instance? String (first (modules "string")))))
|
||||
(testing "symbol"
|
||||
(is (instance? String (first (modules 'java.lang.String))))))
|
||||
|
||||
(deftest modules-instantiate-fail-test
|
||||
(binding [module-lookup
|
||||
|
|
Loading…
Reference in New Issue