Got my befores and afters mixed up

Got my befores and afters mixed up

--- src/clojure/staircase/handler.clj
+++ src/clojure/staircase/handler.clj
@@ -284,7 +284,7 @@

 (defn build-service-routes [{:keys [config services]}]
   (let [ensure-name (fn [service] (-> service (assoc :name (or (:name service) (:confname service))) (dissoc :confname)))
-        ensure-token (fn [service] (if (and (:token service) (:valid_until service) (.after (now) (:valid_until service)))
+        ensure-token (fn [service] (if (and (:token service) (:valid_until service) (.before (now) (:valid_until service)))
                                      service
                                      (let [token (register-for service)
                                            current (first (get-where services [:= :root (:root service)]))
@@ -294,6 +294,7 @@
                                                                             {:name (:name service)
                                                                              :root (:root service)
                                                                              :token token})))]
+                                       (info "Got new token for" (:name service) (:valid_until service))
                                        (merge service canon))))
         ensure-valid (comp ensure-token ensure-name)
         real-id #(if (= "default" %) (:default-service config) %)]


datacenter arg for spy-session

datacenter arg for spy-session

--- src/er_cassandra/session/alia.clj
+++ src/er_cassandra/session/alia.clj
@@ -109,11 +109,12 @@
   (reset-spy-log [_] (reset! spy-log-atom [])))

 (defnk create-spy-session
-  [contact-points keyspace {port nil} {truncate-on-close nil}]
-  (->AliaSpySession keyspace
-                    (create-alia-session* contact-points keyspace port)
-                    (atom [])
-                    truncate-on-close))
+  [contact-points datacenter keyspace {port nil} {truncate-on-close nil}]
+  (->AliaSpySession
+   keyspace
+   (create-alia-session* contact-points datacenter keyspace port)
+   (atom [])
+   truncate-on-close))

 (defn with-spy-session-reset*
   "start an alia spy-session, call a function and truncate


Comment debug output.

Comment debug output.

--- src/dsbdp/data_processing_dsl.clj
+++ src/dsbdp/data_processing_dsl.clj
@@ -167,7 +167,7 @@
                           (create-incremental-proc-fn-body-java-map-out input-sym output-sym rules))))
 ;        _ (println "Created data processing function vector from DSL:" fn-body-vec)
         fn-body (reverse (into '() fn-body-vec))
-        _ (println "Created data processing function body:" fn-body)
+;        _ (println "Created data processing function body:" fn-body)
         data-processing-fn (eval `(fn [~input-sym ~output-sym] ~fn-body))]
     data-processing-fn))


Refactor handling of nested elements.

Refactor handling of nested elements.

--- src/dsbdp/data_processing_dsl.clj
+++ src/dsbdp/data_processing_dsl.clj
@@ -66,6 +66,7 @@
     (symbol (str "__" nesting-level "_" rule-name))))

 (declare create-let-expression)
+(declare create-proc-fn)

 (defn- create-bindings-vector
   [input rules body-creation-fn output nesting-level]
@@ -74,27 +75,28 @@
       (let [rule-name (first rule)
             rule-expression (second rule)]
         (cond
+          (and
+            (list? rule-expression)
+            (every? vector? rule-expression)) (do
+                                                (println "NESTED SEQUENCE!!")
+                                                (into
+                                                  (conj v
+                                                        rule-name
+                                                        nil)
+                                                  ['abc 123]
+                                                  ))
           (list? rule-expression) (conj v
                                     (prefix-rule-name rule-name nesting-level)
                                     (create-proc-sub-fn rule-expression input))
           (and
             (vector? rule-expression)
-            (every? vector? rule-expression)
-            (some #{:seq} rule)) (println "NESTED SEQUENCE!!")
-          (and
-            (vector? rule-expression)
-            (every? vector? rule-expression)) (do
-                                                ;(println "Binding: Got a VECTOR..." (first rule) (second rule))
-                                                (into
-                                                  (conj v
-                                                        rule-name
-                                                        nil)
-                                                  (create-bindings-vector
-                                                    input
-                                                    rule-expression
-                                                    body-creation-fn
-                                                    output
-                                                    (inc nesting-level))))
+            (every? vector? rule-expression)) (let [nested-expr (create-let-expression
+                                                                  input
+                                                                  rule-expression
+                                                                  body-creation-fn
+                                                                  output
+                                                                  (inc nesting-level))]
+                                                (conj v (prefix-rule-name rule-name nesting-level) nested-expr))
           (cond-rule-expr? rule-expression) (let [cond-expr (reduce
                                                               (fn [vect v]
                                                                 (cond
@@ -128,18 +130,10 @@
   (reduce
     (fn [v rule]
       (cond
-        (list? (second rule)) (conj v
-                                    `(.put
-                                      ~(name (first rule))
-                                      ~(prefix-rule-name (first rule) nesting-level)))
-        (and
-          (vector? (second rule))
-          (every? vector? (second rule))) (do
-                                            ;(println "Java Map Body: Got a Vector..." (first rule) (second rule))
-                                            (conj v
-                                                  `(.put
-                                                     ~(name (first rule))
-                                                     ~(reverse (into '() (create-let-body-vec-java-map-out (second rule) nil (inc nesting-level)))))))
+        (sequential? (second rule)) (conj v
+                                          `(.put
+                                            ~(name (first rule))
+                                            ~(prefix-rule-name (first rule) nesting-level)))
         (cond-rule-expr? (second rule)) (conj v
                                               `(.put ~(name (first rule))
                                                      ~(prefix-rule-name (first rule) nesting-level)))
@@ -154,18 +148,10 @@
   (reduce
     (fn [v rule]
       (cond
-        (list? (second rule)) (conj v
-                                    `(assoc
-                                      ~(name (first rule))
-                                      ~(prefix-rule-name (first rule) nesting-level)))
-        (and
-          (vector? (second rule))
-          (every? vector? (second rule))) (do
-                                            ;(println "Java Map Body: Got a Vector..." (first rule) (second rule))
-                                            (conj v
-                                                  `(assoc
-                                                     ~(name (first rule))
-                                                     ~(reverse (into '() (create-let-body-vec-clj-map-out (second rule) nil (inc nesting-level)))))))
+        (sequential? (second rule)) (conj v
+                                          `(assoc
+                                            ~(name (first rule))
+                                            ~(prefix-rule-name (first rule) nesting-level)))
         (cond-rule-expr? (second rule)) (conj v
                                               `(assoc ~(name (first rule))
                                                       ~(prefix-rule-name (first rule) nesting-level)))
@@ -203,21 +189,13 @@
                      (conj tmp-k `(.append "\""))
                      tmp-k)
             tmp-v (cond
-                    (list? (second rule)) (conj
-                                            tmp-k2
-                                            `(.append ~(prefix-rule-name (first rule) nesting-level)))
-                    (and
-                      (vector? (second rule))
-                      (every? vector? (second rule))) (do
-                                                        (conj tmp-k2 (reverse
-                                                                       (into '()
-                                                                             (create-let-body-vec-json-str-out
-                                                                               (second rule)
-                                                                               output
-                                                                               (inc nesting-level))))))
+                    (sequential? (second rule)) (conj
+                                                  tmp-k2
+                                                  `(.append ~(prefix-rule-name (first rule) nesting-level)))
                     (cond-rule-expr? (second rule)) (conj tmp-k2 `(.append ~(prefix-rule-name (first rule) nesting-level)))
-                    :default (do (println "JSON String Body: unknown element for rule:" (str rule))
-                                 tmp-k2))
+                    :default (do
+                               (println "JSON String Body: unknown element for rule:" (str rule))
+                               tmp-k2))
             tmp-v2 (if (some #{:string} rule)
                      (conj tmp-v `(.append "\""))
                      tmp-v)]
@@ -259,8 +237,8 @@
 ;        _ (println "Created data processing function vector from DSL:" fn-body-vec)
         fn-body (create-let-expression input-sym rules let-body-creation-fn output-sym 0)
 ;        _ (println "Created data processing function body:" fn-body)
-;        _ (pprint fn-body)
-;        _ (println "")
+        _ (pprint fn-body)
+        _ (println "")
         data-processing-fn (if (not (nil? output-sym))
                              (eval `(fn [~input-sym ~output-sym] ~fn-body))
                              (eval `(fn [~input-sym] ~fn-body)))]


Fix errors.

Fix errors.


#"\." -> ".", fixes Windows regression

#"\." -> ".", fixes Windows regression

--- src/main/clojure/cljs/closure.clj
+++ src/main/clojure/cljs/closure.clj
@@ -1199,7 +1199,7 @@

 (defn lib-rel-path [{:keys [lib-path url provides] :as ijs}]
   (if (nil? lib-path)
-    (str (string/replace (first provides) #"\." File/separator) ".js")
+    (str (string/replace (first provides) "." File/separator) ".js")
     (if (.endsWith lib-path ".js")
       (util/get-name url)
       (let [path (util/path url)]


Fx chain editing. (Not processed on server.)

--- sonic-jam/src/sonic_jam/core.cljs
+++ sonic-jam/src/sonic_jam/core.cljs
@@ -279,33 +279,52 @@
       {:state :init})
     om/IRenderState
     (render-state [_ state]
-      (let [transition #(om/update-state! owner (fn [s] (merge {:state %})))]
+      (let [transition #(om/update-state! owner (fn [s] (merge {:state %})))
+            closing-row #(dom/tr nil
+                                 (dom/td #js {:onClick (fn [] (transition :init))} %)
+                                 (dom/td nil nil)
+                                 (dom/td nil nil))
+            body-rows (map #(dom/tr nil
+                                    (dom/td nil nil)
+                                    (dom/td nil (get % "fx"))
+                                    (dom/td nil (om/build param-editor
+                                                          {:cursor %
+                                                           :id id
+                                                           :set-state-ch set-state-ch})))
+                           cursor)
+            commit #(let [new-fx {:fx (:fx state)
+                                  :params {}}]
+                      (transition :open)
+                      (print cursor)
+                      (om/transact! cursor (fn [c] (clj->js (into c [new-fx]))))
+                      (go (>! set-state-ch id)))]
         (condp = (:state state)
           :init (dom/span #js {:onClick #(transition :open)}
                           "{..}")
           :open (dom/table nil
                            (apply dom/tbody nil
                                   (concat
-                                   [(dom/tr nil
-                                            (dom/td #js {:onClick #(transition :init)} "{")
-                                            (dom/td nil nil)
-                                            (dom/td nil nil))]
-                                   (map #(dom/tr nil
-                                                 (dom/td nil nil)
-                                                 (dom/td nil (get % "fx"))
-                                                 (dom/td nil (om/build param-editor
-                                                                       {:cursor %
-                                                                        :id id
-                                                                        :set-state-ch set-state-ch})))
-                                        cursor)
+                                   [(closing-row "{")]
+                                   body-rows
                                    [(dom/tr nil
                                             (dom/td nil nil)
-                                            (dom/td #js {:onClick #(transition :open)} "[+]") ; TODO(:adding)
+                                            (dom/td #js {:onClick #(transition :adding)} "[+]")
                                             (dom/td nil nil))
-                                    (dom/tr nil
-                                            (dom/td #js {:onClick #(transition :init)} "}")
-                                            (dom/td nil nil)
-                                            (dom/td nil nil))]))))))))
+                                    (closing-row "}")])))
+          :adding (dom/table nil
+                             (apply dom/tbody  nil
+                                    (concat
+                                     [(closing-row "{")]
+                                     body-rows
+                                     [(dom/tr nil
+                                              (dom/td nil nil)
+                                              (dom/td nil
+                                                      (dom/input #js {:type "text" :value (:fx state)
+                                                                      :onChange #(handle-change % owner state :fx)
+                                                                      :onKeyDown #(when (= 13 (.-which %)) (commit))}))
+                                              (dom/td nil nil))
+
+                                      (closing-row "}")]))))))))

 (defn track-editor [{:keys [cursor id delete-ch set-state-ch] :as input} owner]
   (reify
@@ -412,7 +431,8 @@
                                  (clj->js
                                   (conj s {"type" "none"
                                            "beats" (repeat % [0])
-                                           "params" {}}))))
+                                           "params" {}
+                                           "fx" []}))))
             width-selection (fn [w s]
                               (dom/span #js {:onClick
                                              #(do


fix npm packages using @export annotations

closure seems to use these. when npm packages use them in a
different way it blows up when it shouldn't.

--- src/main/shadow/build/closure.clj
+++ src/main/shadow/build/closure.clj
@@ -1916,6 +1916,9 @@
           (add-sm-location-mappings state sources)

           (.resetWarningsGuard)
+          ;; we are processing wild npm code here that doesn't use closure-compiler annotations
+          ;; @export shouldn't try to call goog specific code
+          (.setGenerateExports false)

           (.setStrictModeInput false)


extended wallet api and documentation

extended wallet api and documentation

--- src/freecoin/handlers/sign_in.clj
+++ src/freecoin/handlers/sign_in.clj
@@ -25,13 +25,19 @@
                (lr/ring-response (soc/authorisation-redirect-response sso-config))))

 (defn empty-wallet [name email]
-  {:_id ""
-   :name  name
-   :email email
-   :public-key nil
-   :private-key nil
-   :blockchains {}
-   :blockchain-secrets {}})
+
+  {:_id ""            ;; unique id
+   :name  name        ;; identifier, case insensitive, space counts
+   :email email       ;; verified email account
+   :info nil          ;; misc information text on the account
+   :creation-date nil ;; date on which the wallet was created
+   :last-login nil    ;; last time this participant logged in succesfully
+   :last-login-ip nil ;; connection ip address of the last succesful login
+   :failed-logins nil ;; how many consecutive failed logins were attempted
+   :public-key nil    ;; public asymmetric key for off-the-blockchain encryption
+   :private-key nil   ;; private asymmetric key for off-the-blockchain encryption
+   :blockchains {}       ;; list of blockchains and public account ids
+   :blockchain-keys {}}) ;; list of keys for private blockchain operations

 (defn create-wallet [db-connection name email]
   (let [new-account


Remove batch tests

Remove batch tests

--- test/clojure/clojurewerkz/cassaforte/batch_test.clj
+++ test/clojure/clojurewerkz/cassaforte/batch_test.clj
@@ -1,50 +0,0 @@
-(ns clojurewerkz.cassaforte.batch-test
-  (:refer-clojure :exclude [update])
-  (:require
-   [clojurewerkz.cassaforte.test-helper :as th]
-            [clojurewerkz.cassaforte.client :as client]
-   ;;          [clojurewerkz.cassaforte.policies :as cp]
-   ;;          [clojurewerkz.cassaforte.cql :as cql :refer :all]
-   ;;          [clojurewerkz.cassaforte.uuids :as uuids]
-   ;;          [clojurewerkz.cassaforte.query :refer :all]
-
-            [clojure.test :refer :all]
-
-            [clj-time.core :refer [seconds ago before? date-time] :as tc]
-            [clj-time.format :as tf]
-            [clj-time.coerce :as cc]))
-
-(use-fixtures :each (fn [f]
-                      (th/with-temporary-keyspace f)))
-
-;; (let [s (th/make-test-session)]
-;;   (deftest test-insert-batch-with-ttl-without-prepared-statements
-;;     (let [input [[{:name "Alex" :city "Munich" :age (int 19)} (using :ttl (int 350))]
-;;                   [{:name "Alex" :city "Munich" :age (int 19)} (using :ttl (int 350))]]]
-;;        (insert-batch s :users input)
-;;        (is (= (first (first input)) (first (select s :users))))
-;;        (truncate s :users)))
-
-;;   (deftest test-insert-batch-plain-without-prepared-statements
-;;     (let [input [{:name "Alex" :city "Munich" :age (int 19)}
-;;                   {:name "Alex" :city "Munich" :age (int 19)}]]
-;;        (insert-batch s :users input)
-;;        (is (= (first input) (first (select s :users))))
-;;        (truncate s :users)))
-
-;;   (deftest test-insert-with-atomic-batch-without-prepared-statements
-;;     (cql/atomic-batch s (queries
-;;                           (hs/insert :users (values {:name "Alex" :city "Munich" :age (int 19)}))
-;;                           (hs/insert :users (values {:name "Fritz" :city "Hamburg" :age (int 28)}))))
-;;      (is (= "Munich" (-> (select s :users) first :city)))
-;;      (truncate s :users))
-
-;;   ;; there's some oddity with this test on C* 2.1, doesn't seem to be
-;;   ;; a client problem. Needs more investigation. MK.
-;;   #_ (deftest test-insert-with-atomic-batch-with-prepared-statements
-;;     (client/prepared
-;;      (cql/atomic-batch s (queries
-;;                           (hs/insert :users (values {:name "Alex" :city "Munich" :age (int 19)}))
-;;                           (hs/insert :users (values {:name "Fritz" :city "Hamburg" :age (int 28)}))))
-;;      (is (= "Munich" (-> (select s :users) first :city)))
-;;      (truncate s :users))))


Using :const

Using :const

--- src/org/spootnik/cyanite/util.clj
+++ src/org/spootnik/cyanite/util.clj
@@ -154,7 +154,7 @@
 ;;
 ;; The next section contains a series of path matching functions

-(def agg-methods ["sum" "avg" "mean" "min" "max" "raw"])
+(def ^:const agg-methods ["sum" "avg" "mean" "min" "max" "raw"])

 (defmulti aggregate-with
   "This transforms a raw list of points according to the provided aggregation
@@ -190,10 +190,12 @@
   (aggregate-with :avg data))

 (def agg-fn-map (zipmap agg-methods
-                        (map #(partial aggregate-with (keyword %)) agg-methods)))
+                        (map #(partial aggregate-with (keyword %))
+                             agg-methods)))

 (def agg-path-re (re-pattern
-                  (format "^(%s)(\\.|\\-).*" (str/join "|" agg-methods))))
+                  (format "^(%s)(\\.|\\-).*"
+                          (str/join "|" agg-methods))))

 (defn agg-fn-by-path
   [path]


Make lift-lambdas a fix operation

Make lift-lambdas a fix operation

Don't stop till we lift 'em all! :D

--- src/oxcart/passes/lambda_lift.clj
+++ src/oxcart/passes/lambda_lift.clj
@@ -269,6 +269,6 @@
   [{:keys [modules] :as ast} options]
   (->> (for [module modules]
          (binding [*ns* module]
-           [module (lift-lambdas-in-module (get ast module))]))
+           [module (fix lift-lambdas-in-module (get ast module))]))
        (into {})
        (merge ast)))


