Merge branch 'master' of gitlab.com:domaindrivenarchitecture/c4k-common
This commit is contained in:
commit
1a2997b89f
1 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
(:require
|
(:require
|
||||||
[clojure.java.io :as io]
|
[clojure.java.io :as io]
|
||||||
[clj-yaml.core :as yaml]
|
[clj-yaml.core :as yaml]
|
||||||
|
[clojure.string :as cs]
|
||||||
[clojure.walk]
|
[clojure.walk]
|
||||||
[orchestra.core :refer [defn-spec]]
|
[orchestra.core :refer [defn-spec]]
|
||||||
[dda.c4k-common.predicate :as cp]))
|
[dda.c4k-common.predicate :as cp]))
|
||||||
|
@ -22,6 +23,12 @@
|
||||||
[edn cp/map-or-seq?]
|
[edn cp/map-or-seq?]
|
||||||
(yaml/generate-string edn :dumper-options {:flow-style :block}))
|
(yaml/generate-string edn :dumper-options {:flow-style :block}))
|
||||||
|
|
||||||
|
(defn-spec is-yaml? boolean?
|
||||||
|
[filename string?]
|
||||||
|
(or
|
||||||
|
(cs/ends-with? filename ".yaml")
|
||||||
|
(cs/ends-with? filename ".yml")))
|
||||||
|
|
||||||
(defn dispatch-by-resource-name
|
(defn dispatch-by-resource-name
|
||||||
[resource]
|
[resource]
|
||||||
:clj)
|
:clj)
|
||||||
|
|
Loading…
Reference in a new issue