Skip to content
This repository
Browse code

checkpoint

  • Loading branch information...
commit a38b93280e3a670f974c64c1404316d97c1486d3 1 parent 19e7a63
Daniel E. Renfer authored
9  src/ciste/loader.clj
@@ -10,7 +10,6 @@
10 10
   (try
11 11
     (log/debugf "Loading %s" sym)
12 12
     (require sym)
13  
-    (log/debugf " - %s loaded" sym)
14 13
     (catch Exception ex
15 14
       (log/error ex)
16 15
       (.printStackTrace ex)
@@ -37,7 +36,7 @@
37 36
 (defn process-requires
38 37
   []
39 38
   (loop [sym (.poll pending-requires)]
40  
-    (when sym
41  
-      (consume-require sym)
42  
-      (recur (.poll pending-requires)))))
43  
-
  39
+    (if sym
  40
+      (do (consume-require sym)
  41
+          (recur (.poll pending-requires)))
  42
+      (log/info "Done processing requires"))))
9  src/ciste/sections.clj
@@ -26,7 +26,8 @@ Example:
26 26
           (fn [user]
27 27
             [:li (show-section user)])
28 28
           users)])"
29  
-  (:use [ciste.core :only [*format* *serialization*]]))
  29
+  (:use [ciste.core :only [*format* *serialization*]])
  30
+  (:require [clojure.tools.logging :as log]))
30 31
 
31 32
 (defn record-class
32 33
   "Returns the class of the first parameter"
@@ -68,7 +69,7 @@ Example:
68 69
         ;; Find a way to make this automatic
69 70
         ;; One option would be to capture the ns outside the defmacro,
70 71
         ;; creating a closure. I'm not sure if that's bad practice, however.
71  
-        dispatch-ns# *ns*
  72
+        dispatch-ns# (the-ns 'ciste.sections)
72 73
         
73 74
         dispatch-fn# (ns-resolve dispatch-ns# (symbol dispatch-name#))
74 75
         serialization-dispatch# (ns-resolve dispatch-ns# (symbol (str dispatch-name# "-serialization")))
@@ -116,6 +117,8 @@ Example:
116 117
                              type-name#))
117 118
             full-symbol# (symbol (str declared-ns# "/" method-name#))]
118 119
         `(defmethod ~full-symbol# ~dispatch-val#
119  
-           ~binding-form ~@body))
  120
+           ~binding-form
  121
+           (log/debugf "%s %s"  '~full-symbol# '~dispatch-val#)
  122
+           ~@body))
120 123
       (throw (IllegalArgumentException. (str "Can not resolve section: " name))))))
121 124
 
2  src/ciste/sections/default.clj
@@ -42,7 +42,7 @@
42 42
 
43 43
 (defsection show-section :default
44 44
   [record & options]
45  
-  (:title record))
  45
+  (title record))
46 46
 
47 47
 (defsection index-line :default
48 48
   [record & options]

0 notes on commit a38b932

Please sign in to comment.
Something went wrong with that request. Please try again.