startup page and intro page start buttons have common style

--- src/unspun/screens/introduction.cljs
+++ src/unspun/screens/introduction.cljs
@@ -1,8 +1,8 @@
 (ns unspun.screens.introduction
   (:require [cljs-exponent.components :refer [element text view image touchable-highlight status-bar scroll-view] :as rn]
             [themes.palettes :refer [get-palette]]
-            [shared.ui :refer [n-icon]]
-            [unspun.db :refer [app-state palette-index to-pc number-needed stories story-index]]
+            [shared.ui :refer [n-icon tffsz]]
+            [unspun.db :refer [app-state palette-index to-pc number-needed stories story-index ]]
             [rum.core :as rum]))

 (def shadow-size 1)
@@ -16,16 +16,17 @@
         page-style {:flex            0.8
                     :padding         20
                     :backgroundColor (:primary palette)}
-        header-style {:fontSize 24
-                      :color    (:text-icons palette)
+        header-style {:fontSize     (* 1.2 tffsz)
+                      :fontWeight "bold"
+                      :color        (:text-icons palette)
                       :marginBottom 20}
-        text-style {:fontSize 18
-                    :color    (:text-icons palette)
+        text-style {:fontSize     tffsz
+                    :color        (:text-icons palette)
                     :marginBottom 15}
-        quote-style {:fontSize 20
-                     :fontStyle "italic"
-                    :color    (:text-icons palette)
-                    :marginBottom 15}]
+        quote-style {:fontSize     (* 1.2 tffsz)
+                     :fontStyle    "italic"
+                     :color        (:text-icons palette)
+                     :marginBottom 15}]
     (letfn [(jumpToDrawer [drawerId route]
               (let [navigation (aget (:rum/react-component state) "props" "navigation")]
                 (.performAction navigation (fn [stateUtils]
@@ -33,8 +34,6 @@
                 ))]

       (view {:style {:flex 1}}
-
-
             (scroll-view {:style page-style
                           :key   1}
                          (text {:style header-style}
@@ -54,45 +53,34 @@
                          (text {:style text-style}
                                "It looks quite different when you put it like that!\n\nRefresh the list of scenarios to see our latest.\n\n See Settings to hook up your own data source.")
                          #_(text {:style text-style}
-                               "Turn on notifications if you want to know when we add more examples.")
+                                 "Turn on notifications if you want to know when we add more examples.")
                          )
-            (view {:style {:flex            0.18
+            (view {:style {:flex            0.2
+                           :justifyContent  "center"
                            :backgroundColor (:dark-primary palette)
                            }}
-                  (touchable-highlight {:style   {:flex            1
-                                                  :margin      20
-                                                  :height          50
-                                                  :borderColor    (:accent (get-palette (rum/react palette-index)))
-                                                  :borderWidth    2
-                                                  :borderRadius    30
-                                                  :shadowColor     "#000"
-                                                  :shadowOffset    {:width shadow-size :height shadow-size}
-                                                  :shadowRadius    shadow-size
-                                                  :shadowOpacity   0.5
-                                                  :alignItems      "center"
-                                                  :justifyContent  "center"
+                  (touchable-highlight {:style   {:flex           0
+                                                  :marginLeft     20
+                                                  :marginRight    20
+                                                  :height         (* tffsz 3)
+                                                  :borderColor    (:accent palette)
+                                                  :borderWidth    (* tffsz 0.2)
+                                                  :borderRadius   (* tffsz 1.5)
+                                                  :shadowColor    "#000"
+                                                  :shadowOffset   {:width shadow-size :height shadow-size}
+                                                  :shadowRadius   shadow-size
+                                                  :shadowOpacity  0.5
+                                                  :alignItems     "center"
+                                                  :justifyContent "center"
                                                   }
                                         :onPress #(jumpToDrawer "scenarios" "stories")}

-                                       (text {:style {:color      (:text-icons (get-palette (rum/react palette-index)))
+                                       (text {:style {:color      (:text-icons palette)
                                                       :textAlign  "center"
+                                                      :fontSize   tffsz
                                                       :fontWeight "bold"}}
                                              "Start"))

-                  #_(touchable-highlight {:style {:flex            1
-                                                :margin          20
-                                                :backgroundColor (:accent (get-palette (rum/react palette-index)))
-                                                :borderRadius    30
-                                                :shadowColor     "#000"
-                                                :shadowOffset    {:width shadow-size :height shadow-size}
-                                                :shadowRadius    shadow-size
-                                                :shadowOpacity   0.5
-                                                :alignItems      "center"
-                                                :justifyContent  "center"
-                                                }
-                                        :onPress #(jumpToDrawer "scenarios" "stories")
-                                        ;#(.push (aget (:rum/react-component state) "props" "navigator") "stories")
-                                        }
-                                       (text {:style {:color (:text-icons (get-palette (rum/react palette-index))) :textAlign "center" :fontWeight "bold" :width 55}} "Start")))))))
+                  )))))


Code reorganization of dashboard/projects page (main page).

--- src/uxbox/ui/dashboard/projects.cljs
+++ src/uxbox/ui/dashboard/projects.cljs
@@ -14,7 +14,7 @@
             [uxbox.router :as r]
             [uxbox.rstore :as rs]
             [uxbox.state :as s]
-            [uxbox.util.time :as time]
+            [uxbox.util.datetime :as dt]
             [uxbox.data.dashboard :as dd]
             [uxbox.data.projects :as dp]
             [uxbox.data.workspace :as dw]
@@ -55,13 +55,152 @@
                       :height 1080
                       :layout :desktop})

