Created
October 22, 2015 17:55
-
-
Save christianromney/229bcee58a1b8390482f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn config-files | |
"Returns a sequence of configuration files | |
that should be loaded by Immuconf." | |
([] | |
(config-files (env :environment))) | |
([current-env] | |
(let [converter (comp (map (partial str "config/")) | |
(map io/resource) | |
(remove nil?)) | |
file-list (cond-> [] | |
true (conj "base.edn" "strings.edn") | |
current-env (conj (str current-env ".edn")) | |
true (conj "user.edn"))] | |
(sequence converter file-list)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment