فهرست منبع

Merge branch 'master' of https://github.com/yogthos/FrameworkBenchmarks into PR739

Conflicts:
	luminus/hello/project.clj
	luminus/setup.py
Mike Smith 11 سال پیش
والد
کامیت
9537342e7f
3فایلهای تغییر یافته به همراه26 افزوده شده و 27 حذف شده
  1. 8 10
      luminus/hello/project.clj
  2. 13 10
      luminus/hello/src/hello/handler.clj
  3. 5 7
      luminus/setup.py

+ 8 - 10
luminus/hello/project.clj

@@ -3,26 +3,24 @@
   "luminus"
   :dependencies
   [[org.clojure/clojure "1.5.1"]
-   [lib-noir "0.6.6"]
+   [lib-noir "0.7.9"]
    [compojure "1.1.6"]
    [ring-server "0.3.1"]
-   [selmer "0.5.6"]
-   [com.taoensso/timbre "1.6.0"]
+   [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.38"]
-   [org.clojure/java.jdbc "0.3.0-alpha1"]
-   [mysql/mysql-connector-java "5.1.6"]
-   [korma "0.3.0-RC6"]
+   [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,7 +28,7 @@
    {:ring
     {:open-browser? false, :stacktraces? false, :auto-reload? false}},
    :dev
-   {:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.1.8"]]}}
+   {:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.2.1"]]}}
   :url
   "http://example.com/FIXME"
   :plugins

+ 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]))

+ 5 - 7
luminus/setup.py

@@ -7,13 +7,11 @@ def start(args, logfile, errfile):
   setup_util.replace_text("luminus/hello/src/hello/models/schema.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
 
   try:
-    subprocess.check_call("rm -rf target", shell=True, cwd="luminus/hello", stderr=errfile, stdout=logfile)
-    subprocess.check_call("lein clean", shell=True, cwd="luminus/hello", stderr=errfile, stdout=logfile)
-    subprocess.check_call("lein deps", shell=True, cwd="luminus/hello", stderr=errfile, stdout=logfile)
-    subprocess.check_call("lein ring uberwar", shell=True, cwd="luminus/hello", stderr=errfile, stdout=logfile)
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("cp luminus/hello/target/hello-luminus-standalone.war $RESIN_HOME/webapps/luminus.war", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("lein clean", shell=True, cwd="compojure/hello", stderr=errfile, stdout=logfile)
+    subprocess.check_call("lein ring uberwar", shell=True, cwd="luminus/hello" stderr=errfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
+    subprocess.check_call("cp luminus/hello/target/hello-luminus-standalone.war $RESIN_HOME/webapps/luminus.war", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
     return 0
   except subprocess.CalledProcessError:
     return 1