add cljs.stacktrace/string->regex to eliminate platform differences

--- src/main/cljs/cljs/stacktrace.cljc
+++ src/main/cljs/cljs/stacktrace.cljc
@@ -29,6 +29,10 @@
   [^String s0 s1]
   #?(:clj  (.endsWith s0 s1)
      :cljs (gstring/endsWith s0 s1)))
+
+(defn string->regex [s]
+  #?(:clj  (Pattern/compile s)
+     :cljs (RegExp. s)))

 (defmethod parse-stacktrace :default
   [repl-env st err opts] st)
@@ -56,12 +60,12 @@
   "Given a browser file url convert it into a relative path that can be used
    to locate the original source."
   [{:keys [host host-port port] :as repl-env} file {:keys [asset-path] :as opts}]
-  (let [base-url-pattern (Pattern/compile (str "http://" host ":" (or host-port port) "/"))]
+  (let [base-url-pattern (string->regex (str "http://" host ":" (or host-port port) "/"))]
     (if (re-find base-url-pattern file)
       (-> file
         (string/replace base-url-pattern "")
         (string/replace
-          (Pattern/compile
+          (string->regex
             ;; if :asset-path specified drop leading slash
             (str "^" (or (and asset-path (string/replace asset-path #"^/" ""))
                          (util/output-directory opts)) "/"))


Remove dead code

Remove dead code

--- src/structural_typing/guts/type_descriptions/flatten.clj
+++ src/structural_typing/guts/type_descriptions/flatten.clj
@@ -3,7 +3,7 @@
   (:require [structural-typing.guts.type-descriptions.includes :as includes]
             [com.rpl.specter :as specter]))

-(declare map->flatmap)
+(declare map->flatmap map->pairs)

 ;;; Flattening paths

@@ -75,24 +75,8 @@
             (handle-kvs ( (includes/includes type-signifier-or-map) type-map)))
           includes/as-type-expander))))

-(deftype ALLType []
-  CondensedPath
-  (->paths [this] (add-on this [[]]))
-  PathComponent
-  (add-on [this paths]
-    (prn :adding this :onto paths)
-    (let [note-index (specter/view (partial map-indexed vector)) ; value [x y] -> [ [0 x] [1 y] ]
-                                                                 ; for next step
-          prepend-index (specter/collect-one specter/FIRST)  ; stash the index (0 or 1 above) so that
-                                                             ; Specter will prepend to final result.
-          intermediate-value specter/LAST]  ; Further selectors apply to the original val (x and y)
-      (for [path paths]
-        (let [x (into path [note-index specter/ALL prepend-index intermediate-value])]
-          (prn :result x)
-          x)))))
-
-;; TODO: don't know yet if this should reject objects other than Specter-equivalents,
-;; or if compilation should.
+;; TODO: don't know yet if this is the right place to reject types that can't be
+;; used in one of our paths.
 (extend-type Object
   PathComponent
   (add-on [this paths]
@@ -106,8 +90,6 @@

 ;;;; Flattening maps
-
-(declare map->flatmap map->pairs)

 (defn- step1:expand-map-values [kvs parent-path]
   (reduce (fn [so-far [path v]]


re-enable switch user form

re-enable switch user form

- broken here https://github.com/circleci/frontend-private/pull/1193

--- src-cljs/frontend/components/admin.cljs
+++ src-cljs/frontend/components/admin.cljs
@@ -43,7 +43,13 @@
            [:input {:value (utils/csrf-token)
                     :name "CSRFToken",
                     :type "hidden"}]
-           [:button.btn.btn-primary {:value "Switch user", :type "submit"}
+           [:button.btn.btn-primary {:value "Switch user"
+                                     :type "submit"
+                                     :on-click (fn [event]
+                                                 ;; a higher level handler will stop all form submissions
+                                                 ;;
+                                                 ;; see frontend.components.app/app*
+                                                 (.stopPropagation event))}
             "Switch user"]]]]]))))

 (defn current-seat-usage [active-users total-seats]


Fix BallotName present tests

Fix BallotName present tests

...which revealed this isn't quite working yet.

--- test/vip/data_processor/validation/v5/candidate_test.clj
+++ test/vip/data_processor/validation/v5/candidate_test.clj
@@ -79,6 +79,6 @@
       (is (get-in out-ctx [:errors :candidates "VipObject.0.Candidate.0.BallotName" :missing]))
       (is (get-in out-ctx [:errors :candidates "VipObject.0.Candidate.1.BallotName" :missing])))
     (testing "doesn't for those that aren't"
-      (is (not (get-in out-ctx [:fatal :id "VipObject.0.Candidate.2.BallotName" :missing]))))
+      (is (not (get-in out-ctx [:errors :candidates "VipObject.0.Candidate.2.BallotName" :missing]))))
     (testing "doesn't care if BallotName isn't first"
-      (is (not (get-in out-ctx [:fatal :id "VipObject.0.Candidate.3.BallotName" :missing]))))))
+      (is (not (get-in out-ctx [:errors :candidates "VipObject.0.Candidate.3.BallotName" :missing]))))))


:message -> :notification

:message -> :notification

