Permalink
Browse files

update runner to load a list of modules

  • Loading branch information...
1 parent dde3914 commit e79826e41ffd3a2b00957e9ab566bff01ed6be39 @duck1123 duck1123 committed Mar 8, 2012
Showing with 13 additions and 3 deletions.
  1. +4 −3 ciste-core/src/ciste/runner.clj
  2. +9 −0 ciste-core/test/ciste/runner_test.clj
@@ -11,8 +11,8 @@
(-> "ciste.clj" slurp read-string)
(catch FileNotFoundException ex
;; TODO: Throw an exception here
- (log/error "Could not find service config. Ensure that ciste.clj exists at the root of your application and is readable")
- (System/exit -1))))
+ (throw (RuntimeException.
+ "Could not find service config. Ensure that ciste.clj exists at the root of your application and is readable")))))
(defn -main
[& options]
@@ -25,7 +25,8 @@
(load-config)
;; TODO: load namespaces other than services to be started
- (doseq [sn (:services service-config)]
+ (doseq [sn (concat (:modules service-config)
+ (:services service-config))]
(log/debug (str "Loading " sn))
(require (symbol sn)))
@@ -0,0 +1,9 @@
+(ns ciste.runner-test
+ (:use (ciste runner
+ [test-helper :only [test-environment-fixture]])))
+
+(test-environment-fixture
+
+
+ )
+

0 comments on commit e79826e

Please sign in to comment.