Browse Source

updated Luminus dependencies, fixed handler to work with the latest lib-noir

Yogthos 11 years ago
parent
commit
b9c1872e89
2 changed files with 24 additions and 21 deletions
  1. 11 11
      luminus/hello/project.clj
  2. 13 10
      luminus/hello/src/hello/handler.clj

+ 11 - 11
luminus/hello/project.clj

@@ -3,26 +3,26 @@
   "luminus"
   :dependencies
   [[org.clojure/clojure "1.5.1"]
-   [lib-noir "0.6.6"]
-   [compojure "1.1.5"]
-   [ring-server "0.2.8"]
-   [selmer "0.3.6"]
-   [com.taoensso/timbre "1.6.0"]
+   [lib-noir "0.7.9"]
+   [compojure "1.1.6"]
+   [ring-server "0.3.1"]
+   [selmer "0.5.7"]
+   [com.taoensso/timbre "2.7.1"]
    [com.postspectacular/rotor "0.1.0"]
    [com.taoensso/tower "1.5.1"]
-   [markdown-clj "0.9.29"]
+   [markdown-clj "0.9.40"]
    [org.clojure/java.jdbc "0.2.3"]
-   [mysql/mysql-connector-java "5.1.6"]
+   [mysql/mysql-connector-java "5.1.28"]
    [korma "0.3.0-RC5"]
    [log4j
-    "1.2.15"
+    "1.2.17"
     :exclusions
     [javax.mail/mail
      javax.jms/jms
      com.sun.jdmk/jmxtools
      com.sun.jmx/jmxri]]]
   :ring
-  {:handler hello.handler/war-handler,
+  {:handler hello.handler/app,
    :init hello.handler/init,
    :destroy hello.handler/destroy}
   :profiles
@@ -30,11 +30,11 @@
    {:ring
     {:open-browser? false, :stacktraces? false, :auto-reload? false}},
    :dev
-   {:dependencies [[ring-mock "0.1.3"] [ring/ring-devel "1.1.8"]]}}
+   {:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.2.1"]]}}
   :url
   "http://example.com/FIXME"
   :plugins
-  [[lein-ring "0.8.5"]]
+  [[lein-ring "0.8.10"]]
   :description
   "FIXME: write description"
   :min-lein-version "2.0.0")

+ 13 - 10
luminus/hello/src/hello/handler.clj

@@ -26,11 +26,11 @@
      :async? false ; should be always false for rotor
      :max-message-per-msecs nil
      :fn rotor/append})
-  
+
   (timbre/set-config!
     [:shared-appender-config :rotor]
     {:path "hello.log" :max-size 10000 :backlog 10})
-  
+
   (timbre/info "hello started successfully"))
 
 (defn destroy
@@ -39,12 +39,15 @@
   []
   (timbre/info "hello is shutting down..."))
 
-;;append your application routes to the all-routes vector
-(def all-routes [home-routes app-routes])
-
-(def app (-> all-routes
-             middleware/app-handler
-             ;;add your middlewares here
-             ))
 
-(def war-handler (middleware/war-handler app))
+(def app (middleware/app-handler
+           ;; add your application routes here
+           [home-routes app-routes]
+           ;; add custom middleware here
+           :middleware []
+           ;; add access rules here
+           :access-rules []
+           ;; serialize/deserialize the following data formats
+           ;; available formats:
+           ;; :json :json-kw :yaml :yaml-kw :edn :yaml-in-html
+           :formats [:json-kw :edn]))