From 10cfc33c7b288211f56b6870b90d709365768108 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 31 Jan 2015 02:27:38 -0700 Subject: [PATCH] Allow setting :ip and :port from gorilla-options. --- src/leiningen/gorilla.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/leiningen/gorilla.clj b/src/leiningen/gorilla.clj index 68748dd..ad10ca6 100644 --- a/src/leiningen/gorilla.clj +++ b/src/leiningen/gorilla.clj @@ -17,15 +17,15 @@ (defn gorilla [project & opts] (let [opts-map (apply hash-map opts) - port (read-string (or (get opts-map ":port") "0")) - ip (or (get opts-map ":ip") "127.0.0.1") + gorilla-options (:gorilla-options project) + port (or (:port gorilla-options) (read-string (or (get opts-map ":port") "0"))) + ip (or (:ip gorilla-options) (get opts-map ":ip") "127.0.0.1") nrepl-port (read-string (or (get opts-map ":nrepl-port") "0")) ;; inject the gorilla-repl dependency into the target project curr-deps (or (:dependencies project) []) new-deps (conj curr-deps ['gorilla-repl/gorilla-repl gorilla-version]) prj (assoc project :dependencies new-deps) - project-name (:name project) - gorilla-options (:gorilla-options project)] + project-name (:name project)] (eval/eval-in-project prj `(g/run-gorilla-server {:port ~port