remove earmuffs from non dynamic vars

remove earmuffs from non dynamic vars

--- src/cljs/infinitelives/utils/events.cljs
+++ src/cljs/infinitelives/utils/events.cljs
@@ -255,22 +255,22 @@
 ;; --------------
 ;; resize channels receive [width height]
 ;;
-(def *resize-chans* (atom #{}))
+(def resize-chans (atom #{}))

 (defn new-resize-chan []
   (let [c (chan)]
-    (swap! *resize-chans* conj c)
+    (swap! resize-chans conj c)
     c))

 (defn del-resize-chan [c]
-  (swap! *resize-chans* disj c))
+  (swap! resize-chans disj c))

 (defn clear-resize-chans! []
-  (swap! *resize-chans* #{}))
+  (swap! resize-chans #{}))

 (defn resize-event-chan-handler [ev]
   (let [size [(.-innerWidth js/window) (.-innerHeight js/window)]]
-    (doseq [c @*resize-chans*] (put! c size))))
+    (doseq [c @resize-chans] (put! c size))))

 (defn install-resize-handler!
   "install the resize callback to resize the main canvas renderer"
@@ -283,22 +283,22 @@
 ;; -------------
 ;; frame channel receives a true every frame paint
 ;;
-(def *frame-chans* (atom #{}))
+(def frame-chans (atom #{}))

 (defn new-frame-chan []
   (let [c (chan)]
-    (swap! *frame-chans* conj c)
+    (swap! frame-chans conj c)
     c))

 (defn del-frame-chan! [c]
-  (swap! *frame-chans* disj c))
+  (swap! frame-chans disj c))

 (defn clear-frame-chans! []
-  (swap! *frame-chans* #{}))
+  (swap! frame-chans #{}))

 (defn frame-event-chan-handler [ev]
   (request-animation-frame frame-event-chan-handler)
-  (doseq [c @*frame-chans*] (put! c true)))
+  (doseq [c @frame-chans] (put! c true)))

 (defn install-frame-handler!
   "install the frame callback to send frame chan messages"


label one more thread.

label one more thread.

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@7071 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- acqEngine/src/org/micromanager/acq_engine.clj
+++ acqEngine/src/org/micromanager/acq_engine.clj
@@ -594,7 +594,8 @@
                            (let [img (annotate-image (core getLastImage) event state)]
                               (reset-snap-window img)
                               (show-image @snap-window img)))
-                         (core stopSequenceAcquisition)))))
+                         (core stopSequenceAcquisition))
+                    "Live mode (clojure)")))
         (dosync (ref-set live-mode-running false))))

 ;; java interop


remove broken tests

remove broken tests

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@10400 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

--- acqEngine/src/org/micromanager/acq_engine.clj
+++ acqEngine/src/org/micromanager/acq_engine.clj
@@ -874,11 +874,11 @@
     (.setParentGUI gui)
     (.setPositionList (.getPositionList gui))))))

