Skip to content

Commit

Permalink
use edn/read-string in config.clj
Browse files Browse the repository at this point in the history
  • Loading branch information
saidone75 committed May 24, 2024
1 parent 8ad217d commit ac21dca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
[org.clojure/data.json "2.5.0"]
[org.saidone/cral "0.3.2"]
[com.taoensso/telemere "1.0.0-beta9"]
[russellwhitaker/immuconf "0.3.0"]
[org.clojure/core.async "1.6.681"]]
:main ^:skip-aot weller.core
:target-path "target/%s"
Expand Down
9 changes: 5 additions & 4 deletions src/weller/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
; along with this program. If not, see <http://www.gnu.org/licenses/>.

(ns weller.config
(:require [clojure.string :as str]
(:require [clojure.edn :as edn]
[clojure.string :as str]
[clojure.walk :as walk]
[cral.api.auth :as auth]
[immuconf.config :as immu]
[taoensso.telemere :as t]))

(def config (atom {:alfresco {:scheme "http"
Expand Down Expand Up @@ -73,7 +73,7 @@

(defn- load-cfg-file [file-name]
(try
(let [cfg (immu/load file-name)]
(let [cfg (edn/read-string (slurp file-name))]
(t/log! :info (format "loading config file %s" file-name))
(swap! config deep-merge cfg)
(reset! config (parse-values @config resolve-placeholder)))
Expand Down Expand Up @@ -103,4 +103,5 @@
;; configure CRAL
(cral.config/configure (:alfresco @config))
(ticket)
(t/log! :trace @config))
(t/log! :trace @config)
@config)
2 changes: 1 addition & 1 deletion test/weller/filters_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@
(let [result (promise)
pipe (pipe/make-pipe (every-pred (pred/event? events/node-created) (xpred/in-path? "/Company Home/Guest Home")) #(deliver result %))]
(tu/create-then-update-then-delete-node)
(println @result)
(is (not (nil? @result)))
(component/stop pipe)))

0 comments on commit ac21dca

Please sign in to comment.