-;; (def name->order (into {} (for [[k v] project-orderings] [v k])))
-
-;; Views
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Top Menu
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(def ^:const menu-l
+  (as-> (l/select-keys [:projects-by-id]) $
+    (l/focus-atom $ s/state)))
+
+(def ^:const project-ordering-l
+  (as-> (l/in [:dashboard :project-order]) $
+    (l/focus-atom $ s/state)))
+
+(def ^:const project-filtering-l
+  (as-> (l/in [:dashboard :project-filter]) $
+    (l/focus-atom $ s/state)))
+
+(defn project-sort-render
+  []
+  (let [ordering (rum/react project-ordering-l)
+        change-order #(rs/emit! (dd/set-project-ordering (keyword (.-value (.-target %)))))]
+    (html
+     [:div
+       [:span (tr "ds.project-ordering")]
+       [:select.input-select
+        {:on-change change-order
+         :value (name ordering)}
+        (for [option (keys +ordering-options+)
+              :let [option-id (get +ordering-options+ option)
+                    option-value (name option)
+                    option-text (tr option-id)]]
+          [:option
+           {:key option-id
+            :value option-value}
+           option-text])]])))
+
+(def project-sorting
+  (mx/component
+   {:render project-sort-render
+    :name "project-sort-order"
+    :mixins [rum/reactive]}))
+
+(defn project-search-render
+  []
+  (let [change-term #(rs/emit! (dd/set-project-filtering (.-value (.-target %))))
+        clear-term #(rs/emit! (dd/clear-project-filtering))]
+    (html
+     [:form.dashboard-search
+      [:input.input-text
+       {:type "text"
+        :on-change change-term
+        :auto-focus true
+        :placeholder (tr "ds.project-search.placeholder")
+        :value (rum/react project-filtering-l)}]
+      [:div.clear-search
+        {:on-click clear-term}
+       i/close]])))
+
+(def project-search
+  (mx/component
+   {:render project-search-render
+    :name "project-search"
+    :mixins [rum/reactive]}))
+
+(defn menu-render
+  []
+  (let [projects (rum/react menu-l)
+        pcount (count (:projects-by-id projects))] ;; FIXME: redundant project-by-id key
+    (html
+     [:section.dashboard-bar
+      [:div.dashboard-info
+       [:span.dashboard-projects (tr "ds.num-projects" (t/c pcount))]
+       (project-sorting)
+       (project-search)]])))
+
+(def menu
+  (mx/component
+   {:render menu-render
+    :name "projects-menu"
+    :mixins [rum/reactive]}))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Grid
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(def ^:static grid-l
+  (as-> (l/select-keys [:projects-by-id]) $
+    (l/focus-atom $ s/state)))
+
+(defn project-item-render
+  [own project]
+  (letfn [(on-navigate [event]
+            (rs/emit! (dp/go-to (:id project))))
+          (on-delete [event]
+            (dom/stop-propagation event)
+            (rs/emit! (dp/delete-project project)))]
+    (html
+     [:div.grid-item.project-th {:on-click on-navigate
+                                 :key (:id project)}
+      [:h3 (:name project)]
+      [:span.project-th-update
+       (str "Updated " (dt/timeago (:modified-at project)))]
+      [:div.project-th-actions
+       [:div.project-th-icon.pages
+        i/page
+        [:span "0"]]
+       [:div.project-th-icon.comments
+        i/chat
+        [:span "0"]]
+       [:div.project-th-icon.delete
+        {:on-click on-delete}
+        i/trash]]])))
+
+(def project-item
+  (mx/component
+   {:render project-item-render
+    :name "project"
+    :mixins [rum/static]}))
+
+(defn grid-render
+  [own]
+  (letfn [(on-click [e]
+            (dom/prevent-default e)
+            (lightbox/open! :new-project))]
+    (let [state (rum/react grid-l)
+          ordering (rum/react project-ordering-l)
+          filtering (rum/react project-filtering-l)
+          projects (dp/filter-projects-by filtering (vals (:projects-by-id state)))]
+      (html
+       [:section.dashboard-grid
+        [:h2 "Your projects"]
+         [:div.dashboard-grid-content
+          [:div.grid-item.add-project {:on-click on-click}
+           [:span "+ New project"]]
+          (for [item (dp/sort-projects-by ordering projects)]
+            (-> (project-item item)
+                (rum/with-key (:id item))))]]))))
+
+(def grid
+  (mx/component
+   {:render grid-render
+    :name "grid"
+    :mixins [rum/reactive]}))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Lightbox
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 (defn layout-input
   [local layout-id]
@@ -152,148 +291,3 @@
 (defmethod lightbox/render-lightbox :new-project
   [_]
   (new-project-lightbox))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Menu
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(def ^:static menu-l
-  (as-> (l/select-keys [:projects-by-id]) $
-    (l/focus-atom $ s/state)))
-
-(def ^:static project-ordering-l
-  (as-> (l/in [:dashboard :project-order]) $
-    (l/focus-atom $ s/state)))
-
-(def ^:static project-filtering-l
-  (as-> (l/in [:dashboard :project-filter]) $
-    (l/focus-atom $ s/state)))
-
-(defn project-sort-render
-  []
-  (let [ordering (rum/react project-ordering-l)
-        change-order #(rs/emit! (dd/set-project-ordering (keyword (.-value (.-target %)))))]
-    (html
-     [:div
-       [:span (tr "ds.project-ordering")]
-       [:select.input-select
-        {:on-change change-order
-         :value (name ordering)}
-        (for [option (keys +ordering-options+)
-              :let [option-id (get +ordering-options+ option)
-                    option-value (name option)
-                    option-text (tr option-id)]]
-          [:option
-           {:key option-id
-            :value option-value}
-           option-text])]])))
-
-(def project-sorting
-  (mx/component
-   {:render project-sort-render
-    :name "project-sort-order"
-    :mixins [rum/reactive]}))
-
-(defn project-search-render
-  []
-  (let [change-term #(rs/emit! (dd/set-project-filtering (.-value (.-target %))))
-        clear-term #(rs/emit! (dd/clear-project-filtering))]
-    (html
-     [:form.dashboard-search
-      [:input.input-text
-       {:type "text"
-        :on-change change-term
-        :auto-focus true
-        :placeholder (tr "ds.project-search.placeholder")
-        :value (rum/react project-filtering-l)}]
-      [:div.clear-search
-        {:on-click clear-term}
-       i/close]])))
-
-(def project-search
-  (mx/component
-   {:render project-search-render
-    :name "project-search"
-    :mixins [rum/reactive]}))
-
-(defn menu-render
-  []
-  (let [projects (rum/react menu-l)
-        pcount (count (:projects-by-id projects))] ;; FIXME: redundant project-by-id key
-    (html
-     [:section#dashboard-bar.dashboard-bar
-      [:div.dashboard-info
-       [:span.dashboard-projects (tr "ds.num-projects" (t/c pcount))]
-       (project-sorting)
-       (project-search)]])))
-
-(def menu
-  (mx/component
-   {:render menu-render
-    :name "projects-menu"
-    :mixins [rum/reactive]}))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Project Item
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defn project-item-render
-  [own project]
-  (let [on-click #(rs/emit! (dp/go-to (:id project)))]
-    (html
-     [:div.grid-item.project-th {:on-click on-click
-                                 :key (:id project)}
-      [:h3 (:name project)]
-      [:span.project-th-update
-       (str "Updated " (time/ago (:last-update project)))]
-      [:div.project-th-actions
-       [:div.project-th-icon.pages
-        i/page
-        [:span "0"]]
-       [:div.project-th-icon.comments
-        i/chat
-        [:span "0"]]
-       [:div.project-th-icon.delete
-        {:on-click #(do
-                      (dom/stop-propagation %)
-                      (rs/emit! (dp/delete-project project))
-                      %)}
-        i/trash]]])))
-
-(def project-item
-  (mx/component
-   {:render project-item-render
-    :name "project"
-    :mixins [rum/static]}))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Grid
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(def ^:static grid-l
-  (as-> (l/select-keys [:projects-by-id]) $
-    (l/focus-atom $ s/state)))
-
-(defn grid-render
-  [own]
-  (letfn [(on-click [e]
-            (dom/prevent-default e)
-            (lightbox/open! :new-project))]
-    (let [state (rum/react grid-l)
-          ordering (rum/react project-ordering-l)
-          filtering (rum/react project-filtering-l)
-          projects (dp/filter-projects-by filtering (vals (:projects-by-id state)))]
-      (html
-       [:section.dashboard-grid
-        [:h2 "Your projects"]
-         [:div.dashboard-grid-content
-          [:div.grid-item.add-project {:on-click on-click}
-           [:span "+ New project"]]
-          (for [item (dp/sort-projects-by ordering projects)]
-            (rum/with-key (project-item item) (:id item)))]]))))
-
-(def grid
-  (mx/component
-   {:render grid-render
-    :name "grid"
-    :mixins [rum/reactive]}))


(PDB-4810) noisy-future: log the exception too

Otherwise, of course, it might be lost if *err* isn't being
captured/monitored.

--- src/puppetlabs/puppetdb/utils.clj
+++ src/puppetlabs/puppetdb/utils.clj
@@ -442,8 +442,11 @@
      (try
        ~@body
        (catch Throwable ex#
-         (binding [*out* *err*]
-           (println ex#))
+         (let [msg# (trs "Reporting unexpected error to stderr and log")]
+           (binding [*out* *err*]
+             (println msg#)
+             (println ex#))
+           (log/error ex# msg#))
          (throw ex#)))))

 ;; For now, if you change these extensions, make sure they satisfy


Update ThreeDeeIntersect.clj

Update ThreeDeeIntersect.clj

--- clojure/ThreeDeeIntersect.clj
+++ clojure/ThreeDeeIntersect.clj
@@ -18,9 +18,10 @@
       "Displays the intersection of the given sphere (x, y, z) center points
        and radius r against the plane z=0 in somewhat anti-aliased ASCII art"
       [h k l r]
+      ;; Label the X axis
       (println ";;  y|     x=10|       20|       30|       40|       50|       60|       70|       80|       90|")
       (dotimes [y 44]
-        (print ";;" (if (< y 10) (str " " y) y))
+        (print ";;" (if (< y 10) (str " " y) y)) ;; Y-axis labels
         (dotimes [x 94]
           (let [z 0
                 ;; [(x-h)^2 + (y-k)^2 + (z-l)^2] - r^2
@@ -30,17 +31,22 @@
                               (Math/pow r 2.0))
                 av (Math/abs dSphere)
                ]
-               (print (cond (< av 0) " "
-                            (< av 1) "@"
-                            (< av 10) "*"
-                            (< av 40) "'"
-                            (= 0 (rem x 10)) "|"
-                            (= 0 (rem y 10)) "-"
-                            :else " "))))
-        (println)))
+               (print (cond (< av 0) " "  ;; No intersection
+                            (< av 1) "@"  ;; Exact intersect - darkest symbol
+                            (< av 10) "*" ;; Near miss - lighter symbol
+                            (< av 40) "'" ;; Distant miss - lightest symbol
+                            (= 0 (rem x 10)) "|" ;; Show vertical grid line
+                            (= 0 (rem y 10)) "-" ;; Show horizontal grid line
+                            :else " "))))        ;; Just a spacer.
+        (println))) ;; On to next line...

+;; Actually "play" the "movie", moving the sphere through the screen over time.
 (dotimes [t 61]
          (showSphere (+ 40 (* 20 (Math/sin (* t (/ Math/PI 30)))))
                      (+ 20 (* 10 (Math/cos (* t (/ Math/PI 20)))))
                      (- t 30) 30)
-         (Thread/sleep (if (< t 7) (- 300 (* 30 t)) 150)))
+         (Thread/sleep (if (< t 11)          ;; First few frames slower
+                           (let [n (- 17 t)]
+                                (* n n 4))
+                           150)))            ;; Subsequent frames faster
+


[#118] Fix typo: cluster-key request info (currently unused)

--- src/taoensso/carmine/commands.clj
+++ src/taoensso/carmine/commands.clj
@@ -82,14 +82,16 @@
          bytestring-req# (mapv protocol/coerce-bs request#)

          cluster-keyslot#
-         (if-not (get-in conn# [:spec :cluster]) request#
+         (if-not (get-in conn# [:spec :cluster])
+           request#
            (let [cluster-key-idx# ~cluster-key-idx
                  _# (assert (pos? cluster-key-idx#))
                  cluster-key#
                  (let [k-uncoerced# (nth request# cluster-key-idx#)]
                    (if (string? k-uncoerced#) (keyslot k-uncoerced#)
                      (let [k-coerced# (nth bytestring-req# cluster-key-idx#)]
-                       (keyslot k-coerced#))))]))
+                       (keyslot k-coerced#))))]
+             cluster-key#))

          request# ; User-readable request, nice for debugging
          (with-meta request#


Really fix tests

Really fix tests

--- test/atom_finder/atom_patch_test.clj
+++ test/atom_finder/atom_patch_test.clj
@@ -4,6 +4,7 @@
             [atom-finder.constants :refer :all]
             [atom-finder.patch :refer :all]
             [atom-finder.atom-patch :refer :all]
+            [atom-finder.atom-stats :refer :all]
             [atom-finder.results-util :refer :all]
             [atom-finder.source-versions :refer :all]
             [atom-finder.classifier :refer :all]


Tests: test-render-html-header-existence, test-render-html-footer-existence, test-render-navigation-bar-section-existence, test-render-breadcrumb-existence, and test-render-back-link-existence

--- test/hurvinek/html_renderer_test.clj
+++ test/hurvinek/html_renderer_test.clj
@@ -27,3 +27,33 @@
 ; Tests for various function definitions
 ;

+(deftest test-render-html-header-existence
+    "Check that the hurvinek.html-renderer/render-html-header definition exists."
+    (testing "if the hurvinek.html-renderer/render-html-header definition exists."
+        (is (callable? 'hurvinek.html-renderer/render-html-header))))
+
+
+(deftest test-render-html-footer-existence
+    "Check that the hurvinek.html-renderer/render-html-footer definition exists."
+    (testing "if the hurvinek.html-renderer/render-html-footer definition exists."
+        (is (callable? 'hurvinek.html-renderer/render-html-footer))))
+
+
+(deftest test-render-navigation-bar-section-existence
+    "Check that the hurvinek.html-renderer/render-navigation-bar-section definition exists."
+    (testing "if the hurvinek.html-renderer/render-navigation-bar-section definition exists."
+        (is (callable? 'hurvinek.html-renderer/render-navigation-bar-section))))
+
+
+(deftest test-render-breadcrumb-existence
+    "Check that the hurvinek.html-renderer/render-breadcrumb definition exists."
+    (testing "if the hurvinek.html-renderer/render-breadcrumb definition exists."
+        (is (callable? 'hurvinek.html-renderer/render-breadcrumb))))
+
+
+(deftest test-render-back-link-existence
+    "Check that the hurvinek.html-renderer/render-back-link definition exists."
+    (testing "if the hurvinek.html-renderer/render-back-link definition exists."
+        (is (callable? 'hurvinek.html-renderer/render-back-link))))
+
+


kro/results_in_expression_from ---> RO_0002510

--- kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/gensat/gensat_rules.clj
+++ kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/temp/gensat/gensat_rules.clj
@@ -4,11 +4,11 @@
          (?/record obo/IAO_0000142 ?/expression)

          (?/r1 rdf/type owl/Restriction)
-         (?/r1 owl/onProperty obo/BFO_0000066)
+         (?/r1 owl/onProperty obo/BFO_0000066) ; occurs_in
          (?/r1 owl/someValuesFrom ?/uberon)

          (?/r2 rdf/type owl/Restriction)
-         (?/r2 owl/onProperty kro/results_in_expression_from)
+         (?/r2 owl/onProperty obo/RO_0002510) ; transcribed_from
          (?/r2 owl/someValuesFrom ?/gene)

          ;;make the interaction be necessarily part of these 3 restrictions
@@ -57,7 +57,7 @@
          (?/r1 owl/someValuesFrom ?/celltype)

          (?/r2 rdf/type owl/Restriction)
-         (?/r2 owl/onProperty kro/results_in_expression_from)
+         (?/r2 owl/onProperty obo/RO_0002510) ; transcribed_from
          (?/r2 owl/someValuesFrom ?/gene)

          (?/r3 rdf/type owl/Restriction)
@@ -133,7 +133,7 @@
          (?/r1 owl/someValuesFrom ?/cellsubtype)

          (?/r2 rdf/type owl/Restriction)
-         (?/r2 owl/onProperty kro/results_in_expression_from)
+         (?/r2 owl/onProperty obo/RO_0002510) ; transcribed_from
          (?/r2 owl/someValuesFrom ?/gene)

          (?/r3 rdf/type owl/Restriction)
@@ -224,7 +224,7 @@
 ;         (?/r1 owl/someValuesFrom ?/cellpart)
 ;
 ;         (?/r2 rdf/type owl/Restriction)
-;         (?/r2 owl/onProperty kro/results_in_expression_from)
+;         (?/r2 owl/onProperty obo/RO_0002510) ; transcribed_from
 ;         (?/r2 owl/someValuesFrom ?/gene)
 ;
 ;         (?/r3 rdf/type owl/Restriction)


fix test broken by description wording change

--- test/semtag_web/integration_test.clj
+++ test/semtag_web/integration_test.clj
@@ -97,7 +97,7 @@
   (is (.contains (taxi/text "#introduction") "Semtag is a site"))

   ;; newly rendered static link works
-  (click "the types page")
+  (click "these are my types")
   (is (.contains (taxi/text "#page_title") "Type Statistics")))

 (deftest regular-search-works


Fix flakiness on travis.

Fix flakiness on travis.

--- test/clj/hatnik/selenium/core.clj
+++ test/clj/hatnik/selenium/core.clj
@@ -93,7 +93,9 @@
     (.withMessage message)
     (.until (reify ExpectedCondition
               (apply [this driver]
-                (condition driver))))))
+                (condition driver)))))
+  ; Hack. Tests don't pass on travis for some reason. It should help.
+  (Thread/sleep 100))

 (defn wait-until-projects-match [driver projects]
   (wait-until driver


Fix conditional require for nrepl stuff idempotent

--- src/refactor_nrepl/middleware.clj
+++ src/refactor_nrepl/middleware.clj
@@ -10,15 +10,16 @@
 ;; Compatibility with the legacy tools.nrepl and the new nREPL 0.4.x.
 ;; The assumption is that if someone is using old lein repl or boot repl
 ;; they'll end up using the tools.nrepl, otherwise the modern one.
-(if (find-ns 'clojure.tools.nrepl)
-  (require
-   '[clojure.tools.nrepl.middleware :refer [set-descriptor!]]
-   '[clojure.tools.nrepl.misc :refer [response-for]]
-   '[clojure.tools.nrepl.transport :as transport])
-  (require
-   '[nrepl.middleware :refer [set-descriptor!]]
-   '[nrepl.misc :refer [response-for]]
-   '[nrepl.transport :as transport]))
+(when-not (resolve 'set-descriptor!)
+    (if (find-ns 'clojure.tools.nrepl)
+      (require
+       '[clojure.tools.nrepl.middleware :refer [set-descriptor!]]
+       '[clojure.tools.nrepl.misc :refer [response-for]]
+       '[clojure.tools.nrepl.transport :as transport])
+      (require
+       '[nrepl.middleware :refer [set-descriptor!]]
+       '[nrepl.misc :refer [response-for]]
+       '[nrepl.transport :as transport])))

 (defn- require-and-resolve [sym]
   (require (symbol (namespace sym)))


IS/SR #26 Moved heading in experience-checkbox inside the label to make it clickable. Completed story #26

--- src/cljs/conference_rating/add_rating_page/add_rating_page.cljs
+++ src/cljs/conference_rating/add_rating_page/add_rating_page.cljs
@@ -97,9 +97,9 @@

 (defn experience-checkbox [id input-label]
   [:div {:class "col-lg-2 col-md-2 col-sm-3 col-xs-2"}
-   [:p {:class "text-lg-center"} input-label]
    [:input {:field :checkbox :type "checkbox" :id id}]
    [:label {:for id}
+    [:p {:class "text-lg-center"} input-label]
     [:span {:class "checkbox"}]]])

 (defn experience-panel []


GAWB 2778 allow deletion of error clusters (#1083)

--- src/cljs/main/broadfcui/page/workspace/notebooks/notebooks.cljs
+++ src/cljs/main/broadfcui/page/workspace/notebooks/notebooks.cljs
@@ -248,7 +248,7 @@
                    :as-text :clusterName :sort-by :clusterName
                    :render
                    (fn [cluster]
-                     (if (= (:status cluster) "Running")
+                     (if (or (= (:status cluster) "Running") (= (:status cluster) "Error"))
                        (links/create-internal
                          {:data-test-id "x-button"
                           :id (:id props)


fix first and last big headings

fix first and last big headings

--- src-cljs/frontend/components/landing.cljs
+++ src-cljs/frontend/components/landing.cljs
@@ -233,7 +233,10 @@
                [:span.philosphy-excess " workflow"]
                [:span.philosphy-needed "."]]
               [:p.philosphy-subtext
-               [:span.philosphy-needed "No nonsense, just the tools you need when you need them."]]
+               [:span.philosphy-needed "No nonsense—"]
+               [:span.philosphy-needed "exactly what you need"]
+               [:span.philosphy-excess " when you need it"]
+               [:span.philosphy-needed "."]]
               [:div.calls-to-action
                (om/build make-button (select-keys app [:document/id]))]]]]
            [:div.our-proof
@@ -306,11 +309,12 @@
              [:div.our-philosphy-wrap
               [:div.our-philosphy.content
                [:h1.philosphy-headline
-                [:span "Precursor is pure prototyping."]]
+                [:span.philosphy-needed "Precursor is pure prototyping."]]
                [:p.philosphy-subtext
                 [:span.philosphy-needed "Real-time collaboration"]
                 [:span.philosphy-excess " that makes it easy "]
-                [:span.philosphy-needed " to focus on what's important."]]
+                [:span.philosphy-excess " to focus on what's important"]
+                [:span.philosphy-needed "."]]
                [:div.calls-to-action
                 (common/google-login)
                 (om/build make-button (select-keys app [:document/id]))]]]


More home page cleanup

More home page cleanup

--- src-cljs/frontend/components/landing.cljs
+++ src-cljs/frontend/components/landing.cljs
@@ -193,15 +193,11 @@
         [:div.home-cover]
         [:div.home-top-shelf]
         [:div.home-slogans
-         [:h1.slogan.proverb {:item-prop "Ship better code, faster."
-                              :alt       "Let's just authorize first."}
+         [:h1.slogan.proverb {:item-prop "Ship better code, faster."}
           "Ship better code, faster."]
-         [:h3.slogan.context {:item-prop "You have a product to focus on, let CircleCI handle your"
-                              :alt       "Signing up using your GitHub login lets us start really fast."}
+         [:h3.slogan.context {:item-prop "You have a product to focus on, let CircleCI handle your"}
           "You have a product to focus on, let CircleCI handle your"]
-         [:h3.slogan.context {:item-prop "Continuous Integration & Deployment."
-                              :alt (when (om/get-shared owner [:ab-tests :mention-github-permissions])
-                                     "Currently, we must request permissions in bulk.")}
+         [:h3.slogan.context {:item-prop "Continuous Integration & Deployment."}
           "Continuous Integration & Deployment."]]
         [:div.home-avatars
          [:div.avatars
@@ -408,22 +404,17 @@
        [:section.home-epilog {:ref "home-epilog"}
         [:a.home-action {:href "/signup"
                          :ref "epilog-cta"
-                         :role "button"
-                         :on-mouse-enter #(raise! owner [:epilog-cta-hovered])}
+                         :role "button"}
          (str (common/sign-up-text))]
         [:div.home-cover]
         [:div.home-top-shelf]
         [:div.home-slogans
-         [:h1.slogan.proverb {:item-prop "So, ready to ship faster?"
-                              :alt       "Let's just authorize first."}
+         [:h1.slogan.proverb {:item-prop "So, ready to ship faster?"}
           "So, ready to ship faster?"]
-         [:h3.slogan.context {:item-prop "Next you'll just need to log in using your GitHub account."
-                              :alt       "Signing up using your GitHub login lets us start really fast."}
+         [:h3.slogan.context {:item-prop "Next you'll just need to log in using your GitHub account."}
           "Next you'll just need to log in using your GitHub account."]
-         [:h3.slogan.context {:item-prop "Still not convinced yet? Check out our pricing."
-                              :alt (when (om/get-shared owner [:ab-tests :mention-github-permissions])
-                                     "Currently, we must request permissions in bulk.")}
-          "Still not convinced yet? Check out our "
+         [:h3.slogan.context {:item-prop "Still not convinced? Check out our pricing."}
+          "Still not convinced? Check out our "
           [:a {:href "pricing"} "pricing"]
           "."]]
         [:div.home-avatars


Three tests for middleware/inject-configuration function

--- test/hurvinek/middleware_test.clj
+++ test/hurvinek/middleware_test.clj
@@ -11,8 +11,8 @@
 ;

 (ns hurvinek.middleware-test
-  (:require [clojure.test :refer :all]
-            [hurvinek.core :refer :all]))
+  (:require [clojure.test        :refer :all]
+            [hurvinek.middleware :refer :all]))

 ;
 ; Common functions used by tests.
@@ -32,3 +32,35 @@
     (testing "if the hurvinek.middleware/inject-configuration definition exists."
         (is (callable? 'hurvinek.middleware/inject-configuration))))

+;
+; Tests for function behaviours.
+;
+
+(deftest test-inject-confuguration-1
+    "Check the behaviour of function hurvinek.middleware/inject-configuration."
+    (testing "The function hurvinek.middleware/inject-configuration."
+        (let [function (inject-configuration (fn [x] x) :cfg)]
+            (are [x y] (= x y)
+                {:configuration :cfg} (function nil)
+                {:configuration :cfg} (function {})
+                {:configuration :cfg :foo :bar} (function {:foo :bar})))))
+
+(deftest test-inject-confuguration-2
+    "Check the behaviour of function hurvinek.middleware/inject-configuration."
+    (testing "The function hurvinek.middleware/inject-configuration."
+        (let [function (inject-configuration (fn [x] nil) :cfg)]
+            (are [x y] (= x y)
+                nil (function nil)
+                nil (function {})
+                nil (function {:foo :bar})
+                nil (function {:foo :bar :baz :bar})))))
+
+(deftest test-inject-confuguration-not-NPE
+    "Check the behaviour of function hurvinek.middleware/inject-configuration."
+    (testing "The function hurvinek.middleware/inject-configuration."
+        (let [function (inject-configuration (fn [x] x) nil)]
+            (are [x y] (= x y)
+                {:configuration nil} (function nil)
+                {:configuration nil} (function {})
+                {:configuration nil :foo :bar} (function {:foo :bar})))))
+


correcting file reference

correcting file reference

--- src/scullery_plateau/routings.clj
+++ src/scullery_plateau/routings.clj
@@ -48,7 +48,7 @@
                      {"content-type" "text/html"}
                      {}
                      (fn [_]
-                       (build-page "/resources/tpl/home.edn"
+                       (build-page "/resources/tpl/home"
                                    {:links [{:link "draw/pixel"
                                              :label "Pixel Art"}]})))
               (r/context "/sample"


fix tests

fix tests

--- test/yeller_timbre_appender_test.clj
+++ test/yeller_timbre_appender_test.clj
@@ -1,6 +1,6 @@
 (ns yeller-timbre-appender-test
   (:require [clojure.test :refer :all]
-            [yeller-timbre-appender :refer :all]))
+            [yeller.timbre-appender :refer :all]))

 (deftest extract-data-grabs-ex-data
   (testing "it grabs ex-data if it's there"


Large print styling tweaks

Large print styling tweaks

--- src/catalog/layout/fop.clj
+++ src/catalog/layout/fop.clj
@@ -20,22 +20,22 @@
   {:font {:font-family "Verdana" :font-size "11pt"}
    :block {:text-align "start" :hyphenate "false"}
    :h1 {:font-weight "bold" :keep-with-next "always" :space-before "11pt" :space-after "11pt"
-        :break-before "page" :font-size "26pt" :role "H1"}
+        :break-before "page" :font-size "25pt" :role "H1"}
    :h2 {:font-weight "bold" :keep-with-next "always" :space-before "26pt" :space-after "11pt"
         :font-size "17pt" :role "H2"}
    :h3 {:font-weight "bold" :keep-with-next "always" :space-before "17pt" :space-after "11pt"
-        :font-size "15pt" :role "H3"}
+        :font-size "14pt" :role "H3"}
    :header {:text-align-last "justify" :font-weight "bold" :border-bottom "thin solid"}})

 (def ^:private large-print-stylesheet
   {:font {:font-family "Tiresias" :font-size "17pt"}
    :block {:text-align "start" :hyphenate "false"}
-   :h1 {:font-weight "bold" :keep-with-next "always" :space-before "11pt" :space-after "11pt"
-        :break-before "page" :font-size "26pt" :role "H1"}
-   :h2 {:font-weight "bold" :keep-with-next "always" :space-before "26pt" :space-after "11pt"
-        :font-size "17pt" :role "H2"}
-   :h3 {:font-weight "bold" :keep-with-next "always" :space-before "17pt" :space-after "11pt"
-        :font-size "15pt" :role "H3"}
+   :h1 {:font-weight "bold" :keep-with-next "always" :space-before "17pt" :space-after "17pt"
+        :break-before "page" :font-size "36pt" :role "H1" :line-height "110%"}
+   :h2 {:font-weight "bold" :keep-with-next "always" :space-before "36pt" :space-after "17pt"
+        :font-size "36pt" :role "H2" :line-height "110%"}
+   :h3 {:font-weight "bold" :keep-with-next "always" :space-before "25pt" :space-after "17pt"
+        :font-size "25pt" :role "H3"}
    :header {:text-align-last "justify" :font-weight "bold" :border-bottom "thin solid"}})

 (def ^:private ^:dynamic *stylesheet* default-stylesheet)


[base] Add redirect from /groups/:id to make invites work

--- src/braid/core/client/routes.cljs
+++ src/braid/core/client/routes.cljs
@@ -21,6 +21,11 @@
     (dispatch [:set-group-and-page! [(uuid group-id) page]])
     (pages/on-load! (keyword page-id) page)))

+;; invites end up here
+(defroute group-path "/groups/:group-id" [group-id]
+  (router/go-to (group-page-path {:group-id group-id
+                                  :page-id "inbox"})))
+
 (defroute system-page-path "/pages/:page-id" [page-id query-params]
   (let [page (merge {:type (keyword page-id)
                      :page-id (keyword page-id)}


Remove debug output

Remove debug output

--- src/circle/model/build.clj
+++ src/circle/model/build.clj
@@ -81,7 +81,6 @@
            continue?    ;; if true, continue running the build. Failed actions will set this to false
            ]
     :as args}]
-  (println "build:" args)
   (let [project (project/get-by-url! vcs_url)
         build_num (project/next-build-num project)
         build-id (or _id (object-id))


add watch state to IQ

add watch state to IQ

--- src/clj/game/cards-ice.clj
+++ src/clj/game/cards-ice.clj
@@ -322,9 +322,16 @@
                          :effect (effect (damage :brain 1 {:card card}) (tag-runner :runner 1))}}]}

    "IQ"
-   {:abilities [end-the-run]
+   {:effect (req (add-watch state (keyword (str "iq" (:cid card)))
+                   (fn [k ref old new]
+                     (let [handsize (count (get-in new [:corp :hand]))]
+                       (when (not= (count (get-in old [:corp :hand])) handsize)
+                         (update! ref side (assoc (get-card ref card) :strength-bonus handsize))
+                         (update-ice-strength ref side (get-card ref card)))))))
+    :abilities [end-the-run]
     :strength-bonus (req (count (:hand corp)))
-    :rez-cost-bonus (req (count (:hand corp)))}
+    :rez-cost-bonus (req (count (:hand corp)))
+    :leave-play (req (remove-watch state (keyword (str "iq" (:cid card)))))}

    "Information Overload"
    {:abilities [{:label "Trace 1 - Give the Runner 1 tag"


update to work with cake 0.4.0

update to work with cake 0.4.0

--- src/clj/protobuf/tasks.clj
+++ src/clj/protobuf/tasks.clj
@@ -1,5 +1,5 @@
 (ns protobuf.tasks
-  (:use cake cake.ant
+  (:use cake cake.core cake.ant
         [clojure.java.shell :only [sh]]
         [clojure.java.io :only [reader]]
         [useful.io :only [extract-resource]])


Another "sea" to "deep-water" fix

Another "sea" to "deep-water" fix

--- src/cljs/zetawar/data.cljs
+++ src/cljs/zetawar/data.cljs
@@ -394,7 +394,7 @@
                :buildable-at #{:seaport}
                :image "tilesets/elite-command/units/frigate-COLOR.png"
                :terrain-effects
-               {:sea           {:movement-cost 1 :armor-bonus 0 :attack-bonus 0}
+               {:deep-water    {:movement-cost 1 :armor-bonus 0 :attack-bonus 0}
                 :shallow-water {:movement-cost 1 :armor-bonus 0 :attack-bonus 0}
                 :seaport       {:movement-cost 1 :armor-bonus 0 :attack-bonus 0}}
                :attack-strengths


fix clojure ref links for clojure.core.reducers (close #41)

--- src/cljs_api_gen/write.clj
+++ src/cljs_api_gen/write.clj
@@ -96,6 +96,9 @@
 ;; Common
 ;;--------------------------------------------------------------------------------

+(def clj-ns->page-ns
+  {"clojure.core.reducers" "clojure.core"})
+
 (defn make-clj-ref
   [item]
   (when-let [full-name (:clj-symbol item)]
@@ -103,7 +106,11 @@
      :display-name (md-escape full-name)
      :import (= "clojure" (second (re-find #"/clojure/([^/]+)/" (:source-link item))))
      :link (let [ns- (-> full-name symbol namespace)]
-             (str "http://clojure.github.io/clojure/branch-master/" ns- "-api.html#" full-name))}))
+             (str "http://clojure.github.io/clojure/branch-master/"
+                  (if-let [page-ns (clj-ns->page-ns ns-)]
+                    page-ns
+                    ns-)
+                  "-api.html#" full-name))}))

 (defn item-filename
   [item]


Small edit to defrel

Small edit to defrel

--- src/cia/schemas/relationships.clj
+++ src/cia/schemas/relationships.clj
@@ -25,6 +25,7 @@
    `(defrel ~name "" ~reference ~merge-map))
   ([name doc reference merge-map]
    `(s/defschema ~name
+      ~doc
       (s/either
        (merge
         c/ScopeWrapper


fix Chronos Protocol to fire on net damage only

--- src/clj/game/cards-identities.clj
+++ src/clj/game/cards-identities.clj
@@ -60,15 +60,18 @@
    {:events
     {:pre-resolve-damage
      {:once :per-turn
+      :req (req (= target :net))
       :effect (effect (damage-defer :net (last targets))
                       (resolve-ability
                         {:optional {:prompt (str "Use Chronos Protocol: Selective Mind-mapping to reveal the Runner's "
                                                  "grip to select the first card trashed?") :player :corp
                                     :yes-ability {:prompt (msg "Choose a card to trash")
                                                   :choices (req (:hand runner)) :not-distinct true
-                                                  :msg (msg "trash " (:title target) " and deal "
-                                                            (- (get-defer-damage state side :net nil) 1)
-                                                            " more net damage")
+                                                  :msg (msg "trash " (:title target)
+                                                         (when (> (- (get-defer-damage state side :net nil) 1) 0)
+                                                           (str " and deal "
+                                                                (- (get-defer-damage state side :net nil) 1)
+                                                                " more net damage")))
                                                   :effect (effect (trash target)
                                                                   (damage :net (- (get-defer-damage state side :net nil) 1)
                                                                           {:unpreventable true :card card}))}


implement remaining draft IDs

implement remaining draft IDs

--- src/clj/game/cards-identities.clj
+++ src/clj/game/cards-identities.clj
@@ -1,4 +1,9 @@
 (in-ns 'game.core)
+
+(def draft-points-target
+  "Set each side's agenda points target at 6, per draft format rules"
+  (req (swap! state assoc-in [:runner :agenda-point-req] 6)
+       (swap! state assoc-in [:corp :agenda-point-req] 6)))

 (def cards-identities
   {"Adam: Compulsive Hacker"
@@ -55,6 +60,17 @@
                                 (move state side target :hand)
                                 (system-msg state side (str "adds " (:title target) " to HQ and gains " cost " [Credits]"))
                                 (swap! state update-in [:bonus] dissoc :cost)))}]}
+
+   "Boris \"Syfr\" Kovac: Crafty Veteran"
+   {:effect draft-points-target
+    :events (let [bor {:req (req (let [facs (frequencies (map :faction (all-installed state :runner)))
+                                       an (get facs "Anarch" 0)
+                                       sh (get facs "Shaper" 0)
+                                       cr (get facs "Criminal" 0)]
+                                   (and (> cr sh) (> cr an) (pos? (:tag runner)))))
+                       :msg "remove 1 tag"
+                       :effect (effect (lose :tag 1))}]
+              {:runner-turn-begins bor})}

    "Cerebral Imaging: Infinite Frontiers"
    {:effect (req (add-watch state :cerebral-imaging
@@ -114,6 +130,20 @@
                               :msg (msg "draw a card")
                               :effect (effect (draw 1))}}}

+   "Fringe Applications: Tomorrow, Today"
+   {:effect draft-points-target
+    :events (let [fap {:req (req (let [facs (frequencies (map :faction (filter :rezzed (all-installed state :corp))))
+                                       hb (get facs "Haas-Bioroid" 0)
+                                       ji (get facs "Jinteki" 0)
+                                       nb (get facs "NBN" 0)
+                                       we (get facs "Weyland Consortium" 0)]
+                                   (and (> we ji) (> we hb) (> we nb))))
+                       :msg (msg "place 1 advancement token on " (card-str state target))
+                       :prompt "Choose a piece of ICE to place 1 advancement token on it" :player :corp
+                       :choices {:req #(and (installed? %) (ice? %))}
+                       :effect (req (add-prop state :corp target :advance-counter 1 {:placed true}))}]
+              {:runner-turn-begins fap})}
+
    "Gabriel Santiago: Consummate Professional"
    {:events {:successful-run {:msg "gain 2 [Credits]" :once :per-turn
                               :effect (effect (gain :credit 2)) :req (req (= target :hq))}}}
@@ -179,6 +209,30 @@
    "Industrial Genomics: Growing Solutions"
    {:events {:pre-trash {:effect (effect (trash-cost-bonus
                                            (count (filter #(not (:seen %)) (:discard corp)))))}}}
+
+   "Information Dynamics: All You Need To Know"
+   {:effect draft-points-target
+    :events (let [inf {:req (req (let [facs (frequencies (map :faction (filter :rezzed (all-installed state :corp))))
+                                       hb (get facs "Haas-Bioroid" 0)
+                                       ji (get facs "Jinteki" 0)
+                                       nb (get facs "NBN" 0)
+                                       we (get facs "Weyland Consortium" 0)]
+                                   (and (> nb ji) (> nb hb) (> nb we))))
+                       :msg "give the Runner 1 tag"
+                       :effect (effect (tag-runner :runner 1))}]
+              {:agenda-scored inf :agenda-stolen inf})}
+
+   "Jamie \"Bzzz\" Micken: Techno Savant"
+   {:effect draft-points-target
+    :events (let [jam {:req (req (let [facs (frequencies (map :faction (all-installed state :runner)))
+                                       an (get facs "Anarch" 0)
+                                       sh (get facs "Shaper" 0)
+                                       cr (get facs "Criminal" 0)]
+                                   (and (> sh an) (> sh cr) (pos? (count (:deck runner))))))
+                       :msg "draw 1 card"
+                       :once :per-turn
+                       :effect (effect (draw 1))}]
+              {:runner-install jam})}

    "Jesminder Sareen: Girl Behind the Curtain"
    {:events {:pre-tag {:once :per-run
@@ -418,20 +472,21 @@
            :msg (msg "make the Runner lose 1 [Credits] by rezzing an advertisement")}}}

    "Strategic Innovations: Future Forward"
-   {:events {:runner-turn-ends
-                      {:req (req (let [facs (frequencies (map :faction (filter :rezzed (all-installed state :corp))))
-                                       hb (get facs "Haas-Bioroid" 0)
-                                       ji (get facs "Jinteki" 0)
-                                       nb (get facs "NBN" 0)
-                                       we (get facs "Weyland" 0)]
-                                   (and (> hb ji) (> hb nb) (> hb we) (pos? (count (:discard corp))))))
-                       :prompt "Choose a card in Archives to shuffle into R&D"
-                       :choices {:req #(and (card-is? % :side :corp) (= (:zone %) [:discard]))}
-                       :player :corp :show-discard true :priority true
-                       :msg (msg "to shuffle " (if (:seen target) (:title target) "a card")
-                                 " into R&D")
-                       :effect (effect (move :corp target :deck)
-                                       (shuffle! :corp :deck))}}}
+   {:effect draft-points-target
+    :events {:runner-turn-ends
+             {:req (req (let [facs (frequencies (map :faction (filter :rezzed (all-installed state :corp))))
+                              hb (get facs "Haas-Bioroid" 0)
+                              ji (get facs "Jinteki" 0)
+                              nb (get facs "NBN" 0)
+                              we (get facs "Weyland Consortium" 0)]
+                          (and (> hb ji) (> hb nb) (> hb we) (pos? (count (:discard corp))))))
+              :prompt "Choose a card in Archives to shuffle into R&D"
+              :choices {:req #(and (card-is? % :side :corp) (= (:zone %) [:discard]))}
+              :player :corp :show-discard true :priority true
+              :msg (msg "to shuffle " (if (:seen target) (:title target) "a card")
+                        " into R&D")
+              :effect (effect (move :corp target :deck)
+                              (shuffle! :corp :deck))}}}

    "Sunny Lebeau: Security Specialist"
    {:effect (effect (gain :link 2))}
@@ -449,6 +504,23 @@
                                (update! state side (-> card (assoc :sync-front true)(assoc :code "09001"))))))
                  :msg (msg "flip their ID")}]}

+   "Synthetic Systems: The World Re-imagined"
+   {:effect draft-points-target
+    :flags {:corp-phase-12 (req (let [facs (frequencies (map :faction (filter :rezzed (all-installed state :corp))))
+                                      hb (get facs "Haas-Bioroid" 0)
+                                      ji (get facs "Jinteki" 0)
+                                      nb (get facs "NBN" 0)
+                                      we (get facs "Weyland Consortium" 0)]
+                                  (and (> ji hb) (> ji nb) (> ji we)
+                                       (> (count (filter #(ice? %) (all-installed state :corp))) 1))))}
+    :abilities [{:prompt "Select two pieces of ICE to swap positions"
+                 :choices {:req #(and (installed? %) (ice? %)) :max 2}
+                 :once :per-turn
+                 :effect (req (when (= (count targets) 2)
+                                (swap-ice state side (first targets) (second targets))))
+                 :msg (msg "swap the positions of " (card-str state (first targets))
+                           " and " (card-str state (second targets)))}]}
+
    "Tennin Institute: The Secrets Within"
    {:flags {:corp-phase-12 (req (and (not= 1 (:turn @state)) (not (:successful-run runner-reg))))}
     :abilities [{:msg (msg "place 1 advancement token on " (card-str state target))
@@ -469,6 +541,12 @@
                           :effect (effect (move (some #(when (= (:title %) (:title target)) %) (:deck corp)) :hand)
                                           (shuffle! :deck))}}}}}

+   "The Masque: Cyber General"
+   {:effect draft-points-target}
+
+   "The Shadow: Pulling the Strings"
+   {:effect draft-points-target}
+
    "Titan Transnational: Investing In Your Future"
    {:events {:agenda-scored {:msg (msg "add 1 agenda counter to " (:title target))
                              :effect (effect (add-prop target :counter 1))}}}
@@ -489,13 +567,14 @@
    {:recurring 3}

    "Wyvern: Chemically Enhanced"
-   {:events (let [wyv {:req (req (let [facs (frequencies (map :faction (all-installed state :runner)))
+   {:effect draft-points-target
+    :events (let [wyv {:req (req (let [facs (frequencies (map :faction (all-installed state :runner)))
                                        an (get facs "Anarch" 0)
                                        sh (get facs "Shaper" 0)
                                        cr (get facs "Criminal" 0)]
                                    (and (card-is? target :side :corp) (> an sh) (> an cr)
                                         (pos? (count (:discard runner))))))
-                       :msg (msg "shuffle " (:title (last (:discard runner))) " into their stack")
+                       :msg (msg "shuffle " (:title (last (:discard runner))) " into their Stack")
                        :effect (effect (move :runner (last (:discard runner)) :deck)
                                        (shuffle! :runner :deck))}]
               {:runner-trash wyv})}})


Adds toast to Nasir.

Adds toast to Nasir.

--- src/clj/game/cards-identities.clj
+++ src/clj/game/cards-identities.clj
@@ -236,16 +236,21 @@

    "Nasir Meidan: Cyber Explorer"
    {:effect (effect (gain :link 1))
+    :events {:rez {:req (req (and (:run @state)
+                                  ;; check that the rezzed item is the encountered ice
+                                  (= (:cid target)
+                                     (:cid (get-card state current-ice)))))
+                   :effect (req (toast state :runner "Click Nasir Meidan: Cyber Explorer to lose all credits and gain credits equal to the rez cost of the newly rezzed ice." "info"))}}
     :abilities [{:req (req (and (:run @state)
                                 (:rezzed (get-card state current-ice))))
                  :effect (req (let [current-ice (get-card state current-ice)]
-                           (trigger-event state side :pre-rez-cost current-ice)
-                           (let [cost (rez-cost state side current-ice)]
-                             (lose state side :credit (:credit runner))
-                             (gain state side :credit cost)
-                             (system-msg state side (str "loses all credits and gains " cost
-                                                         " [Credits] from the rez of " (:title current-ice)))
-                             (swap! state update-in [:bonus] dissoc :cost))))}]}
+                                (trigger-event state side :pre-rez-cost current-ice)
+                                (let [cost (rez-cost state side current-ice)]
+                                  (lose state side :credit (:credit runner))
+                                  (gain state side :credit cost)
+                                  (system-msg state side (str "loses all credits and gains " cost
+                                                              " [Credits] from the rez of " (:title current-ice)))
+                                  (swap! state update-in [:bonus] dissoc :cost))))}]}

    "NBN: Making News"
    {:recurring 2}