-(defn test-dialog [eng]
-  (.show (AcqControlDlg. eng (Preferences/userNodeForPackage (.getClass gui)) gui)))
-
-(defn run-test []
-  (test-dialog (create-acq-eng)))
+;(defn test-dialog [eng]
+;  (.show (AcqControlDlg. eng (Preferences/userNodeForPackage (.getClass gui)) gui)))
+
+;(defn run-test []
+;  (test-dialog (create-acq-eng)))

 (defn stop []
   (when-let [acq-thread (:acq-thread (.state last-acq))]


Proper 301 redirects for old /show/ urls

--- src/multiplex/routes/home.clj
+++ src/multiplex/routes/home.clj
@@ -1,5 +1,6 @@
 (ns multiplex.routes.home
-  (:use compojure.core)
+  (:use compojure.core
+        [noir.response :only (redirect)])
   (:require [clojure.data.json :as json]
             [multiplex.config :as config]
             [multiplex.gfx :as gfx]
@@ -157,11 +158,11 @@
 (defroutes home-routes
   (POST "/store/:apikey" [url txt type apikey] (render-page-store apikey (untaint url txt type)))
   (POST "/signup" [username email password code] (render-page-signup (untaint-signup username email password code)))
+  (GET "/signup" [code] (render-page-signup {:code (util/string-or-default code "")}))
   (GET "/add/:apikey" [url txt type apikey title] (render-page-add (untaint url txt type apikey title)))
-  (GET "/show/:id" [id] (show-single id))
   (GET "/post/:id" [id] (show-single id))
+  (GET "/show/:id" [id] (redirect (str "/post/" id) :permanent))
   (GET "/about" [] (render-page-about))
-  (GET "/signup" [code] (render-page-signup {:code (util/string-or-default code "")}))
   (GET "/user/:username/:apikey" [username apikey] (render-page-user {:username username :apikey apikey}))
   (GET "/user/:username" [username] (render-page-user {:username username}))
   (GET "/" [page limit] (show-some (util/int-or-default limit 10) (util/int-or-default page 1))))


Make eastwood happy.

Make eastwood happy.

--- src/oc/storage/api/boards.clj
+++ src/oc/storage/api/boards.clj
@@ -393,8 +393,7 @@
                           ;; For drafts board still use the full board
                           (if (= (:slug board) (:slug board-res/default-drafts-board))
                             (let [full-board (assemble-board conn org board ctx)
-                                 with-sorted-entries (assoc full-board :entries
-                                  (sort/sort-draft-board-entries (:entries full-board)))]
+                                 with-sorted-entries (update-in full-board [:entries] sort/sort-draft-board-entries)]
                               (board-rep/render-board org sort-type with-sorted-entries ctx nil))
                             ;; Render paginated board for all the rest
                             (let[ctx-params (keywordize-keys (-> ctx :request :params))


Use dotimes to clear pixel-pusher display.

--- src/org/playasophy/wonderdome/display/pixel_pusher.clj
+++ src/org/playasophy/wonderdome/display/pixel_pusher.clj
@@ -49,8 +49,9 @@
   (stop
     [this]
     (log/info "Stopping PixelPusher display...")
-    (display/clear this)
-    (Thread/sleep 10)
+    (dotimes [i 10]
+      (display/clear this)
+      (Thread/sleep 100))
     (.stopPushing registry)
     this)


Fixed issue #59

Fixed issue #59

--- src/clojure/alfresco_technical_validation/impl/validations/api.clj
+++ src/clojure/alfresco_technical_validation/impl/validations/api.clj
@@ -95,7 +95,7 @@
                                 "API05"
                                 "Bean injections other than ServiceRegistry"
                                 true
-                                "The technology does not perform bean injection."
+                                "The technology does not inject any beans other than the ServiceRegistry."
                                 #(when (empty? %) true))))

 ; Would be preferable to do a deeper search here, but Neo4J is super slow at those


CMR-339: Fixed parameter order.

CMR-339: Fixed parameter order.

--- src/cmr/search/data/query_to_elastic.clj
+++ src/cmr/search/data/query_to_elastic.clj
@@ -26,7 +26,7 @@

 (defn query-field->elastic-field
   "Returns the elastic field name for the equivalent query field name."
-  [concept-type field]
+  [field concept-type]
   (get-in field-mappings [concept-type field] field))

 (defprotocol ConditionToElastic


Updated ring-servlet dependencies

Updated ring-servlet dependencies

--- ring-servlet/project.clj
+++ ring-servlet/project.clj
@@ -1,6 +1,6 @@
-(defproject ring/ring-servlet "0.2.5"
+(defproject ring/ring-servlet "0.3.0-beta1"
   :description "Ring servlet utilities."
   :url "http://github.com/mmcgrana/ring"
-  :dependencies [[ring/ring-core "0.2.5"]
+  :dependencies [[ring/ring-core "0.3.0-beta1"]
                  [javax.servlet/servlet-api "2.5"]]
   :dev-dependencies [[lein-clojars "0.5.0"]])


attributes cleanup: ec2

attributes cleanup: ec2

--- ssclj/tools/src/com/sixsq/slipstream/tools/cli/ssconfigmigrate.clj
+++ ssclj/tools/src/com/sixsq/slipstream/tools/cli/ssconfigmigrate.clj
@@ -48,6 +48,13 @@
 ;; Persistence.
 ;;

+(defn remove-attrs
+  "Cleanup of old attributes during migration."
+  [con]
+  (cond
+    (= "ec2" (:cloudServiceType con)) (dissoc con :securityGroup)
+    :else con))
+
 (defn persist-config!
   [sc]
   (println "Peristing global configuration.")
@@ -60,6 +67,7 @@
   [cn vals]
   (println "Persisting connector:" cn)
   (-> vals
+      remove-attrs
       ssconfig/validate
       ssconfig/store))


unnecessary namespace removed

unnecessary namespace removed

--- Clojure-Websockets/MainApp/src/clj/birdwatch/persistence/component.clj
+++ Clojure-Websockets/MainApp/src/clj/birdwatch/persistence/component.clj
@@ -1,7 +1,6 @@
 (ns birdwatch.persistence.component
   (:gen-class)
   (:require
-   [birdwatch.persistence.tools :as pt]
    [birdwatch.persistence.elastic :as es]
    [clojure.tools.logging :as log]
    [clojure.pprint :as pp]


CMR-822: Update tests to reflect new error language

--- test/cmr/system_int_test/search/parameter_type_validation_test.clj
+++ test/cmr/system_int_test/search/parameter_type_validation_test.clj
@@ -18,10 +18,12 @@
   [concept-type name valid-example-map & other-params]
   (testing (str "querying with " name " as a single value returns an error")
     (let [response (search/find-refs concept-type (into {name "a"} other-params))]
-      (is-bad-request? response [(str "Parameter [" name "] must contain a map.")])))
+      (is-bad-request? response
+                       [(str "Parameter [" name "] must include a nested key, " name "[...]=value.")])))
   (testing (str "querying with " name " as a list returns an error")
     (let [response (search/find-refs concept-type (into {name ["a" "b"]} other-params))]
-      (is-bad-request? response [(str "Parameter [" name "] must contain a map.")])))
+      (is-bad-request? response
+                       [(str "Parameter [" name "] must include a nested key, " name "[...]=value.")])))
   (testing (str "querying with " name " as a map succeeds")
     (let [response (search/find-refs concept-type (into {name valid-example-map} other-params))]
       (is (nil? (:errors response))))))
@@ -39,10 +41,10 @@

   (testing "invalid type alongside other invalid parameters produces multiple errors"
     (let [response (search/find-refs :granule {:options "bad" :page_size "twenty"})]
-      (is-bad-request? response ["Parameter [options] must contain a map."
+      (is-bad-request? response ["Parameter [options] must include a nested key, options[...]=value."
                                  "page_size must be a number between 0 and 2000"])))

   (testing "multiple invalid types produce multiple errors"
     (let [response (search/find-refs :granule {:options "bad" :exclude "also-bad"})]
-      (is-bad-request? response ["Parameter [exclude] must contain a map."
-                                 "Parameter [options] must contain a map."]))))
+      (is-bad-request? response ["Parameter [exclude] must include a nested key, exclude[...]=value."
+                                 "Parameter [options] must include a nested key, options[...]=value."]))))


Type specs: Allow many ref values to be vectors or sets

--- src/main/workflo/macros/specs/types.cljc
+++ src/main/workflo/macros/specs/types.cljc
@@ -57,7 +57,8 @@
 ;;;; Simple reference types

 (s/def ::ref ::id)
-(s/def ::ref-many (s/coll-of ::id :kind vector?))
+(s/def ::ref-many (s/or :vector (s/coll-of ::id :kind vector?)
+                        :set (s/coll-of ::id :kind set?)))

 ;;;; Entity references


Making functions non-public

Making functions non-public

--- src/org/spootnik/cyanite/store_cache.clj
+++ src/org/spootnik/cyanite/store_cache.clj
@@ -15,29 +15,29 @@
 (def ^:const metric-wait-time 60)
 (def ^:const cache-add-ttl 180)

-(defn agg-avg
+(defn- agg-avg
   [data]
   (/ (reduce + data) (count data)))

-(defn construct-mkey
+(defn- construct-mkey
   [tenant period rollup time]
   (str/join "-" [tenant period rollup time]))

-(defn construct-key
+(defn- construct-key
   ([tenant period rollup time path]
      (str/join "-" [(construct-mkey tenant period rollup time) path]))
   ([mkey path]
      (str/join "-" [mkey path])))

-(defn calc-delay
+(defn- calc-delay
   [rollup add]
   (+ rollup metric-wait-time add))

-(defn to-ms
+(defn- to-ms
   [sec]
   (* sec 1000))

-(defn create-flusher
+(defn- create-flusher
   [mkeys mkey pkeys tenant period rollup time ttl fn-get fn-agg fn-store fn-key]
   (fn []
     (try
@@ -50,7 +50,7 @@
       (catch Exception e
         (info e "Cache flushing exception")))))

-(defn run-delayer!
+(defn- run-delayer!
   [rollup fn-flusher]
   (let [delayer (future
                   (Thread/sleep (to-ms (calc-delay rollup (rand-int 59)))))
@@ -61,7 +61,7 @@
                   (fn-flusher))]
     [delayer flusher]))

-(defn set-pkeys!
+(defn- set-pkeys!
   [mkeys tenant period rollup time ttl fn-get fn-agg fn-store fn-key]
   (let [mkey (construct-mkey tenant period rollup time)]
     (swap! mkeys
@@ -81,14 +81,14 @@
                 (assoc % mkey pkeys))))
     (get @mkeys mkey)))

-(defn set-keys!
+(defn- set-keys!
   [mkeys tenant period rollup time path ttl fn-get fn-agg fn-store fn-key]
   (let [pkeys (set-pkeys! mkeys tenant period rollup time ttl fn-get
                           fn-agg fn-store fn-key)]
     (swap! pkeys #(if (contains? % path) % (conj % path)))
     pkeys))

-(defn run-flusher!
+(defn- run-flusher!
   [mkeys]
   (debug "Flushing the cache...")
   (doseq [[mkey pkeys] @mkeys]
@@ -101,7 +101,7 @@
           (deref flusher)))))
   (debug "The cache has been flushed"))

-(defn store-chan
+(defn- store-chan
   [chan tenant period rollup time path data ttl]
   (>!! chan {:tenant tenant
              :period period


(PDB-4961) Change PostgreSQL deprecation log level to error for Puppet 7

--- src/puppetlabs/puppetdb/cli/services.clj
+++ src/puppetlabs/puppetdb/cli/services.clj
@@ -548,7 +548,7 @@
                        :current current
                        :oldest supported})))
     (when (neg? (compare current supported))
-      (log/warn (trs "PostgreSQL {0}.{1} is deprecated. Please upgrade to PostgreSQL {2}"
+      (log/error (trs "PostgreSQL {0}.{1} is deprecated. Please upgrade to PostgreSQL {2}"
                      (first current)
                      (second current)
                      (first supported))))


CMR-2905: Moving metadata db to a regular dependency of access control app due to source code dependency.

--- access-control-app/project.clj
+++ access-control-app/project.clj
@@ -5,11 +5,11 @@
     [nasa-cmr/cmr-elastic-utils-lib "0.1.0-SNAPSHOT"]
     [nasa-cmr/cmr-message-queue-lib "0.1.0-SNAPSHOT"]
     [nasa-cmr/cmr-common-app-lib "0.1.0-SNAPSHOT"]
-    [nasa-cmr/cmr-umm-spec-lib "0.1.0-SNAPSHOT"]])
+    [nasa-cmr/cmr-umm-spec-lib "0.1.0-SNAPSHOT"]
+    [nasa-cmr/cmr-metadata-db-app "0.1.0-SNAPSHOT"]])

 (def dev-cmr-deps
-  '[[nasa-cmr/cmr-metadata-db-app "0.1.0-SNAPSHOT"]
-    [nasa-cmr/cmr-mock-echo-app "0.1.0-SNAPSHOT"]])
+  '[[nasa-cmr/cmr-mock-echo-app "0.1.0-SNAPSHOT"]])

 (defproject nasa-cmr/cmr-access-control-app "0.1.0-SNAPSHOT"
   :description "Implements the CMR access control application."


Multiple clean ups for consistency

Multiple clean ups for consistency

--- src/test_utils/fracture_diagnostics.cljc
+++ src/test_utils/fracture_diagnostics.cljc
@@ -2,12 +2,33 @@
   #?(:cljs (:require [test-utils.core :as tuc])
      :clj (:require (test-utils [core :as tuc]))))

+(def physical-quantities [:length :mass :pressure :volume :slurry-rate :proppant-concentration])
+
+(defn rand-physical-quantity []
+  (rand-nth physical-quantities))
+
+(defn rand-unit [physical-quantity]
+  (let [quantity-units-map {:length [:ft :m]
+                            :mass [:lb :kg]
+                            :pressure [:psi :kPa :MPa]
+                            :volume [:bbl :m3]
+                            :slurry-rate [:bbl-per-min :bpm :m3-per-min :m3/min]
+                            :proppant-concentration [:lb-per-gal :lb/gal :kg-per-m3 :kg/m3]}]
+    (fn [] (rand-nth (get quantity-units-map physical-quantity)))))
+
+(def rand-length-unit (rand-unit :length))
+(def rand-mass-unit (rand-unit :mass))
+(def rand-pressure-unit (rand-unit :pressure))
+(def rand-volume-unit (rand-unit :volume))
+(def rand-slurry-rate-unit (rand-unit :slurry-rate))
+(def rand-proppant-concentration-unit (rand-unit :proppant-concentration))
 (defn convert-units-f [from to]
   (let [factors {[:m :ft] 3.28084
                  [:kg :lb] 2.20462262185
                  [:m3 :bbl] 6.28981077
                  [:psi :kPa] 6.894757293168361
-                 [:M :k] 1000}
+                 [:M :k] 1000
+                 [:lb-per-gal :kg-per-m3] 119.826}
         converter {[:ft :m] #(/ % (factors [:m :ft]))
                    [:m :ft] #(* % (factors [:m :ft]))
                    [:lb :kg] #(/ % (factors [:kg :lb]))
@@ -18,6 +39,10 @@
                    [:kPa :psi] #(/ % (factors [:psi :kPa]))
                    [:kPa :MPa] #(/ % (factors [:M :k]))
                    [:MPa :kPa] #(* % (factors [:M :k]))
+                   [:lb-per-gal :kg-per-m3] #(* % (factors [:lb-per-gal :kg-per-m3]))
+                   [:kg-per-m3 :lb-per-gal] #(/ % (factors [:lb-per-gal :kg-per-m3]))
+                   [:m3-per-min :bbl-per-min] #(* % (factors [:m3 :bbl]))
+                   [:bbl-per-min :m3-per-min] #(/ % (factors [:lb-per-gal :kg-per-m3]))
                    [:C :F] #(+ (* % 1.8) 32)}]
     (converter [from to])))

@@ -35,12 +60,11 @@
   (tuc/draw-normal 13750 2150))

 (defn typical-stage-length
-  ([] (let [length-unit (rand-nth [:ft :m])]
-        [length-unit (typical-stage-length length-unit)]))
+  ([] (typical-stage-length (rand-length-unit)))
   ([length-unit]
    (condp = length-unit
-     :ft [:ft (tuc/draw-normal 152 17)]
-     :m [:m ((convert-units-f :ft :m) (nth (typical-stage-length :ft)))])))
+     :ft [(tuc/draw-normal 152 17) :ft]
+     :m [((convert-units-f :ft :m) (nth (typical-stage-length :ft) 0)) :m])))

 (defn typical-stage-extent
   ([]
@@ -326,27 +350,6 @@
         sigma (/ mean 6)]
     (tuc/draw-normal mean sigma)))

-(def physical-quantities [:length :mass :pressure :volume :injection-rate :proppant-concentration])
-
-(defn rand-physical-quantity []
-  (rand-nth physical-quantities))
-
-(defn rand-unit [physical-quantity]
-  (let [quantity-units-map {:length [:ft :m]
-                            :mass [:lb :kg]
-                            :pressure [:psi :kPa :MPa]
-                            :volume [:bbl :m3]
-                            :injection-rate [:bbl-per-min :bpm :m3-per-min :m3/min]
-                            :proppant-concentration [:lb-per-gal :lb/gal :kg-per-m3 :kg/m3]}]
-    (fn [] (rand-nth (get quantity-units-map physical-quantity)))))
-
-(def rand-length-unit (rand-unit :length))
-(def rand-mass-unit (rand-unit :mass))
-(def rand-pressure-unit (rand-unit :pressure))
-(def rand-volume-unit (rand-unit :volume))
-(def rand-injection-rate-unit (rand-unit :injection-rate))
-(def rand-proppant-concentration-unit (rand-unit :proppant-concentration))
-
 (defn typical-monitor-pressure
   ([units]
    (cond (= units :psi)
@@ -385,37 +388,39 @@
         (keyword? arg)
         (repeatedly (fn [] (typical-surface-treating-pressure arg)))))

-(defn typical-injection-rate
+(defn typical-slurry-rate
   ([]
-   (let [unit (rand-injection-rate-unit)]
-     [unit (typical-injection-rate unit)]))
+   (let [unit (rand-slurry-rate-unit)]
+     (typical-slurry-rate unit)))
   ([unit]
-   (cond (or (= unit :bbl-per-min)
-             (= unit :bpm))
-         (value-from-typical-range 75 100)
-         (or (= unit :m3-per-min)
-             (= unit :m3/min))
-         (value-from-typical-range 11.92 15.9))))
-
-(defn injection-rate-seq [arg]
+   (let [typical-value (cond (or (= unit :bbl-per-min)
+                                 (= unit :bpm))
+                             (value-from-typical-range 75 100)
+                             (or (= unit :m3-per-min)
+                                 (= unit :m3/min))
+                             (value-from-typical-range 11.92 15.9))]
+     [typical-value unit])))
+
+(defn slurry-rate-seq [arg]
   (cond (int? arg)
-        (let [unit (rand-injection-rate-unit)]
-          [unit (take arg (injection-rate-seq unit))])
+        (let [unit (rand-slurry-rate-unit)]
+          [unit (take arg (slurry-rate-seq unit))])
         (keyword? arg)
-        (repeatedly (fn [] (typical-injection-rate arg)))))
+        (repeatedly (fn [] (typical-slurry-rate arg)))))

 (defn typical-proppant-concentration
   ([]
    (let [unit (rand-proppant-concentration-unit)]
-     [unit (typical-proppant-concentration unit)]))
+     (typical-proppant-concentration unit)))
   ([unit]
-   (cond (or (= unit :lb-per-gal)
-             (= unit :lb/gal))
-         (value-from-typical-range 0.2 10)
-         (or (= unit :kg-per-m3)
-             (= unit :kg/m3))
-         (let [conversion (/ 0.453592 0.00378541)]
-           (value-from-typical-range (* 0.2 conversion) (* 10 conversion))))))
+   (let [typical-value (cond (or (= unit :lb-per-gal)
+                                 (= unit :lb/gal))
+                             (value-from-typical-range 0.2 10)
+                             (or (= unit :kg-per-m3)
+                                 (= unit :kg/m3))
+                             (let [conversion (/ 0.453592 0.00378541)]
+                                (value-from-typical-range (* 0.2 conversion) (* 10 conversion))))]
+     [typical-value unit])))AbstractMethodError

 (defn proppant-concentration-seq [arg]
   (cond (int? arg)


update bootstrap template

update bootstrap template

--- streamparse/bootstrap/project/project.jinja2.clj
+++ streamparse/bootstrap/project/project.jinja2.clj
@@ -4,10 +4,8 @@
   :target-path "_build"
   :min-lein-version "2.0.0"
   :jvm-opts ["-client"]
-  :dependencies [     [org.clojure/data.json "0.2.4"]
-                      [org.clojure/tools.cli "0.3.1"]
-                      [org.apache.storm/storm-core "0.9.1-incubating"]
-                      [com.parsely/streamparse "0.0.2-SNAPSHOT"]]
+  :dependencies [     [org.apache.storm/storm-core "0.9.1-incubating"]
+                      [com.parsely/streamparse "0.0.3-SNAPSHOT"]]
   :jar-exclusions     [#"log4j\.properties" #"backtype" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
   :uberjar-exclusions [#"log4j\.properties" #"backtype" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
   )


log abbreviated token texts during rendering

--- cljs/src/main/plastic/cogs/editor/render/code.cljs
+++ cljs/src/main/plastic/cogs/editor/render/code.cljs
@@ -22,7 +22,7 @@
         analysis (subscribe [:editor-form-node-analysis editor-id form-id node-id])
         layout (subscribe [:editor-form-node-layout editor-id form-id node-id])]
     (fn [editor-id form-id node-id]
-      (log-render "code-token" node-id
+      (log-render "code-token" [node-id (subs (:text @layout) 0 10)]
         (let [{:keys [selectable? type text id]} @layout
               {:keys [decl-scope call? def-name?]} @analysis
               ;_ (log "R! token" id (subs text 0 10) "cursor" @cursor? @analysis)


(maint) Extract name from bin files before converting to Ruby value

These bin files are also JarFileEntries, and need to have their name
extracted before they can be converted into a Ruby string literal for
interpolation.

--- src/puppetlabs/ezbake/core.clj
+++ src/puppetlabs/ezbake/core.clj
@@ -577,7 +577,7 @@
      :system-config-files                (as-ruby-literal (map remove-erb-extension system-config-files))
      :cli-app-files                      (as-ruby-literal (map remove-erb-extension cli-app-files))
      :cli-defaults-file                  (as-ruby-literal (remove-erb-extension cli-defaults-filename))
-     :bin-files                          (as-ruby-literal bin-files)
+     :bin-files                          (as-ruby-literal (map #(.getName %1) bin-files)) ;; These are JarFileEntries
      :create-dirs                        (local->ruby :create-dirs [])
      :debian-deps                        (val->ruby :debian :dependencies)
      :debian-build-deps                  (val->ruby :debian :build-dependencies)


Removed testcommand from install

Removed testcommand from install

--- main/src/dda/pallet/dda_managed_ide/infra.clj
+++ main/src/dda/pallet/dda_managed_ide/infra.clj
@@ -91,7 +91,6 @@
        :script-dir "/root/"
        :script-env {:HOME (str "/root")}})
     (actions/package-manager :update)
-    (vscode/testcommand facility)
     (basics/install-system facility ide-settings contains-basics? basics)
     (db/install-system facility ide-settings contains-db? db)
     (clojure/install-system facility contains-clojure? clojure)


CMR-3369: Removed unused require

CMR-3369: Removed unused require

--- access-control-app/src/cmr/access_control/data/access_control_index.clj
+++ access-control-app/src/cmr/access_control/data/access_control_index.clj
@@ -6,7 +6,6 @@
    [cmr.access-control.data.acls :as acls]
    [cmr.common-app.services.search.elastic-search-index :as esi]
    [cmr.common-app.services.search.query-to-elastic :as q2e]
-   [cmr.common.concepts :as cs]
    [cmr.common.log :refer [info debug error]]
    [cmr.common.services.errors :as errors]
    [cmr.common.util :as util :refer [defn-timed]]


[core] allow to configure fixed :tags for telemetry events

--- core/src/gorillalabs/tesla/component/telemetry.clj
+++ core/src/gorillalabs/tesla/component/telemetry.clj
@@ -9,6 +9,8 @@
 ;;;              :queue-size 1000               ;; how many messages can be buffered
 ;;;              :threshold  50                 ;; minimum number of milliseconds
 ;;;                                             ;; for a timed even to be actually reported
+;;;              :tags       [:t1 :t2 :t3]      ;; specify additional tags that are merged into
+;;;                                             ;; every event
 ;;;              }}

 (ns gorillalabs.tesla.component.telemetry
@@ -39,11 +41,14 @@
       (riemann/send-events client events))))

 (defn- prepare-event [telemetry event]
-  (let [prefix (:prefix (:config telemetry) "")]
+  (let [config (:config telemetry)
+        prefix (:prefix config "")
+        tags   (:tags config [])]
     (-> event
       (assoc :time (now))
       (assoc :host (:host telemetry))
-      (assoc :service (str prefix (:service event))))))
+      (assoc :service (str prefix (:service event)))
+      (update-in [:tags] #(distinct (concat % tags))))))

 (defn enqueue [telemetry event]
   (>!! (:queue telemetry) (prepare-event telemetry event)))


First submission of the simple array sum.

--- hackerrank/simple-array-sum.clj
+++ hackerrank/simple-array-sum.clj
@@ -1,17 +1,9 @@
 ; https://www.hackerrank.com/challenges/simple-array-sum
 (use '[clojure.string :only (split triml)])

-(
- let [
-      n_t (read-line)
+(let [n_t (read-line)
       n (Integer/parseInt n_t)
-      ]
-
- (
-  let [
-       arr_temp (read-line)
-       arr_t (split arr_temp #"\s+")
-       arr (map #(Integer/parseInt %) arr_t)
-       ]
-  )
-)
+      arr_temp (read-line)
+      arr_t (split arr_temp #"\s+")
+      arr (map #(Integer/parseInt %) arr_t)]
+  (println(reduce + arr)))


add range inference rule

add range inference rule

--- src/thi/ng/fabric/triples.cljc
+++ src/thi/ng/fabric/triples.cljc
@@ -319,16 +319,19 @@
         all (:result (add-query! g :all [nil nil nil]))
         num-projects (add-counter! g projects)
         num-types (add-counter! g types)
-        inf1 (add-rule!
+        _ (add-rule!
               g :symmetric '[[?a ?prop ?b] [?prop type symmetric-prop]]
               (fn [{:syms [?a ?prop ?b]}] [[?b ?prop ?a]]))
-        inf2 (add-rule!
+        _ (add-rule!
               g :domain '[[?a ?prop nil] [?prop domain ?d]]
               (fn [{:syms [?a ?prop ?d]}] [[?a 'type ?d]]))
-        inf3 (add-rule!
+        _ (add-rule!
+              g :range '[[nil ?prop ?a] [?prop range ?r]]
+              (fn [{:syms [?a ?prop ?r]}] [[?a 'type ?r]]))
+        _ (add-rule!
               g :transitive '[[?a ?prop ?b] [?b ?prop ?c] [?prop type transitive-prop]]
               (fn [{:syms [?a ?prop ?c]}] [[?a ?prop ?c]]))
-        inf3 (add-rule!
+        _ (add-rule!
               g :sub-prop '[[?a ?prop ?b] [?prop sub-prop-of ?super]]
               (fn [{:syms [?a ?super ?b]}] [[?a ?super ?b]]))
         pq (:qvar-result (add-param-query! g :pq '[?s knows ?o]))
@@ -338,15 +341,17 @@
     (mapv
      #(add-triple! g %)
      '[[toxi author fabric]
-       [fabric type project]
+       ;;[fabric type project]
        [knows type symmetric-prop]
        [knows domain person]
        [author domain person]
+       [author range creative-work]
        [parent sub-prop-of ancestor]
        [ancestor type transitive-prop]
+       [ancestor domain person]
+       [ancestor range person]
        ;;[noah knows toxi]
        ])
-    ;;(debug :inf-vertices (get-in inf1 [:query :result :id]) (get-in inf1 [:inf :id]))
     {:g        g
      :ctx      ctx
      :all      all


Fixed version of evermind.core in evermind.web project.

--- evermind.web/project.clj
+++ evermind.web/project.clj
@@ -16,7 +16,7 @@
                            [cljsjs/react-dom "15.4.2-1"]
                            [sablono "0.7.7"]
                            [org.omcljs/om "1.0.0-alpha46"]
-                           [evermind.core "0.1.0-SNAPSHOT"]]
+                           [evermind.core :version]]

             :source-paths ["src"]


added server config for elastic search

added server config for elastic search

--- resources/config/ophion.clj
+++ resources/config/ophion.clj
@@ -1,8 +1,9 @@
 {:graph  {:database :janus
           :host "localhost"
           :keyspace :pentomino}
- :server {:port 4443}
- :search {:index :pentomino
+ :search {:host "localhost"
+          :port 9200
+          :index :pentomino
           :indexed?
           #{"Individual"
             "Evidence"
@@ -14,7 +15,8 @@
             "GeneDatabase"
             "OntologyTerm"
             "Compound"}}
+ :kafka {:host "localhost"
+         :port 9092}
+ :server {:port 4443}
  :protograph {:path "resources/config/protograph.yml"
-              :prefix "protograph"}
- :kafka {:host "localhost"
-         :port 9092}}
+              :prefix "protograph"}}


some comments in ex32

some comments in ex32

--- examples/ex32_harmonograph.clj
+++ examples/ex32_harmonograph.clj
@@ -1,6 +1,8 @@
 ;; Harmonograph on noise
 ;;
 ;; Version rendered using BinPixels object (accumulative bins)
+;;
+;; Eats a lot of memory, rendering is run on all but one cores

 (ns examples.ex32-harmonograph
   (:require [clojure2d.core :refer :all]
@@ -11,7 +13,8 @@
             [clojure2d.math.vector :as v]
             [clojure2d.extra.glitch :as g]
             [clojure2d.color :as c]
-            [clojure2d.core :as core])
+            [clojure2d.core :as core]
+            [clojure.pprint :refer [pprint]])
   (:import [clojure2d.pixels BinPixels]
            [clojure2d.math.vector Vec4]))

@@ -24,13 +27,13 @@
 (def ^:const ^int hheight (int (/ height 2)))
 (def r (mapv #(* 1.05 ^int %) [(- hwidth) hwidth (- hheight) hheight]))
 (def ^:const ^double step 0.00451234) ;; time step
-(def ^:const ^int first-step 200000)
+(def ^:const ^int first-step 500000)
 (def ^:const ^int steps-per-task 1000000)

 (defn unit-fn ^double [_ _] 1.0)

 (defn make-jnoise
-  ""
+  "Create own version of joise noise (only simplex based, no cells)"
   []
   (j/make-noise (j/make-fractal {:type (rand-nth (keys j/fractal-type))
                                  :lacunarity (r/drand 1.0 3.0)
@@ -47,15 +50,15 @@
         freqs (map #(/ (double %) m/TWO_PI) (range (- rngs) rngs (r/irand 1 6)))
         ^double a1 (r/drand hwidth)
         a2 (r/drand (- hwidth a1))
-        ^double a3 (r/drand hwidth)
-        a4 (- hwidth a3)
+        ^double a3 (r/drand hheight)
+        a4 (- hheight a3)
         n [(make-jnoise) (make-jnoise) j/perlin-noise j/perlin-noise r/noise r/noise r/noise]
         palseq (filter #(> (c/get-luma (first %)) 100) (repeatedly #(:palette (g/color-reducer-machine))))
         pal1 (first palseq)
         pal2 (second palseq)
         c1 (first pal1)
         c2 (rand-nth pal1)
-        c3 (rand-nth pal2)
+        c3 (first pal2)
         c4 (rand-nth pal2)]
     {:f1 (rand-nth freqs)
      :f2 (rand-nth freqs)
@@ -115,12 +118,11 @@
                                 (dampstepsy (int (m/norm (m/qsin (+ time p4)) -1.0 1.1 0.0 dampyc))))

               x (* dampx (+ (* a1 s3)
-                            (* a2 s1 (* ^double (n2 (* time prevx nscalex1) (* prevy nscaley1))
-                                        ^double (n1 s1 (* prevx prevy))))))
+                            (* a2 s1 ^double (n2 (* prevx nscalex1) (* prevy nscaley1)))))
               s4 (m/sin (+ (* time f4)
-                           (* m/TWO_PI ^double (n4 (* x nscaley2) p4))
+                           (* m/TWO_PI ^double (n4 (* x nscalex2) p4))
                            p4))
-              y (* dampy (+ (* a3 s2 ^double (n3 (* prevx nscalex2) (+ time (* prevy nscaley2))))
+              y (* dampy (+ (* a3 s2 ^double (n3 (* (+ time prevx) nscalex2) (+ (* prevy nscaley2))))
                             (* a4 s4)))

               ^Vec4 col1 (v/interpolate c1 c2 (m/abs (* s1 s2)))
@@ -132,7 +134,7 @@
         bp))))

 (defn draw-on-canvas
-  ""
+  "Render BinPixels to canvas."
   [canvas ^BinPixels bp]
   (p/set-canvas-pixels canvas (p/to-pixels bp
                                            (Vec4. 8 10 15 255)
@@ -140,7 +142,7 @@

 ;; Create canvas, windows, binpixels, configuration and iterate until window is closed
 ;; press `space` to save
-
+;; close window to stop
 (let [config (make-random-config)
       canvas (create-canvas width height)
       [_ run?] (show-window canvas "Harmonograph" 800 800 5)]
@@ -148,7 +150,7 @@
   (defmethod key-pressed ["Harmonograph" \space] [_]
     (save-canvas canvas (next-filename "results/ex32/" ".png")))

-  (println (:n3 config))
+  (pprint config)

   ;; first run
   (let [bp (iterate-harmonograph first-step 0.0 run? config)]


add markdown docs to CEP

add markdown docs to CEP

--- cimi/src/com/sixsq/slipstream/ssclj/resources/cloud_entry_point.clj
+++ cimi/src/com/sixsq/slipstream/ssclj/resources/cloud_entry_point.clj
@@ -1,6 +1,334 @@
 (ns com.sixsq.slipstream.ssclj.resources.cloud-entry-point
-  "The CloudEntryPoint resource provides the root list of all resources
-   on the server."
+  "
+The Cloud Entry Point (CEP) provides a list of all CIMI resource (document)
+collections available from this server instance. See the general information
+about the service below. Detailed metadata for each collection (and for some
+resource templates) can be found in the ResourceMetadata collection.
+
+# CIMI API
+
+The [Cloud Infrastructure Management
+Interface](https://www.dmtf.org/sites/default/files/standards/documents/DSP0263_2.0.0.pdf)
+(CIMI) specification from DMTF describes a uniform, extensible, RESTful (HTTP)
+API for the management of cloud resources.
+
+As CIMI's underlying resource model closely resembles the existing
+SlipStream resource model and simplifies use of the API through
+standard patterns and autodiscovery, the SlipStream developers have
+decided to adopt this standard.
+
+
+All of the resources rooted at '/api' follow the CIMI resource
+management patterns. These are marked with 'CIMI' in the table of
+contents.
+
+
+## Autodiscovery
+
+The CIMI API has been designed to allow for automatic discovery of the
+supported resources and management operations.
+
+### Resource Directory
+
+```shell
+# Cloud Entry Point (directory of resources)
+curl https://nuv.la/api/cloud-entry-point
+```
+
+```json
+{
+  \"id\" : \"cloud-entry-point\",
+  \"resourceURI\" : \"http://schemas.dmtf.org/cimi/2/CloudEntryPoint\",
+  \"created\" : \"2016-06-21T17:31:14.950Z\",
+  \"updated\" : \"2016-06-21T17:31:14.950Z\",
+
+  \"baseURI\" : \"https://nuv.la/api/\",
+
+  \"connectors\" : {
+    \"href\" : \"connector\"
+  },
+  \"accountingRecords\" : {
+    \"href\" : \"accounting-record\"
+  },
+
+  \"other fields\" : \"...\"
+}
+```
+
+The primary directory of resources is the **Cloud Entry Point** (CEP),
+which contains a list of named resource collections and their URLs (in
+the `href` field) relative to the `baseURI` value.  The CEP also
+contains some other metadata.
+
+
+Although SlipStream maintains consistent naming throughout the API,
+assumptions about the URL naming must not be made by clients. Clients
+must use the CEP to discover the correct URLs for managed resources.
+
+
+### Operations
+
+If the user is authorized to perform various management operations on
+a resource, the resource will contain an 'operations' key.  The value
+of the key will contain a list of actions (e.g. `add`, `edit`,
+`delete`, `start`) along with the URL to use to execute the action.
+
+The HTTP methods to use for the CIMI `add`, `edit`, and `delete`
+operations are POST, PUT, and DELETE, respectively.  All other
+operations use the HTTP POST method.
+
+## Resource Management (CRUD)
+
+The CIMI standard defines patterns for all of the usual database
+actions: Search (or Query), Create, Read, Update, and Delete (SCRUD),
+although the specification uses 'Add' for 'Create' and 'Edit' for
+'Update'.
+
+**See Section 4.2.1 of the CIMI specification for detailed
+descriptions of these patterns.**  Only differences from the standard
+patterns are documented here.
+
+### HTTP Methods
+
+The following table shows the mapping between the resource management
+action and the HTTP method to be used. **Those resources *with* a CIMI
+notation follow the CIMI patterns.**
+
+Action | HTTP Method | URL
+------ | ----------- | ---
+Search | `GET` or `PUT` | resource collection
+Add (create) | `POST` | resource collection
+Read | `GET` | resource
+Edit (update) | `PUT` | resource
+Delete | `DELETE` | resource
+Other | `POST` | operation URL
+
+
+
+Specialized actions can appear in the operations section of a
+resource.  Any non-standard operation will use the POST method for the
+request.  The parameters (if any) will depend on the operation.
+
+
+
+
+### Add Pattern Variations
+
+Note that there are two CIMI add (create) patterns:
+
+ * **Direct creation** that takes uses the new resource's content
+   directly in the creation request, and
+
+ * **Templated creation** that uses a template to create the resource.
+
+In the Cloud Entry Point, **any resource that has a corresponding
+template resource will use the templated add pattern**. For example,
+the Session resource will use the templated add pattern because there
+is a SessionTemplate resource also listed.
+
+## Resource Selection
+
+The CIMI specification provides advanced features for selecting
+resources when searching collections, including paging (CIMI Section
+4.1.6.2), subsetting (4.1.6.3), sorting (4.1.6.6), and filtering
+(4.1.6.1).
+
+All of the resource selection parameters are specified as HTTP query
+parameters.  These are specified directly within the URL when using
+the HTTP `GET` method.  They are specified in a body with the media
+type of `application/x-www-form-urlencoded` when using the `PUT`
+method. (Note that use of `PUT` for searches is an SlipStream
+extension to the CIMI standard.)
+
+
+All of the CIMI query parameters are prefixed with a dollar sign
+($). This was an unfortunate choice because it signals variable
+interpolation in most shells.  When using these parameters at the
+command line, be sure to escape the dollar signs or to put the
+parameters within single quotes.
+
+
+### Ordering
+
+The results can be ordered by the values of fields within the
+resources.  The general form of a query with ordering is:
+
+`$orderby=attributeName[:asc|:desc], ...`
+
+The ascending (:asc, default) or descending (:desc) field is
+optional.  The sorting is done using the natural order of the field
+values. Multiple `$orderby` parameters are allowed, in which case
+resources are sorted by the first attribute, then equal values are
+sorted by the second attribute, etc.
+
+### Paging
+
+A range of resources can be obtained by setting the `$first` and
+`$last` (1-based) query parameters.  The values default to the first
+and last resources, respectively, in the collection if explicit values
+are not provided.
+
+
+Note that the SlipStream implementation will limit the number of
+returned resources to 10000, independently of the values provided for
+these parameters.  This is to protect both the client and server from
+excessively large responses.
+
+
+
+The selection of resources via these parameters is done after any
+filtering and ordering.
+
+
+### Subsetting
+
+Using the `$select` parameter allows you to select only certain
+attributes to be returned by the server.  Avoiding sending information
+that will not be useful reduces the load on the network and the
+server.
+
+Multiple attributes may be specified by providing a string with
+comma-separated values or with multiple `$select` parameters.
+
+
+For various reasons, the server may return attributes that you have
+not selected in the responses.  The server should always return the
+selected attributes.
+
+
+> Example select values
+
+```c
+name,description
+```
+
+### Filtering
+
+> Example filters
+
+```c
+((alpha>2) and (beta>='bad value') or (nested/value!=false)
+```
+
+```c
+((property['alpha']=\"OK\") or (missing=null))
+```
+
+The CIMI specification defines a simple, but powerful, filtering
+language to make sophisticated selections of resources. (See Section
+4.1.6.1 of the full [CIMI
+specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0263_2.0.0.pdf).)
+The syntax of the `$filter` query parameter consists of infix binary
+comparisons combined with `and` or `or` operators. Parentheses can be
+used to force the ordering of operations.  Whitespace is ignored.
+
+The following tables list the supported relational operators and
+types. All comparisons use the natural ordering of the data type.
+
+operator | description
+-------- | -----------
+= | equal
+!= | not equal
+< | less than
+<= | less than or equal
+> | greater than
+>= | greater than or equal
+^= | starts with (SlipStream extension)
+
+type | comment
+---- | -------
+integer | integer values
+string | single or double-quoted strings
+date | date in ISO8601 format
+boolean | either true or false
+null | null values (SlipStream extension)
+
+The SlipStream filtering implementation is a superset of the CIMI
+filtering specification.  These extentions include:
+
+ - The arguments for binary operators can be specified in either order
+   (attribute, value or value, attribute).
+ - 'null' is supported as a literal value to allow the
+   existence/non-existence of a value to be determined.
+ - A 'prefix' or 'starts with' operator ('^=') is supported. This was
+   judged to be generally useful and was easy to implement for
+   Elasticsearch.
+ - Nested attributes are supported with levels separated by slashes
+   ('/'). This syntax is used elsewhere in the CIMI standard, but not
+   specifically mentioned in the filter specification.
+
+The filter syntax may be extended in the future to also support the
+'not' logical operation.
+
+The [full
+grammar](https://raw.githubusercontent.com/slipstream/SlipStreamServer/master/cimi/resources/com/sixsq/slipstream/ssclj/filter/cimi-filter-grammar.txt)
+of our extended CIMI filtering is documented in GitHub.
+
+
+### Aggregations
+
+The SlipStream CIMI implementation also allows users to aggregate
+values over a set of filtered documents.  This is useful for providing
+summary information concerning a set of documents, such as the sum of
+an attribute, average, etc.
+
+The general form of a query with an aggregation is:
+
+`$aggregation=algorithm:attributeName, ...`
+
+Multiple aggregation expressions can be provided.  The results of
+these calculations are provided in the 'aggregations' section of the
+response. The supported aggregations are described in the following
+table.
+
+algorithm | description
+--------- | -----------
+min | minimum value
+max | maximum value
+sum | sum of values
+avg | average of values
+stats | statistics of values
+extendedstats | extended statistics of values
+count | number of values/documents
+percentiles | binned percentiles of values
+cardinality | cardinality of a field
+missing | number of documents with missing field
+terms | histogram of values and counts
+
+## Deviations
+
+SlipStream does not (yet) provide a complete implementation of the
+CIMI API and out of necessity deviates in several ways from the
+standard.
+
+### Media Types
+
+The CIMI standard mandates the support of both XML and JSON.  **The
+SlipStream implementation only supports JSON** (and in some cases
+URL-encoded forms).
+
+### Authorization
+
+The CIMI standard does not mandate any authentication and
+authorization process. The schema of all resources in the SlipStream
+implementation includes an 'acl' key.  **The Access Control List (ACL)
+of each resource describes who is authorized to manage that
+resource.**
+
+### Searches
+
+The CIMI standard only provides for searches over resource collections
+with the HTTP `GET` method.  Because those filters can be quite long,
+there can be issues with the length of the `GET` URL. Consequently,
+SlipStream clients may also **search resource collections using the
+HTTP `PUT` method** with a body containing the filters (and other
+parameters) as a URL-encoded form.
+
+### Aggregations
+
+As described earlier, SlipStream extends the CIMI standard to also
+include aggregating values over a collection of resources.
+"
   (:require
     [clojure.tools.logging :as log]
     [com.sixsq.slipstream.auth.acl :as a]


test making canvas. and cleanup func.

test making canvas. and cleanup func.

--- test/infinitelives/pixi/canvas_test.cljs
+++ test/infinitelives/pixi/canvas_test.cljs
@@ -1,7 +1,24 @@
 (ns infinitelives.pixi.canvas-test
   (:require [cljs.test :refer-macros [deftest is]]
-            [infinitelives.pixi.canvas :as canvas]))
+            [infinitelives.pixi.canvas :as canvas]
+            [goog.dom :as dom]))
+
+(defn- nodelist->seq
+  "returns a lazy-seq of all the nodes in the nodelist"
+  ([nodelist]
+   (nodelist->seq nodelist 0))
+  ([nodelist i]
+   (when (< i (.-length nodelist))
+     (cons (aget nodelist i)
+           (lazy-seq (nodelist->seq nodelist (inc i)))))))
+
+(defn- remove-all-dom-canvas
+  "remove every canvas from the DOM"
+  []
+  (doseq [node (nodelist->seq (dom/$$ "canvas"))]
+    (dom/removeNode node)))

 (deftest make
-  (let [c (canvas/make :engine :canvas
-                       :canvas (.getElementById js/document "app"))]))
+  (is (canvas/make :engine :canvas))
+  (is (canvas/make :engine :auto))
+  (remove-all-dom-canvas))


fix variable clash introduced in last commit

--- test/lambdacd_cctray/sample_pipeline.clj
+++ test/lambdacd_cctray/sample_pipeline.clj
@@ -34,7 +34,7 @@
 (defn wait-for-interaction [args ctx]
   (manualtrigger/wait-for-manual-trigger nil ctx))

-(def pipeline `(
+(def pipeline-structure `(
   some-slow-step
   wait-for-interaction
   (either
@@ -52,8 +52,8 @@
 (defn -main [& args]
   (let [home-dir (if (not (empty? args)) (first args) (util/create-temp-dir))
         config { :home-dir home-dir }
-        pipeline (lambdacd/assemble-pipeline pipeline config)
-        cctray-pipeline-handler (cctray/cctray-handler-for pipeline (:state pipeline) "http://localhost:8080/pipeline")]
+        pipeline (lambdacd/assemble-pipeline pipeline-structure config)
+        cctray-pipeline-handler (cctray/cctray-handler-for pipeline-structure (:state pipeline) "http://localhost:8080/pipeline")]
     (runners/start-one-run-after-another pipeline)
     (ring-server/serve (mk-routes (ui/ui-for pipeline) cctray-pipeline-handler)
                                   {:open-browser? true


Comment self-require test

Comment self-require test

--- test/node/replumb/require_node_test.cljs
+++ test/node/replumb/require_node_test.cljs
@@ -513,15 +513,15 @@
       (is (= "200" out ) "(mul-core 10 20) should produce 200")
       (reset-env! '[my.namespace foo.bar.core foo.bar.macros])))

-  (deftest ns-macro-self-requiring-namespace
-    ;; see "loop" section here: http://blog.fikesfarm.com/posts/2015-12-18-clojurescript-macro-tower-and-loop.html
-    ;; but it does not work in JS ClojureScript
-    (let [res (read-eval-call "(ns my.namespace (:require [foo.bar.self]))")
-          error (unwrap-result res)]
-      (is (not (success? res)) "(ns my.namespace (:require [foo.bar.self])) should not succeed")
-      (is (valid-eval-error? error) "(ns my.namespace (:require [foo.bar.self])) should be an instance of js/Error")
-      (is (re-find #"Maximum call stack size exceeded" (extract-message error)) "(ns my.namespace (:require [foo.bar.self])) should have correct error message")
-      (reset-env!)))
+  ;; (deftest ns-macro-self-requiring-namespace
+  ;;   ;; see "loop" section here: http://blog.fikesfarm.com/posts/2015-12-18-clojurescript-macro-tower-and-loop.html
+  ;;   ;; but it does not work in JS ClojureScript
+  ;;   (let [res (read-eval-call "(ns my.namespace (:require [foo.bar.self]))")
+  ;;         error (unwrap-result res)]
+  ;;     (is (not (success? res)) "(ns my.namespace (:require [foo.bar.self])) should not succeed")
+  ;;     (is (valid-eval-error? error) "(ns my.namespace (:require [foo.bar.self])) should be an instance of js/Error")
+  ;;     (is (re-find #"Maximum call stack size exceeded" (extract-message error)) "(ns my.namespace (:require [foo.bar.self])) should have correct error message")
+  ;;     (reset-env!)))

   (deftest process-reload
     (let [alterable-core-path "dev-resources/private/test/src/cljs/alterable/core.cljs"
@@ -634,7 +634,7 @@
   (ns-macro-use-macros)
   (ns-macro-require)
   (ns-macro-require-macros-as)
-  (ns-macro-self-requiring-namespace)
+  ;; (ns-macro-self-requiring-namespace)

   (process-reload)
   (process-reload-all)


Story ID: RPC-171

Story ID: RPC-171

Removed more spy/d

--- test/smooth_test/specification_spec.cljc
+++ test/smooth_test/specification_spec.cljc
@@ -28,7 +28,7 @@
 (testing "Specification"
   (testing "includes test meta-data"

-    (is (= (name (first #spy/d simple-spec)) "with-meta"))
+    (is (= (name (first simple-spec)) "with-meta"))
   ))

 (specification "Specification1"


put `host` back in postgres setup

put `host` back in postgres setup

--- test/vip/data_processor/test_helpers.clj
+++ test/vip/data_processor/test_helpers.clj
@@ -71,9 +71,8 @@
     (log/info "Recreating the test database")
     (let [database-name (config [:postgres :database])
           jdbc-config {:dbtype "postgresql"
-                       :dbname "postgres"  ; connect to the default db for
-                                           ; creating/dropping your test
-                                           ; database
+                       :dbname "postgres"
+                       :host (config [:postgres :host])
                        :port (config [:postgres :port])
                        :user (config [:postgres :user])
                        :password (config [:postgres :password])}]


add target

add target

--- examples/blog/build.boot
+++ examples/blog/build.boot
@@ -31,6 +31,7 @@
         (rss :description "Hashobject blog")
         (atom-feed :filterer :original)
         (print-meta)
+        (target)
         (notify)))

 (deftask dev


Test data- and aria- attributes

Test data- and aria- attributes

--- src/test/cljs/webui/main.cljs
+++ src/test/cljs/webui/main.cljs
@@ -52,7 +52,7 @@
    :render
    (fn [{:keys [this state]}]
      (let [{:keys [rect]} @state]
-       [:div {}
+       [:div {:data-foo "bar" :aria-foo "bar"}
         [:h2 {} (r/get-display-name this)]
         [:div {}
          "Real count: " (:real-count @state) [:br]


add nested connections

add nested connections

--- clj-jdbc/src/clj_jdbc/core.clj
+++ clj-jdbc/src/clj_jdbc/core.clj
@@ -3,6 +3,7 @@
   (:import (java.sql Connection Statement ResultSet)))

 (def *connections* {})
+(def *t-levels* {})

 (defn require-driver
   "Ensure that the driver corresponding to the given class name is loaded."
@@ -20,7 +21,8 @@
        (let [~binding-sym existing-conn#]
          ~@body)
        (with-open [new-conn# (.getConnection data-source#)]
-         (binding [*connections* (assoc *connections* data-source# new-conn#)]
+         (binding [*connections* (assoc *connections* data-source# new-conn#)
+                   *t-levels*    (assoc *t-levels* new-conn# 0)]
            (let [~binding-sym new-conn#]
               ~@body))))))

@@ -132,11 +134,13 @@
     (first (resultset-maps rs))))

 (defmacro in-transaction
-  "Evaluates body as a transaction on the given database connection. Updates
-  are committed together or rolled back after an uncaught exception.
-  Supports nested transactions."
+  "Evaluates body as in transaction on the connection. Updates
+  are committed if the execution completes without error or rolled back
+  after an uncaught exception. Supports nested transactions."
   [conn-sym & body]
   `(do
+    (let [level# (*t-levels* ~conn-sym)]
+      (binding [*t-levels* (if level# (update *t-levels* ~conn-sym inc) (assoc *t-levels* 1))]
      (.setAutoCommit ~conn-sym false)
      (try
        (let [ret# (do ~@body)]


Correct docstrings in client.tcp

Correct docstrings in client.tcp

--- clj-tcp/src/clj_tcp/client.clj
+++ clj-tcp/src/clj_tcp/client.clj
@@ -107,10 +107,11 @@
                               )))
 	      )))

-(defn exception-listener [write-lock-ch v {:keys [internal-error-ch]}]
+(defn exception-listener
   "Returns a GenericFutureListener instance
    that on completion checks the Future, if any exception
    an error is sent to the error-ch"
+  [write-lock-ch v {:keys [internal-error-ch]}]
   (reify GenericFutureListener
     (operationComplete [this f]
        ;(go (>! write-lock-ch 1)) ;release write lock
@@ -122,8 +123,9 @@
 		                   (go (>! internal-error-ch [cause (->FailedWrite v)])))
 		           ))))))

-(defn close-listener [^Client client write-lock-ch {:keys [internal-error-ch]}]
+(defn close-listener
   "Close a client after a write operation has been completed"
+  [^Client client write-lock-ch {:keys [internal-error-ch]}]
   (reify GenericFutureListener
     (operationComplete [this f]
        ;(go (>! write-lock-ch 1))
@@ -136,25 +138,27 @@
                                        )))))))

-(defn write! [client v]
+(defn write!
   "Writes and blocks if the write-ch is full"
+  [client v]
   (if (-> client ^ChannelFuture (:channel-f) ^Channel (.channel) (.isOpen))
     (>!! (:write-ch client) v)
     (throw (RuntimeException. "Client closed"))))

-(defn read!
+(defn read!
+  "Reads from the read-ch and blocks if no data is available"
   ([{:keys [read-ch]} timeout-ms]
     (first
       (alts!!
 		     [read-ch
 		     (timeout timeout-ms)])))
   ([{:keys [read-ch]}]
-  "Reads from the read-ch and blocks if no data is available"
   (<!! read-ch)))

 (defn read-error
+   "Reads from the error-ch and blocks if no data is available"
    ([{:keys [error-ch]} timeout-ms]
      (if error-ch
 		    (first
@@ -163,14 +167,14 @@
 				     (timeout timeout-ms)]))))

   ([{:keys [error-ch]}]
-  "Reads from the error-ch and blocks if no data is available"
-    (if error-ch (<!! error-ch))))
-
-
-
-(defn- do-write [^Client client write-lock-ch ^bytes v close-after-write {:keys [internal-error-ch] :as conf}]
+    (when error-ch (<!! error-ch))))
+
+
+
+(defn- do-write
   "Writes to the channel, this operation is non blocking and a exception listener is added to the write's ChannelFuture
    to send any errors to the internal-error-ch"
+   [^Client client write-lock-ch ^bytes v close-after-write {:keys [internal-error-ch] :as conf}]
    (let [^Channel channel (-> client ^ChannelFuture (:channel-f) ^Channel (.channel))]
      (if (.isOpen channel)
 	     (let [ch-f (-> channel ^ChannelFuture (.writeAndFlush v) (.addListener ^ChannelFutureListener (exception-listener write-lock-ch v conf)))]
@@ -180,13 +184,13 @@

 (defn start-client
+  "Start a Client instance with read-ch, write-ch and internal-error-ch"
   ([host port {:keys [group read-group
                       channel-options read-ch internal-error-ch error-ch write-ch handlers reconnect-count closed] :as conf
                                  :or {
                                       reconnect-count (AtomicInteger. (int 0))
                                       closed (AtomicBoolean. false)
                                       read-ch (chan 1000) internal-error-ch (chan 100) error-ch (chan 100) write-ch (chan 1000)}}]
-  "Start a Client instance with read-ch, write-ch and internal-error-ch"
   (try
   (let [g (if group group (NioEventLoopGroup. (get-default-threads)))
         b (Bootstrap.)]
@@ -369,4 +373,4 @@

-		    +


move-character

move-character

--- clojure/src/dnd/character.cljs
+++ clojure/src/dnd/character.cljs
@@ -1,6 +1,14 @@
 (ns dnd.character)

-(def character {
-                :char "@"
-                :inventory []
-                })
+(def character {:char "@"
+                :inventory [] })
+
+(defn move-character [level character dx dy]
+  (let [get-params [level [dx dy]]
+        firstOne (apply get-in get-params)
+        updated-character (assoc character :x dx :y dy)
+        update-habs #(assoc firstOne :inhabitants [character])
+        updated-level (apply update-in (conj get-params update-habs))]
+    [updated-level updated-character]))
+
+


Refactored globbing

Refactored globbing

--- vendor/compojure.clj
+++ vendor/compojure.clj
@@ -51,14 +51,6 @@
           (. out (write buffer 0 len))
           (recur (. in (read buffer))))))))

-(defn glob->regex
-  "Turns a shallow file glob into a regular expression."
-  [s]
-  (re-pattern
-    (.. (escape "\\.+|()[]{}$^" s)
-        (replaceAll "\\*" ".*")
-        (replaceAll "\\?" "."))))
-
 (defn split-path
   "Splits a path up into its parts."
   [path]
@@ -67,7 +59,31 @@
       (if-let parent (. path (getParent))
         (recur parts (file parent))
         parts))))
-
+
+(defn- glob->regex
+  "Turns a shallow file glob into a regular expression."
+  [s]
+  (re-pattern
+    (.. (escape "\\.+|()[]{}$^" s)
+        (replaceAll "\\*" ".*")
+        (replaceAll "\\?" "."))))
+
+(defn- glob-parts
+  [parts path]
+  (if parts
+    (if (. path (isDirectory))
+      (mapcat
+       #(glob-parts (rest parts) (file path %))
+        (grep (glob->regex (first parts)) (. path (list)))))
+    (list path)))
+
+(defn glob
+  "Find all files in a directory matching a glob."
+  ([pattern]
+    (glob pattern "."))
+  ([pattern path]
+    (glob-parts (split-path pattern) (file path))))
+
 (defn load-file-pattern
   "Load all files matching a regular expression."
   [re]


add 'wow solution' for k-combinations (103)

--- stuf/src/sandbox/4clojure.clj
+++ stuf/src/sandbox/4clojure.clj
@@ -662,7 +662,13 @@
               :else (concat
                      (map #(conj % fst) (comb (dec m) rst))
                      (comb m rst))))]
-  (set (comb m (seq st)))))
+    (set (comb m (seq st)))))
+;;wow solution
+;;(defn k-combos [n items]
+;;  (if (zero? n) [#{}]
+;;      ((comp set mapcat)
+;;       #(for [i (k-combos (dec n) (disj items %))] (conj i %))
+;;       items)))

 ;;104 Write Roman Numerals
 (fn [a]


Refactor

Refactor

--- backend/src/akvo/lumen/lib/auth.clj
+++ backend/src/akvo/lumen/lib/auth.clj
@@ -14,8 +14,7 @@
    [clojure.tools.logging :as log]
    [clojure.set :as set]
    [hugsql.core :as hugsql]
-   [integrant.core :as ig]
-   [reitit.core :as rc]))
+   [integrant.core :as ig]))

 (hugsql/def-db-fns "akvo/lumen/lib/visualisation.sql")
 (hugsql/def-db-fns "akvo/lumen/lib/dataset.sql")


Update bundled backtick version

Update bundled backtick version

This includes fix brandonbloom/backtick#2

--- boot/pod/src/boot/from/backtick.clj
+++ boot/pod/src/boot/from/backtick.clj
@@ -1,5 +1,6 @@
 (ns boot.from.backtick
-  {:boot/from :bbloom/backtick}
+  {:boot/from :bbloom/backtick
+   :boot/from-version "0.3.2"}
   (:refer-clojure :exclude [eval resolve]))

 (def ^:dynamic *resolve*)
@@ -31,10 +32,10 @@
     (record? form) `'~form
     (coll? form)
       (let [xs (if (map? form) (apply concat form) form)
-            parts (for [x (partition-by unquote-splicing? xs)]
-                    (if (unquote-splicing? (first x))
-                      (second (first x))
-                      (mapv quote-fn* x)))
+            parts (for [x xs]
+                    (if (unquote-splicing? x)
+                      (second x)
+                      [(quote-fn* x)]))
             cat (doall `(concat ~@parts))]
         (cond
           (vector? form) `(vec ~cat)


modular-bidi: use new bidi helpers

modular-bidi: use new bidi helpers

--- modules/bidi/src/modular/bidi.clj
+++ modules/bidi/src/modular/bidi.clj
@@ -5,7 +5,8 @@
    [schema.core :as s]
    [modular.ring :refer (WebRequestHandler WebRequestBinding)]
    [com.stuartsierra.component :as component]
-   [bidi.bidi :as bidi :refer (match-route ->ResourcesMaybe)]
+   [bidi.bidi :as bidi :refer (match-route resolve-handler)]
+   [bidi.ring :refer (resources-maybe make-handler)]
    [clojure.tools.logging :refer :all]
    [plumbing.core :refer (?>)]))

@@ -48,7 +49,7 @@
   WebService
   (request-handlers [_] {})
   (routes [_]
-    [uri-context (->ResourcesMaybe {:prefix resource-prefix})])
+    [uri-context (resources-maybe {:prefix resource-prefix})])
   (uri-context [_] ""))

 (def new-static-resource-service-schema
@@ -66,7 +67,7 @@
 (defrecord KeywordToHandler [matched handlers]
   bidi/Matched
   (resolve-handler [this m]
-    (when-let [{:keys [handler] :as res} (bidi/resolve-handler matched m)]
+    (when-let [{:keys [handler] :as res} (resolve-handler matched m)]
       (if (keyword? handler)
         (assoc res :handler (get handlers handler))
         res)))
@@ -89,7 +90,7 @@
         joined-routes [(or (uri-context service) "")
                        (->KeywordToHandler [routes] handlers)]]
     (wrap-info
-     (bidi/make-handler joined-routes)
+     (make-handler joined-routes)
      {::routes joined-routes
       ::handlers handlers})))


:free -> FREE

:free -> FREE

--- test/example/fm_synthesis.clj
+++ test/example/fm_synthesis.clj
@@ -5,7 +5,7 @@

 (defsynth fm [carrier 440 modulator 440 depth 0.1]
   (let [mod-env (env-gen (perc 0.3 0.6))
-        amp-env (env-gen (perc 0.01 0.8) 1 1 0 1 :free)]
+        amp-env (env-gen (perc 0.01 0.8) 1 1 0 1 FREE)]
     (* amp-env
        (sin-osc (+ carrier
                  (* depth mod-env


Cleanup managed-ajax inputs

Cleanup managed-ajax inputs

--- frontend/utils/ajax.cljs
+++ frontend/utils/ajax.cljs
@@ -105,12 +105,7 @@
         ajax-opts
         clj-ajax/ajax-request)))

-(defn managed-ajax [method url & {:keys [params keywords? headers format response-format csrf-token]
-                                  :or {keywords? true
-                                       response-format :json
-                                       format :json
-                                       csrf-token true}
-                                  :as opts}]
+(defn managed-ajax [method url & {:as opts}]
   (let [channel (chan)
         base-opts {:method method
                    :uri url


0.6.6

0.6.6

0.6.6 release; rename float to decimal.

--- advance/project.clj
+++ advance/project.clj
@@ -1,4 +1,4 @@
-(defproject org.clojars.marsliu/jparsec-adv "0.6.6-SNAPSHOT"
+(defproject org.clojars.marsliu/jparsec-adv "0.6.6"
   :name "JParsec"
   :description "Haskell Parsec Library's Java 1.8+ Editon"
   :url "https://github.com/Dwarfartisan/jparsec"


comment out test that's not ready

comment out test that's not ready

--- test/clj_money/import_test.clj
+++ test/clj_money/import_test.clj
@@ -418,6 +418,6 @@
         (is (= expected-ira-items actual-ira-items)
             "The IRA account has the correct items")))

-    (testing "account balances are calculated correctly"
+    #_(testing "account balances are calculated correctly"
       (is (= 0M (:balance four-o-one-k)) "All shares have been transfered out of 401k")
       (is (= 200M (:balance ira)) "Shares have been transfered into IRA")))) ; TODO Adjust this to account for value, not shares


Missed a call to defunk head fn

Missed a call to defunk head fn

--- test/kixi/integration/base.clj
+++ test/kixi/integration/base.clj
@@ -159,7 +159,7 @@

 (defn dload-file
   [location]
-  (let [_ (wait-for-url-head location)
+  (let [_ (wait-for-url location)
         f (java.io.File/createTempFile (uuid) ".tmp")
         _ (.deleteOnExit f)]
     (bs/transfer (:body (client/get location {:as :stream}))


Fleshing outDDD unit tests for the persistence namespace

--- test/onix/unit/persistence.clj
+++ test/onix/unit/persistence.clj
@@ -15,36 +15,51 @@
                                                                                :metadata "{\"size\":\"big\",\"colour\":\"red\"}"}))

                    (fact "Fetching a app which does not exist returns nil"
-                                (persistence/get-application "dummy") => nil
-                                (provided
-                                  (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => nil)))
+                         (persistence/get-application "dummy") => nil
+                         (provided
+                           (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => nil)))

             (facts "About updating an existing application"

                    (fact "Adding a metadata item to an existing app adds the item to the stored application."
-                                (persistence/update-application-metadata "dummy" "key" "value") => {:key "value"}
-                                (provided
-                                  (persistence/get-application "dummy") => {:name "dummy"
-                                                                            :metadata {:size "big" :colour "red"}}
-                                  (persistence/create-application {:name "dummy"
-                                                                   :metadata "{\"key\":\"value\",\"size\":\"big\",\"colour\":\"red\"}"})
-                                  => anything))
+                         (persistence/update-application-metadata "dummy" "key" "value") => {:key "value"}
+                         (provided
+                           (persistence/get-application "dummy") => {:name "dummy"
+                                                                     :metadata {:size "big" :colour "red"}}
+                           (persistence/create-application {:name "dummy"
+                                                            :metadata "{\"key\":\"value\",\"size\":\"big\",\"colour\":\"red\"}"})
+                           => anything))

                    (fact "Updating a metadata item in an existing app overwrites the previous value"
-                                (persistence/update-application-metadata "dummy" "colour" "blue") => {:colour "blue"}
-                                (provided
-                                  (persistence/get-application "dummy") => {:name "dummy"
-                                                                            :metadata {:size "big" :colour "red"}}
-                                  (persistence/create-application {:name "dummy"
-                                                                   :metadata "{\"size\":\"big\",\"colour\":\"blue\"}"})
-                                  => anything))
+                         (persistence/update-application-metadata "dummy" "colour" "blue") => {:colour "blue"}
+                         (provided
+                           (persistence/get-application "dummy") => {:name "dummy"
+                                                                     :metadata {:size "big" :colour "red"}}
+                           (persistence/create-application {:name "dummy"
+                                                            :metadata "{\"size\":\"big\",\"colour\":\"blue\"}"})
+                           => anything))

                    (fact "Updating a metadata item in an app which doesn't exist returns nil"
-                                (persistence/update-application-metadata "dummy" "key" "value") => nil
-                                (provided
-                                  (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => nil)))
+                         (persistence/update-application-metadata "dummy" "key" "value") => nil
+                         (provided
+                           (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => nil)))

-
-
-            )
+            (facts "About getting an individual metadata item from an application."
+
+                   (fact "Requesting a metadata item which exists on an existing application succeeds."
+                         (persistence/get-application-metadata-item "dummy" "colour") => {:colour "red"}
+                         (provided
+                           (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => {:name "dummy"
+                                                                                :metadata "{\"size\":\"big\",\"colour\":\"red\"}"}))
+
+                   (fact "Requesting a metadata item which does not exist on an existing application returns nil."
+                         (persistence/get-application-metadata-item "dummy" "key") => nil
+                         (provided
+                           (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => {:name "dummy"
+                                                                                :metadata "{\"size\":\"big\",\"colour\":\"red\"}"}))
+
+                   (fact "Requesting a metadata item on an application which doesn't exist returns nil."
+                         (persistence/get-application-metadata-item "dummy" "key") => nil
+                         (provided
+                           (dynamo/get-item persistence/applications-table {:hash_key "dummy"}) => nil))))


Whoops, fix other call to load-file

Whoops, fix other call to load-file


move standard-number-of-times inside (defn speed-test)

--- test/babel/test/fr.cljc
+++ test/babel/test/fr.cljc
@@ -672,9 +672,9 @@
     (is (= "nous acheterons" (fo generated)))))

-(def standard-number-of-times 10)
 (defn speed-test [spec & [times]]
-  (let [times (or times standard-number-of-times)]
+  (let [standard-number-of-times 10
+        times (or times standard-number-of-times)]
     (is (= times
            (count (take times
                         (repeatedly


more INFO logging

more INFO logging

--- src/babel/engine.cljc
+++ src/babel/engine.cljc
@@ -85,7 +85,10 @@
                (unify spec
                       {:synsem {:subcat '()}}))

-        debug (log/debug (str "pre-enrich spec: " spec))
+        debug (log/info (str "generate-all:"
+                             {:language (:language language-model)
+                              :model (:name language-model)
+                              :spec spec}))

         spec (if (and do-enrich (:enrich language-model))
                ((:enrich language-model)
@@ -103,6 +106,15 @@
                                       (:lexicon language-model)
                                       (:index language-model)
                                       (:morph language-model))]
+      (if (not (empty? result))
+        (log/info (str "successfully generated with:"
+                       {:language (:language language-model)
+                        :model (:name language-model)
+                        :spec spec} " => '" ((:morph language-model) (first result)) "'"))
+        (log/warn (str "generate-all: failed to generate with: "
+                       {:language (:language language-model)
+                        :model (:name language-model)
+                        :spec spec})))
       result)))

 #?(:clj


Find files in git

Find files in git

--- src/boot_fmt/core.clj
+++ src/boot_fmt/core.clj
@@ -2,9 +2,23 @@
   "Reformat Clojure(script) source files"
   {:boot/export-tasks true}
   (:require [clojure.set]
+            [clojure.string]
+            [clojure.java.shell]
             [boot-fmt.impl :as impl]
             [boot.core :as bc]
             [boot.util :as bu]))
+
+(defn find-files-git []
+  (let [{:keys [exit out err]} (clojure.java.shell/sh "git" "ls-fileszzz" "-z" "*.clj" "*.cljs" "*.cljc" "*.boot")]
+    (when (not= exit 0)
+      (throw (ex-info "git ls-files failed"
+                      {:err err})))
+    (-> out
+        (clojure.string/split #"\000")
+        set)))
+
+(defn find-files-source []
+  (clojure.set/union (bc/get-env :source-paths) (bc/get-env :resource-paths)))

 ;!zprint {:format :skip}

@@ -38,11 +52,13 @@
   [m mode MODE kw "Mode of operation, i.e. print, list, diff or overwrite. Defaults to print"
    r really bool "In overwrite mode, files are overwritten only if the --really flag is set as well"
    f files VAL #{str} "The list of files or directories to format"
-   s source bool "Automatically scan for source file in boot source directories"
+   s source bool "Automatically scan for source files in boot source directories"
+   g git bool "Automatically scan for source files in current git repository"
    o options OPTS edn "zprint options"]
   (let [mode (or mode :print)
         files (cond-> files
-                source (clojure.set/union (bc/get-env :source-paths) (bc/get-env :resource-paths)))]
+                source (clojure.set/union (find-files-source))
+                git (clojure.set/union (find-files-git)))]
     (assert (seq files) "At least one filename needs to be provided.")
     (assert (#{:print :list :diff :overwrite} mode) "Invalid mode")
     (assert (or (not= :overwrite mode) really)
@@ -53,7 +69,9 @@
                             (map clojure.java.io/file)
                             (mapcat (fn [f]
                                       (if (.isDirectory f) (file-seq f) [f])))
-                            (filter impl/clj-file?))]
+                            (filter impl/clj-file?)
+                            set
+                            sort)]
         (impl/process-many {:mode mode
                             :zprint-options options} files*)
         fileset))))


look for migrations in jars on the classpath

--- joplin.core/src/joplin/core.clj
+++ joplin.core/src/joplin/core.clj
@@ -1,11 +1,13 @@
 (ns joplin.core
   (:require [clj-time.core :as t]
             [clj-time.format :as f]
+            [clojure.java.classpath :as classpath]
             [clojure.java.io :as io]
             [clojure.set]
-            [clojure.string]
+            [clojure.string :as string]
             [ragtime.core]
             [ragtime.main]))
+

 ;; ==========================================================================
 ;; methods implemented by migrator/seed targets
@@ -49,25 +51,36 @@
 (defn get-full-migrator-id [id]
   (str (f/unparse (f/formatter "YYYYMMddHHmmss") (t/now)) "-" id))

-(defn- get-migration-ns [path]
+(defn- get-migration-files [path]
+  (let [folder (io/file path)
+        classpath-folder (->> (string/split path "/")
+                              rest (interpose "/") (apply str))]
+    (if (.isDirectory folder)
+      ;; If it's a folder just read the file from there
+      (map #(.getName %) (.listFiles folder))
+
+      ;; Try finding this path in a jar on the classpath
+      (->> (classpath/classpath-jarfiles)
+           (mapcat classpath/filenames-in-jar)
+           (filter #(.startsWith % classpath-folder))))))
+
+(defn- get-migration-namespaces [path]
   (when path
-    (let [ns (->> (clojure.string/split path #"/")
+    (let [ns (->> (string/split path #"/")
                   rest
                   (interpose ".")
-                  (apply str))
-          folder (io/file path)]
-      (->> (.listFiles folder)
-           (map #(.getName %))
+                  (apply str))]
+      (->> (get-migration-files path)
            (map #(re-matches #"(.*)(\.clj)$" %))
            (keep second)
-           (map #(clojure.string/replace % "_" "-"))
+           (map #(string/replace % "_" "-"))
            sort
            (mapv #(vector % (symbol (str ns "." %))))))))

 (defn get-migrations
   "Get all seq of ragtime migrators given a path (will scan the filesystem)"
   [path]
-  (for [[id ns] (get-migration-ns path)]
+  (for [[id ns] (get-migration-namespaces path)]
     (do
       (require ns)
       (verbose-migration
@@ -131,7 +144,7 @@
   (when (:migrator target)
     (let [migration-id (get-full-migrator-id id)
           path (str (:migrator target) "/"
-                    (clojure.string/replace migration-id "-" "_")
+                    (string/replace migration-id "-" "_")
                     ".clj")]
       (println "creating" path)
       (try
@@ -147,7 +160,7 @@
   )
 " (apply str (interpose "."
                         (concat
-                         (-> (:migrator target) (clojure.string/split #"/") rest)
+                         (-> (:migrator target) (string/split #"/") rest)
                          [migration-id]))) ns))
         (catch Exception e
           (println "Error creating file" path))))))


accompanying-material should be added to more braille books

regardless of braille-grade, subgenre and double-spaced?

--- src/catalog/vubis.clj
+++ src/catalog/vubis.clj
@@ -291,9 +291,7 @@
                      ;; preconditions
                      accompanying-material (when (and
                                                   rucksackbuch-number
-                                                  (= (:sub-genre item) :kinderbücher-ab-6)
-                                                  (= braille-grade :vollschrift)
-                                                  (not double-spaced?))
+                                                  (= (:sub-genre item) :kinderbücher-ab-6))
                                              "inkl. Schwarzschriftbeilage")]
                  (-> item
                      (assoc-some


client config: ips => hosts

client config: ips => hosts

--- src/chazel/chazel.clj
+++ src/chazel/chazel.clj
@@ -24,11 +24,11 @@
   ([conf]
     (Hazelcast/getOrCreateHazelcastInstance conf)))

-(defn client-config [{:keys [ips retry-ms retry-max]}]
+(defn client-config [{:keys [hosts retry-ms retry-max]}]
   (let [config (ClientConfig.)]
     (doto config
       (.getNetworkConfig)
-      (.addAddress (into-array ips))
+      (.addAddress (into-array hosts))
       (.setConnectionAttemptPeriod retry-ms)
       (.setConnectionAttemptLimit retry-max))
     config))
@@ -41,7 +41,7 @@
 (defonce
   ;; "will only be used if no config is provided"
   default-client-config
-  {:ips ["127.0.0.1"]
+  {:hosts ["127.0.0.1"]
    :retry-ms 5000
    :retry-max 720000})                        ;; 720000 * 5000 = one hour


Fix lazy-seq macro

Fix lazy-seq macro

--- src/clj/cljs/core.clj
+++ src/clj/cljs/core.clj
@@ -96,5 +96,5 @@
        ~@(map method methods))))

 (defmacro lazy-seq [& body]
-  `(new cljs.user.LazySeq nil false (fn [] ~@body)))
+  `(new cljs.core.LazySeq nil false (fn [] ~@body)))


CLJS-1094: read option not used by cljs.repl/repl*

--- src/clj/cljs/repl.clj
+++ src/clj/cljs/repl.clj
@@ -705,7 +705,7 @@
                                      (apply merge
                                        ((juxt :requires :require-macros)
                                          (ana/get-namespace ana/*cljs-ns*)))]
-                             (repl-read request-prompt request-exit))]
+                             (read request-prompt request-exit))]
                  (or ({request-exit request-exit
                        :cljs/quit request-exit
                        request-prompt request-prompt} input)


basic support for passing analyze-path param to REPLs.

--- src/clj/cljs/repl.clj
+++ src/clj/cljs/repl.clj
@@ -161,11 +161,13 @@

 (defn repl
   "Note - repl will reload core.cljs every time, even if supplied old repl-env"
-  [repl-env & {:keys [verbose warn-on-undeclared special-fns]}]
+  [repl-env & {:keys [analyze-path verbose warn-on-undeclared special-fns]}]
   (prn "Type: " :cljs/quit " to quit")
   (binding [ana/*cljs-ns* 'cljs.user
             *cljs-verbose* verbose
             ana/*cljs-warn-on-undeclared* warn-on-undeclared]
+    (when analyze-path
+      (analyze-source analyze-path))
     (let [env {:context :expr :locals {}}
           special-fns (merge default-special-fns special-fns)
           is-special-fn? (set (keys special-fns))]


Fix symbol `runner`-> `:runner`

Fix symbol `runner`-> `:runner`

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -1650,9 +1650,9 @@
         "/bp"         #(swap! %1 assoc-in [%2 :bad-publicity] (max 0 value))
         "/link"       #(swap! %1 assoc-in [%2 :link] (max 0 value))
         "/handsize"   #(swap! %1 assoc-in [%2 :max-hand-size] (max 0 value))
-        "/take-meat"  #(when (= %2 runner) (damage %1 %2 :meat  (max 0 value)))
-        "/take-net"   #(when (= %2 runner) (damage %1 %2 :net   (max 0 value)))
-        "/take-brain" #(when (= %2 runner) (damage %1 %2 :brain (max 0 value)))
+        "/take-meat"  #(when (= %2 :runner) (damage %1 %2 :meat  (max 0 value)))
+        "/take-net"   #(when (= %2 :runner) (damage %1 %2 :net   (max 0 value)))
+        "/take-brain" #(when (= %2 :runner) (damage %1 %2 :brain (max 0 value)))
         "/discard"    #(move %1 %2 (nth (get-in @%1 [%2 :hand]) num nil) :discard)
         "/deck"       #(move %1 %2 (nth (get-in @%1 [%2 :hand]) num nil) :deck {:front true})
         nil


add a "Runner wins the game" message when the Corp is decked

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -274,6 +274,8 @@
 (defn draw
   ([state side] (draw state side 1))
   ([state side n]
+   (when (and (= side :corp) (> n (count (get-in @state [:corp :deck]))))
+     (system-msg state side "is decked and the Runner wins the game"))
    (let [active-player (get-in @state [:active-player])]
      (when-not (get-in @state [active-player :register :cannot-draw])
        (let [drawn (zone :hand (take n (get-in @state [side :deck])))]


Reverted install message change, it's a more complicated subject than it seemed

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -275,14 +275,16 @@

 (defn card-str
   ([state card] (card-str state card nil))
-  ([state card {:keys [visible where] :as args}]
+  ([state card {:keys [visible] :as args}]
    (str (if (card-is? card :side :corp)
          ; Corp card messages
          (str (if (or (rezzed? card) visible) (:title card) (if (ice? card) "ICE" "a card"))
-              (if (ice? card) " protecting " " in ")
-              ;TODO add naming of scoring area of corp/runner
-              (or where (zone->name (second (:zone card))))
-              (if (ice? card) (str " at position " (ice-index state card))))
+              ; Hosted cards do not need "in server 1" messages, host has them
+              (if-not (:host card)
+                (str (if (ice? card) " protecting " " in ")
+                     ;TODO add naming of scoring area of corp/runner
+                     (zone->name (second (:zone card)))
+                     (if (ice? card) (str " at position " (ice-index state card))))))
          ; Runner card messages
          (if (or (:facedown card) visible) "a facedown card" (:title card)))
        (if (:host card) (str " hosted on " (card-str state (:host card)))))))
@@ -1689,10 +1691,10 @@
                    (when-let [prev-card (some #(when (#{"Asset" "Agenda"} (:type %)) %) dest-zone)]
                      (system-msg state side (str "trashes " (card-str state prev-card)))
                      (trash state side prev-card {:keep-server-alive true})))
-                 (let [visible (or (= :rezzed-no-cost install-state) (= :face-up install-state))]
-                   ; TODO code above could be simplified, check whether visible is really needed here or if card-str is smart enough to figure it out on its own
+                 (let [card-name (if (or (= :rezzed-no-cost install-state) (= :face-up install-state) (:rezzed c))
+                                   (:title card) (if (ice? c) "ICE" "a card"))]
                    (system-msg state side (str (build-spend-msg cost-str "install")
-                                               (card-str state c {:visible visible :where server }))))
+                                               card-name (if (ice? c) " protecting " " in ") server)))
                  (let [moved-card (move state side c slot)]
                    (trigger-event state side :corp-install moved-card)
                    (when (= (:type c) "Agenda")


count ices for correct run index for ddos

--- src/clj/game/core.clj
+++ src/clj/game/core.clj
@@ -1547,7 +1547,7 @@
                                     (system-msg state side (str "is prevented from rezzing ICE on this run by "
                                                                 (:title (run-flag state :no-rez-ice)))))
      ;DDoS
-     (and (turn-flag state :no-rez-outermost-ice) (= 1 (get-in @state [:run :position]))) ( (constantly false)
+     (and (turn-flag state :no-rez-outermost-ice) (= (count (get-in @state [:run :ices])) (get-in @state [:run :position]))) ( (constantly false)
                                                (system-msg state side (str "is prevented from rezzing outermost ice by "
                                                                            (:title (turn-flag state :no-rez-outermost-ice)))))
      :else true)))


Start on templates

Start on templates

--- src/consumer/core.clj
+++ src/consumer/core.clj
@@ -20,19 +20,39 @@
   [request]
   (let [data (client/get "http://provider:8080/api/" {:headers {
         "Authorization" (str "Bearer " (.getTokenString (get-session request)))}})]
-      (chesire/decode (:body data))))
+      (chesire/parse-string (:body data) true)))

-(defn render-page
-  "Builds the matter for a page"
+(defn render-plain-page
+  "Builds a plain page with no sidebar"
   [content]
   (let [js ["c3.js" "d3.v3.js" "jquery-2.1.1.js" "bootstrap.js" "jasny-bootstrap.js"]
         css ["bootstrap.css" "jasny-bootstrap.css" "font-awesome.css" "c3.css" "auxilary.css"]]
     (hiccup/html
       [:html
-        [:head
-              (for [item js] [:script {:src (str "/assets/js/" item)}])
-              (for [item css] [:link {:href (str "/assets/css/" item)}])]
-        [:body content]])))
+        [:head
+          (for [item js] [:script {:src (str "/assets/js/" item)}])
+          (for [item css] [:link {:rel "stylesheet" :href (str "/assets/css/" item)}])]
+        [:body
+          content]])))
+
+(defn render-page
+  "Builds a page with the sidebar"
+  [request content]
+  (render-plain-page
+    [:div.navmenu.navmenu-inverse.navmenu-fixed-left.offcanvas
+      [:a.navmenu-brand {:href "/"}]
+      [:ul.nav.navmenu-nav
+        (cons [:li
+          [:a.navmenu-header {:href "/"}
+            [:i.fa.fa-question]
+            "Visualizations"]]
+          (for [vis (get-visualization-list request)]
+            [:a {:href (str "/view/" (:_id vis))
+                 :data-toggle "tooltip"
+                 :data-placement "right"
+                 :title (:description vis)}
+                 (:title vis)]))]]))
+

 (defn home-route
   "Renders the homepage"
@@ -44,7 +64,7 @@
   "Renders the dashboard"
   [request]
   ; TODO
-  (render-page [:h1 "Hello hello!"]))
+  (render-page request [:h1 "Hello hello!"]))

 (defn view-route
   "Renders the view of a specified visualization"


Improved configuration

Improved configuration

--- src/decimal/core.cljs
+++ src/decimal/core.cljs
@@ -8,6 +8,25 @@

 (def ^:static +decimal+ (js/Decimal.noConflict))
 (def ^:dynamic *decimal* +decimal+)
+
+(def round-mapping {
+  :round-up 0
+  :round-down 1
+  :round-ceil 2
+  :round-floor 3
+  :round-half-up 4
+  :round-half-down 5
+  :round-half-even 6
+  :round-half-ceil 7
+  :round-half-floor 8
+  :euclid 9})
+
+(def modulo-mapping {
+  :round-up 0
+  :round-down 1
+  :round-floor 3
+  :round-half-even 6
+  :euclid 9})

 (defn config!
   "Set the global configuration for the decimal constructor.
@@ -19,29 +38,38 @@
     default: 20).
   - `rounding`: The default rounding mode used when rounding
     the result of an operation (integer 0 to 8 inclusive,
-    default: ROUND_HALF_UP).
+    default: :round-half-up).
+  - `min-e`: The negative exponent limit, i.e. the exponent value below
+    which underflow to zero occurs (integer, -9e15 to 0 inclusive, default:
+    -9e15).
+  - `max-e`: The positive exponent limit, i.e. the exponent value above
+    which overflow to Infinity occurs (integer, 0 to 9e15 inclusive, default:
+    9e15).
+  - `to-exp-neg`: The negative exponent value at and below which `toString`
+    returns exponential notation. (integer, -9e15 to 0 inclusive, default: -7)
+  - `to-exp-pos`: The positive exponent value at and above which `toString`
+    returns exponential notation. (integer, 0 to 9e15 inclusive, default: 20)
   - `modulo`: The modulo mode used when calculating the modulus: `a mod n`.
-    (integer, 0 to 9 inclusive, default: ROWN_DOWN)
+    (integer, 0 to 9 inclusive, default: :round-down)
   - `crypto`: The value that determines whether cryptographically-secure
     pseudo-random number generation is used. (boolean, default: false)

   **Rounding modes**

-  Rounding modes 0 to 6 (inclusive) are the same as those of Java's
-  BigDecimal class.
-
-  Property         | Value | Description
-  -----------------|-------|------------
-  ROUND_UP         | 0     | Rounds away from zero
-  ROUND_DOWN       | 1     | Rounds towards zero
-  ROUND_CEIL       | 2     | Rounds towards Infinity
-  ROUND_FLOOR      | 3     | Rounds towards -Infinity
-  ROUND_HALF_UP    | 4     | Rounds towards nearest neighbour. If equidistant, rounds away from zero
-  ROUND_HALF_DOWN  | 5     | Rounds towards nearest neighbour. If equidistant, rounds towards zero
-  ROUND_HALF_EVEN  | 6     | Rounds towards nearest neighbour. If equidistant, rounds towards even neighbour
-  ROUND_HALF_CEIL  | 7     | Rounds towards nearest neighbour. If equidistant, rounds towards Infinity
-  ROUND_HALF_FLOOR | 8     | Rounds towards nearest neighbour. If equidistant, rounds towards -Infinity
-  EUCLID           | 9     | Not a rounding mode, see modulo
+  Rounding modes are:
+
+  Keyword           |  Description
+  ------------------|-------------
+  :round-up         |  Rounds away from zero
+  :round-down       |  Rounds towards zero
+  :round-ceil       |  Rounds towards Infinity
+  :round-floor      |  Rounds towards -Infinity
+  :round-half-up    |  Rounds towards nearest neighbour. If equidistant, rounds away from zero
+  :round-half-down  |  Rounds towards nearest neighbour. If equidistant, rounds towards zero
+  :round-half-even  |  Rounds towards nearest neighbour. If equidistant, rounds towards even neighbour
+  :round-half-ceil  |  Rounds towards nearest neighbour. If equidistant, rounds towards Infinity
+  :round-half-floor |  Rounds towards nearest neighbour. If equidistant, rounds towards -Infinity
+  :euclid           |  Not a rounding mode, see modulo

   **Modulo modes**

@@ -49,29 +77,45 @@
   are shown in the following table. Although the other rounding modes can be used,
   they may not give useful results.

-  Property         | Value | Description
-  -----------------|-------|------------
-  ROUND_UP         | 0     | The remainder is positive if the dividend is negative, else is negative
-  ROUND_DOWN       | 1     | The remainder has the same sign as the dividend. This uses truncating division and matches the behaviour of JavaScript's remainder operator %.
-  ROUND_FLOOR      | 3     | The remainder has the same sign as the divisor. (This matches Python's % operator)
-  ROUND_HALF_EVEN  | 6     | The IEEE 754 remainder function
-  EUCLID           | 9     | The remainder is always positive.
+  Keyword           | Description
+  ------------------|------------
+  :round-up         | The remainder is positive if the dividend is negative, else is negative
+  :round-down       | The remainder has the same sign as the dividend. This uses truncating division and matches the behaviour of JavaScript's remainder operator %.
+  :round-floor      | The remainder has the same sign as the divisor. (This matches Python's % operator)
+  :round-half-even  | The IEEE 754 remainder function
+  :euclid           | The remainder is always positive.

   **Other options**

   The underlying library supports more options that and this
   function also accepts. You can read more about here:
   http://mikemcl.github.io/decimal.js/#Dconfig"
-  [{:keys [precision rounding modulo crypto] :as options}]
-  (.config +decimal+ (clj->js options))
-  nil)
+  [options]
+  (let [final-options {:precision (:precision options 20)
+                       :rounding ((:rounding options :round-half-up) round-mapping)
+                       :modulo ((:modulo options :round-down) modulo-mapping)
+                       :minE (:min-e options -9e15)
+                       :maxE (:max-e options 9e15)
+                       :toExpNeg (:to-exp-neg options -7)
+                       :toExpPos (:to-exp-pos options 20)
+                       :crypto (:crypto options false)}]
+    (.config +decimal+ (clj->js final-options))
+    nil))

 (defn config
   "The same as `config` but returns an constructor
   of decimals that can be used for create new instances
   with provided configuration."
   [options]
-  (.clone +decimal+ (clj->js options)))
+  (let [final-options {:precision (:precision options 20)
+                       :rounding ((:rounding options :round-half-up) round-mapping)
+                       :modulo ((:modulo options :round-down) modulo-mapping)
+                       :minE (:min-e options -9e15)
+                       :maxE (:max-e options 9e15)
+                       :toExpNeg (:to-exp-neg options -7)
+                       :toExpPos (:to-exp-pos options 20)
+                       :crypto (:crypto options false)}]
+    (.clone +decimal+ (clj->js final-options))))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Protocols & Constructor


Put issue selections into fn

Put issue selections into fn

--- src/discuss/find.cljs
+++ src/discuss/find.cljs
@@ -46,6 +46,12 @@
   (vlib/commit-target-value key val owner)
   (find-statement (.. val -target -value)))

+(defn issue-selector-view
+  "Create option items from each issue."
+  [issue owner]
+  (dom/option #js {:key (lib/prefix-name (str "discuss-issue-selector-" (:uid issue)))}
+              (:title issue)))
+
 (defn form-view [_ owner]
   (reify
     om/IInitState
@@ -59,9 +65,7 @@
                           (dom/label nil "Select Issue")
                           (dom/select #js {:className "form-control"
                                            :multiple  true}
-                                      (map #(dom/option #js {:key (lib/prefix-name (str "discuss-issue-selector-" (:uid %)))}
-                                                        (:title %))
-                                           issues))))
+                                      (map #(issue-selector-view % owner) issues))))

                (dom/div #js {:className "input-group"}
                         (dom/input #js {:className   "form-control"


73 handlers ready and tested

73 handlers ready and tested

--- src/etaoin/driver.clj
+++ src/etaoin/driver.clj
@@ -268,6 +268,13 @@
 ;; Download folder
 ;;

+(defn- ^String add-trailing-slash
+  [^String path]
+  (let [sep java.io.File/separator]
+    (if (string/ends-with? path sep)
+      path
+      (str path sep))))
+
 (defmulti set-download-dir
   {:arglists '([driver path])}
   dispatch-driver)
@@ -275,20 +282,60 @@
 (defmethod set-download-dir
   :default
   [driver path]
-  (log/debugf "This driver doesn't support setting a download dir.")
-  driver)
-
+  (log/debugf "This driver doesn't support setting a download directory.")
+  driver)
+
+;; https://github.com/rshf/chromedriver/issues/338
+;; trailing slash is mandatory for Chrome
 (defmethod set-download-dir
   :chrome
   [driver path]
-  (set-prefs driver {:download.default_directory path}))
+  (set-prefs driver {:download.default_directory (add-trailing-slash path)
+                     :download.prompt_for_download false}))
+
+(def ^{:private true
+       :doc "A set of content types that should be downloaded without asking a user."}
+  ff-content-types
+  #{"application/gzip"
+    "application/json"
+    "application/msword"
+    "application/octet-stream"
+    "application/pdf"
+    "application/rtf"
+    "application/vnd.ms-excel"
+    "application/vnd.ms-powerpoint"
+    "application/vnd.openxmlformats-officedocument.presentationml.presentation"
+    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+    "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+    "application/x-7z-compressed"
+    "application/x-rar-compressed"
+    "application/x-shockwave-flash"
+    "application/x-tar"
+    "application/zip"
+    "audio/flac"
+    "audio/mpeg"
+    "audio/ogg"
+    "image/svg+xml"
+    "text/csv"
+    "text/javascript"
+    "text/plain"
+    "text/xml"
+    "video/mp4"
+    "video/mpeg"
+    "video/ogg"
+    "video/quicktime"
+    "video/webm"
+    "video/x-flv"
+    "video/x-msvideo"})

 (defmethod set-download-dir
   :firefox
   [driver path]
   (set-prefs driver {:browser.download.dir path
                      :browser.download.folderList 2
-                     :browser.download.useDownloadDir true}))
+                     :browser.download.useDownloadDir true
+                     :browser.helperApps.neverAsk.saveToDisk
+                     (string/join ";" ff-content-types)}))

 ;;
 ;; binary path


Fix maybe-show-new declaration

Fix maybe-show-new declaration

--- src/gitique/core.cljs
+++ src/gitique/core.cljs
@@ -209,8 +209,8 @@
   (add-button!)
   (update-overall!))

-(defn- maybe-show-new [repo]
-  (if repo
+(defn- maybe-show-new [repo pr]
+  (if (and repo pr)
     (let [{:keys [last-reviewed-commit all-commits]} (commit-info)]
       (swap! state assoc :base-commit last-reviewed-commit :all-commits all-commits))
     (swap! state assoc :base-commit nil :all-commits nil)))


Exclude temp files from jar creation.

Exclude temp files from jar creation.

--- src/leiningen/jar.clj
+++ src/leiningen/jar.clj
@@ -26,6 +26,11 @@
 (defn unix-path [path]
   (.replaceAll path "\\\\" "/"))

+(defn skip-file? [file]
+  (or (.isDirectory file)
+      (re-find #"^\.?#" (.getName file))
+      (re-find #"~$" (.getName file))))
+
 (defmulti copy-to-jar (fn [project jar-os spec] (:type spec)))

 (defn- trim-leading-str [s to-trim]
@@ -37,7 +42,7 @@
         [resources classes src]
         (map noroot (map project [:resources-path :compile-path :source-path]))]
   (doseq [child (file-seq (file (:path spec)))]
-    (when-not (.isDirectory child)
+    (when-not (skip-file? child)
       (let [path (reduce trim-leading-str (unix-path (str child))
                          [root resources classes src "/"])]
         (.putNextEntry jar-os (JarEntry. path))


Typo in task help text

Typo in task help text

--- src/adzerk/boot_cljs.clj
+++ src/adzerk/boot_cljs.clj
@@ -213,7 +213,7 @@
   If no .cljs.edn files exists, default one is created. It will depend on
   all .cljs files in fileset.

-  Available --optimization levels (default 'none'):
+  Available --optimizations levels (default 'none'):

   * none         No optimizations. Bypass the Closure compiler completely.
   * whitespace   Remove comments, unnecessary whitespace, and punctuation.