Fix the client tests

Fix the client tests

--- test/picard/test/client.clj
+++ test/picard/test/client.clj
@@ -35,12 +35,13 @@

 (defcoretest receiving-a-chunked-body
   [ch1 ch2]
-  (deftrackedapp [upstream request]
-    (upstream :response [200 {"transfer-encoding" "chunked"} :chunked])
-    (upstream :body "Hello")
-    (upstream :body "World")
-    (upstream :done nil)
-    (fn [_ _]))
+  (deftrackedapp [downstream]
+    (fn [evt val]
+      (when (= :request evt)
+        (downstream :response [200 {"transfer-encoding" "chunked"} :chunked])
+        (downstream :body "Hello")
+        (downstream :body "World")
+        (downstream :done nil))))

   (client/request
    ["localhost" 4040]
@@ -91,9 +92,10 @@

 (defcoretest simple-keep-alive-requests
   [_ ch2]
-  (deftrackedapp [upstream request]
-    (upstream :response [200 {"content-length" "5"} "Hello"])
-    (fn [_ _]))
+  (deftrackedapp [downstream]
+    (fn [evt val]
+      (when (= :request evt)
+        (downstream :response [200 {"content-length" "5"} "Hello"]))))

   (client/request
    ["localhost" 4040]
@@ -141,12 +143,13 @@

 (defcoretest issuing-pause-resume
   [_ ch2 ch3]
-  (fn [resp req]
-    (resp :response [200 {"transfer-encoding" "chunked"} :chunked])
-    (resp :body "Hello")
-    (resp :body "World")
-    (resp :done nil)
-    (fn [_ _] true))
+  (fn [downstream]
+    (fn [evt val]
+      (when (= :request evt)
+        (downstream :response [200 {"transfer-encoding" "chunked"} :chunked])
+        (downstream :body "Hello")
+        (downstream :body "World")
+        (downstream :done nil))))

   (let [upstream
         (client/request
@@ -175,11 +178,12 @@

 (defcoretest telling-the-application-to-chill-out
   [_ ch2 ch3]
-  (fn [resp req]
-    (resp :response [200 {"content-length" "5"} "Hello"])
-    (resp :pause nil)
-    (receive-all ch3 (fn [_] (resp :resume nil)))
-    (fn [evt val] true))
+  (fn [downstream]
+    (fn [evt val]
+      (when (= :request evt)
+        (downstream :response [200 {"content-length" "5"} "Hello"])
+        (downstream :pause nil)
+        (receive-all ch3 (fn [_] (downstream :resume nil))))))

   (let [latch (atom true)]
     (client/request
@@ -232,11 +236,12 @@

 (defcoretest handling-100-continue-requests-and-responses
   [ch1 ch2]
-  (deftrackedapp [upstream request]
-    (upstream :response [100])
-    (fn [evt val]
+  (deftrackedapp [downstream]
+    (fn [evt val]
+      (when (= :request evt)
+        (downstream :response [100]))
       (when (= :done evt)
-        (upstream
+        (downstream
          :response
          [200 {"content-length" "5" "connection" "close"} "Hello"]))))


pulling in initial data from core

pulling in initial data from core

--- src/nonaga/react.cljs
+++ src/nonaga/react.cljs
@@ -22,28 +22,6 @@
 (defn render-component [component node]
   (.renderComponent js/React component node))
 ; --- end react stuff ---
-
-(def rings
-  #{   [1 4] [2 4] [3 4]
-     [0 3] [1 3] [2 3] [3 3]
-   [0 2] [1 2] [2 2] [3 2] [4 2]
-     [0 1] [1 1] [2 1] [3 1]
-       [1 0] [2 0] [3 0]})
-
-(def reds
-  #{   [1 4]
-
-                           [4 2]
-
-       [1 0]})
-
-
-(def blues
-  #{               [3 4]
-
-   [0 2]
-
-                   [3 0]})

 (defn hex-coord->svg-coord [[hex-x hex-y]]
   (let [x (+ 20 (* 40 hex-x) (if (odd? hex-y) 20 0))
@@ -71,8 +49,8 @@
   (create-class
     "render" (fn []
                (svg {}
-                    (clj->js (draw-rings rings))))))
+                    (clj->js (draw-rings (:rings n/initial-game)))))))

 (defn start []
-  (render-component (board (js-obj "rings" rings)) (sel1 :#content)))
+  (render-component (board) (sel1 :#content)))


don't pull in clojure.core fns that will be overridden by ugen fns (rand + * - / bit-not >= <= mod)

--- src/overtone/live.clj
+++ src/overtone/live.clj
@@ -1,4 +1,5 @@
 (ns overtone.live
+  (:refer-clojure :exclude (rand + * - / bit-not >= <= mod))
   (:require midi osc byte-spec
             clojure.stacktrace
             (overtone.core config time-utils log sc ugen synth synthdef envelope sample)
@@ -10,7 +11,7 @@
 ;   (immigrate 'overtone.instruments)
 (defn immigrate
  "Create a public var in this namespace for each public var in the
- namespaces named by ns-names. The created vars have the same name, value,
+ namespaces named by ns-names. The created vars have the same name, value
  and metadata as the original except that their :ns metadata value is this
  namespace."
  [& ns-names]


Clean up dummy functions

Clean up dummy functions

--- src/play_clj/core.clj
+++ src/play_clj/core.clj
@@ -17,17 +17,14 @@
 (load "core_global")
 (load "core_render")

+(defn- dummy [_])
+
 (defn defscreen*
   [{:keys [on-show on-render on-hide on-pause on-resize on-resume]
+    :or {on-show dummy on-render dummy on-hide dummy
+         on-pause dummy on-resize dummy on-resume dummy}
     :as options}]
-  (let [screen (atom {})
-        dummy-fn (fn [s])
-        on-show (or on-show dummy-fn)
-        on-render (or on-render dummy-fn)
-        on-hide (or on-hide dummy-fn)
-        on-pause (or on-pause dummy-fn)
-        on-resize (or on-resize dummy-fn)
-        on-resume (or on-resume dummy-fn)]
+  (let [screen (atom {})]
     (proxy [Screen] []
       (show []
         (on-show (swap! screen assoc


Make notes bigger in relation to their length in time

--- src/playmary/one.cljs
+++ src/playmary/one.cljs
@@ -126,7 +126,7 @@
      :notes ()
      :w 0 :h 0
      :sound-on? true
-     :px-per-ms 0.1
+     :px-per-ms 0.3
      :scroll {:speed 0 :friction 0.75 :touch-id nil}
      :start start
      :playhead start}))


Minor fix to lower scope on nimbus client call

--- storm-core/src/clj/backtype/storm/command/set_log_level.clj
+++ storm-core/src/clj/backtype/storm/command/set_log_level.clj
@@ -59,17 +59,17 @@
          (merge oldval val)
          val)))

-(defn -main [& args]
+(defn -main [& args]
   (let [[{log-setting :log-setting remove-log-setting :remove-log-setting} [name] _]
-          (cli args ["-l" "--log-setting"
-                        :parse-fn (parse-named-log-levels LogLevelAction/UPDATE)
-                        :assoc-fn merge-together]
-                    ["-r" "--remove-log-setting"
-                        :parse-fn (parse-named-log-levels LogLevelAction/REMOVE)
-                        :assoc-fn merge-together])]
+        (cli args ["-l" "--log-setting"
+                   :parse-fn (parse-named-log-levels LogLevelAction/UPDATE)
+                   :assoc-fn merge-together]
+                  ["-r" "--remove-log-setting"
+                   :parse-fn (parse-named-log-levels LogLevelAction/REMOVE)
+                   :assoc-fn merge-together])
+        log-config (LogConfig.)]
+    (doseq [[log-name log-val] (merge log-setting remove-log-setting)]
+      (.put_to_named_logger_level log-config log-name log-val))
+    (log-message "Sent log config " log-config " for topology " name)
     (with-configured-nimbus-connection nimbus
-      (let [log-config (LogConfig.)]
-        (doseq [[log-name log-val] (merge log-setting remove-log-setting)]
-          (.put_to_named_logger_level log-config log-name log-val))
-        (log-message "Sent log config " log-config " for topology " name)
-        (.setLogConfig nimbus (get-storm-id nimbus name) log-config)))))
+      (.setLogConfig nimbus (get-storm-id nimbus name) log-config))))


(maint) Add catch around sending first message after connect

We've seen several failures in Travis CI that appear to lose the message
sent immediately after connecting. Wrap in try/catch blocks and print
the error to make it easier to debug these failures when they reproduce.

--- test/integration/puppetlabs/pcp/broker/controllers_test.clj
+++ test/integration/puppetlabs/pcp/broker/controllers_test.clj
@@ -60,7 +60,10 @@
 (deftest controller-no-agent-test
   (let [response1 (promise)
         response2 (promise)]
-    (with-redefs [server/on-connect (fn [_ ws] (websockets-client/send! ws (message/encode inventory-request)))
+    (with-redefs [server/on-connect (fn [_ ws]
+                    (try
+                      (websockets-client/send! ws (message/encode inventory-request))
+                      (catch Exception e (println "controller-no-agent-test exception:" (.getMessage e)))))
                   server/on-text (fn [_ ws text]
                     (if-not (realized? response1)
                       (do
@@ -83,7 +86,10 @@
 (deftest controller-agent-connected-test
   (let [inventory-response (promise)
         agent-response (promise)]
-    (with-redefs [server/on-connect (fn [_ ws] (websockets-client/send! ws (message/encode inventory-request)))
+    (with-redefs [server/on-connect (fn [_ ws]
+                    (try
+                      (websockets-client/send! ws (message/encode inventory-request))
+                      (catch Exception e (println "controller-agent-connected-test exception:" (.getMessage e)))))
                   server/on-text (fn [_ ws text]
                     (let [msg (message/decode text)]
                       (if (= (:message_type msg) "http://puppetlabs.com/inventory_response")
@@ -128,7 +134,10 @@

 (deftest controller-whitelist-test
   (let [response (promise)]
-    (with-redefs [server/on-connect (fn [_ ws] (websockets-client/send! ws (message/encode self-request)))
+    (with-redefs [server/on-connect (fn [_ ws]
+                    (try
+                      (websockets-client/send! ws (message/encode self-request))
+                      (catch Exception e (println "controller-whitelist-test exception:" (.getMessage e)))))
                   server/on-text (fn [_ ws text] (deliver response (message/decode text)))]
       (with-app-with-config app (conj broker-services server/mock-server) broker-config
         (let [answer (deref response 3000 nil)]
@@ -144,7 +153,10 @@

 (deftest controller-prevent-spoofed-sender-test
   (let [response (promise)]
-    (with-redefs [server/on-connect (fn [_ ws] (websockets-client/send! ws (message/encode spoof-sender-request)))
+    (with-redefs [server/on-connect (fn [_ ws]
+                    (try
+                      (websockets-client/send! ws (message/encode spoof-sender-request))
+                      (catch Exception e (println "controller-prevent-spoofed-sender-test exception:" (.getMessage e)))))
                   server/on-text (fn [_ ws text] (deliver response (message/decode text)))]
       (with-app-with-config app (conj broker-services server/mock-server) broker-config
         (let [answer (deref response 3000 nil)]
@@ -157,8 +169,10 @@
   (let [responses {:mock-server-1 [(promise) (promise)]
                    :mock-server-2 [(promise) (promise)]
                    :mock-server-3 [(promise) (promise)]}]
-    (with-redefs [server/on-connect (fn [server ws]
-                    (websockets-client/send! ws (message/encode inventory-request)))
+    (with-redefs [server/on-connect (fn [_ ws]
+                    (try
+                      (websockets-client/send! ws (message/encode inventory-request))
+                      (catch Exception e (println "multiple-controllers-test exception:" (.getMessage e)))))
                   server/on-text (fn [server ws text]
                     (let [[response1 response2] (get responses server)]
                       (if-not (realized? response1)
@@ -195,7 +209,10 @@
   (let [inventory-response (promise)
         inventory-update (atom (promise))]
     (with-redefs [puppetlabs.pcp.broker.inventory/batch-update-interval-ms 10
-                  server/on-connect (fn [_ ws] (websockets-client/send! ws (message/encode inventory-subscribe)))
+                  server/on-connect (fn [_ ws]
+                    (try
+                      (websockets-client/send! ws (message/encode inventory-subscribe))
+                      (catch Exception e (println "controllers-subscribe exception:" (.getMessage e)))))
                   server/on-text (fn [_ ws text]
                     (let [msg (message/decode text)]
                       (case (:message_type msg)
@@ -252,8 +269,9 @@
        server/on-connect (fn [_ ws]
                            ;; Only send subscribe the first time we connect
                            (when (zero? @server-message-sent)
-                             (websockets-client/send! ws (message/encode
-                                                           inventory-subscribe))))
+                             (try
+                               (websockets-client/send! ws (message/encode inventory-subscribe))
+                               (catch Exception e (println "controllers-unsubscribe exception:" (.getMessage e))))))
        server/on-text (fn [_ ws text] (deliver inventory-response (message/decode text)))]
       (with-app-with-config app (conj broker-services server/mock-server) broker-config
         (let [broker (:broker (get-context app :BrokerService))]


add some unit tests for wrap-catch-exceptions and post-add-row-count-and-status QP middleware functions.

--- test/metabase/driver/query_processor/qp_middleware_test.clj
+++ test/metabase/driver/query_processor/qp_middleware_test.clj
@@ -6,7 +6,8 @@
             [metabase.models.setting :as setting]
             [metabase.test.util :refer [resolve-private-fns]]))

-(resolve-private-fns metabase.driver.query-processor post-format-rows pre-add-settings)
+(resolve-private-fns metabase.driver.query-processor
+  wrap-catch-exceptions post-add-row-count-and-status post-format-rows pre-add-settings)

 (defrecord TestDriver []
@@ -16,6 +17,23 @@
 (extend TestDriver
   driver/IDriver
   {:features (constantly #{:set-timezone})})
+
+
+;; wrap-catch-exceptions
+
+(expect
+  {}
+  ((wrap-catch-exceptions identity) {}))
+
+(expect
+  {:status        :failed
+   :class         java.lang.Exception
+   :error         "Something went wrong"
+   :stacktrace    true
+   :query          {}
+   :expanded-query nil}
+  (-> ((wrap-catch-exceptions (fn [_] (throw (Exception. "Something went wrong")))) {})
+      (update :stacktrace boolean)))

 ;; pre-add-settings
@@ -40,6 +58,32 @@
          (dissoc response3 :driver)]))))

+;; TODO: pre-expand-macros
+;; TODO: pre-expand-resolve
+
+;; post-add-row-count-and-status
+
+(expect
+  {:row_count      5
+   :status         :completed
+   :data           {:rows [[1] [1] [1] [1] [1]]}
+   :rows_truncated 5}
+  ;; NOTE: the default behavior is to treat the query as :rows type aggregation and use :max-results-bare-rows
+  ((post-add-row-count-and-status (constantly {:rows [[1] [1] [1] [1] [1]]}))
+    {:constraints {:max-results           10
+                   :max-results-bare-rows 5}}))
+
+(expect
+  {:row_count      5
+   :status         :completed
+   :data           {:rows [[1] [1] [1] [1] [1]]}}
+  ;; when we aren't a :rows query the then we use :max-results for our limit
+  ((post-add-row-count-and-status (constantly {:rows [[1] [1] [1] [1] [1]]}))
+    {:query       {:aggregation {:aggregation-type :count}}
+     :constraints {:max-results           10
+                   :max-results-bare-rows 5}}))
+
+
 ;; post-format-rows

 (expect
@@ -57,3 +101,12 @@
   ((post-format-rows (constantly {:rows [[(tc/to-sql-time 1303121567232)]
                                          [(tc/to-sql-date "2011-04-18")] ; joda-time assumes this is UTC time when parsing it
                                          [(tc/to-date 1303121567232)]]})) {:settings {:report-timezone "Asia/Tokyo"}}))
+
+
+;; TODO: pre-add-implicit-fields
+;; TODO: pre-add-implicit-breakout-order-by
+;; TODO: cumulative-sum
+;; TODO: limit
+;; TODO: post-annotate
+;; TODO: pre-log-query
+;; TODO: wrap-guard-multiple-calls


CMR-5065 Update measured-parameters mapping to utilize default enum flag values.

--- umm-spec-lib/src/cmr/umm_spec/umm_g/measured_parameters.clj
+++ umm-spec-lib/src/cmr/umm_spec/umm_g/measured_parameters.clj
@@ -42,7 +42,6 @@
                   OperationalQualityFlagExplanation
                   ScienceQualityFlag
                   ScienceQualityFlagExplanation]}
-
           qa-flags]
       (g/map->QAFlags
        {:automatic-quality-flag AutomaticQualityFlag
@@ -51,6 +50,34 @@
         :operational-quality-flag-explanation OperationalQualityFlagExplanation
         :science-quality-flag ScienceQualityFlag
         :science-quality-flag-explanation ScienceQualityFlagExplanation}))))
+
+(def enum-default-value
+  "Undetermined")
+
+(defmulti flag-enum
+  (fn [flag-type]
+    flag-type))
+
+(defmethod flag-enum :automatic-quality-flag
+  [flag-type]
+  ["Passed" "Failed" "Suspect" enum-default-value])
+
+(defmethod flag-enum :operational-quality-flag
+  [flag-type]
+  ["Passed" "Failed" "Being Investigated" "Not Investigated"
+   "Inferred Passed" "Inferred Failed" "Suspect" enum-default-value])
+
+(defmethod flag-enum :science-quality-flag
+  [flag-type]
+  ["Passed" "Failed" "Being Investigated" "Not Investigated"
+   "Inferred Passed" "Inferred Failed" "Suspect" "Hold" enum-default-value])
+
+(defn sanitize-quality-flag
+  [flag-type flag-value]
+  (if (some #(= % flag-value)
+            (flag-enum flag-type))
+    flag-value
+    enum-default-value))

 (defn- QAFlags->umm-g-qa-flags
   "Returns umm-lib QAFlags from given UMM-G QAFlags."
@@ -63,11 +90,14 @@
                   science-quality-flag
                   science-quality-flag-explanation]}
           qa-flags]
-      {:AutomaticQualityFlag automatic-quality-flag
+      {:AutomaticQualityFlag (sanitize-quality-flag :automatic-quality-flag
+                                                    automatic-quality-flag)
        :AutomaticQualityFlagExplanation automatic-quality-flag-explanation
-       :OperationalQualityFlag operational-quality-flag
+       :OperationalQualityFlag (sanitize-quality-flag :operational-quality-flag
+                                                      operational-quality-flag)
        :OperationalQualityFlagExplanation operational-quality-flag-explanation
-       :ScienceQualityFlag science-quality-flag
+       :ScienceQualityFlag (sanitize-quality-flag :science-quality-flag
+                                                  science-quality-flag)
        :ScienceQualityFlagExplanation science-quality-flag-explanation})))

 (defn- umm-g-measured-parameter->MeasuredParmeter


track delete works!

track delete works!

--- src/server/rooms.cljs
+++ src/server/rooms.cljs
@@ -14,7 +14,7 @@
       (callback))))

 (defn unset-delete-flag [room-id callback]
-  (.set redis-client (str "room:" room-id ":deleted?") "true"
+  (.set redis-client (str "room:" room-id ":deleted?") "false"
     (fn [err reply]
       (callback))))

@@ -266,7 +266,10 @@
         (get-delete-flag room
           (fn [delete-flag?]
             (if delete-flag?
-              (change-to-track-num current-track-num)
+              (do
+                (unset-delete-flag room
+                  (fn []
+                    (change-to-track-num current-track-num))))
               (get-num-of-tracks room
                 (fn [num-of-tracks]
                   (if (>= current-track-num num-of-tracks)


Add additional exclude of clojure namespace on dsl (update method clashes with clojure one)

--- src/suricatta/dsl.clj
+++ src/suricatta/dsl.clj
@@ -24,7 +24,7 @@

 (ns suricatta.dsl
   "Sql building dsl"
-  (:refer-clojure :exclude [val group-by and or not name set])
+  (:refer-clojure :exclude [val group-by and or not name set update])
   (:require [suricatta.core :as core]
             [suricatta.impl :as impl]
             [suricatta.types :as types :refer [defer]]


Update to ClojureScript 1.10.439

Update to ClojureScript 1.10.439

--- ClojureScript/replete/project.clj
+++ ClojureScript/replete/project.clj
@@ -8,7 +8,7 @@
                  [tailrecursion/cljson "1.0.7"]
                  [malabarba/lazy-map "1.3"]
                  [org.clojure/clojure "1.9.0"]
-                 [org.clojure/clojurescript "1.10.339"]
+                 [org.clojure/clojurescript "1.10.439"]
                  [org.clojure/test.check "0.10.0-alpha2"]]
   :clean-targets ["out" "target"]
   :plugins [[lein-cljsbuild "1.1.7"]]


Shuffle firing squad's first row

Shuffle firing squad's first row

--- src/obb_rules/auto_deploys/common.cljc
+++ src/obb_rules/auto_deploys/common.cljc
@@ -39,7 +39,7 @@
   "Associates the expected quantities with every lineup element"
   [lineup stash]
   (let [quantities (map (partial split-stash lineup) stash)]
-    (apply concat quantities)))
+    (shuffle (apply concat quantities))))

 (defn- build-deploy-action
   "Builds a deploy action command"


Update reserved slugs.

Update reserved slugs.

--- src/open_company/resources/company.clj
+++ src/open_company/resources/company.clj
@@ -58,13 +58,13 @@

 (def reserved-slugs #{"about" "android" "api" "app" "careers" "companies"
                       "company" "contact" "create-company" "crowd" "developer"
-                      "developers" "download" "faq" "forum" "forums"
-                      "founder" "founders" "help"
-                      "home" "investor" "investors" "ios" "jobs" "login"
-                      "logout" "news" "newsletter" "press" "privacy" "register"
-                      "section" "sections" "signup" "stakeholder"
-                      "stakeholder-update" "terms" "topic" "topics"
-                      "update" "updates" "profile"})
+                      "developers" "download" "email-confirmation" "faq" "forum" "forums"
+                      "founder" "founders" "help" "home"
+                      "investor" "investors" "invite" "ios" "jobs" "login" "logout"
+                      "news" "newsletter" "press" "privacy" "profile" "register" "reset"
+                      "section" "sections" "signin" "signout" "signup" "stakeholder"
+                      "stakeholder-update" "subscription-completed" "terms" "topic" "topics"
+                      "update" "updates"})

 (declare list-companies)
 (defn taken-slugs


make react-drvs-return a map

make react-drvs-return a map

--- src/org/martinklepsch/derivatives.cljc
+++ src/org/martinklepsch/derivatives.cljc
@@ -175,7 +175,7 @@
          :clj  (get *derivatives* drv-k))
       (throw (ex-info (str "No derivative found! Maybe you forgot a (drv " drv-k ") mixin?")
                       {:key drv-k :derivatives #?(:cljs (keys (::derivatives state))
-                                                  :clj (keys *derivatives*))}))))
+                                                  :clj  (keys *derivatives*))}))))

 (defn react
   "Like `get-ref` wrapped in `rum.core/react`"
@@ -183,8 +183,8 @@
   (rum/react (get-ref state drv-k)))

 (defn react-drvs [state & ks]
-  (->> (if (seq ks) ks (-> state ::derivatives keys))
-       (map #(react state %))))
+  (let [ks (or (seq ks) (-> state ::derivatives keys))]
+    (zipmap ks (map #(react state %) ks))))

 (comment
   (def base (atom 0))


Removed strange corruption in known-hosts data.


make tests happy

make tests happy

--- src/test/shadow/build/ns_form_test.clj
+++ src/test/shadow/build/ns_form_test.clj
@@ -161,7 +161,7 @@
            '{something {"react" alias$react}}})]

     (is (= 'alias$react (get-in ast-resolved [:requires 'react])))
-    (is (= '[goog cljs.core alias$react] (:deps ast-resolved)))
+    (is (= '[goog shadow.cljs_helpers cljs.core alias$react] (:deps ast-resolved)))
     ;; (pprint ast)
     ;; (pprint ast-resolved)
     ))
@@ -180,7 +180,7 @@
            '{react alias$react}})]

     (is (= 'alias$react (get-in ast-resolved [:requires 'react])))
-    (is (= '[goog cljs.core alias$react] (:deps ast-resolved)))
+    (is (= '[goog shadow.cljs_helpers cljs.core alias$react] (:deps ast-resolved)))
     ;; (pprint ast)
     ;; (pprint ast-resolved)
     ))
@@ -210,7 +210,7 @@
            '{react-dnd-html5-backend alias$react-dnd-html5-backend}})]

     (is (= 'alias$react-dnd-html5-backend (get-in ast-resolved [:requires 'react-dnd-html5-backend])))
-    (is (= '[goog cljs.core alias$react-dnd-html5-backend] (:deps ast-resolved)))
+    (is (= '[goog shadow.cljs_helpers cljs.core alias$react-dnd-html5-backend] (:deps ast-resolved)))
     (is (= 'alias$react-dnd-html5-backend/default (get-in ast-resolved [:renames 'HTML5Backend])))
     ;; (pprint ast)
     ;; (pprint ast-resolved)


starting with parsing the existing database dump into clojure data structures

--- src/bitfondue/migrations.clj
+++ src/bitfondue/migrations.clj
@@ -1,7 +1,8 @@
 (ns bitfondue.migrations
   (:require (ragtime [jdbc :as jdbc]
                      [repl :as repl])
-            [bitfondue.config :as config]))
+            [bitfondue.config :as config]
+            [cheshire.core :refer :all]))

 (defn load-config []
   {:datastore  (jdbc/sql-database config/database)
@@ -13,3 +14,10 @@
 (defn rollback []
   (repl/rollback (load-config)))

+
+;; migrate the existing data into the new database
+;; parse the json line entries into a collection of maps
+(def ed (with-open [rdr (clojure.java.io/reader "existing_data.json")]
+          (doall (->> rdr
+                      line-seq
+                      (map #(parse-string % true))))))


add schemas for our other data structures

--- src/braid/common/schema.cljc
+++ src/braid/common/schema.cljc
@@ -24,8 +24,9 @@
   "A thread (just calling it Thread apparently causes confusion (with java.lang.Thread)"
   {:id s/Uuid
    :messages [ThreadMessage]
-   :tag-ids [s/Uuid]
-   :mentioned-ids [s/Uuid]})
+   :tag-ids #{s/Uuid}
+   :mentioned-ids #{s/Uuid}
+   (s/optional-key :last-open-at) (s/cond-pre s/Int s/Inst)})

 ;; Notification rules schema
 (def NotifyRule
@@ -47,7 +48,32 @@
 (def Group
   {:id s/Uuid
    :name s/Str
-   :admins [s/Uuid]
+   :admins #{s/Uuid}
    :intro (s/maybe s/Str)
    :avatar (s/maybe s/Str)
    :extensions [Extension]})
+
+(def User
+  {:id s/Uuid
+   :nickname s/Str
+   :avatar s/Str
+   :group-ids [s/Uuid]
+   (s/optional-key :status) (s/enum :online :offline)})
+
+(def Tag
+  {:id s/Uuid
+   :name s/Str
+   :description (s/maybe s/Str)
+   :group-id s/Uuid
+   :group-name s/Str
+   :threads-count s/Int
+   :subscribers-count s/Int})
+
+(def Invitation
+  {:id s/Uuid
+   :inviter-id s/Uuid
+   :inviter-email s/Str
+   :inviter-nickname s/Str
+   :invitee-email s/Str
+   :group-id s/Uuid
+   :group-name s/Str})


feat(model.db): introduce save function for saving objects to table of current db

--- src/busa_server/model/db.clj
+++ src/busa_server/model/db.clj
@@ -61,3 +61,10 @@
   (connect)
   (create-db @current-db)
   (create-table "connections"))
+
+(defn save [objs table]
+  (->
+    (r/db @current-db)
+    (r/table table)
+    (r/insert objs)
+    (r/run @current-db-connection)))


use generic Exception

use generic Exception

--- src/ca_recipe/tnywb/core.clj
+++ src/ca_recipe/tnywb/core.clj
@@ -1,11 +1,8 @@
 (ns ca-recipe.tnywb.core
-  (:require [clojure.string :as str])
-  (:import (com.mblinn.oo.tinyweb RenderingException ControllerException)))
+  (:require [clojure.string :as str]))

 (defn- render [view model]
-  (try
-    (view model)
-    (catch Exception e (throw (RenderingException. e)))))
+    (view model))

 (defn- execute-request [http-request handler]
   (let [controller (handler :controller) view (handler :view)]
@@ -15,9 +12,6 @@
        (render
         view
         (controller http-request))}
-      (catch ControllerException e {:status-code (.getStatusCode e) :body ""})
-      (catch RenderingException e {:status-code 500
-                                   :body "Exception while rendering"})
       (catch Exception e (.printStackTrace e) {:status-code 500 :body ""}))))

 (defn- apply-filters [filters http-request]


Use array-maps explicitly for serializer collections.

This patch converts the {} reader macros on clojure-primitives
and java-primitives to use array-map explicitly. I think Clojure
uses array-maps by default for small maps; I'm not sure, though,
and if {} created a hash-map with different  ordering when populating
two different instances of kryo, deserialization will fail.

--- src/carbonite/serializer.clj
+++ src/carbonite/serializer.clj
@@ -136,19 +136,21 @@

 (def clojure-primitives
   "Define a map of Clojure primitives and their serializers to install."
-  {BigInt clojure-reader-serializer
+  (array-map
+   BigInt clojure-reader-serializer
    Keyword clojure-reader-serializer
-   Symbol clojure-reader-serializer})
+   Symbol clojure-reader-serializer))

 (def java-primitives
-  {BigDecimal (BigDecimalSerializer.)
+  (array-map
+   BigDecimal (BigDecimalSerializer.)
    BigInteger (BigIntegerSerializer.)
    Date (DateSerializer.)
    Timestamp timestamp-serializer
    java.sql.Date (sqldate-serializer java.sql.Date)
    java.sql.Time (sqldate-serializer java.sql.Time)
    URI uri-serializer
-   UUID uuid-serializer})
+   UUID uuid-serializer))

 (defn clojure-collections
   [registry]


docstring for view

docstring for view

--- src/clj/com/rpl/specter.cljx
+++ src/clj/com/rpl/specter.cljx
@@ -291,7 +291,10 @@
      structure
      )))

-(defpath view [afn]
+(defpath
+  ^{:doc "Navigates to result of running `afn` on the currently navigated value."}
+  view
+  [afn]
   (select* [this structure next-fn]
     (next-fn (afn structure)))
   (transform* [this structure next-fn]


fix chaikin-curve-retain-ends multi arity

--- src/clj/genartlib/curves.clj
+++ src/clj/genartlib/curves.clj
@@ -36,8 +36,8 @@
 (defn chaikin-curve-retain-ends
   "Like chaikin-curve, but retains the first and last point in the
    original `points` seq."
-  ([points] (chaikin-curve points 4))
-  ([points depth] (chaikin-curve points depth 0.25))
+  ([points] (chaikin-curve-retain-ends points 4))
+  ([points depth] (chaikin-curve-retain-ends points depth 0.25))
   ([points depth tightness]
    (if (<= (count points) 2)
      points


ensure data directory exists

ensure data directory exists

--- src/clj/jsk/agent/events.clj
+++ src/clj/jsk/agent/events.clj
@@ -25,6 +25,7 @@
 (defn init!
   "Initializes the data writer."
   []
+  (util/ensure-directory "./data")
   (locking data-writer
     (assert (not @data-writer) "data-writer is already initialized!")
     (setup-writer! true)))


Improve card image display in tooltip

Improve card image display in tooltip

--- src/cljs/decktouch/core.cljs
+++ src/cljs/decktouch/core.cljs
@@ -12,8 +12,9 @@
 ;; -------------------------
 ;; Views

-(defn img [url]
-  (str "<img src='" url "'>"))
+(defn card-img [url]
+  [:img {:src url
+         :style (js-obj "width" "240" "height" "340")}])

 (defn card-in-list [card card-id]
   (let [image-name (clojure.string/replace (get card "imageName") #" " "_")
@@ -24,7 +25,7 @@
          :data-placement "bottom"
          :data-html true
          :data-trigger "hover"
-         :title (img image-link)}
+         :title (reagent/render-component-to-string [card-img image-link])}
          (str (get card "name"))]]))

 (defn card-in-list-did-mount [card-id]


Update mllib linalg module.

Update mllib linalg module.

--- src/clojure/flambo/mllib.clj
+++ src/clojure/flambo/mllib.clj
@@ -2,7 +2,8 @@
   (:import (org.apache.spark.mllib.linalg.distributed CoordinateMatrix RowMatrix))
   (:refer-clojure :exclude [vec])
   (:import (org.apache.spark.mllib.linalg Vector Vectors Matrices Matrix)
-           (org.apache.spark.mllib.linalg.distributed DistributedMatrix CoordinateMatrix RowMatrix IndexedRow IndexedRowMatrix)))
+           (org.apache.spark.mllib.linalg.distributed DistributedMatrix CoordinateMatrix RowMatrix IndexedRow IndexedRowMatrix MatrixEntry)
+           (org.apache.spark.mllib.regression LabeledPoint)))

 ;;linear algebra stuff

@@ -45,3 +46,51 @@
   [values-column-at-a-time num-rows, num-cols]
   (Matrices/dense num-rows num-cols (double-array values-column-at-a-time))
   )
+
+(defn row-matrix
+  "A RowMatrix is a row-oriented distributed matrix without meaningful row indices,
+  backed by an RDD of its rows, where each row is a local vector.
+  Since each row is represented by a local vector, the number of columns is limited
+  by the integer range but it should be much smaller in practice."
+  ([row-vector-rdd num-rows num-cols]
+    (RowMatrix. row-vector-rdd num-rows num-cols))
+  ([row-vector-rdd]
+    (RowMatrix. row-vector-rdd)
+    ))
+
+(defn indexed-row-matrix
+  "An IndexedRowMatrix is similar to a RowMatrix but with meaningful row indices.
+  It is backed by an RDD of indexed rows,
+  so that each row is represented by its index (long-typed) and a local vector."
+  ([indexed-row-rdd num-rows num-cols]
+    (IndexedRowMatrix. indexed-row-rdd num-rows num-cols))
+  ([indexed-row-rdd]
+    (IndexedRowMatrix. indexed-row-rdd)
+    ))
+
+(defn indexed-row
+  "Entry for indexed-row-matrix rdd"
+  [vector index]
+  (IndexedRow. index vector))
+
+(defn matrix-entry
+  "Entry for coordinate-matrix rdd"
+  [i j value]
+  (MatrixEntry. i j value))
+
+(defn coordinate-matrix
+  "A CoordinateMatrix is a distributed matrix backed by an RDD of its entries.
+  Each entry is a tuple of (i: Long, j: Long, value: Double),
+  where i is the row index, j is the column index, and value is the entry value.
+  A CoordinateMatrix should be used only when both dimensions of the matrix are huge
+  and the matrix is very sparse."
+  ([entry-rdd num-rows num-cols]
+    (CoordinateMatrix. entry-rdd num-rows num-cols))
+  ([entry-rdd]
+    (CoordinateMatrix. entry-rdd)
+    ))
+
+(defn labeled-point
+  "A labeled point is a local vector, either dense or sparse, associated with a label/response - Double"
+  [vector label]
+  (LabeledPoint. label vector))


Make STDOUT an instance of RubyIO

Make STDOUT an instance of RubyIO

--- src/clojure_ruby/corelib.clj
+++ src/clojure_ruby/corelib.clj
@@ -140,7 +140,11 @@
     (print s)))

 (def STDOUT
-  {:methods {"putc" STDOUT-putc}})
+  {:class "RubyIO"
+   :methods {"putc" STDOUT-putc}})
+
+(def RubyIO
+  {})

 ;;;;;;;;;;;;;;;;;;;;;;;;;

@@ -161,4 +165,5 @@
       (var/add-binding "RubyString" RubyString)
       (var/add-binding "Array" Array)
       (var/add-binding "File" File)
+      (var/add-binding "RubyIO" RubyIO)
       (var/add-binding "STDOUT" STDOUT)))


JRuby 1.7 OpenStruct#to_json puts attrs in :table

--- lib/assets/cljs/cglossa/search_views/cwb/shared.cljs
+++ lib/assets/cljs/cglossa/search_views/cwb/shared.cljs
@@ -64,7 +64,8 @@
   (go
     (let [results-ch (http/post url {:json-params (merge params {:step 1 :cut page-size})
                                      :headers {"Accept" "application/json"}})
-          {:keys [status success] {:keys [search result]} :body :as response} (<! results-ch)]
+          {:keys [status success] {{search :table} :search
+                                   :keys [result]} :body :as response} (<! results-ch)]
       (if-not success
         (.log js/console status)
         (do


Fix flaky tests over http

Fix flaky tests over http

Closes https://github.com/clojure-emacs/refactor-nrepl/issues/339

--- test/refactor_nrepl/artifacts_test.clj
+++ test/refactor_nrepl/artifacts_test.clj
@@ -18,20 +18,41 @@
 (def clojure-artifacts ["clojure"])
 (def clojars-artifacts (resource "clojars-artifacts.edn"))

+(defn retry-flaky
+  "Retries a flaky fn `f`.
+
+  In our case the flakiness is outside of our control since Maven Central,
+  Clojars, etc can always have hiccups."
+  ([f]
+   (retry-flaky f 0))
+  ([f ^long attempts]
+   (try
+     (f)
+     (catch Exception e
+       ;; give Maven a break:
+       (Thread/sleep 12000)
+       (if (< attempts 4)
+         (retry-flaky f (inc attempts))
+         (throw e))))))
+
 (deftest get-mvn-artifacts!-test
-  (is (> (count (#'artifacts/get-mvn-artifacts! "org.clojure"))
+  (is (> (count (retry-flaky (fn []
+                               (#'artifacts/get-mvn-artifacts! "org.clojure"))))
          10)))

 (deftest get-clojars-artifacts!-test
-  (is (> (count (#'artifacts/get-clojars-artifacts!))
+  (is (> (count (retry-flaky (fn []
+                               (#'artifacts/get-clojars-artifacts!))))
          1000)))

 (deftest get-mvn-versions!-test
-  (is (> (count (#'artifacts/get-mvn-versions! "org.clojure/clojure"))
+  (is (> (count (retry-flaky (fn []
+                               (#'artifacts/get-mvn-versions! "org.clojure/clojure"))))
          20)))

 (deftest get-clojars-versions!-test
-  (is (> (count (#'artifacts/get-clojars-versions! "refactor-nrepl/refactor-nrepl"))
+  (is (> (count (retry-flaky (fn []
+                               (#'artifacts/get-clojars-versions! "refactor-nrepl/refactor-nrepl"))))
          30)))

 (deftest creates-a-map-of-artifacts


kibit suggestions

kibit suggestions

--- src/foosball/routes/user.clj
+++ src/foosball/routes/user.clj
@@ -21,7 +21,7 @@
          :content (html5
                    [:div
                     [:h1 "Assign a player to your login"]
-                    (when (and (nil? playerid) (not (empty? unclaimed-players)))
+                    (when (and (nil? playerid) (seq unclaimed-players))
                       [:div.panel.panel-success
                        [:div.panel-heading
                         [:h3 "Do you have an existing player?"]]
@@ -57,8 +57,8 @@
                      [:p "Some information from openid:"
                       [:ul (for [[k v] auth]
                              [:li [:strong (str (name k) ":  ")] v])]]
-                     [:h2 (str "nil? playerid " (nil? playerid) " not empty? " (not (empty? unclaimed-players)))]
-                     (when (and (nil? playerid) (not (empty? unclaimed-players)))
+                     [:h2 (str "nil? playerid " (nil? playerid) " not empty? " (seq unclaimed-players))]
+                     (when (and (nil? playerid) (seq unclaimed-players))
                        [:div
                         [:h2 "Unclaimed players"]
                         [:table


Reformatting

Reformatting

--- src/clj/sparqlab/routes/home.clj
+++ src/clj/sparqlab/routes/home.clj
@@ -137,13 +137,15 @@
                            :hard hard}))))

 (defn get-exercises-by-categories
-  [{lang :accept-lang} exercise-statuses]
+  [{lang :accept-lang}
+   exercise-statuses]
   (let [exercises (-> "get_exercises_by_category"
                       (sparql/sparql-template {:language lang})
                       select-query
                       (mark-exercises-with-statuses exercise-statuses))]
-    (sort-by (comp string/lower-case key)
-             (group-by :categoryLabel exercises))))
+    (->> exercises
+         (group-by :categoryLabel)
+         (sort-by (comp string/lower-case key)))))

 (defn exercises-by-categories
   [{tr :tempura/tr


remove dommy from about/software

remove dommy from about/software

--- src/foosball/views/about.clj
+++ src/foosball/views/about.clj
@@ -31,9 +31,6 @@
    ['hiccup/hiccup
     "Hiccup"
     "https://github.com/weavejester/hiccup"]
-   ['prismatic/dommy
-    "Dommy"
-    "https://github.com/Prismatic/dommy"]
    ['clj-time/clj-time
     "clj-time"
     "https://github.com/clj-time/clj-time"]


add comment

add comment

--- dada2-core/src/test/clojure/org/dada2/test_join_model.clj
+++ dada2-core/src/test/clojure/org/dada2/test_join_model.clj
@@ -720,6 +720,7 @@
     	   (data joined-model)))

     ;; TODO:
+    ;;; support custom join fns
     ;;  outer joins
     ;;  support use of versioned map
     ;;  support extant / extinct
@@ -734,3 +735,10 @@
     ;;   (first (.seqFrom (sorted-map :a 1 :c 3 :d 4) :b false)) => [:a 1]
     ;;   is this enough ?
     ))
+
+;; THOUGHTS:
+;; a flatter data model would require less rebuilding each time a change takes place
+;; updates should probably be a pair of [datum, deleted?]
+;; update api should be update[s] and not upsert[s], delete[s]
+;; I should write a reusable versioned-map component
+


Change the format of the routing table (and intermediate format) to expose more useful data to Swagger

--- src/io/aviso/rook/dispatcher.clj
+++ src/io/aviso/rook/dispatcher.clj
@@ -445,8 +445,8 @@
            doall))))

 (defn- construct-routing-table
-  "Expands the output of [[build-namespace-table]], converting each namespace entry into
-  a series of entries:
+  "Expands the output of [[build-namespace-table]] and [[expand-namespace-metadata]], converting each namespace entry into
+  a seq of routing entries:

       [method path handler endpoint-meta route-params]

@@ -465,21 +465,29 @@

   The handler-wrapper is a special middleware placed *before* any normal middleware for the
   endpoint. For synchronous Rook, it is always identity. For async Rook, it converts
-  a synchronous handler into an asynchronous handler, using the core.async thread macro."
-  [handler-wrapper ns-table]
-  (mapcat (partial expand-namespace-entry handler-wrapper) ns-table))
+  a synchronous handler into an asynchronous handler, using the core.async thread macro.
+
+  Returns a map whose keys are ns-specs (the inputs from the ns-table) and whose
+  values are a seq of routing entries (for that immediate namespace)."
+  [sync-wrapper ns-table]
+  (reduce
+    (fn [result ns-spec]
+      (assoc result ns-spec (expand-namespace-entry sync-wrapper ns-spec)))
+    {}
+    ns-table))

 (defn- construct-dispatch-map
-  "Constructs the dispatch map from the handlers. The structure of the dispatch map
+  "Constructs the dispatch map from routing specs (created by
+  [[construct-routing-table]]. The structure of the dispatch map
   is a tree. Each node on the tree is a map.

-  String keys in a node are literal terms in the path, the value is a nested nodes.
+  String keys in a node are literal terms in the path, the value is a nested node.

   The :_ key in a node represents a position of a path argument, the value is a nested node.

   The other keys in a node are request methods (:get, :put, etc., or :all). The value
   is a vector of handler data, each of which is a vector of [handler endpoint-meta route-params]."
-  [routing-table]
+  [routing-specs]
   (let [conj' (fnil conj [])]
     (reduce
       (fn [dispatch-map [method path handler endpoint-meta]]
@@ -491,11 +499,14 @@
                                           (assoc m term i)
                                           m))
                                       {}
-                                      path)]
+                                      path)
+              ;; Only these two keys are needed by the map traversal dispatcher, so there's no reason to keep
+              ;; the full metdata of the endpoint.
+              endpoint-meta' (select-keys endpoint-meta [:function :match])]
           (update-in dispatch-map path'
-                     conj' [handler endpoint-meta route-params])))
+                     conj' [handler endpoint-meta' route-params])))
       {}
-      routing-table)))
+      routing-specs)))

 (defn- endpoint-filter
   [request [_ {endpoint-matcher :match}]]
@@ -583,8 +594,11 @@
                              (if async?
                                (get options :sync-wrapper default-sync-wrapper)
                                default-namespace-middleware)))
-        handler (->> routing-table
-                     construct-dispatch-map
-                     (create-map-traversal-handler
-                       (if async? closed-channel)))]
+        handler (->>
+                  routing-table
+                  vals
+                  (apply concat)
+                  construct-dispatch-map
+                  (create-map-traversal-handler
+                    (if async? closed-channel)))]
     [handler routing-table]))


Add :patch to the list of supported methods in io.aviso.rook.client/to

Fixes #28

--- src/io/aviso/rook/client.clj
+++ src/io/aviso/rook/client.clj
@@ -48,7 +48,7 @@
   "Same as [[to]], but the paths are provided as a seq, not varargs."
   {:added "0.1.10"}
   [request method paths]
-  {:pre [(#{:put :post :get :delete :head :options} method)]}
+  {:pre [(#{:put :post :get :delete :head :options :patch} method)]}
   (-> request
       (assoc-in [:ring-request :request-method] method)
       (assoc-in [:ring-request :uri]


Scheduler functions have been added to hellhound.system.execution

--- core/src/cljc/hellhound/system/execution.cljc
+++ core/src/cljc/hellhound/system/execution.cljc
@@ -2,7 +2,9 @@
   (:require
    [hellhound.system.protocols :as impl])
   (:import
-   [java.util.concurrent Executors]))
+   [java.util.concurrent
+    Executors
+    TimeUnit]))

 (def SINGLE_THREAD :single-thread)
@@ -15,9 +17,10 @@
   8)

 (defn schedule-pool-size
-  [system]
-  ;; TODO: Find the optimal number for the schedule size
-  8)
+  ([] 8)
+  ([system]
+   ;; TODO: Find the optimal number for the schedule size
+   8))

 (defn create-execution-pool
   ([]
@@ -26,9 +29,11 @@
   ([size]
    (Executors/newFixedThreadPool size)))

+
 (defn create-wait-pool
   []
   (Executors/newCachedThreadPool))
+

 (defn create-schedule-pool
   ([]
@@ -92,5 +97,29 @@
   (execute-in (impl/wait-pool system) f))

 (defn schedule-with-system
-  [system f details]
-  (execute-in (impl/schedule-pool system) f))
+  [system delay f]
+  (.schedule (impl/schedule-pool system) f delay TimeUnit/MILLISECONDS))
+
+(defn schedule-fixrate-interval-with-system
+  "Executes the given `f` periodically with the given `delay` regardless
+  of the termination of the tasks and.
+
+  It schedules the jobs on the schedule threadpool of the given `system`."
+  [system delay f]
+  (.scheduleAtFixedRate (impl/schedule-pool system)
+                        f
+                        0
+                        delay
+                        TimeUnit/MILLISECONDS))
+
+(defn schedule-interval-with-system
+  "Executes the given `f` periodically with the given `delay` between
+  the termination of one execution and the commencement of the next.
+
+  It schedules the jobs on the schedule threadpool of the given `system`."
+  [system delay f]
+  (.scheduleWithFixedDelay (impl/schedule-pool system)
+                           f
+                           0
+                           delay
+                           TimeUnit/MILLISECONDS))


CMR-736: Added support for finding collections that default to SCIENCE_QUALITY via wildcards.

--- src/cmr/search/services/parameters/conversion.clj
+++ src/cmr/search/services/parameters/conversion.clj
@@ -113,6 +113,14 @@
     (format "Could not find parameter handler for [%s] with concept-type [%s]"
             param concept-type)))

+(defn- convert-to-regex
+  "Convert a parameter with wildcards to a regex"
+  [param]
+  (-> param
+      (str/replace #"\?" ".")
+      (str/replace #"\*" ".*")
+      re-pattern))
+
 (defn string-parameter->condition
   [param value options]
   (let [case-sensitive (case-sensitive-field? param options)
@@ -150,7 +158,6 @@
       (qm/and-conds [collection-cond granule-cond])
       (or collection-cond granule-cond))))

-
 ;; Construct an inheritance query condition for granules.
 ;; This will find granules which either have explicitly specified a value
 ;; or have not specified any value for the field and inherit it from their parent collection.
@@ -192,7 +199,6 @@

     :else
     (errors/internal-error! (format "Boolean condition for %s has invalid value of [%s]" param value))))
-

 (defmethod parameter->condition :readable-granule-name
   [concept-type param value options]
@@ -221,7 +227,9 @@
           pattern (pattern-field? :collection-data-type options)]
       (if (or (= "SCIENCE_QUALITY" value)
               (and (= "SCIENCE_QUALITY" (str/upper-case value))
-                   (not= "false" (get-in options [:collection-data-type :ignore-case]))))
+                   (not= "false" (get-in options [:collection-data-type :ignore-case])))
+              (and pattern
+                   (re-find (convert-to-regex (str/upper-case value)) "SCIENCE_QUALITY")))
         ; SCIENCE_QUALITY collection-data-type should match concepts with SCIENCE_QUALITY
         ; or the ones missing collection-data-type field
         (qm/or-conds


test hook

test hook

--- src/main/cawala/api/read.clj
+++ src/main/cawala/api/read.clj
@@ -6,7 +6,7 @@
                      :person/relation :friend}
                  2  {:db/id 2 :person/name "Sally" :person/age 22
                      :person/relation :friend}
-                 3  {:db/id 3 :person/name "Allie" :person/age 70
+                 3  {:db/id 3 :person/name "Allie" :person/age 69
                      :person/relation :enemy}
                  4  {:db/id 4 :person/name "Zoe" :person/age 32
                      :person/relation :friend}


#object printing for deftype w/o printing implementation, and for Volatile and for Atom

--- src/main/cljs/cljs/core.cljs
+++ src/main/cljs/cljs/core.cljs
@@ -8839,11 +8839,15 @@
         (-pr-writer obj writer opts)

         :else
-        (let [name (.. obj -constructor -name)
-              name (if (or (nil? name) (gstring/isEmpty name))
-                     "Object"
-                     name)]
-          (write-all writer "#object[" name " " (str obj) "]"))))))
+        (if (.. obj -constructor -cljs$lang$ctorStr)
+          (write-all writer
+            "#object[" (.replace (.. obj -constructor -cljs$lang$ctorStr)
+                         (js/RegExp. "/" "g") ".") "]")
+          (let [name (.. obj -constructor -name)
+               name (if (or (nil? name) (gstring/isEmpty name))
+                      "Object"
+                      name)]
+           (write-all writer "#object[" name " " (str obj) "]")))))))

 (defn- pr-writer
   "Prefer this to pr-seq, because it makes the printing function
@@ -9050,15 +9054,15 @@

   Atom
   (-pr-writer [a writer opts]
-    (-write writer "#<Atom: ")
-    (pr-writer (.-state a) writer opts)
-    (-write writer ">"))
+    (-write writer "#object [cljs.core.Atom ")
+    (pr-writer {:val (.-state a)} writer opts)
+    (-write writer "]"))

   Volatile
   (-pr-writer [a writer opts]
-    (-write writer "#<Volatile: ")
-    (pr-writer (.-state a) writer opts)
-    (-write writer ">"))
+    (-write writer "#object [cljs.core.Volatile ")
+    (pr-writer {:val (.-state a)} writer opts)
+    (-write writer "]"))

   Var
   (-pr-writer [a writer opts]


Docstrings & warnings in 'move'

Docstrings & warnings in 'move'

--- src/main/clojure/clojure/tools/namespace/move.clj
+++ src/main/clojure/clojure/tools/namespace/move.clj
@@ -7,6 +7,13 @@
 ;; remove this notice, or any other, from this software.

 (ns clojure.tools.namespace.move
+  "Refactoring tool to move a Clojure namespace from one name/file to
+  another, and update all references to that namespace in your other
+  Clojure source files.
+
+  WARNING: This code is ALPHA and subject to change. It also modifies
+  and deletes your source files! Make sure you have a backup or
+  version control."
   (:require [clojure.string :as str]
             [clojure.java.io :as io])
   (:import (java.io File)))
@@ -54,7 +61,10 @@
 (defn move-ns-file
   "ALPHA: subject to change. Moves the .clj source file (found relative
   to source-path) for the namespace named old-sym to a file for a
-  namespace named new-sym."
+  namespace named new-sym.
+
+  WARNING: This function moves and deletes your source files! Make
+  sure you have a backup or version control."
   [old-sym new-sym source-path]
   (let [old-file (io/file source-path (ns-file-name old-sym))
         new-file (io/file source-path (ns-file-name new-sym))]
@@ -70,7 +80,10 @@
   "ALPHA: subject to change. Moves the .clj source file (found relative
   to source-path) for the namespace named old-sym to new-sym and
   replace all occurances of the old name with the new name in all
-  Clojure source files found in dirs."
+  Clojure source files found in dirs.
+
+  WARNING: This function modifies and deletes your source files! Make
+  sure you have a backup or version control."
   [old-sym new-sym source-path dirs]
   (move-ns-file old-sym new-sym source-path)
   (doseq [file (clojure-source-files dirs)]


compact DIOTONIC-MODES code so we just need to specify the offset order and everything else in terms of that.

--- src/overtone/music/pitch.clj
+++ src/overtone/music/pitch.clj
@@ -107,25 +107,20 @@
               :minor-pentatonic (only minor [1 3 4 5 7])}))

 (def DIOTONIC-MODES
-  ;; offset-order: ionian, dorian, phrygian, lydian, mixolydian, aeolian, lochrian
   (let [ionian-sequence [2 2 1 2 2 2 1]
-        ionian-offset     0
-        dorian-offset     1
-        phrygian-offset   2
-        lydian-offset     3
-        mixolydian-offset 4
-        aeolian-offset    5
-        lochrian-offset   6
-        rotate-ionian (fn [offset] (drop offset (take (+ 7 offset) (cycle ionian-sequence))))]
-    {:ionian     (rotate-ionian ionian-offset)
-     :major      (rotate-ionian ionian-offset)
-     :dorian     (rotate-ionian dorian-offset)
-     :phrygian   (rotate-ionian phrygian-offset)
-     :lydian     (rotate-ionian lydian-offset)
-     :mixolydian (rotate-ionian mixolydian-offset)
-     :aeolian    (rotate-ionian aeolian-offset)
-     :minor      (rotate-ionian aeolian-offset)
-     :lochrian   (rotate-ionian lochrian-offset)}))
+        offset-order [:ionian :dorian :phrygian :lydian :mixolydian :aeolian :lochrian]
+        offsets (into {} (map-indexed (fn [i el] [el i]) offset-order))
+        ionian-len (count ionian-sequence)
+        rotate-ionian (fn [offset] (drop offset (take (+ ionian-len offset) (cycle ionian-sequence))))]
+    {:ionian     (rotate-ionian (:ionian offsets))
+     :major      (rotate-ionian (:ionian offsets))
+     :dorian     (rotate-ionian (:dorian offsets))
+     :phrygian   (rotate-ionian (:phrygian offsets))
+     :lydian     (rotate-ionian (:lydian offsets))
+     :mixolydian (rotate-ionian (:mixolydian offsets))
+     :aeolian    (rotate-ionian (:aeolian offsets))
+     :minor      (rotate-ionian (:aeolian offsets))
+     :lochrian   (rotate-ionian (:lochrian offsets))}))

 ; Various scale intervals in terms of steps on a piano, or midi note numbers
 (def SCALES


Remove bogus attribute "react-key"

Remove bogus attribute "react-key"

This has almost certainly never done anything useful, and has been
throwing a React warning.

--- src-cljs/frontend/components/aside.cljs
+++ src-cljs/frontend/components/aside.cljs
@@ -357,7 +357,6 @@
                      :type "radio"
                      :value "false"
                      :checked (not show-all-branches?)
-                     :react-key "toggle-all-branches-my-branches"
                      :on-change #(raise! owner [:show-all-branches-toggled false])}]
             [:label {:for "my-branches"}
              "My branches"]
@@ -366,7 +365,6 @@
                      :type "radio"
                      :value "true"
                      :checked show-all-branches?
-                     :react-key "toggle-all-branches-all-branches"
                      :on-change #(raise! owner [:show-all-branches-toggled true])}]
             [:label {:for "all-branches"}
              "All branches"]]]


Button-code erronously accepted symbol as argument

Fixed issue #105 on oakes/playclj

--- src/play_clj/core_basics.clj
+++ src/play_clj/core_basics.clj
@@ -123,7 +123,7 @@
   [k]
   `(input! :is-key-pressed (key-code ~k)))

-(defmacro button-code
+(defn button-code
   "Returns a static field from [Input.Buttons](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Buttons.html).

     (button-code :left)"


:bug: Fix group name of notification page

--- frontend/src/uxbox/main/ui/settings/notifications.cljs
+++ frontend/src/uxbox/main/ui/settings/notifications.cljs
@@ -28,19 +28,19 @@
      [:div.input-radio.radio-primary
       [:input {:type "radio"
                :id "notification-1"
-               :name "notification-1"
+               :name "notification"
                :value "none"}]
       [:label {:for "notification-1"
                :value "None"} "None"]
       [:input {:type "radio"
                :id "notification-2"
-               :name "notification-2"
+               :name "notification"
                :value "every-hour"}]
       [:label {:for "notification-2"
                :value "Every hour"} "Every hour"]
       [:input {:type "radio"
                :id "notification-3"
-               :name "notification-3"
+               :name "notification"
                :value "every-day"}]
       [:label {:for "notification-3" :value "Every day"} "Every day"]]
      [:input.btn-primary {:type "submit" :value "Update settings"}]


:tada: Make outline shows when selected

:tada: Make outline shows when selected

--- frontend/src/uxbox/main/ui/workspace/shapes/frame.cljs
+++ frontend/src/uxbox/main/ui/workspace/shapes/frame.cljs
@@ -9,6 +9,7 @@

 (ns uxbox.main.ui.workspace.shapes.frame
   (:require
+   [clojure.set :as set]
    [rumext.alpha :as mf]
    [uxbox.common.data :as d]
    [uxbox.main.constants :as c]
@@ -58,7 +59,10 @@
                                        #(refs/make-selected (:id shape)))
             selected? (mf/deref selected-iref)
             zoom (mf/deref refs/selected-zoom)
+
+            selected-shape? (or (mf/deref refs/selected-shapes) #{})
             hover? (or (mf/deref refs/current-hover) #{})
+            outline? (set/union selected-shape? hover?)

             on-mouse-down   (mf/use-callback (mf/deps shape)
                                              #(common/on-mouse-down % shape))
@@ -109,6 +113,6 @@
               :children children}]

             [:g.outlines
-             (for [child (filter (comp hover? :id) children)]
+             (for [child (filter (comp outline? :id) children)]
                [:& outline {:shape (geom/transform-shape child)}])]]])))))


(PE-5731) fixup bad reference after rebase

--- src/clj/puppetlabs/services/ca/certificate_authority_core.clj
+++ src/clj/puppetlabs/services/ca/certificate_authority_core.clj
@@ -113,7 +113,7 @@
   (fn [context]
     (when (= :put (get-in context [:request :request-method]))
       (let [state (get-desired-state context)]
-        (schema/check ca/DesiredCertState state))))
+        (schema/check ca/DesiredCertificateState state))))

   :handle-malformed
   (fn [context]


Find parentless depth-8's with comments

Find parentless depth-8's with comments

--- src/atom_finder/location_dump.clj
+++ src/atom_finder/location_dump.clj
@@ -253,7 +253,7 @@
      (map (juxt start-line write-ast))
      pprint     )

-;; which nodes make up each depth stratus
+;; find depth 8 nodes with comments near them, but not their parents
 '(->> gcc-path
      (pmap-dir-files location-dump-atoms-and-non-atoms)
      (mapcat (partial map #(update % :node write-node)))
@@ -272,38 +272,33 @@
      time
      )

-'(->> gcc-path
+(->> gcc-path
      (pmap-dir-files location-dump-atoms-and-non-atoms)
-     (mapcat (partial map #(update % :node write-node)))
+     (mapcat identity) ;(partial map #(update % :node write-node)))
      (map #(merge %1 (if (:path %1) {:depth (count (:path %1))} {})))
      (map (fn [m] (update m :file #(subs % (- (count gcc-path) 3))))) ; remove gcc-path prefix from file paths
      (partition-by :file) ; group data by filenames
-     (take 100000)
+     (take 1000)
      (pmap
       (fn [atom-positions]
         (let [comments  (filter (comp #{:comment} :type) atom-positions)
               non-atoms (filter (fn [{t :type s :start-line e :end-line d :depth}] (and (= :non-atom t) s e d)) atom-positions)
               comment-locs (set (mapcat (fn [{s :start-line e :end-line}] (range s (inc e))) comments))]
-          [(->> atom-positions first :file)
-          (reduce
-           (fn [hash node]
-             (let [{type :type start :start-line end :end-line depth :depth} node]
-             (merge-with (partial merge-with +) hash
-                         {depth {
-                          :same-line (bin (comment-locs start))
-                          :non-atoms 1
-                          }}))
-            ) {} non-atoms)])))
-     ;(reduce (partial merge-with (partial merge-with +)))
-     ;(tap (fn [l] (prn (map #(get-in % [1 8 :same-line]) l))))
-     (filter #(and (some->> (get-in %1 [1 8 :same-line]) (< 100)) (some->> (get-in %1 [1 7 :same-line]) (< 100))))
-     (map-values (partial map-values #(vector (float (safe-div (:same-line %1) (:non-atoms %1))) (:same-line %1) (:non-atoms %1))))
-     (sort-by #(- (get-in %1 [1 8 0]) (get-in %1 [1 7 0])))
-     (take-last 1000)
-     (map (fn [[k v]] [k (sort-by first v)]))
-     ;(map-values #(update-in % [:node] frequencies))
-     ;(map-values (fn [m] (update-in m [:node] #(take 5 (sort-by (comp - last) %)))))
-     ;(sort-by first)
+          ;(pprn non-atoms)
+          (->> non-atoms
+               (filter
+                (fn [hash]
+                  (let [{type :type start :start-line end :end-line depth :depth node :node} hash]
+                    (and (= 8 depth)
+                         (comment-locs start)
+                         (not (comment-locs (start-line (parent node)))))
+                    )
+                  ))
+               (map (partial tap (comp print-node :node)))
+               )
+               )))
+     flatten
+     (take 10)
      (map prn)
      dorun
      time


generalize "je + vowel" to "je/me/te + vowel"

--- src/babel/francais/morphology.clj
+++ src/babel/francais/morphology.clj
@@ -29,9 +29,10 @@
         (and (not (nil? b))
              (let [a (get-string word)
                    b (get-string b)]
-               (and (= a "je")
+               (and (re-find #"^[jmlt]e" a) ;; je/le/me/te
                     (re-find #"^[aeéiou]" b))))
-        (str "j'" (get-string b))
+        (let [a (get-string word)]
+          (str (string/replace a #"^([jmlt]).*" (fn [[_ suffix]] (str suffix "'"))) (get-string b)))

         (and (not (nil? word))
              (not (nil? b)))


revise TODO

revise TODO

--- src/babel/francais/morphology.clj
+++ src/babel/francais/morphology.clj
@@ -13,8 +13,9 @@
 (declare get-string)
 (declare suffix-of)

-;; TODO: this is an overly huge method that needs to be rewritten to be easier to understand and maintain.
-;; TODO: lots of redundant code with other languages than French: refactor.
+;; TODO: separate part-of-speech -related functionality (e.g. the word is a verb) from
+;; compositional functionality (e.g. the word has an :a and :b, so combine by concatenation, etc)
+;;
 (defn get-string [word & [b]]
   (cond (and (nil? b)
              (seq? word))


available-processors

available-processors

--- src/atom_finder/util/jvm_util.clj
+++ src/atom_finder/util/jvm_util.clj
@@ -4,6 +4,7 @@
 (defn heap-size [] (.totalMemory (Runtime/getRuntime)))
 (defn free-memory [] (.freeMemory (Runtime/getRuntime)))
 (defn used-memory [] (long (/ (- (heap-size) (free-memory)) (* 1024 1024))))
+(defn available-processors [] (.. Runtime getRuntime availableProcessors))

 ;(defn object-size [o] (Instrumentation/getObjectSize o))


support post-:a punctuation (e.g. comma (,) in "at the party, i got drunk"

--- src/babel/english/morphology.cljc
+++ src/babel/english/morphology.cljc
@@ -164,7 +164,8 @@

        true
        (join " "
-             [(get-string (get-in word '(:a)))
+             [(str (get-string (get-in word '(:a)))
+                   (get-in word [:punctuation :middle]))
               (get-string (get-in word '(:b)))])))

    ;; TODO: this seems wrong: how could :infl == :english?


better generalization of gendered pronouns

--- src/babel/english/morphology.cljc
+++ src/babel/english/morphology.cljc
@@ -26,31 +26,23 @@
                                      [:english :b :b :note]]) ;; this handles "yourself" in the same sentence.
                 input)

-        input (cond (and (= "fr" from-language)
-                         (= "they" (get-in input [:english :a :english]))
-                         (= :fem (get-in input [:english :a :agr :gender])))
-                    (assoc-in
-                     input [:english :a :note] "♀")
-                    (and (= "fr" from-language)
-                         (= "they" (get-in input [:english :a :english]))
-                         (= :masc (get-in input [:english :a :agr :gender])))
-                    (assoc-in
-                     input [:english :a :note] "♂")
-
-                    (and (= "fr" from-language)
-                         (= "it" (get-in input [:english :a :english]))
-                         (= :fem (get-in input [:english :a :agr :gender])))
-                    (assoc-in
-                     input [:english :a :note] "♀")
-                    (and (= "fr" from-language)
-                         (= "it" (get-in input [:english :a :english]))
-                         (= :masc (get-in input [:english :a :agr :gender])))
-                    (assoc-in
-                     input [:english :a :note] "♂")
-
+        input (cond (and (some #(= from-language %) ["es" "fr"])
+                         (some #(= (get-in input [:english :a :english]) %) ["they"]))
+                    (cond (= :fem (get-in input [:english :a :agr :gender]))
+                          (assoc-in input [:english :a :note] "♀")
+                          (= :masc (get-in input [:english :a :agr :gender]))
+                          (assoc-in input [:english :a :note] "♂")
+                          true input)
+
+                    (and (some #(= from-language %) ["es" "fr" "it"])
+                         (some #(= (get-in input [:english :a :english]) %) ["it"]))
+                    (cond (= :fem (get-in input [:english :a :agr :gender]))
+                          (assoc-in input [:english :a :note] "♀")
+                          (= :masc (get-in input [:english :a :agr :gender]))
+                          (assoc-in input [:english :a :note] "♂")
+                          true input)
+
                     true input)]
-
-
     (cond ;; fo
       (= input :fail)
       (str input)


throw exception if generated expression can't be parsed

--- src/babel/italiano/benchmark.cljc
+++ src/babel/italiano/benchmark.cljc
@@ -13,14 +13,22 @@
             [clojure.string :as string]
             [dag_unify.core :refer [get-in strip-refs]]))

+(defn exception [error-string]
+  #?(:clj
+     (throw (Exception. error-string)))
+  #?(:cljs
+     (throw (js/Error. error-string))))
+
 (defn run-benchmark [times]
   (count (take (Integer/parseInt times)
                (repeatedly #(let [debug (println "starting generation..")
                                   expr (time (generate :top))]
                               (println (str "generated expression: " (fo expr)))
                               (println (str "starting parsing.."))
-                              (let [parsed (time (first (take 1 (parse (fo expr)))))]
-                                (println (str "parsed: " (fo parsed)))
+                              (let [parsed (time (take 1 (parse (fo expr))))]
+                                (if (empty? parsed)
+                                  (throw (exception (str "could not parse: " (fo expr)))))
+                                (println (str "parsed: " (fo (first parsed))))
                                 (println "")))))))
 (defn -main [times]
   (run-benchmark times))


apt update missing in front of r-base

apt update missing in front of r-base

--- main/src/dda/pallet/dda_managed_vm/infra/desktop_wiki.clj
+++ main/src/dda/pallet/dda_managed_vm/infra/desktop_wiki.clj
@@ -25,14 +25,6 @@
     :install-diagram
     :install-desktop-wiki))

-(defn install-diagram
-  [facility]
-  (actions/as-action
-   (logging/info (str facility "-install system: install-diagram")))
-  (actions/packages
-    :aptitude ["graphviz" "ditaa" "scrot" "dia"
-               "dvipng" "gnuplot" "r-base"]))
-
 (defn init-desktop-wiki
   [facility]
   (actions/as-action
@@ -43,6 +35,15 @@
      :release "bionic"
      :scopes ["main"]
      :key-url "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7588B93F8F7DF243"}))
+
+(defn install-diagram
+  [facility]
+  (actions/as-action
+   (logging/info (str facility "-install system: install-diagram")))
+  (actions/package-manager :update)
+  (actions/packages
+    :aptitude ["graphviz" "ditaa" "scrot" "dia"
+               "dvipng" "gnuplot" "r-base"]))

 (defn install-desktop-wiki
   [facility]


Create the lib/ dir if need be.

Create the lib/ dir if need be.

--- integration-tests/src/test/clojure/immutant/integs.clj
+++ integration-tests/src/test/clojure/immutant/integs.clj
@@ -57,6 +57,7 @@
   (let [jar-name (str "clojure-" version ".jar")]
     (if-let [jar (io/resource jar-name)]
       (doseq [lib-dir app-lib-dirs]
+        (.mkdir lib-dir)
         (io/copy (io/file jar) (io/file lib-dir jar-name))))))

 (defn for-each-version


set tags

set tags

--- src/brainbot/nozzle/esconnect.clj
+++ src/brainbot/nozzle/esconnect.clj
@@ -150,6 +150,9 @@
     {true (or allowed '("NOBODY"))
      false (or denied '("UNAUTHENTICATED"))}))  ;; XXX why can't we have the same default values

+(defn get-tags-from-path
+  [s]
+  (sort (disj (set (string/split s #"/")) "")))

 (defn simple-import_file
   [fs es-index {:keys [directory entry] :as body} {publish :publish}]
@@ -163,6 +166,7 @@
     (esd/put es-index "doc"
              id
              {:parent parent-id
+              :tags (get-tags-from-path directory)
               :allow_token_document (simple-perms true)
               :deny_token_document (simple-perms false)
               :lastmodified (get-in entry [:stat :mtime])})))


Small reformat.

Small reformat.

--- src/blutwurst/tuple_generator.clj
+++ src/blutwurst/tuple_generator.clj
@@ -71,7 +71,9 @@
                                                    value-generators (map #(hash-map :column %
                                                                                :generator (->> % (select-generators-for-column spec) :generator))
                                                                          (value-columns spec table))
-                                                   complex-generators (map #(fn[] (list (-> % :name keyword) ((build-generator-fn spec % generated-data)))) (complex-columns table))]
+                                                   complex-generators (map #(let [compound-generator (build-generator-fn spec % generated-data)]
+                                                                              (fn[] (list (-> % :name keyword) (compound-generator))))
+                                                                           (complex-columns table))]
                                                (doseq [c value-generators]
                                                  (if (nil? (:generator c))
                                                    (error "Unable to find generator for column " (:column c))))


Moving CLJS code to use transformers instead of reducers

--- src/clj/com/rpl/specter/impl.cljx
+++ src/clj/com/rpl/specter/impl.cljx
@@ -8,7 +8,7 @@
     [select* transform* collect-val]])
   (:require [com.rpl.specter.protocols :as p]
             [clojure.walk :as walk]
-            [clojure.core.reducers :as r]
+            #+clj [clojure.core.reducers :as r]
             [clojure.string :as s]
             #+clj [com.rpl.specter.defhelpers :as dh]
             )
@@ -502,10 +502,19 @@
   (assoc structure akey (next-fn (get structure akey))
   ))

+#+clj
 (defn all-select [structure next-fn]
   (into [] (r/mapcat next-fn structure)))

 #+cljs
+(defn next-fn-mapcat-transformation [next-fn]
+  (mapcat #(next-fn %1)))
+
+#+cljs
+(defn all-select [structure next-fn]
+  (into [] (next-fn-mapcat-transformation next-fn) structure))
+
+#+cljs
 (defn queue? [coll]
   (= (type coll) (type #queue [])))

@@ -513,6 +522,7 @@
 (defn queue? [coll]
   (= (type coll) (type clojure.lang.PersistentQueue/EMPTY)))

+#+clj
 (defn all-transform [structure next-fn]
   (let [empty-structure (empty structure)]
     (cond (and (list? empty-structure) (not (queue? empty-structure)))
@@ -525,6 +535,19 @@
           :else
           (->> structure (r/map next-fn) (into empty-structure))
       )))
+
+#+cljs
+(defn next-fn-map-transformation [next-fn]
+  (map #(next-fn %1)))
+
+#+cljs
+(defn all-transform [structure next-fn]
+  (let [empty-structure (empty structure)]
+    (if (and (list? empty-structure) (not (queue? empty-structure)))
+        ;; this is done to maintain order, otherwise lists get reversed
+        (doall (map next-fn structure))
+        (into empty-structure (next-fn-map-transformation next-fn) structure)
+        )))

 (deftype AllStructurePath [])


touch up messages on Shipments

touch up messages on Shipments

--- src/clj/game/cards-operations.clj
+++ src/clj/game/cards-operations.clj
@@ -369,7 +369,7 @@
    {:choices {:max 2 :req #(or (= (:advanceable %) "always")
                                (and (= (:advanceable %) "while-rezzed") (:rezzed %))
                                (= (:type %) "Agenda"))}
-    :msg (msg "1 advancement tokens on " (count targets) " cards")
+    :msg (msg "place 1 advancement token on " (count targets) " cards")
     :effect (req (doseq [t targets] (add-prop state :corp t :advance-counter 1 {:placed true})))}

    "Shipment from MirrorMorph"
@@ -388,7 +388,7 @@
                      {:choices {:req #(or (= (:advanceable %) "always")
                                           (and (= (:advanceable %) "while-rezzed") (:rezzed %))
                                           (= (:type %) "Agenda"))}
-                      :msg (msg "add " c " advancement tokens on a card")
+                      :msg (msg "place " c " advancement tokens on " (if (:rezzed target) (:title target) "a card"))
                       :effect (effect (add-prop :corp target :advance-counter c {:placed true}))} card nil)))}

    "Shoot the Moon"


Complete turn from p1 workin'

Complete turn from p1 workin'

--- src/cljs/battle_console/game.cljs
+++ src/cljs/battle_console/game.cljs
@@ -203,7 +203,13 @@
 (defn- game-deployed
   "After the game was deployed"
   [data]
+  (game-played data))
+
+(defn- game-played
+  "After the game was deployed"
+  [data]
   (state/set-state :game-data data)
+  (state/set-state :original-game-data data)
   (state/set-state :current-actions nil)
   (state/set-state :processing-action nil))

@@ -220,6 +226,21 @@
     (PUT url {:params {:actions actions}
               :format :json
               :handler game-deployed
+              :error-handler error-loading-action})))
+
+(defn- play-game
+  "Plays a game"
+  [ev]
+  (let [actions (or (state/get-state :current-actions) [])
+        game (state/get-state :original-game-data)
+        player-code (get-in game ["viewed-by" "player-code"])
+        token (state/get-state :token)
+        game-id (state/get-state :game-id)
+        url (str "http://api.orionsbelt.eu/game/" game-id "/turn?token=" token)]
+    (state/set-state :processing-action actions)
+    (PUT url {:params {:actions actions}
+              :format :json
+              :handler game-played
               :error-handler error-loading-action})))

 (defn- add-action
@@ -257,6 +278,16 @@
       (empty? (get-in state [:original-game-data "board" "stash" player-code])) "disabled"
       :else "")))

+(defn- play-disabled
+  "Checks if the play button should be disabled"
+  [state]
+  (let [player-code (get-in state [:game-data "viewed-by" "player-code"])]
+    (println (get-in state [:original-game-data "board" "state"]))
+    (cond
+      (state :processing-action) "disabled"
+      (not= player-code (get-in state [:original-game-data "board" "state"])) "disabled"
+      :else "")))
+
 (defn- render-action-console
   "Renders the action management console"
   [state]
@@ -266,7 +297,8 @@
     (dom/input #js {:type "text" :id "newAction" :className "form-control"})
     (dom/button #js {:id "resetActionButton" :onClick reset-actions :className "btn btn-default"} "Reset")
     (dom/button #js {:id "addActionButton" :onClick add-action :className "btn btn-info" :disabled (add-action-disabled state)} "Add")
-    (dom/button #js {:id "deployButton" :onClick deploy-game :className "btn btn-info" :disabled (deploy-disabled state)} "Deploy")))
+    (dom/button #js {:id "deployButton" :onClick deploy-game :className "btn btn-info" :disabled (deploy-disabled state)} "Deploy")
+    (dom/button #js {:id "playButton" :onClick play-game :className "btn btn-info" :disabled (play-disabled state)} "Play")))

 (defn- render-game
   "Renders the index page"


Start player roaster

Start player roaster

--- src/cljs/battle_console/game.cljs
+++ src/cljs/battle_console/game.cljs
@@ -85,6 +85,11 @@
             (for [x (range 1 9)]
               (dom/td nil (render-board-cell game x y)))))))))

+(defn- render-player-roaster
+  "Renders the player's roaster"
+  [game]
+  "")
+
 (defn- render-game
   "Renders the index page"
   [state owner]
@@ -95,7 +100,7 @@
         (dom/div nil
                  (game-header (state :game-data))
                  (dom/div #js {:className "row"}
-                   (dom/div #js {:className "col-lg-2"} "")
+                   (dom/div #js {:className "col-lg-2"} (render-player-roaster state))
                    (render-board (state :game-data))
                    (dom/div #js {:className "col-lg-2"} ""))
                  (game-stash (state :game-data))))


fetch service while rendering logs as we need service data #20

--- src/cljs/swarmpit/controller.cljs
+++ src/cljs/swarmpit/controller.cljs
@@ -79,11 +79,13 @@

 (defmethod dispatch :service-log
   [{:keys [route-params handler]}]
-  (get (routes/path-for-backend :service-logs route-params)
-       (fn [response]
-         (state/set-value {:handler handler
-                           :data    {:service (:id route-params)
-                                     :logs    response}} cursor))))
+  (get (routes/path-for-backend :service route-params)
+       (fn [service]
+         (get (routes/path-for-backend :service-logs route-params)
+              (fn [service-logs]
+                (state/set-value {:handler handler
+                                  :data    {:service service
+                                            :logs    service-logs}} cursor))))))

 (defmethod dispatch :service-create-image
   [{:keys [handler]}]


Added granule-ur to the placeholder UMM MENDS ISO granule xml.

--- src/cmr/umm/iso_mends/granule.clj
+++ src/cmr/umm/iso_mends/granule.clj
@@ -15,13 +15,15 @@
     ([granule]
      (cmr.umm.iso-mends.core/umm->iso-mends-xml granule false))
     ([granule indent?]
-     (let [emit-fn (if indent? x/indent-str x/emit-str)]
+     (let [{:keys [granule-ur]} granule
+           emit-fn (if indent? x/indent-str x/emit-str)]
        (emit-fn
-         (x/element :granule {} "UMM granule for MENDS ISO is not supported."))))))
+         (x/element :granule {}
+                    (x/element :placehodler {} "UMM granule for MENDS ISO is not supported.")
+                    (x/element :granule-ur {} granule-ur)))))))

 (defn validate-xml
   "Validates the XML against the ISO schema."
   [xml]
   (v/validate-xml (io/resource "schema/iso_mends/schema/1.0/ISO19115-2_EOS.xsd") xml))

-


Replace current board state with new one

--- src/cljs/battle_console/game.cljs
+++ src/cljs/battle_console/game.cljs
@@ -124,8 +124,10 @@
   [data]
   (let [actions (or (state/get-state :current-actions) [])
         current-action (state/get-state :processing-action)
-        new-actions (conj actions current-action)]
+        new-actions (conj actions current-action)
+        current-game (state/get-state :game-data)]
     (println data)
+    (state/set-state :game-data (assoc current-game "battle" (get data "board")))
     (state/set-state :current-actions new-actions)
     (state/set-state :processing-action nil)))


confirm

confirm

--- src/cljs/just_married/events.cljs
+++ src/cljs/just_married/events.cljs
@@ -1,6 +1,7 @@
 (ns just-married.events
   (:require [re-frame.core :as re-frame :refer [dispatch reg-event-db]]
-            [just-married.db :as db]))
+            [just-married.db :as db]
+            [ajax.core :refer [GET]]))

 (reg-event-db
  :initialize-db
@@ -21,3 +22,17 @@
  :email
  (fn [db [_ name]]
    (assoc db :email name)))
+
+(defn confirm
+  [coming db]
+  (print "Calling function to record coming"))
+
+(reg-event-db
+ :coming
+ (fn [db [_]]
+   (confirm db true)))
+
+(reg-event-db
+ :not-coming
+ (fn [db [_]]
+   (confirm db false)))


conditionally set tos text

conditionally set tos text

--- src/cljs/main/broadfcui/auth.cljs
+++ src/cljs/main/broadfcui/auth.cljs
@@ -302,7 +302,12 @@
             (do
               (endpoints/tos-get-text
                 (fn [{:keys [success? status-code raw-response]}]
-                  (swap! state assoc :tos raw-response))) ;; TODO: probably need more elegant handling than raw-response
+                    (swap! state assoc :tos
+                      (if success?
+                        raw-response
+                        (str "Could not load Terms of Service; please read it at "
+                           (str (config/terra-base-url) "/#terms-of-service")
+                           ".")))))
               (case status-code
                 ;; 403 means the user declined the TOS (or has invalid token? Need to distinguish)
                 403 (swap! state assoc :error :declined)


Improve log view performance #6

Improve log view performance #6

Improves log view performance by tracking the maximum id seen for this
deployment. That way we can just pull the last n entries out by message
id

--- src/cljs/onyx_dashboard/core.cljs
+++ src/cljs/onyx_dashboard/core.cljs
@@ -20,9 +20,11 @@
 (defonce app-state
   (atom {:ready? false
          :deployments {}
-         :deployment {:jobs []
+         :deployment {:tracking-id nil
+                      :jobs []
                       :selected-job nil
-                      :entries []}}))
+                      :message-id-max nil
+                      :entries {}}}))

 (let [{:keys [chsk ch-recv send-fn state]}
       (sente/make-channel-socket! "/chsk" {:type :auto})]
@@ -31,15 +33,17 @@
   (def chsk-send! send-fn)
   (def chsk-state state))

-;; SETUP A CONTROLLER HERE SOMEWHERE FOR ALL THE SWAPS
 ; (defn stop-tracking! [deployment-id]
 ;   (chsk-send! [:deployment/track-cancel deployment-id]))

 (defn start-tracking! [deployment-id]
-  (swap! app-state assoc :deployment {:id deployment-id
-                                      :entries []})
-  (chsk-send! [:deployment/track deployment-id])
-  false)
+  (let [tracking-id (uuid/make-random)]
+    (swap! app-state assoc :deployment {:tracking-id tracking-id
+                                        :id deployment-id
+                                        :entries {}})
+    (chsk-send! [:deployment/track {:deployment-id deployment-id
+                                    :tracking-id tracking-id}])
+    false))

 (defcomponent select-deployment [{:keys [deployments deployment]} owner]
   (render [_]
@@ -49,23 +53,25 @@
                        (apply (partial b/dropdown {:bs-style "primary"
                                                    :title (or (:id deployment)
                                                               "Deployments")})
-                              (for [[id info] deployments]
+                              (for [[id info] (reverse (sort-by (comp :created-at val)
+                                                                deployments))]
                                 (b/menu-item {:key id
                                               :on-select (fn [_]
                                                            ;(stop-tracking! id)
                                                            (start-tracking! id))}
                                              id)))))))

-(defn entry-for-job? [job-id entry]
+(defn is-job-entry? [job-id entry]
   (if-let [entry-job-id (if (= (:fn entry) :submit-job)
                           (:id entry)
                           (:job-id entry))]
     (= entry-job-id job-id)))

-(defcomponent deployment-entries [{:keys [selected-job entries]} owner]
+(defcomponent deployment-entries [{:keys [selected-job entries message-id-max]} owner]
   (render [_]
-          ;(println "ENTRY INFO:" (count (map :message-id entries))  (count (set (map :message-id entries))))
-          (let [filtered-entries nil #_(filter (partial entry-for-job? selected-job) entries)]
+          (let [num-displayed 100
+                start-id (max 0 (- (inc message-id-max) num-displayed))
+                displayed-msg-ids (range start-id (inc message-id-max))]
             (table {:striped? true :bordered? true :condensed? true :hover? true}
                    (dom/thead
                      (dom/tr
@@ -73,7 +79,9 @@
                        (dom/th "Time")
                        (dom/th "fn")))
                    (dom/tbody ;{:height "500px" :position "absolute" :overflow-y "scroll"}
-                              (for [entry (take 100 (reverse (sort-by :message-id entries)))]
+                              ; Entries may not exist if they have come in out of order from sente,
+                              ; thus we only keep the not nil entries
+                              (for [entry (keep entries (reverse displayed-msg-ids))]
                                 (dom/tr {:key (str "entry-" (:message-id entry))
                                          :title (str (om/value entry))}
                                         (dom/td (str (:id (:args entry))))
@@ -92,7 +100,7 @@
                      (dom/th "ID")
                      (dom/th "Time")))
                  (dom/tbody
-                   (for [job (reverse (time (sort-by :created-at (vals jobs))))]
+                   (for [job (reverse (sort-by :created-at (vals jobs)))]
                      (let [job-id (:id job)]
                        (dom/tr {; make this a class
                                 :style {:background-color (if (= job-id selected-job)
@@ -108,12 +116,36 @@

 (defcomponent job-info [{:keys [selected-job jobs]} owner]
   (render [_]
-          (if (and selected-job jobs)
-            (let [job (jobs selected-job)]
-              (dom/div
-                (dom/div (str (om/value job)))
-                (if-let [catalog (:catalog job)]
-                  (om/build catalog-view catalog {})))))))
+          (if-let [job (and selected-job jobs (jobs selected-job))]
+            (dom/div
+              (dom/div (str (om/value job)))
+              (if-let [catalog (:catalog job)]
+                (om/build catalog-view catalog {}))))))
+
+(defn msg-controller [type msg]
+  (swap! app-state
+         (fn [state]
+           (if-let [tracking-id (:tracking-id msg)]
+             (cond (= tracking-id (get-in state [:deployment :tracking-id]))
+                   (case type
+                     ;:deployment/replica
+                     ;(assoc-in state [:deployment :replica] recv-msg)
+                     :job/completed-task
+                     (do (println "Task completed: " msg)
+                         state)
+                     :job/submitted-job
+                     (assoc-in state [:deployment :jobs (:id msg)] msg)
+                     :job/entry
+                     (update-in state [:deployment] (fn [deployment]
+                                                      (-> deployment
+                                                          (assoc :message-id-max (max (:message-id msg)
+                                                                                (:message-id-max deployment)))
+                                                          (assoc-in [:entries (:message-id msg)] msg))))
+                     state)
+                   :else state)
+             (if (= :deployment/listing type)
+               (assoc-in state [:deployments] msg)
+               state)))))

 (defn event-handler [{:keys [event]}]
   (let [[msg-type msg] event]
@@ -121,18 +153,7 @@
       :chsk/recv
       (let [[recv-type recv-msg] msg]
         (println "Recv event " event)
-        (case recv-type
-          :deployment/replica
-          (swap! app-state assoc-in [:deployment :replica] recv-msg)
-          :deployment/listing
-          (swap! app-state assoc :deployments recv-msg)
-          :job/completed-task
-          (println "Task completed: " recv-msg)
-          :job/submitted-job
-          (swap! app-state assoc-in [:deployment :jobs (:id recv-msg)] recv-msg)
-          :job/entry
-          (swap! app-state update-in [:deployment :entries] conj recv-msg)
-          (println "Unhandled recv-type: " recv-type recv-msg)))
+        (msg-controller recv-type recv-msg))
       :chsk/state (when (:first-open? msg)
                     (chsk-send! [:deployment/get-listing])
                     (swap! app-state assoc :ready? true)
@@ -141,7 +162,7 @@
 (sente/start-chsk-router! ch-chsk event-handler)

 (defn main []
-  #_(om/root
+  (om/root
     ankha/inspector
     app-state
     {:target (js/document.getElementById "ankha")})


Fix styling so that hover-cards are not covered by subsequent messages

--- src/braid/client/ui/styles/message.cljs
+++ src/braid/client/ui/styles/message.cljs
@@ -18,8 +18,20 @@
       {:display "none"}]]

     [:&.seen
-     {:transition [["opacity" "0.5s" "linear"]]
-      :opacity 0.6}]
+     {:transition [["opacity" "0.5s" "linear"]]}
+     ; cannot apply opacity to .message or .content or .dummy
+     ; b/c it creates a new stacking context
+     ; causing hover-cards to display under subsequent messages
+     ["> .info"
+      "> .avatar img"
+      "> .embed"
+      "> .content > img"
+      "> .content > .dummy > .user > .pill"
+      "> .content > .dummy > .tag > .pill"
+      "> .content > .dummy > .external"
+      {:opacity 0.6}]
+     ["> .content"
+      {:color "rgba(0,0,0,0.6)"}]]

     [:&.unseen {}]


update get-items-coords doc string

update get-items-coords doc string

--- src/clj/battlebots/game/bot_helpers.clj
+++ src/clj/battlebots/game/bot_helpers.clj
@@ -61,7 +61,16 @@

 (defn get-items-coords
   "Given an item and an arena, get-items-coords will return the coordinates associated
-  with the item or nil if no item is found."
+  with the item or nil if no item is found.
+
+  ex:
+    :item a1
+    :arena o1 f2 o4
+           o5 b1 a1
+           o2 o3 f1
+
+  returns: [2 1]
+  "
   [item arena]
   (let [tracker (atom {:x -1 :y -1})]
     (:coords (reduce (fn [match row]


Don't quote symbols

Don't quote symbols

--- src/cljs/cglossa/search_inputs/cwb.cljs
+++ src/cljs/cglossa/search_inputs/cwb.cljs
@@ -91,15 +91,15 @@
         multilingual? (> (count languages) 1)]
     [:span
      [:div.row-fluid.search-input-links
-      (if (= view 'simple)
+      (if (= view simple)
         [:b "Simple"]
         [:a {:href "" :title "Simple search box" :on-click #()} "Simple"])
       " | "
-      (if (= view 'extended)
+      (if (= view extended)
         [:b "Extended"]
         [:a {:href "" :title "Search for grammatical categories etc." :on-click #()} "Extended"])
       " | "
-      (if (= view 'cqp)
+      (if (= view cqp)
         [:b "CQP"]
         [:a {:href "" :title "CQP expressions" :on-click #()} "CQP"])
       [search-button multilingual?]


Add graph view.

Add graph view.

--- src/clojure/my/stuff/fitlogger/main.clj
+++ src/clojure/my/stuff/fitlogger/main.clj
@@ -10,7 +10,7 @@
               [clojure.string :refer [join split-lines split]]
               [clojure.java.io :as io]
               [my.stuff.fitlogger.sebas :as seb])
-    (:import (android.widget EditText TextView)
+    (:import (android.widget EditText TextView CheckBox)
              (android.view ViewGroup)
              (android.support.v4.view ViewPager PagerAdapter)
              (java.util Calendar)
@@ -19,7 +19,8 @@
              (android.app DatePickerDialog DatePickerDialog$OnDateSetListener)
              (android.app DialogFragment)
              (android.content.res AssetManager)
-             (android.graphics.Color)))
+             (android.graphics.Color)
+             (com.jjoe64.graphview GraphView)))

 ;; We execute this function to import all subclasses of R class. This gives us
 ;; access to all application resources.
@@ -58,6 +59,12 @@
 (defelement :view-pager
   :classname android.support.v4.view.ViewPager
   :inherits :view-group)
+(defelement :graphview
+  :classname com.jjoe64.graphview.GraphView
+  :inherits :view)
+(defelement :checkbox
+  :classname android.widget.CheckBox
+  :inherits :button)

 (defn format-measurements [m]
   (apply conj [:table-row {}]
@@ -199,6 +206,16 @@
                   :layout-weight 1}
     (format-listing @listing)]])

+(defn graph-layout [activity]
+  [:linear-layout {:orientation :vertical}
+   [:graphview {:layout-width :fill,
+                :layout-height 700}]
+   [:linear-layout {:orientation :horizontal}
+    [:checkbox {:text "Total Weight"}]]
+   [:linear-layout {:orientation :horizontal}
+    [:checkbox {:text "BF%"}]
+    [:checkbox {:text "Total BF"}]]])
+

 (defn pager-adapter [activity]
   (proxy [PagerAdapter] []
@@ -209,10 +226,9 @@
         (let [layout (make-ui activity (input-layout activity))]
           (do (.addView coll layout 0)
               layout))
-        (let [tv (TextView. activity)]
-          (do (.setText tv (str pos))
-              (.addView coll tv 0)
-              tv))))))
+        (let [layout (make-ui activity (graph-layout activity))]
+          (do (.addView coll layout 0)
+              layout))))))

 ;; This is how an Activity is defined. We create one and specify its onCreate
 ;; method. Inside we create a user interface that consists of an edit and a


Add snapshot-action-fields-mapping

Add snapshot-action-fields-mapping

https://github.com/threatgrid/ctim/pull/282

--- src/ctia/entity/investigation.clj
+++ src/ctia/entity/investigation.clj
@@ -56,6 +56,17 @@
 (def realize-investigation
   (default-realize-fn "investigation" NewInvestigation StoredInvestigation))

+(def snapshot-action-fields-mapping
+  {:object_ids {:type "text"
+                :analyzer "text_analyzer"
+                :search_quote_analyzer "text_analyzer"
+                :search_analyzer "search_analyzer"
+                :include_in_all false}
+   :targets {:type "nested"
+             :include_in_all false}
+   :investigated_observables {:type "nested"
+                              :include_in_all false}})
+
 (def investigation-mapping
   {"investigation"
    {:dynamic false
@@ -64,7 +75,8 @@
      em/base-entity-mapping
      em/describable-entity-mapping
      em/sourcable-entity-mapping
-     em/stored-entity-mapping)}})
+     em/stored-entity-mapping
+     snapshot-action-fields-mapping)}})

 (def-es-store InvestigationStore :investigation
   StoredInvestigation


up version for release

up version for release

--- kafka-clj/project.clj
+++ kafka-clj/project.clj
@@ -1,4 +1,4 @@
-(defproject kafka-clj "4.0.0-SNAPSHOT"
+(defproject kafka-clj "4.0.0"
   :description "fast kafka library implemented in clojure"
   :url "https://github.com/gerritjvv/kafka-fast"
   :license {:name "Eclipse Public License"


Added fuzzy-subset?

Added fuzzy-subset?

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

--- src/conexp/contrib/fuzzy/sets.clj
+++ src/conexp/contrib/fuzzy/sets.clj
@@ -142,6 +142,13 @@
   (fn [first & rest]
     (max 0 (apply - first rest))))

+(defn fuzzy-subset?
+  "Returns true iff fuzzy-set-1 is a subset of fuzzy-set-2."
+  [fuzzy-set-1 fuzzy-set-2]
+  (forall [k (keys (fuzzy-set-as-hashmap fuzzy-set-1))]
+    (<= (fuzzy-set-1 k)
+        (fuzzy-set-2 k))))
+
 ;;;

 nil


todomvc: bump Carry dep

todomvc: bump Carry dep

--- examples/todomvc/project.clj
+++ examples/todomvc/project.clj
@@ -26,7 +26,7 @@
                                            [cljsjs/jquery-ui "1.11.4-0"]
                                            [cljsjs/filesaverjs "1.1.20151003-0"]]}

-             :clojars-deps {:dependencies [[carry "0.1.0"]
+             :clojars-deps {:dependencies [[carry "0.2.0"]
                                            [carry-debugger "0.2.0"]
                                            [carry-history "0.3.0"]
                                            [carry-logging "0.1.0"]


core: split-with, repeat

core: split-with, repeat

--- data/core.clj
+++ data/core.clj
@@ -1463,3 +1463,15 @@
   {:added "1.0"}
   [n coll]
   [(take n coll) (drop n coll)])
+
+(defn split-with
+  "Returns a vector of [(take-while pred coll) (drop-while pred coll)]"
+  {:added "1.0"}
+  [pred coll]
+  [(take-while pred coll) (drop-while pred coll)])
+
+(defn repeat
+  "Returns a lazy (infinite!, or length n if supplied) sequence of xs."
+  {:added "1.0"}
+  ([x] (lazy-seq (cons x (repeat x))))
+  ([n x] (take n (repeat x))))


core: and

core: and

--- data/core.clj
+++ data/core.clj
@@ -577,3 +577,15 @@
   must implement Comparable"
   {:added "1.0"}
   [x y] (compare* x y))
+
+(defmacro and
+  "Evaluates exprs one at a time, from left to right. If a form
+  returns logical false (nil or false), and returns that value and
+  doesn't evaluate any of the other expressions, otherwise it returns
+  the value of the last expr. (and) returns true."
+  {:added "1.0"}
+  ([] true)
+  ([x] x)
+  ([x & next]
+   `(let [and# ~x]
+      (if and# (and ~@next) and#))))


Lisätty error-logitus 400-virheelle (tulee usein Elasticsearchista)

--- clj-log/src/clj_log/error_log.clj
+++ clj-log/src/clj_log/error_log.clj
@@ -13,6 +13,8 @@
                (.error (impl/get-logger (impl/find-factory) *ns*) "HTTP 500 from:" ~'trace-redirects))
              (catch [:status 404] {:keys [~'trace-redirects]}
                (.error (impl/get-logger (impl/find-factory) *ns*) "HTTP 404 from:" ~'trace-redirects))
+             (catch [:status 400] {:keys [~'trace-redirects ~'body]}
+               (.error (impl/get-logger (impl/find-factory) *ns*) "HTTP 400 from:" ~'trace-redirects " [" ~'body "]"))
              (catch Object ~'_
                (if test
                  (if verbose


Bump version

Bump version

--- project.clj
+++ project.clj
@@ -1,5 +1,5 @@
-(defproject salava "0.1.0-SNAPSHOT"
-  :description "FIXME: write description"
+(defproject salava "1.0.0"
+  :description "Salava application server"
   :url "http://salava.org"
   :license {:name "Apache 2.0"
             :url "http://www.apache.org/licenses/LICENSE-2.0"}


version 0.3.8

version 0.3.8

--- project.clj
+++ project.clj
@@ -1,3 +1,3 @@
-(defproject clojure-useful "0.3.7"
+(defproject clojure-useful "0.3.8"
   :description "useful clojure functions"
   :dependencies [[clojure "1.2.0"]])


Updated ring-reload-modified to 0.1.1

Updated ring-reload-modified to 0.1.1

--- project.clj
+++ project.clj
@@ -5,4 +5,4 @@
                  [org.clojure/clojure-contrib "1.2.0"]
                  [ring/ring-jetty-adapter "0.3.10"]
                  [ring/ring-devel "0.3.10"]
-                 [ring-reload-modified "0.1.0"]])
+                 [ring-reload-modified "0.1.1"]])


Update to next version of muon

Update to next version of muon

--- project.clj
+++ project.clj
@@ -37,9 +37,9 @@
                  [ring/ring-defaults "0.1.2"]
                  [midje "1.6.3"]
                  [uap-clj "1.0.1"]
-                 [io.muoncore/muon-core "0.33"]
-                 [io.muoncore/muon-transport-amqp "0.33"]
-                 [io.muoncore/muon-discovery-amqp "0.33"]
+                 [io.muoncore/muon-core "0.34"]
+                 [io.muoncore/muon-transport-amqp "0.34"]
+                 [io.muoncore/muon-discovery-amqp "0.34"]
                  [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                  [stylefruits/gniazdo "0.4.0"]]
   :plugins [[lein-ring "0.9.6"]