Small fixes arising out of lein ancient updates.

This commit is contained in:
Simon Brooke 2017-12-04 17:11:30 +00:00
parent c18b74fef6
commit 1e9ce7b9a0
6 changed files with 37 additions and 29 deletions

View file

@ -8,7 +8,7 @@
[noir.util.middleware :refer [app-handler]]
[compojure.route :as route]
[taoensso.timbre :as timbre]
[taoensso.timbre.appenders.rotor :as rotor]
[taoensso.timbre.appenders.3rd-party.rotor :as rotor]
[selmer.parser :as parser]
[environ.core :refer [env]]))
@ -46,16 +46,15 @@
an app server such as Tomcat
put any initialization code here"
[]
(timbre/set-config!
[:appenders :rotor]
{:min-level :info
:enabled? true
:async? false ; should be always false for rotor
:max-message-per-msecs nil
:fn rotor/appender-fn})
(timbre/set-config!
[:shared-appender-config :rotor]
{:path "mw_ui.log" :max-size (* 512 1024) :backlog 10})
(timbre/merge-config!
{:appenders
{:rotor (rotor/rotor-appender
{:path "mw-ui.log"
:max-size (* 512 1024)
:backlog 10})}
:level (or
(if (env :dev) :debug)
:info)})
(if (env :dev) (parser/cache-off!))

View file

@ -3,6 +3,7 @@
mw-ui.layout
(:require [selmer.parser :as parser]
[clojure.string :as s]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[ring.util.response :refer [content-type response]]
[compojure.response :refer [Renderable]]))
@ -33,6 +34,9 @@
(def template-path "templates/")
(parser/add-tag! :csrf-field (fn [_ _] (anti-forgery-field)))
(deftype RenderableTemplate [template params]
Renderable
(render [this request]

View file

@ -78,8 +78,7 @@
(io/get-resource "/rulesets/basic.txt")))
(session/get :rules)))
generation (inc (or (session/get :generation) 0))
w2 (engine/transform-world world rules)
]
w2 (engine/transform-world world rules)]
(session/put! :world w2)
(session/put! :generation generation)
[:div {:class "world"}