--- src/sns_beanstalk_chat/handler.clj
+++ src/sns_beanstalk_chat/handler.clj
@@ -20,7 +20,7 @@
         (when (<! (sns.consume/verify-message! m region))
           (case type
             :subscription-confirmation (http.client/get (:subscribe-url m))
-            :message (async/put! chan (:message m))))))
+            :notification (async/put! chan (:message m))))))
     nil))

 (defn make-get-handler [_ {mult :sns-incoming-mult out-chan :sns-outgoing}]


Attempt unified test/suite def syntax

Attempt unified test/suite def syntax

--- lazytest.clj
+++ lazytest.clj
@@ -17,6 +17,8 @@

 (def *active-contexts* {})

+(def *defining-context-bindings* [])
+
 (defprotocol Successful
   (success? [r] "Returns true if the result r was 100% successful."))

@@ -26,7 +28,7 @@

 (deftype Context [before after])

-(deftype Suite [contexts tests])
+(deftype Suite [contexts children])

 (deftype AssertionSuccess [assertion]
   Successful (success? [] true))
@@ -65,6 +67,7 @@
         (catch Throwable t#
           (AssertionThrown (quote ~expr) t#))))

+;; TODO: Lazy evaluation
 (defn- format-test [t]
   {:pre [(test? t)
          (vector? (:locals t))
@@ -114,32 +117,155 @@
   (TestResult t (call-with-contexts (:contexts t)
                   (compile-test t))))

+(declare run)
+
 (defn run-suite
   "Run a Suite s, return a SuiteResult."
   [s]
   (SuiteResult s (call-with-contexts (:contexts s)
                    (fn [& _]
-                     (doall (map run-test (:tests s)))))))
-
-
-;;; USAGE:
+                     (doall (map run (:children s)))))))
+
+
+(defn run [x]
+  (cond (suite? x) (run-suite x)
+        (test? x) (run-test x)
+        :else (throw (IllegalArgumentException.
+                      "Suites may only contain Tests and other Suites"))))
+
+
+
+;;; CONVENIENCE MACROS
+
+(defn- reformat-context [x]
+  (if (symbol? x) x
+      `(Context (fn [] ~x) nil)))
+
+(defmacro make-test
+  "args => docstring? [bindings*] assertions*
+
+  bindings => local-name context
+
+  If context is an expression, will create an anonymous
+  context using that expression in its :before function."
+  [& args]
+  (let [docstring (if (string? (first args))
+                    (first args)
+                    nil)
+        args (if (string? (first args))
+                (next args) args)
+        context-bindings (if (vector? (first args))
+                           (first args)
+                           [])
+        assertions (if (vector? (first args))
+                     (next args) args)]
+    `(Test (quote ~(vec (map first (partition 2 context-bindings))))
+           ~(vec (map (comp reformat-context second)
+                      (partition 2 context-bindings)))
+           (quote ~(vec assertions))
+           {:doc ~docstring} {})))
+
+(defmacro deftest [name & args]
+  `(def ~name (let [t# (make-test ~@args)]
+                (with-meta t# (assoc (meta t#)
+                                :name '~name
+                                :ns *ns*
+                                :file *file*
+                                :line @clojure.lang.Compiler/LINE)))))
+
+(declare reformat-child)
+
+(defmacro make-child-test [parent-bindings & args]
+  (let [docstring (if (string? (first args))
+                    (first args)
+                    nil)
+        args (if (string? (first args))
+                (next args) args)
+        context-bindings (if (vector? (first args))
+                           (vec (concat parent-bindings (first args)))
+                           parent-bindings)
+        assertions (if (vector? (first args))
+                     (next args) args)]
+    `(Test (quote ~(vec (map first (partition 2 context-bindings))))
+           ~(vec (map (comp reformat-context second)
+                      (partition 2 context-bindings)))
+           (quote ~(vec assertions))
+           {:doc ~docstring} {})))
+
+(defmacro make-child-suite [parent-bindings & args]
+  (let [docstring (if (string? (first args))
+                    (first args)
+                    nil)
+        args (if (string? (first args))
+                (next args)
+                args)
+        context-bindings (if (vector? (first args))
+                           (vec (concat parent-bindings (first args)))
+                           parent-bindings)
+        children (if (vector? (first args))
+                   (next args) args)]
+    `(Suite ~(vec (map (comp reformat-context second) (partition 2 context-bindings)))
+            ~(vec (map (partial reformat-child context-bindings) children))
+            {:doc ~docstring} {})))
+
+(defn reformat-child [parent-bindings args]
+  (cond (symbol? args) args
+        (= :test (first args)) `(make-child-test ~parent-bindings ~@(rest args))
+        (= :suite (first args)) `(make-child-suite ~parent-bindings ~@(rest args))
+        :else args))
+
+(defmacro make-suite [& args]
+  (let [docstring (if (string? (first args))
+                    (first args)
+                    nil)
+        args (if (string? (first args))
+                (next args)
+                args)
+        context-bindings (if (vector? (first args))
+                           (first args) [])
+        children (if (vector? (first args))
+                   (next args) args)]
+    `(Suite ~(vec (map (comp reformat-context second) (partition 2 context-bindings)))
+            ~(vec (map (partial reformat-child context-bindings) children))
+            {:doc ~docstring} {})))
+
+(defmacro defsuite [name & args]
+  `(def ~name (let [s# (make-suite ~@args)]
+                (with-meta s# (assoc (meta s#)
+                                :name '~name
+                                :ns *ns*
+                                :file *file*
+                                :line @clojure.lang.Compiler/LINE)))))
+
+
+;;; RAW API USAGE:

 (def c1 (Context (fn [] 1) nil))

-(def c2 (Context (fn [] 2) nil))
+(def c2 (Context (fn [] (Thread/sleep 1000) 2) nil))

 (def t1 (Test '[a b] [c1 c2] '[(integer? a) (integer? b)]))

 (def t2 (Test '[a b] [c1 c2] '[(> b a) (< a b)]))

-(def s1 (Suite [c1] [t1 t2]))
-
-;; user=> (run-suite s1)
+;; Including context c2 in the Suite means it's only executed once for
+;; all tests in the suite.
+(def s1 (Suite [c2] [t1 t2]))
+
+;; Suites may be nested.
+(def s2 (Suite nil [s1]))
+
+;; user=> (run-suite s2)
 ;; ...
 ;; user=> (success? *1)
 ;; true

-;;; STILL TO DO:
-
-;; * Come up with convenient macro syntax.
+;;; DEFSUITE USAGE
+
+(defsuite s3 [a c1 b 2]
+  t1 t2
+  (:test [b 2] (> b a))
+  (:suite [c 3]
+          (:test (integer? c))
+          (:test (< a c))))


Tests: test-get-port, test-get-port-special-cases, test-get-port-negative

--- test/emender_jenkins/core_test.clj
+++ test/emender_jenkins/core_test.clj
@@ -110,3 +110,37 @@
     (testing "if the emender-jenkins.core/-main definition exists."
         (is (callable? 'emender-jenkins.core/-main))))

+;
+; Tests for function behaviours
+;
+
+(deftest test-get-port
+    "Check the function emender-jenkins.core/get-port."
+    (testing "the function emender-jenkins.core/get-port."
+        (is (= (get-port "1")     "1"))
+        (is (= (get-port "2")     "2"))
+        (is (= (get-port "3000")  "3000"))
+        (is (= (get-port "65534") "65534"))
+        (is (= (get-port "65535") "65535"))))
+
+(deftest test-get-port-special-cases
+    "Check the function emender-jenkins.core/get-port."
+    (testing "the function emender-jenkins.core/get-port."
+        (is (= (get-port nil)     "3000"))
+        (is (= (get-port "")      "3000"))
+        (is (= (get-port 0)       "3000"))
+        (is (= (get-port 1)       "3000"))
+        (is (= (get-port 65535)   "3000"))
+        (is (= (get-port 65536)   "3000"))))
+
+(deftest test-get-port-negative
+    "Check the function emender-jenkins.core/get-port."
+    (testing "the function emender-jenkins.core/get-port."
+        (is (thrown? AssertionError (get-port "0")))
+        (is (thrown? AssertionError (get-port "-1")))
+        (is (thrown? AssertionError (get-port "-2")))
+        (is (thrown? AssertionError (get-port "65536")))
+        (is (thrown? AssertionError (get-port "65537")))
+        (is (thrown? AssertionError (get-port "1000000")))))
+
+


Killed job.

Killed job.

[ci skip]

--- test/onyx/peer/killed_job_test.clj
+++ test/onyx/peer/killed_job_test.clj
@@ -7,25 +7,7 @@
             [schema.core :as s]
             [onyx.api]))

-(namespace-state-changes [(around :facts (s/with-fn-validation ?form))])
-
-(facts
-
-(def id (java.util.UUID/randomUUID))
-
-(def config (load-config))
-
 (def n-messages 15000)
-
-(def batch-size 20)
-
-(def env-config (assoc (:env-config config) :onyx/id id))
-
-(def peer-config (assoc (:peer-config config) :onyx/id id))
-
-(def env (onyx.api/start-env env-config))
-
-(def peer-group (onyx.api/start-peer-group peer-config))

 (def in-chan-1 (chan (inc n-messages)))

@@ -35,143 +17,145 @@

 (def out-chan-2 (chan (sliding-buffer (inc n-messages))))

-(try
-  ;;; Don't write any segments to j1 so that the job will stay alive until we kill it.
-  (doseq [n (range n-messages)]
-    (>!! in-chan-2 {:n n}))
+(defn my-inc [{:keys [n] :as segment}]
+  (assoc segment :n (inc n)))

-  (>!! in-chan-2 :done)
+(defn inject-in-1-ch [event lifecycle]
+  {:core.async/chan in-chan-1})

-  (defn my-inc [{:keys [n] :as segment}]
-    (assoc segment :n (inc n)))
+(defn inject-in-2-ch [event lifecycle]
+  {:core.async/chan in-chan-2})

-  (def catalog-1
-    [{:onyx/name :in-1
-      :onyx/plugin :onyx.plugin.core-async/input
-      :onyx/type :input
-      :onyx/medium :core.async
-      :onyx/batch-size batch-size
-      :onyx/max-peers 1
-      :onyx/doc "Reads segments from a core.async channel"}
+(defn inject-out-1-ch [event lifecycle]
+  {:core.async/chan out-chan-1})

-     {:onyx/name :inc
-      :onyx/fn :onyx.peer.killed-job-test/my-inc
-      :onyx/type :function
-      :onyx/batch-size batch-size}
+(defn inject-out-2-ch [event lifecycle]
+  {:core.async/chan out-chan-2})

-     {:onyx/name :out-1
-      :onyx/plugin :onyx.plugin.core-async/output
-      :onyx/type :output
-      :onyx/medium :core.async
-      :onyx/batch-size batch-size
-      :onyx/max-peers 1
-      :onyx/doc "Writes segments to a core.async channel"}])
+(def in-1-calls
+  {:lifecycle/before-task-start inject-in-1-ch})

-  (def catalog-2
-    [{:onyx/name :in-2
-      :onyx/plugin :onyx.plugin.core-async/input
-      :onyx/type :input
-      :onyx/medium :core.async
-      :onyx/batch-size batch-size
-      :onyx/max-peers 1
-      :onyx/doc "Reads segments from a core.async channel"}
+(def in-2-calls
+  {:lifecycle/before-task-start inject-in-2-ch})

-     {:onyx/name :inc
-      :onyx/fn :onyx.peer.killed-job-test/my-inc
-      :onyx/type :function
-      :onyx/batch-size batch-size}
+(def out-1-calls
+  {:lifecycle/before-task-start inject-out-1-ch})

-     {:onyx/name :out-2
-      :onyx/plugin :onyx.plugin.core-async/output
-      :onyx/type :output
-      :onyx/medium :core.async
-      :onyx/batch-size batch-size
-      :onyx/max-peers 1
-      :onyx/doc "Writes segments to a core.async channel"}])
+(def out-2-calls
+  {:lifecycle/before-task-start inject-out-2-ch})

-  (def workflow-1 [[:in-1 :inc] [:inc :out-1]])
+(deftest kill-job
+  (let [id (java.util.UUID/randomUUID)
+        config (load-config)
+        batch-size 20
+        env-config (assoc (:env-config config) :onyx/id id)
+        peer-config (assoc (:peer-config config) :onyx/id id)
+        env (onyx.api/start-env env-config)
+        peer-group (onyx.api/start-peer-group peer-config)]
+    ;; Don't write any segments to j1 so that the job will stay alive until we kill it.
+    (doseq [n (range n-messages)]
+      (>!! in-chan-2 {:n n}))
+    (>!! in-chan-2 :done)

-  (def workflow-2 [[:in-2 :inc] [:inc :out-2]])
+    (let [catalog-1
+          [{:onyx/name :in-1
+            :onyx/plugin :onyx.plugin.core-async/input
+            :onyx/type :input
+            :onyx/medium :core.async
+            :onyx/batch-size batch-size
+            :onyx/max-peers 1
+            :onyx/doc "Reads segments from a core.async channel"}

-  (defn inject-in-1-ch [event lifecycle]
-    {:core.async/chan in-chan-1})
+           {:onyx/name :inc
+            :onyx/fn :onyx.peer.killed-job-test/my-inc
+            :onyx/type :function
+            :onyx/batch-size batch-size}

-  (defn inject-in-2-ch [event lifecycle]
-    {:core.async/chan in-chan-2})
+           {:onyx/name :out-1
+            :onyx/plugin :onyx.plugin.core-async/output
+            :onyx/type :output
+            :onyx/medium :core.async
+            :onyx/batch-size batch-size
+            :onyx/max-peers 1
+            :onyx/doc "Writes segments to a core.async channel"}]

-  (defn inject-out-1-ch [event lifecycle]
-    {:core.async/chan out-chan-1})
+          catalog-2
+          [{:onyx/name :in-2
+            :onyx/plugin :onyx.plugin.core-async/input
+            :onyx/type :input
+            :onyx/medium :core.async
+            :onyx/batch-size batch-size
+            :onyx/max-peers 1
+            :onyx/doc "Reads segments from a core.async channel"}

-  (defn inject-out-2-ch [event lifecycle]
-    {:core.async/chan out-chan-2})
+           {:onyx/name :inc
+            :onyx/fn :onyx.peer.killed-job-test/my-inc
+            :onyx/type :function
+            :onyx/batch-size batch-size}

-  (def in-1-calls
-    {:lifecycle/before-task-start inject-in-1-ch})
+           {:onyx/name :out-2
+            :onyx/plugin :onyx.plugin.core-async/output
+            :onyx/type :output
+            :onyx/medium :core.async
+            :onyx/batch-size batch-size
+            :onyx/max-peers 1
+            :onyx/doc "Writes segments to a core.async channel"}]

-  (def in-2-calls
-    {:lifecycle/before-task-start inject-in-2-ch})
+          workflow-1 [[:in-1 :inc] [:inc :out-1]]
+          workflow-2 [[:in-2 :inc] [:inc :out-2]]

-  (def out-1-calls
-    {:lifecycle/before-task-start inject-out-1-ch})
+          lifecycles-1
+          [{:lifecycle/task :in-1
+            :lifecycle/calls :onyx.peer.killed-job-test/in-1-calls}
+           {:lifecycle/task :in-1
+            :lifecycle/calls :onyx.plugin.core-async/reader-calls}
+           {:lifecycle/task :out-1
+            :lifecycle/calls :onyx.peer.killed-job-test/out-1-calls}
+           {:lifecycle/task :out-1
+            :lifecycle/calls :onyx.plugin.core-async/writer-calls}]

-  (def out-2-calls
-    {:lifecycle/before-task-start inject-out-2-ch})
+          lifecycles-2
+          [{:lifecycle/task :in-2
+            :lifecycle/calls :onyx.peer.killed-job-test/in-2-calls}
+           {:lifecycle/task :in-2
+            :lifecycle/calls :onyx.plugin.core-async/reader-calls}
+           {:lifecycle/task :out-2
+            :lifecycle/calls :onyx.peer.killed-job-test/out-2-calls}
+           {:lifecycle/task :out-2
+            :lifecycle/calls :onyx.plugin.core-async/writer-calls}]

-  (def lifecycles-1
-    [{:lifecycle/task :in-1
-      :lifecycle/calls :onyx.peer.killed-job-test/in-1-calls}
-     {:lifecycle/task :in-1
-      :lifecycle/calls :onyx.plugin.core-async/reader-calls}
-     {:lifecycle/task :out-1
-      :lifecycle/calls :onyx.peer.killed-job-test/out-1-calls}
-     {:lifecycle/task :out-1
-      :lifecycle/calls :onyx.plugin.core-async/writer-calls}])
+          v-peers (onyx.api/start-peers 3 peer-group)

-    (def lifecycles-2
-      [{:lifecycle/task :in-2
-        :lifecycle/calls :onyx.peer.killed-job-test/in-2-calls}
-       {:lifecycle/task :in-2
-        :lifecycle/calls :onyx.plugin.core-async/reader-calls}
-       {:lifecycle/task :out-2
-        :lifecycle/calls :onyx.peer.killed-job-test/out-2-calls}
-       {:lifecycle/task :out-2
-        :lifecycle/calls :onyx.plugin.core-async/writer-calls}])
+          j1 (:job-id (onyx.api/submit-job
+                       peer-config
+                       {:catalog catalog-1 :workflow workflow-1
+                        :lifecycles lifecycles-1
+                        :task-scheduler :onyx.task-scheduler/balanced}))

-  (def v-peers (onyx.api/start-peers 3 peer-group))
+          j2 (:job-id (onyx.api/submit-job
+                       peer-config
+                       {:catalog catalog-2 :workflow workflow-2
+                        :lifecycles lifecycles-2
+                        :task-scheduler :onyx.task-scheduler/balanced}))]

-  (def j1 (:job-id (onyx.api/submit-job
-                    peer-config
-                    {:catalog catalog-1 :workflow workflow-1
-                     :lifecycles lifecycles-1
-                     :task-scheduler :onyx.task-scheduler/balanced})))
+      (onyx.api/kill-job peer-config j1)

-  (def j2 (:job-id (onyx.api/submit-job
-                    peer-config
-                    {:catalog catalog-2 :workflow workflow-2
-                     :lifecycles lifecycles-2
-                     :task-scheduler :onyx.task-scheduler/balanced})))
+      (let [results (take-segments! out-chan-2)
+            ch (chan 100)]
+        ;; Make sure we find the killed job in the replica, then bail
+        (loop [replica (extensions/subscribe-to-log (:log env) ch)]
+          (let [entry (<!! ch)
+                new-replica (extensions/apply-log-entry entry replica)]
+            (when-not (= (first (:killed-jobs new-replica)) j1)
+              (recur new-replica))))

-  (onyx.api/kill-job peer-config j1)
+        (let [expected (set (map (fn [x] {:n (inc x)}) (range n-messages)))]
+          (is (= expected (set (butlast results))))
+          (is (= :done (last results))))

-  (def results (take-segments! out-chan-2))
+        (doseq [v-peer v-peers]
+          (onyx.api/shutdown-peer v-peer))

-  (def ch (chan 100))
+        (onyx.api/shutdown-peer-group peer-group)

-  ;; Make sure we find the killed job in the replica, then bail
-  (loop [replica (extensions/subscribe-to-log (:log env) ch)]
-    (let [entry (<!! ch)
-          new-replica (extensions/apply-log-entry entry replica)]
-      (when-not (= (first (:killed-jobs new-replica)) j1)
-        (recur new-replica))))
-
-  (let [expected (set (map (fn [x] {:n (inc x)}) (range n-messages)))]
-    (fact (set (butlast results)) => expected)
-    (fact (last results) => :done))
-  (finally
-   (doseq [v-peer v-peers]
-     (onyx.api/shutdown-peer v-peer))
-
-   (onyx.api/shutdown-peer-group peer-group)
-
-   (onyx.api/shutdown-env env)))
-)
+        (onyx.api/shutdown-env env)))))


I hate everything

I hate everything

--- src/app/core.cljs
+++ src/app/core.cljs
@@ -359,7 +359,7 @@
                (party-selected? owner)
                (om/build rsvp-card-view selection)

-               (seq? results)
+               (seq results)
                (om/build rsvp-multiple-results-view data)

                :else (html [:main


Rendering client requests and responses in unified in ascii timeline.

--- src/cbfg/vis.cljs
+++ src/cbfg/vis.cljs
@@ -359,17 +359,18 @@
   (set-el-innerHTML "client"
                     (apply str
                            (flatten ["
"
-                                     "
id	fence	op	"
-                                     "    args	responses
"
+                                     "
op	fence	"
+                                     "    args	timeline
"
                                      (map (fn [[opaque [request responses]]]
                                             ["
"
-                                             " " opaque "	"
+                                             " " (:op request) "	"
                                              " " (:fence request) "	"
-                                             " " (:op request) "	"
                                              " " (filter-r request) "	"
                                              "
"
+                                             "
request
"
                                              (map (fn [[out-time response]]
                                                     ["
"
                                                      (filter-r response)


forgot to add the email init fn

forgot to add the email init fn

--- src/pc/init.clj
+++ src/pc/init.clj
@@ -2,6 +2,7 @@
   (:require pc.datomic
             pc.datomic.migrations
             pc.datomic.schema
+            pc.email
             pc.less
             pc.logging
             pc.nrepl
@@ -14,6 +15,7 @@
                #'pc.datomic/init
                #'pc.datomic.migrations/init
                #'pc.datomic.schema/init
+               #'pc.email/init
                #'pc.server/init])

 (defn pretty-now []


Quoting in 'emit-protocol' still needs to respects the symbols in maps

--- src/jloj/core.clj
+++ src/jloj/core.clj
@@ -4,7 +4,6 @@
             [instaparse.core :as insta])
   (:import [jloj.lang Jloj Func]))

-;; TODO: This is totally broken - symbol escaping in the proto-sigs breaks in the syntax quote
 (defn emit-protocol
     ([iface]
      (emit-protocol iface "" ""))
@@ -38,7 +37,8 @@
                  {:on ~(symbol (str ns-str "." proto-name))
                   :on-interface ~iface
                   :var (var ~proto-sym)
-                  :sigs ~proto-sigs
+                  :sigs '~proto-sigs
+                  ;; TODO: Confirm method-map is built correctly
                   :method-map ~meth-map
                   ;; TODO: Figure out the best way to make the method-builders
                   :method-builders {}}))
@@ -199,7 +199,7 @@
 (comment

-  (emit-protocol Func)
+  (var-get (emit-protocol Func))

   (def example (slurp "example.jloj"))
   (def parse-res (parser example))
@@ -209,16 +209,15 @@
   (handle-segment (nth parse-res 10))
   (handle-segment (nth parse-res 11))
   (handle-segment (nth parse-res 13))
-  (handle-segment (get-in (nth parse-res 18) [1 6 1]))
   (handle-segment (get-in (nth parse-res 10) [1 3 1]))
   (handle-segment (get-in (nth parse-res 10) [1 4 1]))
   (handle-segment (get-in (nth parse-res 10) [1 5 1]))
   (handle-segment (get-in (nth parse-res 10) [1 6 1]))
   (handle-segment (get-in (nth parse-res 10) [1 8 1]))
   (handle-segment (get-in (nth parse-res 10) [1 10 1]))
-  ;; TODO: VVVV
-  (handle-segment (nth parse-res 16))
-  (handle-segment (nth parse-res 18))
+  ;; TODO: Classes
+  (handle-segment (nth parse-res 17))
+  (handle-segment (nth parse-res 19))
   (def parse-transform (insta/transform transform-opts parse-res))

   (some-> 1


Clean up ns definition for cli-tests.

Clean up ns definition for cli-tests.

--- src/cli4clj/cli_tests.clj
+++ src/cli4clj/cli_tests.clj
@@ -10,27 +10,24 @@
   ^{:author "Ruediger Gad",
     :doc "Helper functions for testing CLIs."}
   cli4clj.cli-tests
-  (:use
-    [clojure.main :only [repl skip-if-eol skip-whitespace]]
-    [clojure.string :only [blank? split]])
   (:require
-    (clj-assorted-utils [util :refer :all])
-    (cli4clj [cli :refer :all])))
+    (clj-assorted-utils [util :as utils])
+    (cli4clj [cli :as cli])))

 (defn cmd-vector-to-test-input-string
   "This function takes a vector of string commands and creates a one-line command that is suited to being passed to a cli instance during testing."
   [cmd-vec]
-  (reduce (fn [s c] (str s c *cli4clj-line-sep*)) "" cmd-vec))
+  (reduce (fn [s c] (str s c cli/*cli4clj-line-sep*)) "" cmd-vec))

 (defn create-repl-read-test-fn
   "This function creates a repl read function for testing."
   [opts]
-  (create-repl-read-fn opts))
+  (cli/create-repl-read-fn opts))

 (defn exec-tested-fn
   "This function takes another function as argument and executes it in a way that is suited for testing."
   [tested-fn]
-  (binding [*read-factory* create-repl-read-test-fn]
+  (binding [cli/*read-factory* create-repl-read-test-fn]
     (tested-fn)))

 (defn test-cli-stdout
@@ -41,13 +38,13 @@
 (defn test-cli-stderr
   "Takes a function to be tested and a vector of string input commands and returns the string that was printed to stderr as a result of executing the supplied commands in the cli provided by the tested-fn."
   [tested-fn in-cmds]
-  (.trim (with-err-str (with-in-str (cmd-vector-to-test-input-string in-cmds) (exec-tested-fn tested-fn)))))
+  (.trim (utils/with-err-str (with-in-str (cmd-vector-to-test-input-string in-cmds) (exec-tested-fn tested-fn)))))

 (defn expected-string
   "Takes a vector of strings that are intended to represent individual line of expected command line output and converts them into a string that can be compared against the output of the test-cli-stdout and test-cli-stderr functions.
    The most notably property is that the lines are joined based on the platform dependent line.separator."
   ([expected-lines]
-    (expected-string expected-lines *cli4clj-line-sep*))
+    (expected-string expected-lines cli/*cli4clj-line-sep*))
   ([expected-lines separator]
     (reduce
       (fn [s e] (str s separator e))


Remove duped analysis cache writing logic.

Never need to write out cljs.core analysis cache.

Never drop cljs.core analysis from compilation environment

--- src/clj/cljs/compiler.clj
+++ src/clj/cljs/compiler.clj
@@ -1076,7 +1076,8 @@
               (if (requires-compilation? src-file dest-file opts)
                 (do
                   (util/mkdirs dest-file)
-                  (when (contains? (::ana/namespaces @env/*compiler*) ns)
+                  (when (and (contains? (::ana/namespaces @env/*compiler*) ns)
+                             (not= ns 'cljs.core))
                     (swap! env/*compiler* update-in [::ana/namespaces] dissoc ns))
                   (let [ret (compile-file* src-file dest-file opts)]
                     (when *dependents*
@@ -1084,9 +1085,6 @@
                         (fn [{:keys [recompile visited]}]
                           {:recompile (into recompile (ana/ns-dependents ns))
                            :visited   (conj visited ns)})))
-                    (when (true? (:cache-analysis opts))
-                      (ana/write-analysis-cache ns
-                        (ana/cache-file src ns-info (util/output-directory opts) :write)))
                     ret))
                 (do
                   (when-not (contains? (::ana/namespaces @env/*compiler*) ns)


Join test.

Join test.

[ci skip]

--- test/onyx/peer/join_test.clj
+++ test/onyx/peer/join_test.clj
@@ -5,19 +5,6 @@
             [onyx.test-helper :refer [load-config]]
             [onyx.api]
             [taoensso.timbre :refer [info warn trace fatal] :as timbre]))
-
-(def id (java.util.UUID/randomUUID))
-
-(def config (load-config))
-
-(def env-config (assoc (:env-config config) :onyx/id id))
-
-(def peer-config (assoc (:peer-config config) :onyx/id id))
-
-(def env (onyx.api/start-env env-config))
-
-(def peer-group (onyx.api/start-peer-group peer-config))
-(def batch-size 2)

 (def people
   [{:id 1 :name "Mike" :age 23}
@@ -35,63 +22,7 @@

 (def age-chan (chan (inc (count ages))))

-(def out-chan (chan 10000 #_(sliding-buffer (inc n-messages))))
-
-(doseq [name names]
-  (>!! name-chan name))
-
-(doseq [age ages]
-  (>!! age-chan age))
-
-(>!! name-chan :done)
-(>!! age-chan :done)
-
-(defn join-person [local-state segment]
-  (let [state @local-state]
-    (if-let [record (get state (:id segment))]
-      (let [result (merge record segment)]
-        (swap! local-state dissoc (:id segment))
-        result)
-      (do (swap! local-state assoc (:id segment) (dissoc segment :id))
-          []))))
-
-(def catalog
-  [{:onyx/name :names
-    :onyx/plugin :onyx.plugin.core-async/input
-    :onyx/type :input
-    :onyx/medium :core.async
-    :onyx/batch-size batch-size
-    :onyx/max-peers 1
-    :onyx/doc "Reads segments from a core.async channel"}
-
-   {:onyx/name :ages
-    :onyx/plugin :onyx.plugin.core-async/input
-    :onyx/type :input
-    :onyx/medium :core.async
-    :onyx/batch-size batch-size
-    :onyx/max-peers 1
-    :onyx/doc "Reads segments from a core.async channel"}
-
-   {:onyx/name :join-person
-    :onyx/fn :onyx.peer.join-test/join-person
-    :onyx/type :function
-    :onyx/group-by-key :id
-    :onyx/min-peers 1
-    :onyx/flux-policy :kill
-    :onyx/batch-size batch-size}
-
-   {:onyx/name :out
-    :onyx/plugin :onyx.plugin.core-async/output
-    :onyx/type :output
-    :onyx/medium :core.async
-    :onyx/batch-size batch-size
-    :onyx/max-peers 1
-    :onyx/doc "Writes segments to a core.async channel"}])
-
-(def workflow
-  [[:names :join-person]
-   [:ages :join-person]
-   [:join-person :out]])
+(def out-chan (chan 10000))

 (defn inject-names-ch [event lifecycle]
   {:core.async/chan name-chan})
@@ -117,37 +48,100 @@
 (def out-calls
   {:lifecycle/before-task-start inject-out-ch})

-(def lifecycles
-  [{:lifecycle/task :names
-    :lifecycle/calls :onyx.peer.join-test/names-calls}
-   {:lifecycle/task :names
-    :lifecycle/calls :onyx.plugin.core-async/reader-calls}
-   {:lifecycle/task :ages
-    :lifecycle/calls :onyx.peer.join-test/ages-calls}
-   {:lifecycle/task :ages
-    :lifecycle/calls :onyx.plugin.core-async/reader-calls}
-   {:lifecycle/task :out
-    :lifecycle/calls :onyx.peer.join-test/out-calls}
-   {:lifecycle/task :out
-    :lifecycle/calls :onyx.plugin.core-async/writer-calls}
-   {:lifecycle/task :join-person
-    :lifecycle/calls :onyx.peer.join-test/join-calls}])
+(defn join-person [local-state segment]
+  (let [state @local-state]
+    (if-let [record (get state (:id segment))]
+      (let [result (merge record segment)]
+        (swap! local-state dissoc (:id segment))
+        result)
+      (do (swap! local-state assoc (:id segment) (dissoc segment :id))
+          []))))

-(def v-peers (onyx.api/start-peers 4 peer-group))
+(deftest join-segments
+  (let [id (java.util.UUID/randomUUID)
+        config (load-config)
+        env-config (assoc (:env-config config) :onyx/id id)
+        peer-config (assoc (:peer-config config) :onyx/id id)
+        env (onyx.api/start-env env-config)
+        peer-group (onyx.api/start-peer-group peer-config)
+        batch-size 2

-(onyx.api/submit-job
- peer-config
- {:catalog catalog :workflow workflow
-  :lifecycles lifecycles
-  :task-scheduler :onyx.task-scheduler/balanced})
+        catalog
+        [{:onyx/name :names
+          :onyx/plugin :onyx.plugin.core-async/input
+          :onyx/type :input
+          :onyx/medium :core.async
+          :onyx/batch-size batch-size
+          :onyx/max-peers 1
+          :onyx/doc "Reads segments from a core.async channel"}

-(def results (take-segments! out-chan))
+         {:onyx/name :ages
+          :onyx/plugin :onyx.plugin.core-async/input
+          :onyx/type :input
+          :onyx/medium :core.async
+          :onyx/batch-size batch-size
+          :onyx/max-peers 1
+          :onyx/doc "Reads segments from a core.async channel"}

-(fact (set (butlast results)) => (set people))
+         {:onyx/name :join-person
+          :onyx/fn :onyx.peer.join-test/join-person
+          :onyx/type :function
+          :onyx/group-by-key :id
+          :onyx/min-peers 1
+          :onyx/flux-policy :kill
+          :onyx/batch-size batch-size}

-(doseq [v-peer v-peers]
-  (onyx.api/shutdown-peer v-peer))
+         {:onyx/name :out
+          :onyx/plugin :onyx.plugin.core-async/output
+          :onyx/type :output
+          :onyx/medium :core.async
+          :onyx/batch-size batch-size
+          :onyx/max-peers 1
+          :onyx/doc "Writes segments to a core.async channel"}]

-(onyx.api/shutdown-peer-group peer-group)
+        workflow
+        [[:names :join-person]
+         [:ages :join-person]
+         [:join-person :out]]

-(onyx.api/shutdown-env env)
+        lifecycles
+        [{:lifecycle/task :names
+          :lifecycle/calls :onyx.peer.join-test/names-calls}
+         {:lifecycle/task :names
+          :lifecycle/calls :onyx.plugin.core-async/reader-calls}
+         {:lifecycle/task :ages
+          :lifecycle/calls :onyx.peer.join-test/ages-calls}
+         {:lifecycle/task :ages
+          :lifecycle/calls :onyx.plugin.core-async/reader-calls}
+         {:lifecycle/task :out
+          :lifecycle/calls :onyx.peer.join-test/out-calls}
+         {:lifecycle/task :out
+          :lifecycle/calls :onyx.plugin.core-async/writer-calls}
+         {:lifecycle/task :join-person
+          :lifecycle/calls :onyx.peer.join-test/join-calls}]
+
+        v-peers (onyx.api/start-peers 4 peer-group)]
+    (doseq [name names]
+      (>!! name-chan name))
+
+    (doseq [age ages]
+      (>!! age-chan age))
+
+    (>!! name-chan :done)
+    (>!! age-chan :done)
+
+    (onyx.api/submit-job
+     peer-config
+     {:catalog catalog :workflow workflow
+      :lifecycles lifecycles
+      :task-scheduler :onyx.task-scheduler/balanced})
+
+    (let [results (take-segments! out-chan)]
+      (is (= (set people)
+             (set (butlast results)))))
+    (doseq [v-peer v-peers]
+      (onyx.api/shutdown-peer v-peer))
+
+    (onyx.api/shutdown-peer-group peer-group)
+
+    (onyx.api/shutdown-env env)))


Use watcher to send events to clients

Use watcher to send events to clients

--- src/clj/threed/server.clj
+++ src/clj/threed/server.clj
@@ -37,13 +37,11 @@

   ;;wrap-json-body
   (POST "/events" {params :params}
-        (do (swap! events conj params)
-            (println "Send events" @events)
-            (comms/send-events! @events)
+        (do (swap! events concat (:events params))
+            ;;(comms/send-events! @events)
             {:status 200 :body "OK"}))

   (GET "/*" req (page)))
-

 (def http-handler
   (let [ring-defaults-config api-defaults
@@ -78,4 +76,6 @@
   (run-web-server port))

 (defn -main [& [port]]
+  (add-watch events :key (fn [k r os events]
+                           (comms/send-events! events)))
   (run port))


Fix the datepicker choosing dates after the selected date.

--- src/cljs/medusa/core.cljs
+++ src/cljs/medusa/core.cljs
@@ -94,8 +94,7 @@
             end-element (js/$ (om/get-node owner "end-date"))
             start-datepicker (.datepicker start-element #js {:format "yyyy-mm-dd"})
             end-datepicker (.datepicker end-element #js {:format "yyyy-mm-dd"})
-            format-date #(timef/unparse date-formatter (time/plus (time/date-time (.-date %))
-                                                                  (time/days 1)))]
+            format-date #(timef/unparse date-formatter (time/date-time (.-date %)))]
         (.on start-datepicker "changeDate" (fn [e]
                                              (.datepicker start-element "hide")
                                              (put! event-channel [:from-selected (format-date e)])))


Make each harness call an assertion

Make each harness call an assertion

--- test/wireframes/examples.clj
+++ test/wireframes/examples.clj
@@ -11,11 +11,11 @@
 (defn harness [{:keys [shape focal-length transform draw-fn filename size]}]
   (println filename)
   (time
-    (b/write-png
-      (b/->img
-        (partial draw-fn focal-length transform shape)
-        (or size [1000 900]))
-      filename)))
+    (is (b/write-png
+        (b/->img
+          (partial draw-fn focal-length transform shape)
+          (or size [1000 900]))
+        filename))))

 (deftest ^:examples wireframes


Bump fix

Bump fix

--- src/npm/boot.cljs
+++ src/npm/boot.cljs
@@ -3,7 +3,11 @@
             [cljs.analyzer.api :as analy]
             [npm.mvn :as mvn]))

-(def PACKAGE (js->clj (js/require (str js/process.env.PWD "/package.json"))))
+(def PACKAGE
+  (if (js/fs.existsSync (str js/process.env.PWD "/package.json"))
+    (js->clj (js/require (str js/process.env.PWD "/package.json")))
+    {"cljs" {"source-paths" ["src"]}}))
+
 (declare *classpath*)

 (defn file-seq [root]


Define <*> and <$> functions as aliases of fapply and fmap respectively.

--- src/cats/core.cljc
+++ src/cats/core.cljc
@@ -361,20 +361,13 @@
 ;; Haskell-style aliases and util functions.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

-(defn <$>
-  "Alias of fmap."
-  ([f]
-   (fn [fv]
-     (fmap f fv)))
-  ([f fv]
-   (fmap f fv)))
-
-(defn <*>
-  "Performs a Haskell-style left-associative fapply."
-  [& avs]
-  {:pre [(not (empty? avs))]}
-  (let [ctx (get-current-context (first avs))]
-    (reduce (partial p/fapply ctx) avs)))
+(def <$>
+  "A haskell-style fmap alias."
+  fmap)
+
+(def <*>
+  "A haskell-style fapply alias."
+  fapply)

 (defn >>=
   "Performs a Haskell-style left-associative


Enable decompressUntilEOF of CompressorStreamFactory

--- src/cljam/util.clj
+++ src/cljam/util.clj
@@ -132,7 +132,7 @@
   [f]
   (let [is (io/input-stream f)]
     (try
-      (-> (CompressorStreamFactory.)
+      (-> (CompressorStreamFactory. true)
           (.createCompressorInputStream is))
       (catch CompressorException _
         is))))


more map examples

more map examples

--- src/data/maps.cljc
+++ src/data/maps.cljc
@@ -7,3 +7,14 @@
  {:five 1 :two 22}
  {:four 4}
  {:one 1 :two 2 :three 3})
+
+(def data
+  {:headers {"Content-Type" "text/html"}
+   :body {:text {:html "markup"}
+          :images "/img/path-to-img.jpg"}})
+
+(assoc-in data [:body :text] "Hello Planet" )
+
+(def matrix [[1 2 3 4 5]
+             ["a" "b" "c" "d" "e"]
+             ["hello" "thanks" "hola" "namaste" "hi"]])


Fairly critical improvement to logic

Fairly critical improvement to logic

--- src/cylon/impl/oauth2.clj
+++ src/cylon/impl/oauth2.clj
@@ -464,14 +464,17 @@
   Authorizer
   (authorized? [this request scope]
     (if (valid-scope? (:auth-server this) scope)
-
-      (let [access-token (second (re-matches #"\Qtoken\E\s+(.*)" (get (:headers request) "authorization")))
-            session (get-session (:access-token-store this) access-token)
-            scopes (:scopes session)]
-        (infof "session is %s, scopes is %s" session scopes)
-        (when scopes (scopes scope)))
-
-      ;; Not a valid scope
+      (when-let [auth-header (get (:headers request) "authorization")]
+
+        (let [access-token (second (re-matches #"\Qtoken\E\s+(.*)" auth-header))
+              session (get-session (:access-token-store this) access-token)
+              scopes (:scopes session)]
+          (infof "session is %s, scopes is %s" session scopes)
+          (when session
+            (when scopes (scopes scope))
+            )))
+
+      ;; Not a valid scope - (internal error)
       (throw (ex-info "Not a valid scope!" {:scope scope})))))

 (defn new-oauth2-access-token-authorizer [& {:as opts}]


Refactor main.

Refactor main.

--- src/dsbdp/main.clj
+++ src/dsbdp/main.clj
@@ -181,7 +181,8 @@
                      (and
                        (not (nil? in-data))
                        (not (.endsWith scenario "-direct"))
-                       (not (.endsWith scenario "-pmap"))
+                       (not (.endsWith scenario "-direct-pmap"))
+                       (not (.endsWith scenario "-direct-reducers-map"))
                        (not (.contains scenario "async-pipeline")))
                      (create-local-processing-pipeline
                        @proc-fns
@@ -213,20 +214,21 @@
                         (fn []
                           (direct-proc-fn in-data)
                           (.inc out-cntr))
-                      (.endsWith scenario "-pmap")
+                      (.endsWith scenario "-direct-pmap")
                         (let [d (repeat collection-size in-data)]
                           (doall d)
                           (fn []
                             (doseq [_ (pmap direct-proc-fn d)]
                               (.inc out-cntr))))
-                      (.endsWith scenario "-reducers-map")
+                      (.endsWith scenario "-direct-reducers-map")
                         (let [in-vec (vec (repeat collection-size in-data))]
                           (doall in-vec)
                           (fn []
-                            (doseq [
-                                    ;_ (reducers/foldcat (reducers/map direct-proc-fn in-vec))
-                                    _ (reducers/fold partition-size reducers/cat reducers/append! (reducers/map direct-proc-fn in-vec))
-                                    ]
+                            (doseq [_ (reducers/fold
+                                        partition-size
+                                        reducers/cat
+                                        reducers/append!
+                                        (reducers/map direct-proc-fn in-vec))]
                               (.inc out-cntr))))
                       (.endsWith scenario "-async-pipeline")
                         (if


Add experiments file, for preliminary test run.

--- src/exp/aaai10.clj
+++ src/exp/aaai10.clj
@@ -28,7 +28,7 @@
 ;;;;;;; 2d-nav

 (defn make-exp-set []
-  (experiments/make-experiment-set "2dnav"
+  (experiments/make-experiment-set "prelim-2dnav"
     [:product
      [:objects [1 2 4 6 8 10]]
      [:rand    [1]]


cleaned up uploads namespace

cleaned up uploads namespace

--- src/frontend/uploads.cljs
+++ src/frontend/uploads.cljs
@@ -38,17 +38,20 @@
         new-upload (new-uploads upload-id)]
     (cond
       (and (not (:stopped? new-upload))
-             (:stopped? old-upload))
-        :started
+           (:stopped? old-upload))
+      :started
+
       (and (:stopped? new-upload)
-               (not (:stopped? old-upload)))
-        :stopped
+           (not (:stopped? old-upload)))
+      :stopped
+
       (and (:paused? new-upload)
            (not (:paused? old-upload)))
-        :paused
+      :paused
+
       (and (not (:paused? new-upload))
-                (:paused? old-upload))
-        :resumed)))
+          (:paused? old-upload))
+      :resumed)))

 (defn handle-state-change [old-state new-state]
   "Returns new state map according to changes between old-state and new-state"
@@ -66,19 +69,21 @@
     (cond
       (and (not (empty? new-upload-ids))
            (< (count room-uploads-order) upload-slots))
-        (assoc new-state
-               :uploads
-               (assoc uploads
-                      (first new-upload-ids)
-                      (start (uploads (first new-upload-ids)))))
+      (assoc new-state
+             :uploads
+             (assoc uploads
+                    (first new-upload-ids)
+                    (start (uploads (first new-upload-ids)))))
+
       (and (and (not (empty? removed-upload-ids))
                 (not (empty? unpaused-inactive-uploads)))
            (< (count active-uploads)
               upload-slots))
-        (assoc new-state
-               :uploads
-               (assoc uploads
-                      (first unpaused-inactive-uploads)
-                      (start (uploads (first unpaused-inactive-uploads)))))
+      (assoc new-state
+             :uploads
+             (assoc uploads
+                    (first unpaused-inactive-uploads)
+                    (start (uploads (first unpaused-inactive-uploads)))))
+
       :else new-state)))


fixes

fixes

--- src/latte/core.clj
+++ src/latte/core.clj
@@ -212,7 +212,8 @@
         conf-form (s/conform spec args)]
     (if (= conf-form :clojure.spec.alpha/invalid)
       (throw (ex-info (str "Cannot declare " (name category) ": syntax error.")
-                      {:explain (s/explain-str spec args)})))))
+                      {:explain (s/explain-str spec args)}))
+      conf-form)))

 ;;{
 ;; Now the maing handling of theorem-like statements is with the following function,
@@ -252,7 +253,7 @@
               ;;{
               ;;  - Step 4: if all went well, we construct the internal representation.
               ;;}
-              [:ok (build-statement thm-name params body-term)]))))))
+              [:ok (build-statement category thm-name params body-term)]))))))

 ;;{
 ;; The following function builds the internal representation of a statement


Take out unneeded import

Take out unneeded import

--- src/useful/io.clj
+++ src/useful/io.clj
@@ -1,8 +1,7 @@
 (ns useful.io
   (:use [clojure.java.io :only [copy]])
   (:import [java.net URL URLConnection JarURLConnection]
-           [java.io File FileInputStream PrintStream]
-           [clojure.lang IDeref]))
+           [java.io File FileInputStream PrintStream]))

 (defn resource-stream [name]
   (if-let [url (.findResource (.getClassLoader clojure.lang.RT) name)]


Add a `trigger` to args of an `:object.behavior.time` event.

--- src/lt/object.cljs
+++ src/lt/object.cljs
@@ -179,7 +179,7 @@
       (binding [*behavior-meta* meta]
         (apply func obj args))
       (when-not (= trigger :object.behavior.time)
-        (raise obj :object.behavior.time r time)))
+        (raise obj :object.behavior.time r time trigger)))
       (catch js/Error e
         (safe-report-error (str "Invalid behavior: " (-> (->behavior r) :name)))
         (safe-report-error e)
@@ -376,6 +376,8 @@

 (behavior ::report-time
            :triggers #{:object.behavior.time}
-           :reaction (fn [this beh time]
+           :reaction (fn [this beh time trigger]
                        (when js/lt.objs.console
-                         (js/lt.objs.console.log (str beh " took " time "ms")))))
+                         (js/lt.objs.console.log (str beh " triggered by "
+                                                      trigger " took "
+                                                      time "ms")))))


workspace.behaviors should support the new flat format

Flat behaviors/keymaps was introduced in 0.7.0. Not supporting it
in workspace.behaviors is confusing and inconsistent

--- src/lt/objs/settings.cljs
+++ src/lt/objs/settings.cljs
@@ -106,14 +106,17 @@
          (sort-by first)
          (vec))))

-(defn parse-file [file]
-  (let [behs (-> (files/open-sync file)
-                 :content
-                 (safe-read file))]
-    (cond
+(defn parse-behaviors [behs file]
+  (cond
      (map? behs) behs
      (vector? behs) (flat-behaviors->map behs)
-     :else (console/error (str "Invalid behaviors file: " file ". Behaviors must be either a vector or a map.")))))
+     :else (console/error (str "Invalid behaviors file: " file ". Behaviors must be either a vector or a map."))))
+
+(defn parse-file [file]
+  (parse-behaviors (-> (files/open-sync file)
+                       :content
+                       (safe-read file))
+                   file))

 (defn pprint-flat-behaviors [flat]
   (-> (reduce (fn [result cur]
@@ -145,7 +148,9 @@
                               ))
         ws-diff (:ws-behaviors @workspace/current-ws)
         final (if (and ws-diff (not (empty? ws-diff)))
-                (behavior-diff (safe-read ws-diff "workspace.behaviors") final)
+                (behavior-diff (parse-behaviors (safe-read ws-diff "workspace.behaviors")
+                                                "workspace.behaviors")
+                               final)
                 final)]
     (reset! object/negated-tags (or (:- final) {}))
     (reset! object/tags (or (:+ final) {}))))
@@ -279,10 +284,10 @@
           :reaction (fn [workspace old]
                       (let [old (:ws-behaviors old)
                             old (when-not (empty? old)
-                                  (reader/read-string old))
+                                  (parse-behaviors (reader/read-string old) "workspace.behaviors"))
                             neue (:ws-behaviors @workspace)
                             neue (when-not (empty? neue)
-                                   (reader/read-string neue))]
+                                   (parse-behaviors (reader/read-string neue) "workspace.behaviors"))]
                         (when old
                           (apply-diff (reverse-diff old))
                           (refresh-diffed old))


Recover from scrape errors

Recover from scrape errors

--- src/mars_ogler/scrape.clj
+++ src/mars_ogler/scrape.clj
@@ -232,9 +232,7 @@

 (defn setup-state!
   []
-  (->> (get-cached-images)
-    sort-images
-    (reset! sorted-images)))
+  (reset! sorted-images (sort-images (get-cached-images))))

 (defn update-states!
   [imgs]
@@ -243,10 +241,20 @@

 (defn scrape-loop!
   []
-  (loop [imgs (get-cached-images)]
-    (let [{:keys [new old all]} (fetch-tick imgs)]
-      (print-summary new all)
-      (when-not (empty? new)
-        (update-states! all))
-      (Thread/sleep (* 60 1000))
-      (recur all))))
+  (let [backup-imgs (atom (get-cached-images))]
+    (while true
+      (try (loop [imgs @backup-imgs]
+             (let [{:keys [new old all]} (fetch-tick imgs)]
+               (print-summary new all)
+               (when-not (empty? new)
+                 (update-states! all)
+                 (reset! backup-imgs all))
+               (Thread/sleep (* 60 1000))
+               (recur all)))
+        (catch Throwable err
+          (let [cause (.getCause err)
+                err-msg (str (.getMessage err)
+                             (and cause
+                                  (str " caused by: ") (.getMessage cause)))]
+            (println "Had some trouble in the scrape loop:" err-msg))
+          (Thread/sleep (* 60 1000)))))))


Only assign partitions with kafka/target-offset spec.

--- src/onyx/plugin/kafka.clj
+++ src/onyx/plugin/kafka.clj
@@ -1,14 +1,12 @@
 (ns onyx.plugin.kafka
-  (:require [onyx.compression.nippy :refer [zookeeper-compress zookeeper-decompress]]
-            [onyx.plugin.partition-assignment :refer [partitions-for-slot]]
+  (:require [onyx.plugin.partition-assignment :refer [partitions-for-slot]]
             [onyx.kafka.helpers :as h]
             [taoensso.timbre :as log :refer [fatal info]]
             [onyx.static.default-vals :refer [arg-or-default]]
             [onyx.plugin.protocols :as p]
             [onyx.static.util :refer [kw->fn]]
             [onyx.tasks.kafka]
-            [schema.core :as s]
-            [onyx.api])
+            [schema.core :as s])
   (:import [java.util.concurrent.atomic AtomicLong]
            [org.apache.kafka.clients.consumer ConsumerRecords ConsumerRecord]
            [org.apache.kafka.clients.consumer KafkaConsumer ConsumerRebalanceListener Consumer]
@@ -165,7 +163,9 @@
           key-deserializer (h/byte-array-deserializer)
           value-deserializer (h/byte-array-deserializer)
           consumer* (h/build-consumer consumer-config key-deserializer value-deserializer)
-          partitions (mapv :partition (h/partitions-for-topic consumer* topic))
+          partitions (mapv :partition
+                           (or (keys (:kafka/target-offsets task-map))
+                               (h/partitions-for-topic consumer* topic)))
           n-partitions (count partitions)]
       (check-num-peers-equals-partitions task-map n-partitions)
       (let [kpartitions* (assign-partitions-to-slot! consumer* task-map topic n-partitions (:onyx.core/slot-id event))]
@@ -178,7 +178,6 @@
       (.close consumer)
       (set! consumer nil))
     this)
-

   p/WatermarkedInput
   (watermark [this]
@@ -234,7 +233,8 @@
               part (.partition rec)]
           (.set watermark (max (.get watermark) (.timestamp rec)))

-          (cond (= :done deserialized) ;; TODO: Remove this in favor of target-offsets
+          ;; TODO: remove support for :done in favor of target-offsets
+          (cond (= :done deserialized)
                 (do (swap! drained assoc (.partition rec) :emitted)
                     nil)

@@ -255,7 +255,7 @@
         (do (set! iter (.iterator ^ConsumerRecords (.poll ^Consumer consumer remaining-ms)))
             nil)))))

-(defn read-messages [{:keys [onyx.core/task-map onyx.core/log-prefix onyx.core/monitoring] :as event}]
+(defn read-messages [{:keys [onyx.core/task-map onyx.core/log-prefix onyx.core/monitoring]}]
   (let [{:keys [kafka/topic kafka/deserializer-fn kafka/target-offsets]} task-map
         batch-timeout (arg-or-default :onyx/batch-timeout task-map)
         wrap-message? (or (:kafka/wrap-with-metadata? task-map) (:kafka/wrap-with-metadata? defaults))
@@ -371,7 +371,7 @@
   (onCompletion [_ v exception]
     (when exception (reset! e exception))))

-(defn write-messages [{:keys [onyx.core/task-map onyx.core/log-prefix] :as event}]
+(defn write-messages [{:keys [onyx.core/task-map onyx.core/log-prefix]}]
   (let [_ (s/validate onyx.tasks.kafka/KafkaOutputTaskMap task-map)
         brokers (or (:kafka/bootstrap-servers task-map) (find-brokers task-map))
         request-size (or (get task-map :kafka/request-size) (get write-defaults :kafka/request-size))


Adding method ignore.

Adding method ignore.

--- src/refac/core.clj
+++ src/refac/core.clj
@@ -1,55 +1,108 @@
 (ns refac.core
   (:gen-class)
   (use refac.io)
-  (use refac.java))
+  (use refac.java)
+  (:require [clojure.string :as s]))

-(defn ignore-to-eol [[first & others]]
-  (case first
-    ";" others
-    (recur others)))
+(defn ignore-to [[first & others] stop-at]
+  {:pre [(not (nil? first))]}
+  (if (= first stop-at) others
+    (recur others stop-at)))
+
+(defn nested-ignore-to [open close items]
+  (loop [items items
+         indent 1]
+
+    (let [[next & others] items
+          indent (+ indent
+                    (condp = next
+                      open   1
+                      close -1
+                      0))]
+      (if (= indent 0)
+        others
+        (do
+          (if (nil? items) (throw (IllegalArgumentException. "Did not find closing.")))
+          (recur others indent))))))
+
+(defn ignore-to-eol [items] (ignore-to items ";"))

 (defn do-package [items] [(ignore-to-eol items) {}])
 (defn do-import  [items] [(ignore-to-eol items) {}])

-(defn do-open-body [[first & others]]
-  (if-not (= first "{")
-    (throw (IllegalStateException. (str "Expected {, got " first)))
-    others))
+(defn do-method [items]
+  (->> (ignore-to items "{")
+       (nested-ignore-to "{" "}")))
+
+(defn do-assignment [items] (ignore-to-eol items))
+
+(declare do-declaration)

 (defn do-body [items]
-  (loop [[first & others] (do-open-body items)
-         indent 1]
-    (println first)
-    (when-not (= indent 0)
+  (let [[next & others] items]
+    (case next
+      "}" others
       (recur
-        others
-         (+ indent
-            (case first
-              "{"  1
-              "}" -1
-              0))
-        ))))
+        (let [[remaining _] (do-declaration items)]
+          remaining)))))

-(defn do-type [[first second & others]]
-  (let [info {:type first :name second}
-        remaining (case first
-                     "class" (do-body others))]
+(defn do-declaration-name [[name assignment & others]]
+  (let [info {:name name}
+        remaining (case assignment
+                    "{" (do-body others)
+                    "(" (do-method others)
+                    "=" (do-assignment others)
+                    ";" others)]
     [remaining info]))
+
+(defn do-generic-type [items]
+  (loop [items items
+         depth 1
+         generic "<"]
+    (let [[first & others] items]
+      (if-not (= depth 0)
+        (recur
+          others
+          (+ depth
+             (case first
+               "<"  1
+               ">" -1
+               0))
+          (str generic first))
+        [items generic]))))
+
+(defn do-declaration-type [items]
+  (let [[type generic-declaration & others] items
+        [remaining generic] (case generic-declaration
+                              "<" (do-generic-type others)
+                              nil)
+        has-generic (not (nil? generic))
+        remaining (if has-generic
+                    remaining
+                    (cons generic-declaration others))
+        type {:type (str type generic)}
+
+        [remaining info] (do-declaration-name remaining)]
+    [remaining (merge info type)]))
+
+(defn log [[remaining info]]
+  (println info)
+  [remaining info])

 (defn do-declaration [items]
   (let [[first & others] items
-        [visability [remaining info]]
-          (case first
-            ("public" "private" "protected" "internal") [first (do-type others)]
-            ["private" (do-type items)])]
-    [remaining (assoc info :visability visability)]))
+        declaration (case first
+                      ("public" "private" "protected" "internal") [first (do-declaration-type others)]
+                      ["private" (do-declaration-type items)])
+        [visability [remaining info]] declaration]
+
+    (log [remaining (merge info {:visability visability})])))

 (defn do-root [items]
   (loop [[items _] [items {}]]
-    (let [[first & others] items]
-      (println first)
+    (let [[next & others] items]
       (recur
-        (case first
+        (case next
           "package" (do-package others)
           "import"  (do-import others)
           (do-declaration items))))))
@@ -57,11 +110,4 @@
 (defn process-symbols [symbols]
   (do-root symbols))

-
-(defn -main
-  [& args]
-  (process-symbols
-    (get-symbol-stream)))
-
-
-
+(defn -main [] (process-symbols (get-symbol-stream)))


buffer isn't a dep for #'overtone.sc.synth

--- src/overtone/sc/synth.clj
+++ src/overtone/sc/synth.clj
@@ -10,7 +10,7 @@
         [overtone.music time]
         [overtone.sc.machinery.ugen fn-gen defaults common specs sc-ugen]
         [overtone.sc.machinery synthdef]
-        [overtone.sc server node buffer]
+        [overtone.sc server node]
         [overtone.helpers seq])
   (:require [overtone.at-at :as at-at]
             [overtone.util.log :as log]))


Type coercions for map-to (float), added map-to-double

--- src/rosado/processing.clj
+++ src/rosado/processing.clj
@@ -485,7 +485,10 @@
 ;; $$main

 (defn map-to [val istart istop ostart ostop]
-  (PApplet/map val istart istop ostart ostop))
+  (PApplet/map (float val) (float istart) (float istop) (float ostart) (float ostop)))
+
+(defn map-to-double [val istart istop ostart ostop]
+  (PApplet/map (double val) (double istart) (double istop) (double ostart) (double ostop)))

 (defn mask
   ([#^ints alpha-array] (.mask *applet* alpha-array)))


Added update-pixels

Added update-pixels

--- src/rosado/processing.clj
+++ src/rosado/processing.clj
@@ -785,7 +785,8 @@
 ;; $$unregisterPre
 ;; $$unregisterSize
 ;; $$update
-;; $$updatePixels
+
+(defn update-pixels [] (.updatePixels *applet*))

 (defn vertex
   ([x y] (.vertex *applet* (float x) (float y)))


document

document

--- src/voke/system/core.cljs
+++ src/voke/system/core.cljs
@@ -24,7 +24,12 @@

 (sm/defn system-to-tick-fn
   "Takes a System map, returns a function of [game-state publish-chan] -> game-state.
-  Basically takes a System map and turns it into something you can run every tick."
+  Basically takes a System map and turns it into something you can run every tick.
+
+  The job of a System-based tick function (found in a System's [:every-tick :fn]) is to take
+  a list of 'relevant' entities (defined by the System's [:every-tick :reads] set) as input,
+  and return a list of 'processed' entities as output. For instance, the movement system takes a list of
+  moving entities and returns a list of entities that have been nudged a bit in the direction they're pointing."
   [system :- System]
   (sm/fn [state :- GameState
           publish-chan]


changed to vectors in smush-chunk

changed to vectors in smush-chunk

--- src/xanny/quiz.clj
+++ src/xanny/quiz.clj
@@ -74,34 +74,47 @@
 (def pronunciation {:consonants {} :vowels {} :dipthongs {}})

 (def cases {:nom {:sg {1 {:fem "-a" :masc "-a"}
-                       2 {:masc "-us" :neut "-um"}}
+                       2 {:masc "-us" :neut "-um"}
+                       3 {:masc "" :fem "-us" :neut "-us"}}
                   :pl {1 {:fem "-ae" :masc "-ae"}
-                       2 {:masc "-i" :neut "-a"}}}
+                       2 {:masc "-i" :neut "-a"}
+                       3 {:masc "-es" :fem "-es" :neut "-a"}}}

             :gen {:sg {1 {:fem "-ae" :masc "-ae"}
-                       2 {:masc "-i" :neut "-i"}}
+                       2 {:masc "-i" :neut "-i"}
+                       3 {:masc "-is" :fem "-is" :neut "-is"}}
                   :pl {1 {:fem "-arum" :masc "-arum"}
-                       2 {:masc "-orum" :neut "-orum"}}}
+                       2 {:masc "-orum" :neut "-orum"}
+                       3 {:masc "-um" :fem "-um" :neut "-um"}}}

             :dat {:sg {1 {:fem "-ae" :masc "-ae"}
-                       2 {:masc "-o" :neut "-o"}}
+                       2 {:masc "-o" :neut "-o"}
+                       3 {:masc "-i" :fem "-i" :neut "-i"}}
                   :pl {1 {:fem "-is" :masc "-is"}
-                       2 {:masc "-is" :neut "-is"}}}
+                       2 {:masc "-is" :neut "-is"}
+                       3 {:masc "-ibus" :fem "-ibus" :neut "-ibus"}}}

             :acc {:sg {1 {:fem "-am" :masc "-am"}
-                       2 {:masc "-um" :neut "-um"}}
+                       2 {:masc "-um" :neut "-um"}
+                       3 {:masc "-em" :fem "-em" :neut "-em"}}
                   :pl {1 {:fem "-as " :masc "-as"}
-                       2 {:masc "-os" :neut "-a"}}}
+                       2 {:masc "-os" :neut "-a"}
+                       3 {:masc "-es" :fem "-es" :neut "-a"}}}

             :abl {:sg {1 {:fem "-a" :masc "-a"}
-                       2 {:masc "-o" :neut "-o"}}
+                       2 {:masc "-o" :neut "-o"}
+                       3 {:masc "-e" :fem "-e" :neut "-e"}}
                   :pl {1 {:fem "-is" :masc "-is"}
-                       2 {:masc "-is" :neut "-is"}}}
+                       2 {:masc "-is" :neut "-is"}
+                       3 {:masc "-ibus" :fem "-ibus" :neut "-ibus"}}}

+
             :voc {:sg {1 {:fem "-a" :masc "-a"}
-                       2 {:masc "-e" :neut "-um"}}
+                       2 {:masc "-e" :neut "-um"}
+                       3 {:masc "" :fem "-us" :neut "-us"}} ;the vocative is the same as nominative except for -us/-ius words
                   :pl {1 {:fem "-ae" :masc "-ae"}
-                       2 {:masc "-i" :neut "-a"}}}})
+                       2 {:masc "-i" :neut "-a"}
+                       3 {:masc "-es" :fem "-es" :neut "-a"}}}})

 (def vowels ["a" "e" "i" "o" "u"])


Upgrade boot-reload (#70)

Upgrade boot-reload (#70)

--- resources/leiningen/new/tenzing/build.boot
+++ resources/leiningen/new/tenzing/build.boot
@@ -3,7 +3,7 @@
  :resource-paths  #{"resources"}
  :dependencies '[[adzerk/boot-cljs          "1.7.228-1"  :scope "test"]
                  [adzerk/boot-cljs-repl     "0.3.0"      :scope "test"]
-                 [adzerk/boot-reload        "0.4.5"      :scope "test"]
+                 [adzerk/boot-reload        "0.4.8"      :scope "test"]
                  [pandeiro/boot-http        "0.7.2"      :scope "test"]
                  [com.cemerick/piggieback   "0.2.1"      :scope "test"]
                  [org.clojure/tools.nrepl   "0.2.12"     :scope "test"]


Add lein-try

Add lein-try

--- profiles.clj
+++ profiles.clj
@@ -1,2 +1,3 @@
-{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"] ]
+{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]
+                  [lein-try "0.4.3"]]
         :dependencies [[org.clojure/tools.nrepl "0.2.10"]]}}


fix form-key typo

fix form-key typo

--- server/src/spacon/components/form/core.clj
+++ server/src/spacon/components/form/core.clj
@@ -58,7 +58,7 @@
                                    "/config/update"
                                    (scm/map->SCMessage
                                     {:action (.value SCCommand/CONFIG_REMOVE_FORM)
-                                     :payload {:form-key: form-key}}))
+                                     :payload {:form-key form-key}}))
         (response/ok (str "Deleted form " form-key)))
       (response/error (str "Error Deleting Form:" form-key)))))


First cut of working datastore queries.

First cut of working datastore queries.

--- src/appengine_magic/services/datastore.clj
+++ src/appengine_magic/services/datastore.clj
@@ -2,6 +2,7 @@
   (:import [com.google.appengine.api.datastore DatastoreService DatastoreServiceFactory
             Key KeyFactory KeyRange
             Entity
+            FetchOptions$Builder
             Query Query$FilterOperator Query$SortDirection]))

@@ -162,9 +163,9 @@
          (save!-helper this# ~kind :parent parent#)))))

-;;; Note that the code relies on the API's implicit transaction tracking, and
-;;; the *current-transaction* value is not used. Making it available just in
-;;; case.
+;;; Note that the code relies on the API's implicit transaction tracking
+;;; wherever possible, but the *current-transaction* value is still used for
+;;; query construction.
 (defmacro with-transaction [& body]
   `(binding [*current-transaction* (.beginTransaction (get-datastore-service))]
      (try
@@ -176,8 +177,7 @@
              (throw err#))))))

-(defn query [& {:keys [kind ancestor filter sort keys-only]
-                :or {keys-only false, filter [[]], sort [[]]}}]
+(defn- make-query-object [kind ancestor filter sort keys-only]
   (let [kind (cond (nil? kind) kind
                    (string? kind) kind
                    (extends? EntityProtocol kind) (unqualified-name kind)
@@ -225,3 +225,29 @@
        ;; invalid sort
        :else (throw (RuntimeException. "invalid sort specified in query"))))
     query-object))
+
+
+(defn query [& {:keys [kind ancestor filter sort keys-only
+                       count-only? in-transaction?
+                       limit offset
+                       start-cursor end-cursor ; TODO: Implement this.
+                       prefetch-size chunk-size]
+                :or {keys-only false, filter [[]], sort [[]],
+                     count-only? false, in-transaction? false}}]
+  (let [query-object (make-query-object kind ancestor filter sort keys-only)
+        fetch-options-object (FetchOptions$Builder/withDefaults)]
+    (when limit
+      (.limit fetch-options-object limit))
+    (when offset
+      (.offset fetch-options-object offset))
+    (when prefetch-size
+      (.prefetchSize prefetch-size))
+    (when chunk-size
+      (.chunkSize chunk-size))
+    (let [prepared-query (if (and in-transaction? *current-transaction*)
+                             (.prepare (get-datastore-service) *current-transaction*
+                                       query-object)
+                             (.prepare (get-datastore-service) query-object))]
+      (if count-only?
+          (.countEntities prepared-query)
+          (seq (.asIterable prepared-query fetch-options-object))))))


Changed the name of the datastore entity name override parameter to match the documentation: :kind.

--- src/appengine_magic/services/datastore.clj
+++ src/appengine_magic/services/datastore.clj
@@ -65,7 +65,7 @@
          :else v)))

-(defn get-key-object-helper [entity-record key-property datastore-entity-name &
+(defn get-key-object-helper [entity-record key-property kind &
                              {:keys [parent]}]
   (let [entity-record-metadata (meta entity-record)
         metadata-key-value (when entity-record-metadata (:key entity-record-metadata))
@@ -81,21 +81,21 @@
      ;; key property exists
      (not (nil? key-property-value))
      (if parent
-         (KeyFactory/createKey (get-key-object parent) datastore-entity-name key-property-value)
-         (KeyFactory/createKey datastore-entity-name key-property-value))
+         (KeyFactory/createKey (get-key-object parent) kind key-property-value)
+         (KeyFactory/createKey kind key-property-value))
      ;; something's wrong
      :else (throw (RuntimeException.
                    "entity has no valid :key metadata, and has no fields marked :key")))))

-(defn save!-helper [entity-record datastore-entity-name &
+(defn save!-helper [entity-record kind &
                     {:keys [parent]}]
   (let [key-object (if parent
                        (get-key-object entity-record parent)
                        (get-key-object entity-record))
         entity (if key-object
                    (Entity. key-object)
-                   (Entity. datastore-entity-name))]
+                   (Entity. kind))]
     (doseq [[property-kw value] entity-record]
       (let [property-name (.substring (str property-kw) 1)]
         (.setProperty entity property-name (coerce-clojure-type value))))
@@ -103,13 +103,13 @@

 (defn retrieve [entity-record-type key-value &
-                {:keys [parent datastore-entity-name]
-                 :or {datastore-entity-name (unqualified-name (.getName entity-record-type))}}]
+                {:keys [parent kind]
+                 :or {kind (unqualified-name (.getName entity-record-type))}}]
   (let [key-object (if parent
                        (KeyFactory/createKey (get-key-object parent)
-                                             datastore-entity-name
+                                             kind
                                              (coerce-key-value-type key-value))
-                       (KeyFactory/createKey datastore-entity-name
+                       (KeyFactory/createKey kind
                                              (coerce-key-value-type key-value)))
         entity (.get (get-datastore-service) key-object)
         raw-properties (into {} (.getProperties entity))
@@ -128,20 +128,20 @@

 (defmacro defentity [name properties &
-                     {:keys [datastore-entity-name]
-                      :or {datastore-entity-name (unqualified-name name)}}]
+                     {:keys [kind]
+                      :or {kind (unqualified-name name)}}]
   (let [key-property-name (first (filter #(= (:tag (meta %)) :key) properties))
         key-property (if key-property-name (keyword (str key-property-name)) nil)]
     `(defrecord ~name ~properties
        EntityProtocol
        (get-key-object [this#]
-         (get-key-object-helper this# ~key-property ~datastore-entity-name))
+         (get-key-object-helper this# ~key-property ~kind))
        (get-key-object [this# parent#]
-         (get-key-object-helper this# ~key-property ~datastore-entity-name :parent parent#))
+         (get-key-object-helper this# ~key-property ~kind :parent parent#))
        (save! [this#]
-         (save!-helper this# ~datastore-entity-name))
+         (save!-helper this# ~kind))
        (save! [this# parent#]
-         (save!-helper this# ~datastore-entity-name :parent parent#)))))
+         (save!-helper this# ~kind :parent parent#)))))

 ;;; Note that the code relies on the API's implicit transaction tracking, and


removed id from task name

removed id from task name

--- src/clj/swarmpit/docker/mapper/inbound.clj
+++ src/clj/swarmpit/docker/mapper/inbound.clj
@@ -42,8 +42,8 @@
         slot (get task :Slot)
         id (get task :ID)
         task-name (if (= "replicated" service-mode)
-                    (str service-name "." slot "." id)
-                    (str service-name "." id))]
+                    (str service-name "." slot)
+                    service-name)]
     (array-map
       :id id
       :taskName task-name


cleanup

cleanup

--- src/cljs/iwaswhere_web/ui/entry/story.cljs
+++ src/cljs/iwaswhere_web/ui/entry/story.cljs
@@ -68,12 +68,6 @@
         stories (reaction (:stories @options))
         ts (:timestamp entry)
         new-entries (subscribe [:new-entries])
-        select-handler
-        (fn [ev]
-          (let [selected (js/parseInt (-> ev .-nativeEvent .-target .-value))
-                updated (-> (get-in @new-entries [ts])
-                            (assoc-in [:linked-story] selected))]
-            (put-fn [:entry/update-local updated])))
         select-story (fn [story-id]
                        (let [updated (-> (get-in @new-entries [ts])
                                          (assoc-in [:linked-story] story-id))]


rest autocomplete components

rest autocomplete components

--- src/cljs/material/component/composite.cljs
+++ src/cljs/material/component/composite.cljs
@@ -24,9 +24,38 @@
                     :backspaceRemovesValue true}
                    (dissoc p :inputRef))])))

+(defn autocomplete-no-options-mssg [props]
+  (let [{:keys [innerProps children]} (keywordize-keys (js->clj props))]
+    (cmp/typography
+      (merge innerProps
+             {:color "textSecondary"
+              :style {:padding "8px 16px"}}) children)))
+
+(defn autocomplete-placeholder [props]
+  (let [{:keys [innerProps children]} (keywordize-keys (js->clj props))]
+    (cmp/typography
+      (merge innerProps
+             {:color "textSecondary"
+              :style {:position "absolute"
+                      :left     2
+                      :fontSize 16
+                      :padding  "10px 15px"}}) children)))
+
 (defn autocomplete-single-value [props]
   (let [{:keys [innerProps children]} (keywordize-keys (js->clj props))]
-    (cmp/typography innerProps children)))
+    (cmp/typography
+      (merge innerProps
+             {:style {:fontSize 16}}) children)))
+
+(defn autocomplete-menu [props]
+  (let [{:keys [innerProps]} (keywordize-keys (js->clj props))]
+    (cmp/paper
+      (merge innerProps
+             {:style {:position  "absolute"
+                      :zIndex    1
+                      :marginTop 8
+                      :left      0
+                      :right     0}}) (goog.object/get props "children"))))

 (defn autocomplete-value-container [props]
   (html
@@ -40,10 +69,6 @@

 (defn autocomplete-control [props]
   (let [{:keys [innerRef innerProps children selectProps]} (keywordize-keys (js->clj props))]
-
-    (js/console.log selectProps)
-
-
     (cmp/text-field
       (merge (:textFieldProps selectProps)
              {:fullWidth  true
@@ -52,7 +77,7 @@
               :InputProps {:inputComponent autocomplete-input
                            :inputProps     (merge innerProps
                                                   {:style    {:display "flex"
-                                                              :padding "10px 5px"}
+                                                              :padding "10px 15px"}
                                                    :inputRef innerRef
                                                    :children children})}}))))

@@ -70,8 +95,10 @@
     {}
     (cmp/react-select
       (merge props
-             {:components {:Control        autocomplete-control
-                           :Option         autocomplete-option
-                           :ValueContainer autocomplete-value-container
-                           :SingleValue    autocomplete-single-value
-                           }}))))+             {:components {:Control          autocomplete-control
+                           :Option           autocomplete-option
+                           :ValueContainer   autocomplete-value-container
+                           :SingleValue      autocomplete-single-value
+                           :Placeholder      autocomplete-placeholder
+                           :NoOptionsMessage autocomplete-no-options-mssg
+                           :Menu             autocomplete-menu}}))))


fix NPE (create title)

fix NPE (create title)

--- src/clojure/com/zensol/cisql/db_access.clj
+++ src/clojure/com/zensol/cisql/db_access.clj
@@ -53,10 +53,10 @@
   ([{user? :user?}]
    (let [{user :user url :url} (db-info)]
      (format "%s%s"
-             (if user?
+             (if (and user? user)
                (str (second (re-find #"^(.*)@.*$" user)) "@")
                "")
-             (second (re-find #"jdbc:.*?://(.*)$" url))))))
+             (or (second (re-find #"jdbc:.*?://?(.*?)$" url)) url)))))

 (defn set-db-spec [spec]
   (reset! dbspec spec))


refactor(model.connection-test): rename test for clarity

--- test/busa_server/model/connection_test.clj
+++ test/busa_server/model/connection_test.clj
@@ -44,7 +44,7 @@
   (fact "should delete all connections"
     (c/delete-all) => (contains {:deleted (count fixtures/connections)}))

-  (fact "should find connections by from and to places"
+  (fact "should find connections by from-to places"
     (c/find-by-from-to p/nummela p/helsinki) => [fixtures/connection-nla-hki])

 )


Check if iterator has moved before descending into child

--- src/aurora/btree.cljs
+++ src/aurora/btree.cljs
@@ -254,7 +254,7 @@
               (set! ix 0)
               #js [(aget (.-keys node) ix) (aget (.-vals node) ix)]))))
   (seek [this key]
-        (loop []
+        (loop [moved? false]
           (when (false? end?)
             (let [upper (.-upper node)]
               (if (lt upper key)
@@ -262,18 +262,19 @@
                   (do
                     (set! ix (.-parent-ix node))
                     (set! node (.-parent node))
-                    (recur))
+                    (recur true))
                   (do
                     (set! end? true)
                     nil))
-                (loop []
+                (loop [moved? moved?]
                   (set! ix (.seek node key ix))
                   (if (>= ix (alength (.-keys node)))
                     (do
                       (set! node (aget (.-children node) ix))
                       (set! ix 0)
-                      (recur))
-                    (if (or (== key (aget (.-keys node) ix))
+                      (recur true))
+                    (if (or (not moved?)
+                            (== key (aget (.-keys node) ix))
                             (nil? (.-children node))
                             (let [lower (.-upper (aget (.-children node) ix))]
                               (lt lower key)))
@@ -281,7 +282,7 @@
                       (do
                         (set! node (aget (.-children node) ix))
                         (set! ix 0)
-                        (recur)))))))))))
+                        (recur true)))))))))))

 (defn iterator [tree]
   (loop [node (.-root tree)]
@@ -439,10 +440,6 @@
                  movements (gen/vector gen-movement)]
                 (run-iterator-prop min-keys actions movements)))

-(run-iterator-prop 1 [[:assoc! 0 0] [:assoc! 1 0] [:assoc! "" 0]] [[:next] [:next] [:seek 0]])
-
-;; (run-iterator-prop 4 [[:dissoc! 42] [:dissoc! 5] [:assoc! "ls-[`6aH|B" 42] [:assoc! "U?cj$9\\z)#oM34=^q~{C!^2=,|9+`er<^.;&" 28] [:assoc! 39 -24] [:assoc! 35 "<hlNVmw$iuLQ\\OoTocIj1$0ey<gI]MFe{~QL}j4sA"] [:assoc! "<~2zx)<'`=:W^" "k6+h%O!hprN66}~:2w"] [:dissoc! -19] [:assoc! -8 "p"] [:dissoc! "M/oCnKtZ4da<kZ.:!9"] [:assoc! -43 ".P(t8Qrw&vkf!b=XVZRmQHO#s/`*gp<ptU ZJ;O`HCDs _Z7tKCj/pU"] [:dissoc! "P&gv~dExsi8!oC!k}%,Kp=3^F;M1xv\\jUJADsE/N+3P/- ]7\\2-x8Tg4q7gQ>O(_"] [:assoc! 46 "G-vqh1ho1rP V}|U`QIfd$^S8eqUOa+\"_]^"] [:assoc! -21 "z$mOg%pS!K+*1c83?I$]dt>t{}:`5LXIfh|c#rHD,0n0;J^n{k"] [:dissoc! -25] [:dissoc! "k1n!Tk|'<Vd`hh<LDg6b*W'yy\\8/*D8:|bC-$ZT:"] [:dissoc! -53] [:assoc! 5 "1YxP6gc~2z"] [:dissoc! "=B.N\\MGcrb]xmG=E6tl6uRuL$L"] [:assoc! -23 "d7)>77Y5!w*/o5ZzrkKRh@Y\\<LS%Lx1`P(mi^g;CtKwq=m3otO@?((Ts'Z+~"] [:assoc! -9 -50] [:dissoc! 35] [:assoc! -49 "XBtp;FwWolcsLFP=xqKH28{er7Pe: b"] [:dissoc! "xtv<<Ox@PuHA(Bxp1nz{B.pE"]] [[:seek -18] [:seek -10] [:seek 37] [:seek "/Bpk}b*\\ubgU4ygT(P.Dw{(g(+# 2M2{(A5,}L]^KVTmS{:qT3}&<`1,j<9Ino"] [:seek 0] [:seek "<$?Oj'&Z$%I45PQ_d"] [:next] [:seek "C\"|LbCx)Nfq]_=rpHOQlL;L$"] [:next] [:seek "JV\"WZVE,`"] [:seek "3<sb\\l5rj'Prv,E]|f=GADJTFl{37P9Hd9~ vaG^YJwWk9At):yzo'DW}Q.z8?"] [:next] [:next] [:next] [:seek ")U+owBxdsR}^{65[?ovtiQO.A<,S@Y1EIxJH_`!@A2%"] [:next] [:seek -9] [:next] [:next] [:seek "^FGwOMy0\"_5vT(--dv`;:kywuKD8SMG_9)X'pX6w"] [:next] [:seek -52] [:seek -25] [:seek 34] [:next] [:seek "hz^rHA%v! (g~b3eL|XHB>'2mY9A\"uMa9$z'3.X_s9faCq["] [:seek "Wzyzi.uuK?rp#k[|M^NI:L)nh&"] [:seek -63] [:next] [:next] [:seek "P$I'|"] [:next] [:seek "A@:N^g]\\qXB:."] [:seek -2] [:next] [:seek "uH6<0u[rpc]8oUcmED"] [:seek -36] [:next] [:seek "<2%43s;qEJSN^WfQ5=b03/.<?E_SA5Cd~ZHp}jCVWR$q\"E:/?Om,]{D-n"] [:next]])
-
 (comment
   (dc/quick-check 1000 least-prop)
   (dc/quick-check 1000 greatest-prop)
@@ -451,10 +448,12 @@
   (dc/quick-check 1000 transitive-prop)
   (dc/quick-check 1000 anti-symmetric-prop)
   (dc/quick-check 1000 total-prop)
-  (dc/quick-check 100 (building-prop gen-assoc))
-  (dc/quick-check 100 (building-prop gen-action))
-  (dc/quick-check 100 (lookup-prop gen-action))
-  (dc/quick-check 100 iterator-prop)
+  (dc/quick-check 500 (building-prop gen-assoc))
+  (dc/quick-check 500 (building-prop gen-action))
+  ;; cljs.core.pr_str(cemerick.double_check.quick_check(1000, aurora.btree.building_prop(aurora.btree.gen_action)))
+  (dc/quick-check 500 (lookup-prop gen-action))
+  (dc/quick-check 500 iterator-prop)
+  ;; cljs.core.pr_str(cemerick.double_check.quick_check(1000, aurora.btree.iterator_prop)

   (defn f []


Add model/identity function to easilty access current username.

--- src/cadence/model.clj
+++ src/cadence/model.clj
@@ -1,7 +1,9 @@
 (ns cadence.model
+  (:refer-clojure :exclude [identity])
   (:require [monger.core :as mg]
             [monger.collection :as mc]
-            [cadence.model.validators :as is-valid])
+            [cadence.model.validators :as is-valid]
+            [cemerick.friend :as friend])
   (:use clojure.walk
         [cemerick.friend.credentials :only [hash-bcrypt]]))

@@ -26,5 +28,7 @@
   (if (is-valid/user? user)
     (mc/save "users" (assoc user :password (hash-bcrypt (:password user))))))

+(def identity #(get friend/*identity* :current))
+
 (defn get-phrase []
   "passwords are so completely last decade")


* src/clj/cljs/core.clj: CLJS-88: bug in javascript generated by condp

--- src/clj/cljs/core.clj
+++ src/clj/cljs/core.clj
@@ -34,7 +34,7 @@
                  :imported)))

 (import-macros clojure.core
- [-> ->> ..  and assert comment cond condp
+ [-> ->> ..  and assert comment cond
   declare defn defn-
   doto
   extend-protocol fn for
@@ -397,6 +397,48 @@
             (fn [[k v]] (list 'set! k v))
             resets))))))

+(defmacro condp
+  "Takes a binary predicate, an expression, and a set of clauses.
+  Each clause can take the form of either:
+
+  test-expr result-expr
+
+  test-expr :>> result-fn
+
+  Note :>> is an ordinary keyword.
+
+  For each clause, (pred test-expr expr) is evaluated. If it returns
+  logical true, the clause is a match. If a binary clause matches, the
+  result-expr is returned, if a ternary clause matches, its result-fn,
+  which must be a unary function, is called with the result of the
+  predicate as its argument, the result of that call being the return
+  value of condp. A single default expression can follow the clauses,
+  and its value will be returned if no clause matches. If no default
+  expression is provided and no clause matches, an
+  IllegalArgumentException is thrown."
+  {:added "1.0"}
+
+  [pred expr & clauses]
+  (let [gpred (gensym "pred__")
+        gexpr (gensym "expr__")
+        emit (fn emit [pred expr args]
+               (let [[[a b c :as clause] more]
+                       (split-at (if (= :>> (second args)) 3 2) args)
+                       n (count clause)]
+                 (cond
+                  (= 0 n) `(throw (js/Error. (str "No matching clause: " ~expr)))
+                  (= 1 n) a
+                  (= 2 n) `(if (~pred ~a ~expr)
+                             ~b
+                             ~(emit pred expr more))
+                  :else `(if-let [p# (~pred ~a ~expr)]
+                           (~c p#)
+                           ~(emit pred expr more)))))
+        gres (gensym "res__")]
+    `(let [~gpred ~pred
+           ~gexpr ~expr]
+       ~(emit gpred gexpr clauses))))
+
 (defmacro try
   "(try expr* catch-clause* finally-clause?)


only fire :leave-play of a forfeited agenda if it came from Corp score area

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -124,7 +124,7 @@
        (when (or (and (= (:side card) "Runner") (:installed card))
                  (:rezzed card)
                  (= (first (:zone card)) :current)
-                 (= (first (:zone card)) :scored))
+                 (not (empty? (filter #(= (:cid card) (:cid %)) (get-in @state [:corp :scored])))))
          (leave-effect state side card nil)))
      (when-let [prevent (:prevent (card-def card))]
        (doseq [[ptype pvec] prevent]


add panel footer default

add panel footer default

--- src/clj/hsm/views.clj
+++ src/clj/hsm/views.clj
@@ -18,18 +18,18 @@
     content])

 (defhtml panelx
-  ([header body-css & content ]
+  ([header footer body-css & content ]
     (let [panel-body-css (s/join " "
                             (conj (set body-css) "panel-body"))]
       [:div.panel.panel-default
         [:div.panel-heading header]
         [:div {:class panel-body-css}
           content]
-        [:div.panel-footer "Footer"]])))
+        [:div.panel-footer footer]])))

 (defhtml panel
   [header & content]
-    (panelx header ["panel-body"] content))
+    (panelx header "" ["panel-body"] content))

 (defhtml languages-pane
   []


oops, bugfix

oops, bugfix

--- src/clj/tictag/db.clj
+++ src/clj/tictag/db.clj
@@ -79,7 +79,7 @@
 (defn sleepy-pings
   "Return the most recent contiguous set of pings marked :afk in the database"
   [{db :db}]
-  (->> ["select * from pings order by timestamp desc limit 100"]
+  (->> ["select * from pings order by ts desc limit 100"]
        (get-pings db)
        (drop-while (comp not :afk :tags))
        (take-while (comp :afk :tags))))


Better cli args parsing

Better cli args parsing

--- src/clj_crud/main.clj
+++ src/clj_crud/main.clj
@@ -8,7 +8,8 @@

 (defn -main [& args]
   (info "Running main with args: " args)
-  (let [port (Long/parseLong (first args))
+  (let [port (try (Long/parseLong (first args))
+                  (catch Exception _ -1))
         _ (assert (pos? port) (str "Something is wrong with the port argument: " (first args)))
         database-url (let [db-url (second args)]
                        (assert (.startsWith db-url "postgres:")


Allow requests to have multiple headers with the same name.

To make a request with multiple same named headers, use a collection
for the value.

(http/get url {:debug true :headers {"x-myheader" ["value1" "value2"]}})

...
HttpRequest:
{...
 :allHeaders
 [...
  #<BasicHeader x-myheader: value1>,
  #<BasicHeader x-myheader: value2>],
 ...}

--- src/clj_http/core.clj
+++ src/clj_http/core.clj
@@ -211,7 +211,10 @@
       (when (instance? SingleClientConnManager conn-mgr)
         (.addHeader http-req "Connection" "close"))
       (doseq [[header-n header-v] headers]
-        (.addHeader http-req header-n header-v))
+        (if (coll? header-v)
+          (doseq [header-vth header-v]
+            (.addHeader http-req header-n header-vth))
+          (.addHeader http-req header-n header-v)))
       (if multipart
         (.setEntity #^HttpEntityEnclosingRequest http-req
                     (mp/create-multipart-entity multipart))


Disable board after game finishes

Disable board after game finishes

--- src/cljs/ji/main.cljs
+++ src/cljs/ji/main.cljs
@@ -135,6 +135,7 @@

               (instance? msg/GameFinishMessage msg)
               (let [{:keys [game]} msg]
+                (>! board-state :disable)
                 (<! (go-game-summary container msg))
                 (close! board-state)
                 (close! player-state)


fix upload after download

fix upload after download

--- src/cljs/sm/core.cljs
+++ src/cljs/sm/core.cljs
@@ -127,12 +127,13 @@
           (let [query (-> query
                           (assoc :download result)
                           (notify :download) <!
-                          (p-download) <?
-                          (notify :downloaded) <!)]
+                          (p-download) <?)]
             (sm/cache-store! cache (<? (gen-cache-key query
                                                       (:view-path query)
                                                       (get-in query [:download :source]))))
-            (<! (p-upload-local-subtitles query notify)))
+            (-> query
+                (p-upload-local-subtitles notify) <?
+                (notify :downloaded) <!))
           (<! (notify query :not-found))))
       (<! (notify query :unchanged)))))


Add public api for obtain the current schema.

--- src/continuo/core.clj
+++ src/continuo/core.clj
@@ -53,6 +53,12 @@
   [conn schema]
   (impl/-run-schema conn schema))

+(defn get-schema
+  "Get the current schema."
+  [conn]
+  (let [schema (impl/-get-schema conn)]
+    (set (vals @schema))))
+
 (comment
   (def uri "pgsql://localhost:5432/foobar?dbname=test")


Fixed whereis-path

Fixed whereis-path

--- src/demogorgon/nh.clj
+++ src/demogorgon/nh.clj
@@ -243,7 +243,7 @@
   (let [player (sanitize-nick (if (= (second match) "")
                               (:nick (:prefix object))
                               (second match)))
-        filename (str "/opt/unnethack/var/unnethack/" player ".whereis")]
+        filename (str "/opt/nethack.nu/var/unnethack/" player ".whereis")]
     (if (not (.exists (File. filename)))
       (str player " doesn't seem to have played here yet.")
       (let [whereis (File. filename)]


Remove layout from parse-defaults.

Remove layout from parse-defaults.

--- src/incise/config.clj
+++ src/incise/config.clj
@@ -7,8 +7,7 @@
   (:refer-clojure :exclude [reset! load assoc! get get-in]))

 (def ^:private default-config
-  {:parse-defaults {:layout :base
-                    :publish true}
+  {:parse-defaults {:publish true}
    :ignore-publish false
    :in-dir "content"
    :uri-root ""


incr/decr on array

incr/decr on array

--- src/latte_compiler/static_analysis.clj
+++ src/latte_compiler/static_analysis.clj
@@ -623,7 +623,7 @@
     ))

 (defn- annotate-incr
-  [vars location eident key]
+  [glob-state vars location eident key]
   (match eident
     [:vident name]
     (domonad phase-m
@@ -635,6 +635,16 @@
       [[type num] (lookup-var vars [:ident name] location)
        res (check-types [:int] type [vars (with-type [key [:ident num]] [:int])] location)]
       res)
+    [:aident nident iexpr]
+    (domonad phase-m
+      [[vars1 neident] (annotate-expr glob-state vars nident)
+       [vars2 nexpr] (annotate-expr glob-state vars1 iexpr)
+       etype (m-result [:int])
+       idtype (m-result (get-type neident))
+       tmp (check-types [:atype etype] idtype "ok" location)
+       tmp2 (check-types [:int] (get-type nexpr) "ok" location)]
+      [vars2 (with-type [key [:fident neident [:eadd [:elitint 1] [:plus] nexpr]]] etype)]
+      )
     ))

 (defn- annotate-code
@@ -662,8 +672,8 @@
               res (check-types type (get-type expr) [nvars (with-type [:ret expr] (get-type expr))] location)
               ]
              res)
-      :incr (annotate-incr vars location (second code) :incr)
-      :decr (annotate-incr vars location (second code) :decr)
+      :incr (annotate-incr glob-state vars location (second code) :incr)
+      :decr (annotate-incr glob-state vars location (second code) :decr)
       :decl (domonad phase-m
               [type (m-result (second code))
                decls (m-result (rest (rest code)))


Update dependencies: clojurescript, ring, compojure, cljsbuild, environ

--- src/leiningen/new/chestnut/project.clj
+++ src/leiningen/new/chestnut/project.clj
@@ -7,16 +7,17 @@
   :source-paths ["src/clj" "src/cljs"]

   :dependencies [[org.clojure/clojure "1.6.0"]
-                 [org.clojure/clojurescript "0.0-2311"]
-                 [ring "1.2.2"]
-                 [compojure "1.1.8"]
+                 [org.clojure/clojurescript "0.0-2342"]
+                 [ring "1.3.1"]
+                 [compojure "1.1.9"]
                  [enlive "1.1.5"]
                  [om "0.7.1"]
                  [figwheel "0.1.4-SNAPSHOT"]
-                 [environ "0.5.0"]]
+                 [environ "1.0.0"]]

   :plugins [[com.cemerick/austin "0.1.5-SNAPSHOT"]
-            [lein-cljsbuild "1.0.3"]]
+            [lein-cljsbuild "1.0.3"]
+            [lein-environ "1.0.0"]]

   :min-lein-version "2.0.0"


Upgrade cider/piggieback to 0.4.1

Upgrade cider/piggieback to 0.4.1

--- src/leiningen/new/re_frame/project.clj
+++ src/leiningen/new/re_frame/project.clj
@@ -47,7 +47,7 @@
                    [day8.re-frame/re-frame-10x "0.4.0"]
                    [day8.re-frame/tracing "0.5.1"]{{/10x?}}{{#cider?}}
                    [figwheel-sidecar "0.5.18"]
-                   [cider/piggieback "0.3.5"]{{/cider?}}{{#re-frisk?}}
+                   [cider/piggieback "0.4.1"]{{/cider?}}{{#re-frisk?}}
                    [re-frisk "0.5.4.1"]{{/re-frisk?}}]

     :plugins      [[lein-figwheel "0.5.18"]{{#test?}}