settings file check-in; db-url will be read out from shell variable

This commit is contained in:
Christian Mueller
2012-06-13 20:24:30 +02:00
parent b5a23b6f09
commit 2e73f899f5
3 changed files with 9 additions and 2 deletions
-1
View File
@@ -1,4 +1,3 @@
config
dump.rdb
resources/
pom.xml
+2
View File
@@ -0,0 +1,2 @@
page-width = 800px
max-title-length = 80
+7 -1
View File
@@ -12,7 +12,13 @@
lines (cs/split file-content #"\n")
pairs (map #(map cs/trim %) (map #(cs/split % #"=") lines))
config-map (apply hash-map (mapcat #(list (keyword (first %)) (second %)) pairs))
value (config-map key)]
value (config-map key)
; Through this hack we can read security-critical settings from (previously
; set) shell variables without commiting their content to CVS
value (if-not value
(System/getenv
(cs/upper-case
(cs/replace (name key) #"-" ""))))]
(if value
(if (fn? converter) (converter value) value)
default)))