show cleaner blockly toolbox

show cleaner blockly toolbox

So that all blocks can be accessed from one pane

--- idecode/myappshare/mainapp.cljs
+++ idecode/myappshare/mainapp.cljs
@@ -62,210 +62,6 @@

-
-
-
-(defn reeval [app-id   calling-app-id]
-  (if (not @in-eval)
-  (go
-    (reset! in-eval true)
-    ;(js/alert (str "(get @app-state :ui :editor :mode):" (get @app-state :ui :editor :mode)))
-    (let [
-           code             (cond
-                              (= (get-in @app-state [:ui :editor :mode])  "text")
-                              (js/getCodeMirrorValue)
-
-                              (= (get-in @app-state [:ui :editor :mode])  "blockly")
-                              (js/getBlocklyValue))
-
-           blockly-xml      (if (= (get-in @app-state [:ui :editor :mode])  "blockly")
-                              (js/getBlocklyXml))
-
-           app-session-id   (str (js/getappsessionid) )
-           ]
-
-      (if
-        (= (get-in @app-state [:ui :editor :mode])  "text")
-        (do
-          (remote !savecode {:id                 app-id
-                             :code               (subs code 0 2000)
-                             :app-session-id     app-session-id})
-
-          (remote !savecode2 {:id               app-id
-                              :code             (subs code 2000 4000)
-                              :app-session-id   app-session-id})))
-
-
-      (if blockly-xml
-        (do
-          (remote !savecode {:id                 app-id
-                             :code               (subs code 0 2000)
-                             :app-session-id     app-session-id})
-
-          (remote !savecode2 {:id               app-id
-                              :code             (subs code 2000 4000)
-                              :app-session-id   app-session-id})
-          (remote !saveblockly {:id                 app-id
-                             :code               (subs blockly-xml 0 2000)
-                             :app-session-id     app-session-id})
-
-          (remote !saveblockly2 {:id               app-id
-                              :code             (subs blockly-xml 2000 4000)
-                              :app-session-id   app-session-id})
-          )
-
-
-        )
-
-      (swap! ns-counter inc)
-      ;(js/alert (str  @ns-counter))
-      (touch [:ui])
-      (js/sendcode  (str (start) code (end))
-                    calling-app-id
-                    ;"reevalapp"
-                    (clj->js "REV first one"
-                             )
-                    )
-      (reset! in-eval false)
-      ))))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-(defn evalapp [app-id   calling-app-id   args]
-  (if (not @in-eval)
-  (go
-    (reset! in-eval true)
-    ;(js/alert (str app-id))
-    (let [
-           app-session-id   (str (js/getappsessionid))
-           app-code-resp    (remote  !getfilecontents  {:calling-from-application-id          calling-app-id
-                                                        :running-application-id               app-id
-                                                        :app-session-id                       app-session-id})
-           code-format      (:code-format   app-code-resp)
-
-           app-code-value         (cond
-                                    (= code-format "blockly")
-                                    (do
-                                      (js/setBlocklyXml  (:blockly app-code-resp))
-                                      (js/getBlocklyValue))
-
-                                    :else
-                                    (:value app-code-resp))
-
-           user-can-edit-app (:value (remote  !user-can-edit-app?  {:id             app-id
-                                                                    :session-id     (:session-id @client-session-atom)}))
-
-           ]
-      ;(js/alert (pr-str "HOST SESSION ID: "   (:session-id @client-session-atom)))
-      ;(js/alert (pr-str "CLIENT SESSION ID: " (js/getappsessionid)))
-      ;(js/alert (pr-str "Code format: " code-format))
-      ;(js/alert (pr-str "app-code-value: " js/Blockly.ClojureScript.valueToCode ))
-
-      (cond
-        (= code-format "blockly")
-        (do
-          (swap! app-state assoc-in [:ui :editor :mode] "blockly")
-          ;(js/alert  (str (:blockly app-code-resp)))
-          (js/setBlocklyXml (str (:blockly app-code-resp)))
-          (js/populateEditor app-code-value)
-          )
-
-        :else
-        (do
-          (swap! app-state assoc-in [:ui :editor :mode] "text")
-          (js/populateEditor app-code-value)
-
-          (if user-can-edit-app
-            (js/setCodeMirrorOption "readOnly" false)
-            (js/setCodeMirrorOption "readOnly" true)))
-
-        )
-
-      (reset! can-use-interfaces (:can-use-interfaces app-code-resp))
-      (js/callresetclientstate    app-session-id)
-      (swap! ns-counter inc)
-      (js/sendcode (str (start)
-                         app-code-value
-                        (end))
-                   calling-app-id
-                   (clj->js ;["a" "b" {:d 1 :r "sfs"}]
-                            "first one"
-                            )
-                   )
-      (reset! in-eval false)
-
-      ))))
-
-
-
-
-
-
-
-
-(defn-ui-component     view-app-component   [app]
-  {:on-mount
-   (do  (go
-          ;(remote !loadapp {:id (read-ui app [:app-id] )})
-          ;(js/alert "loaded")
-          ))}
-
-  (iframe {:id "appframe" :frameBorder "0"
-           :style {:display "inline-block"}
-           :src
-           (str (cond
-                  @debug-mode
-                  "http://127.0.0.1:3449"
-
-                  :else
-                  "http://appshare.co/appshare")
-                "/devclient.html") :width "600" :height "800"}))
-
-
-
-
-
-
-
-
-
-
-(defn-ui-component     edit-app-glyph-component   [app]
-  (div {:style {:margin "20px"}}
-       (map-many
-         #(span {:style {:margin "10px"}
-                 :className (str "glyphicon " %1)
-                 :aria-hidden "true"
-                 :onClick     (fn [x]
-                                (go
-                                  (remote  !saveappglyph  {:id (get-in @app-state [:app-id])  :glyph (str %1)})
-                                  (swap! app-state assoc-in [:mode] "edit")))
-                } "")
-         glyphs)
-
-
-       (button {:style { :marginRight "30px" :marginBottom "10px" :marginTop "20px"}
-                :className "btn-lg btn-default"
-                :onClick     #(go
-                                (swap! app-state assoc-in [:mode] "edit"))}
-               "Cancel")
-
-       ))
-
-
-
-
 (def current-toolbox (atom ""))

@@ -276,6 +72,8 @@
                      ["appshare_element_box" "ui"]
                      ["appshare_element_left_padding" "ui"]
                      ["appshare_element_top_padding" "ui"]
+                     ["appshare_custom_component" "component"]
+                     ["appshare_call_custom_component" "ui"]
                      ])

@@ -300,11 +98,217 @@

+(defn reeval [app-id   calling-app-id]
+  (if (not @in-eval)
+  (go
+    (reset! in-eval true)
+    ;(js/alert (str "(get @app-state :ui :editor :mode):" (get @app-state :ui :editor :mode)))
+    (let [
+           code             (cond
+                              (= (get-in @app-state [:ui :editor :mode])  "text")
+                              (js/getCodeMirrorValue)
+
+                              (= (get-in @app-state [:ui :editor :mode])  "blockly")
+                              (js/getBlocklyValue))
+
+           blockly-xml      (if (= (get-in @app-state [:ui :editor :mode])  "blockly")
+                              (js/getBlocklyXml))
+
+           app-session-id   (str (js/getappsessionid) )
+           ]
+
+      (if
+        (= (get-in @app-state [:ui :editor :mode])  "text")
+        (do
+          (remote !savecode {:id                 app-id
+                             :code               (subs code 0 2000)
+                             :app-session-id     app-session-id})
+
+          (remote !savecode2 {:id               app-id
+                              :code             (subs code 2000 4000)
+                              :app-session-id   app-session-id})))
+
+
+      (if blockly-xml
+        (do
+          (remote !savecode {:id                 app-id
+                             :code               (subs code 0 2000)
+                             :app-session-id     app-session-id})
+
+          (remote !savecode2 {:id               app-id
+                              :code             (subs code 2000 4000)
+                              :app-session-id   app-session-id})
+          (remote !saveblockly {:id                 app-id
+                             :code               (subs blockly-xml 0 2000)
+                             :app-session-id     app-session-id})
+
+          (remote !saveblockly2 {:id               app-id
+                              :code             (subs blockly-xml 2000 4000)
+                              :app-session-id   app-session-id})
+          )
+
+
+        )
+
+      (swap! ns-counter inc)
+      ;(js/alert (str  @ns-counter))
+      (touch [:ui])
+      (js/sendcode  (str (start) code (end))
+                    calling-app-id
+                    ;"reevalapp"
+                    (clj->js "REV first one"
+                             )
+                    )
+      (reset! in-eval false)
+      ))))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(defn evalapp [app-id   calling-app-id   args]
+  (if (not @in-eval)
+  (go
+    (reset! in-eval true)
+    ;(js/alert (str app-id))
+    (let [
+           app-session-id   (str (js/getappsessionid))
+           app-code-resp    (remote  !getfilecontents  {:calling-from-application-id          calling-app-id
+                                                        :running-application-id               app-id
+                                                        :app-session-id                       app-session-id})
+           code-format      (:code-format   app-code-resp)
+
+           app-code-value         (cond
+                                    (= code-format "blockly")
+                                    (do
+                                      (js/setBlocklyXml  (:blockly app-code-resp))
+                                      (js/getBlocklyValue))
+
+                                    :else
+                                    (:value app-code-resp))
+
+           user-can-edit-app (:value (remote  !user-can-edit-app?  {:id             app-id
+                                                                    :session-id     (:session-id @client-session-atom)}))
+
+           ]
+      ;(js/alert (pr-str "HOST SESSION ID: "   (:session-id @client-session-atom)))
+      ;(js/alert (pr-str "CLIENT SESSION ID: " (js/getappsessionid)))
+      ;(js/alert (pr-str "Code format: " code-format))
+      ;(js/alert (pr-str "app-code-value: " js/Blockly.ClojureScript.valueToCode ))
+
+      (cond
+        (= code-format "blockly")
+        (do
+          (swap! app-state assoc-in [:ui :editor :mode] "blockly")
+          ;(js/alert  (str (:blockly app-code-resp)))
+          (js/setBlocklyXml (str (:blockly app-code-resp)))
+          (js/populateEditor app-code-value)
+          )
+
+        :else
+        (do
+          (swap! app-state assoc-in [:ui :editor :mode] "text")
+          (js/populateEditor app-code-value)
+
+          (if user-can-edit-app
+            (js/setCodeMirrorOption "readOnly" false)
+            (js/setCodeMirrorOption "readOnly" true)))
+
+        )
+
+      (reset! can-use-interfaces (:can-use-interfaces app-code-resp))
+      (js/callresetclientstate    app-session-id)
+      (swap! ns-counter inc)
+      (js/sendcode (str (start)
+                         app-code-value
+                        (end))
+                   calling-app-id
+                   (clj->js ;["a" "b" {:d 1 :r "sfs"}]
+                            "first one"
+                            )
+                   )
+      (reset! in-eval false)
+      (show-blocks  "Basic"  basic-blocks)
+
+      ))))
+
+
+
+
+
+
+
+
+(defn-ui-component     view-app-component   [app]
+  {:on-mount
+   (do  (go
+          ;(remote !loadapp {:id (read-ui app [:app-id] )})
+          ;(js/alert "loaded")
+          ))}
+
+  (iframe {:id "appframe" :frameBorder "0"
+           :style {:display "inline-block"}
+           :src
+           (str (cond
+                  @debug-mode
+                  "http://127.0.0.1:3449"
+
+                  :else
+                  "http://appshare.co/appshare")
+                "/devclient.html") :width "600" :height "800"}))
+
+
+
+
+
+
+
+
+
+
+(defn-ui-component     edit-app-glyph-component   [app]
+  (div {:style {:margin "20px"}}
+       (map-many
+         #(span {:style {:margin "10px"}
+                 :className (str "glyphicon " %1)
+                 :aria-hidden "true"
+                 :onClick     (fn [x]
+                                (go
+                                  (remote  !saveappglyph  {:id (get-in @app-state [:app-id])  :glyph (str %1)})
+                                  (swap! app-state assoc-in [:mode] "edit")))
+                } "")
+         glyphs)
+
+
+       (button {:style { :marginRight "30px" :marginBottom "10px" :marginTop "20px"}
+                :className "btn-lg btn-default"
+                :onClick     #(go
+                                (swap! app-state assoc-in [:mode] "edit"))}
+               "Cancel")
+
+       ))
+
+
+
+
+
+
+

 (defn  ^:export refreshapp []
   (do
     (reeval (get @app-state :app-id) nil)
-    (show-blocks  "Basic"  basic-blocks)))
+    ;(show-blocks  "Basic"  basic-blocks)
+    ))

@@ -375,24 +379,28 @@

             (add-blocks "Basic"     basic-blocks)

-            (add-blocks "Glue"     [["appshare_custom_component" "component"]
-                                    ["appshare_call_custom_component" "ui"]
-                                    ])
-
-
-
-            (add-blocks "Text"     [  ["appshare_div" "ui"]
+
+
+
+            (comment add-blocks "Text"     [  ["appshare_div" "ui"]
                                       ["appshare_no_attributes" "ui"]
                                       ["appshare_element_attribute" "ui"]
                                       ["appshare_element_text" "ui"]])

-            (add-blocks "Shapes"   [])
-
-            (add-blocks "Custom"  [ ["appshare_ui_component" "ui"]
+            (comment add-blocks "Shapes"   [])
+
+            (add-blocks "Coming soon"  [ ["appshare_ui_component" "ui"]
                                     ["appshare_div" "ui"]
                                     ["appshare_no_attributes" "ui"]
                                     ["appshare_element_attribute" "ui"]
                                     ["appshare_element_text" "ui"]])
+
+            (div {
+                   :style {:display "inline-block"
+                           :padding "10px"
+                           :backgroundColor
+                           "lightblue"}
+                   })

             )


Fixes numbers in adj-panels

Fixes numbers in adj-panels

--- src/tango/export.clj
+++ src/tango/export.clj
@@ -114,8 +114,8 @@
 (defn- make-panel-adj-node [query-result seq-number]
   (xml/element
     :PanelAdj
-    {:Seq seq-number
-     :AdjNumber (:adjudicator/id query-result)}))
+    {:Seq       seq-number
+     :AdjNumber (dec (:adjudicator/id query-result))}))

 (defn- make-panel-node [panel seq-number]
   (let [adjudicator-infos (:adjudicator-panel/adjudicators panel)]
@@ -145,6 +145,9 @@
   '[:find (pull ?e [{:adjudicator-panel/adjudicators [:adjudicator/id]}])
     :where [?e :adjudicator-panel/id]])

+(def adj-data (d/q make-panel-list-node-query (get-db u/expected-small-example)))
+adj-data
+(make-panel-list-node adj-data)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Export Definition
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(maint) remove duplicated storage test

(maint) remove duplicated storage test

this removes a storage test that was mistakenly duplicated rolling up stable to
master rollup.

--- test/puppetlabs/puppetdb/scf/storage_test.clj
+++ test/puppetlabs/puppetdb/scf/storage_test.clj
@@ -1217,12 +1217,6 @@
                                                                    [:metrics :logs] walk/keywordize-keys})))]
         (is (= expected actual)))))

-  (deftest report-with-event-timestamp
-    (let [z-report (update-event-timestamps report "2011-01-01T12:00:01Z")
-          offset-report (update-event-timestamps report "2011-01-01T12:00:01-0000")]
-      (is (= (shash/report-identity-hash (normalize-report z-report))
-             (shash/report-identity-hash (normalize-report offset-report))))))
-
   (deftest resource-events-cleanup
     (testing "should delete all events for reports older than the specified age"
       (let [report1       (assoc report :end_time (to-string (ago (days 5))))


Add missing locale for password success update message.

--- src/uxbox/locales/en.cljs
+++ src/uxbox/locales/en.cljs
@@ -37,6 +37,8 @@
    "ds.help.circle" "Circle (Ctrl + E)"
    "ds.help.line" "Line (Ctrl + L)"

+   "profile.password-saved" "Password saved successfully!"
+
    "history.alert-message" "You are seeng version %s"
    "errors.form.required" "This field is mandatory"
    "errors.form.string" "Should be string"


Wrap Buffer.flip in fn

Wrap Buffer.flip in fn

--- src/zaffre/glterminal.clj
+++ src/zaffre/glterminal.clj
@@ -15,7 +15,7 @@
   (:import
     (java.lang.reflect Field)
     (org.lwjgl BufferUtils)
-    (java.nio FloatBuffer ByteBuffer)
+    (java.nio Buffer FloatBuffer ByteBuffer)
     (java.nio.charset Charset)
     (org.lwjgl.opengl GL GLUtil GL11 GL12 GL13 GL14 GL15 GL20 GL30 GL32)
     (org.lwjgl.glfw GLFW GLFWVidMode GLFWVidMode$Buffer GLFWImage GLFWImage$Buffer
@@ -36,6 +36,16 @@
 (def char-callback-atom (atom nil))
 (def mouse-button-callback-atom (atom nil))
 (def cursor-pos-callback-atom (atom nil))
+
+(defn flip-byte-buffer [^ByteBuffer byte-buffer]
+  (let [buffer ^Buffer byte-buffer]
+    (.flip buffer)
+    byte-buffer))
+
+(defn flip-float-buffer [^FloatBuffer float-buffer]
+  (let [buffer ^Buffer float-buffer]
+    (.flip buffer)
+    float-buffer))

 (defmacro with-gl-context
   "Executes exprs in an implicit do, while holding the monitor of x and aquiring/releasing the OpenGL context.
@@ -424,10 +434,10 @@
                                             0.0 0.0])
         vertices-buffer       (-> (BufferUtils/createFloatBuffer (count vertices))
                                   (.put vertices)
-                                  (.flip))
+                                  flip-float-buffer)
         texture-coords-buffer (-> (BufferUtils/createFloatBuffer (count texture-coords))
                                   (.put texture-coords)
-                                  (.flip))
+                                  flip-float-buffer)
         vertices-count        (count vertices)
         texture-coords-count  (count texture-coords)
         vao-id                (GL30/glGenVertexArrays)
@@ -765,9 +775,9 @@
             (assert (not (nil? font-texture-width)) "font-texture-width nil")
             (assert (not (nil? font-texture-height)) "font-texture-height")
             (assert (not (nil? font-texture)) "font-texture nil")
-            (.flip glyph-image-data)
-            (.flip fg-image-data)
-            (.flip bg-image-data)
+            (flip-byte-buffer glyph-image-data)
+            (flip-byte-buffer fg-image-data)
+            (flip-byte-buffer bg-image-data)
             ;(log/info character->transparent)
             (GL14/glBlendEquation (gl-enum-value gl-blend-equation))
             (GL11/glBlendFunc (gl-enum-value (first gl-blend-func))


Test bad route

Test bad route

--- application/test/spira/service/routes_fixture.clj
+++ application/test/spira/service/routes_fixture.clj
@@ -13,18 +13,24 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.

-(ns spira.service.routes-service
+(ns spira.service.routes-fixture
   (:require [clojure.test :refer :all]
             [spira.service.routes :refer :all]))

 (def http-req-ok 200)
+(def http-req-not-found 404)

-(def test-req
+(defn test-req [uri]
   {:request-method :get
-   :uri "/api/fu" :headers []
+   :uri uri :headers []
    :params []})
+
+(deftest test-not-found
+  (testing "Testing a non existant route"
+    (is (= http-req-not-found (:status (app-routes (test-req "asdf")))))
+    ))

 (deftest test-fu
   (testing "Testing the /api/fu route"
-    (is (= http-req-ok (:status (app-routes test-req))))
+    (is (= http-req-ok (:status (app-routes (test-req "/api/fu")))))
     ))


CMR-4776: Added docstring.

CMR-4776: Added docstring.

--- mock-echo-app/src/cmr/mock_echo/api/tokens.clj
+++ mock-echo-app/src/cmr/mock_echo/api/tokens.clj
@@ -45,6 +45,7 @@
   (token-db/delete context token-id))

 (defn- get-token-info-mock
+  "Returns the mock token info for the token with the given token id"
   [context token-id]
   (let [{:keys [username client_id id]} (get-token-or-error context token-id)]
     {:token_info {:user_name username


Remove commented code

Remove commented code

--- src/yada/swagger.clj
+++ src/yada/swagger.clj
@@ -104,8 +104,6 @@

   Ring
   (request [_ req match-context]
-    #_(throw (ex-info "TODO" {:match-context match-context
-                            :handler (get spec-handlers (:type match-context))}))
     (if-let [h (get spec-handlers (:type match-context))]
       (h req)
       (throw (ex-info "Error: unknown type" {:match-context match-context}))))


curator required for test jar (#1251)

curator required for test jar (#1251)

--- ssclj/jar/build.boot
+++ ssclj/jar/build.boot
@@ -20,61 +20,61 @@
   :dependencies
   #(vec (concat %
                 (merge-defaults
-                 ['sixsq/default-deps (get-env :version)]
-                 '[[org.clojure/clojure]
-
-                   [aleph]
-                   [cheshire] ;; newer version needed for ring-json
-                   [compojure]
-                   [com.jcraft/jsch]
-                   [clj-stacktrace]
-                   [clj-time]
-                   [environ]
-                   [expound]
-                   [instaparse]
-                   [log4j]
-                   [metrics-clojure]
-                   [metrics-clojure-ring]
-                   [metrics-clojure-jvm]
-                   [metrics-clojure-graphite]
-                   [me.raynes/fs]
-                   [org.clojure/data.json]
-                   [org.clojure/java.classpath]
-                   [org.clojure/tools.cli]
-                   [org.clojure/tools.logging]
-                   [org.clojure/tools.namespace]
-                   [potemkin]
-                   [ring/ring-core]
-                   [ring/ring-json]
-                   [superstring]
-                   [zookeeper-clj]
-
-                   [com.sixsq.slipstream/utils]
-                   [com.sixsq.slipstream/auth]
-                   [com.sixsq.slipstream/token]
-                   [com.sixsq.slipstream/SlipStreamDbBinding-jar]
-                   [org.apache.logging.log4j/log4j-core]
-                   [org.apache.logging.log4j/log4j-api]
-
-                   ;; needed for migration scripts
-                   [korma]
-                   [org.hsqldb/hsqldb]
-                   [org.clojure/java.jdbc]
-
-                   ;; test dependencies
-                   [peridot]
-                   [honeysql]
-                   [org.clojure/test.check]
-                   [org.slf4j/slf4j-log4j12 :scope "test"]
-                   [com.cemerick/url nil :scope "test"]
-                   [org.apache.curator/curator-test :scope "test"]
-
-                   ;; boot tasks
-                   [boot-environ]
-                   [adzerk/boot-test]
-                   [adzerk/boot-reload]
-                   [onetom/boot-lein-generate]
-                   [tolitius/boot-check]]))))
+                  ['sixsq/default-deps (get-env :version)]
+                  '[[org.clojure/clojure]
+
+                    [aleph]
+                    [cheshire]                              ;; newer version needed for ring-json
+                    [compojure]
+                    [com.jcraft/jsch]
+                    [clj-stacktrace]
+                    [clj-time]
+                    [environ]
+                    [expound]
+                    [instaparse]
+                    [log4j]
+                    [metrics-clojure]
+                    [metrics-clojure-ring]
+                    [metrics-clojure-jvm]
+                    [metrics-clojure-graphite]
+                    [me.raynes/fs]
+                    [org.clojure/data.json]
+                    [org.clojure/java.classpath]
+                    [org.clojure/tools.cli]
+                    [org.clojure/tools.logging]
+                    [org.clojure/tools.namespace]
+                    [potemkin]
+                    [ring/ring-core]
+                    [ring/ring-json]
+                    [superstring]
+                    [zookeeper-clj]
+
+                    [com.sixsq.slipstream/utils]
+                    [com.sixsq.slipstream/auth]
+                    [com.sixsq.slipstream/token]
+                    [com.sixsq.slipstream/SlipStreamDbBinding-jar]
+                    [org.apache.logging.log4j/log4j-core]
+                    [org.apache.logging.log4j/log4j-api]
+
+                    ;; needed for migration scripts
+                    [korma]
+                    [org.hsqldb/hsqldb]
+                    [org.clojure/java.jdbc]
+
+                    ;; test dependencies
+                    [peridot]
+                    [honeysql]
+                    [org.clojure/test.check]
+                    [org.slf4j/slf4j-log4j12 :scope "test"]
+                    [com.cemerick/url nil :scope "test"]
+                    [org.apache.curator/curator-test :scope "test"]
+
+                    ;; boot tasks
+                    [boot-environ]
+                    [adzerk/boot-test]
+                    [adzerk/boot-reload]
+                    [onetom/boot-lein-generate]
+                    [tolitius/boot-check]]))))

 (require
   '[environ.boot :refer [environ]]
@@ -94,7 +94,7 @@
        :version (get-env :version)}
   test {:junit-output-to ""}
   install {:pom (str (get-env :project))}
-  push {:pom (str (get-env :project))
+  push {:pom  (str (get-env :project))
         :repo "sixsq"})

 (deftask dev-env
@@ -132,18 +132,18 @@
   [fileset fname]
   (try
     (-> (-> fileset
-          (boot.core/tmp-get fname)
-          boot.core/tmp-dir)
-      (clojure.java.io/file fname)
-      .getPath)
+            (boot.core/tmp-get fname)
+            boot.core/tmp-dir)
+        (clojure.java.io/file fname)
+        .getPath)
     (catch IllegalArgumentException e)))

 (deftask set-version []
-  (fn middleware [next-task]
-    (fn handler [fileset]
-     (let [f (get-file-path fileset "com/sixsq/slipstream/version.txt")]
-       (spit f (get-env :version)))
-     (next-task fileset))))
+         (fn middleware [next-task]
+           (fn handler [fileset]
+             (let [f (get-file-path fileset "com/sixsq/slipstream/version.txt")]
+               (spit f (get-env :version)))
+             (next-task fileset))))

 (deftask build []
          (comp
@@ -161,11 +161,11 @@
                             #"log4j.properties"}
                  :invert true)
            (aot :namespace #{'com.sixsq.slipstream.ssclj.app.main 'com.sixsq.slipstream.ssclj.usage.summarizer})
-           #_(uber :exclude #{ #"(?i)^META-INF/INDEX.LIST$"
-                             #"(?i)^META-INF/[^/]*\.(MF|SF|RSA|DSA)$"
-                             #".*log4j\.properties" })
-           (jar ;; :main 'com.sixsq.slipstream.ssclj.app.main
-            )))
+           #_(uber :exclude #{#"(?i)^META-INF/INDEX.LIST$"
+                              #"(?i)^META-INF/[^/]*\.(MF|SF|RSA|DSA)$"
+                              #".*log4j\.properties"})
+           (jar                                             ;; :main 'com.sixsq.slipstream.ssclj.app.main
+             )))

 (def tests-artef-name "SlipStreamCljResourcesTests-jar")
 (def tests-artef-pom-loc (str "com.sixsq.slipstream/" tests-artef-name))
@@ -173,20 +173,24 @@
 (def tests-artef-jar-name (str tests-artef-name "-" (get-env :version) "-tests.jar"))

 (deftask build-tests-jar
-  "build jar with test runtime dependencies for connectors."
-  []
-  (comp
-    (pom :project tests-artef-project-name :classifier "tests")
-    (sift
-      :to-resource #{#"lifecycle_test_utils\.clj"
-                     #"connector_test_utils\.clj"}
-
-      :include #{#"lifecycle_test_utils\.clj"
-                 #"connector_test_utils\.clj"
-                 #"pom.xml"
-                 #"pom.properties"})
-
-    (jar :file tests-artef-jar-name)))
+         "build jar with test runtime dependencies for connectors."
+         []
+         (comp
+           (pom :project tests-artef-project-name
+                :classifier "tests"
+                :dependencies (merge-defaults
+                                ['sixsq/default-deps (get-env :version)]
+                                [['org.apache.curator/curator-test :scope "compile"]]))
+           (sift
+             :to-resource #{#"lifecycle_test_utils\.clj"
+                            #"connector_test_utils\.clj"}
+
+             :include #{#"lifecycle_test_utils\.clj"
+                        #"connector_test_utils\.clj"
+                        #"pom.xml"
+                        #"pom.properties"})
+
+           (jar :file tests-artef-jar-name)))

 (deftask mvn-test
          "run all tests of project"
@@ -207,17 +211,17 @@
          "build project"
          []
          (comp
-          (dev-env)
-          (build-tests-jar)
-          (install :pom tests-artef-pom-loc)
-          (if (= "true" (System/getenv "BOOT_PUSH"))
-            (push :pom tests-artef-pom-loc)
-            identity)))
+           (dev-env)
+           (build-tests-jar)
+           (install :pom tests-artef-pom-loc)
+           (if (= "true" (System/getenv "BOOT_PUSH"))
+             (push :pom tests-artef-pom-loc)
+             identity)))

 (deftask server-repl
-  "start dev server repl"
-  []
-  (comp
-    (dev-env)
-    (dev-fixture-env)
-    (repl)))
+         "start dev server repl"
+         []
+         (comp
+           (dev-env)
+           (dev-fixture-env)
+           (repl)))


For some reason, this used itself.

For some reason, this used itself.

--- test/midje/test_util.clj
+++ test/midje/test_util.clj
@@ -1,6 +1,5 @@
 (ns midje.test-util
   (:use [clojure.test])
-  (:use [midje.test-util])
 )

 (defmacro testable-privates [namespace & symbols]


Revert "show the account settings link in the aside for customers"

This reverts commit 7f603d990856cedf025168701c7177af2c1012dc.

--- src-cljs/frontend/components/aside.cljs
+++ src-cljs/frontend/components/aside.cljs
@@ -509,33 +509,26 @@
               [:i.material-icons "group_add"]
               [:div.nav-label "Team"]])

-           (when-not (ld/feature-on? "top-bar-ui-v-1")
-             [:a.aside-item {:data-placement "right"
-                             :data-trigger "hover"
-                             :title "Account Settings"
-                             :href "/account"}
-              [:i.material-icons "settings"]
-              [:div.nav-label "Account Settings"]]
-
-             [:hr]
-
+            [:hr]
+
+           (when (not (ld/feature-on? "top-bar-ui-v-1"))
              [:a.aside-item (open-ext {:title "Documentation"
                                        :data-placement "right"
                                        :data-trigger "hover"
                                        :href "https://circleci.com/docs/"})
               [:i.material-icons "description"]
-              [:div.nav-label "Docs"]]
-
-
+              [:div.nav-label "Docs"]])
+
+           (when (not (ld/feature-on? "top-bar-ui-v-1"))
              [:a.aside-item (merge (common/contact-support-a-info owner)
                                    {:title "Support"
                                     :data-placement "right"
                                     :data-trigger "hover"
                                     :data-bind "tooltip: {title: 'Support', placement: 'right', trigger: 'hover'}"})
               [:i.material-icons "chat"]
-              [:div.nav-label "Support"]]
-
-
+              [:div.nav-label "Support"]])
+
+           (when (not (ld/feature-on? "top-bar-ui-v-1"))
              (when-not (config/enterprise?)
                [:a.aside-item (open-ext {:data-placement "right"
                                          :data-trigger "hover"
@@ -544,7 +537,7 @@
                 [:i.material-icons "receipt"]
                 [:div.nav-label "Changelog"]]))

-           [:hr]
+            [:hr]

             (when (:admin user)
               [:a.aside-item {:data-placement "right"


Fix image sizes in /press

Fix image sizes in /press

--- src-cljs/frontend/components/press.cljs
+++ src-cljs/frontend/components/press.cljs
@@ -245,21 +245,22 @@
             [:h3 "CircleCI logos"]
             [:a {:href "https://github.com/circleci/media/tree/master/presskit/logos"}
              [:img {:src (utils/cdn-path "/img/outer/press/badge-logo.svg")
-                    :height 150}]]
+                    :height 75}]]
             [:h3 [:small "SVG, EPS"]]]]
           [:div.col-xs-4
            [:div.well.text-center
             [:h3 "CircleCI badges"]
             [:a {:href "https://github.com/circleci/media/tree/master/presskit/badges"}
              [:img {:src (utils/cdn-path "/img/outer/press/badge-fail.svg")
-                    :height 150}]]
+                    :height 75}]]
             [:h3 [:small "SVG, EPS"]]]]
           [:div.col-xs-4
            [:div.well.text-center
             [:h3 "CircleCI headshots"]
             [:a {:href "https://github.com/circleci/media/tree/master/presskit/headshots"}
-             [:img.img-rounded {:src (stefon/asset-path "/img/outer/about/paul.png")
-                                :height 150}]]
+             [:img.img-circle {:src (stefon/asset-path "/img/outer/about/paul.png")
+                               :height 75
+                               :width 75}]]
             [:h3 [:small "PNG"]]]]]]]
        [:div.outer-section
         [:h2.text-center "CircleCI in the news"]


* clojure/arrays.clj: remove unnecessary typing

--- clojure/arrays.clj
+++ clojure/arrays.clj
@@ -19,9 +19,9 @@
 (defmacro defregister [sym shift]
   (let [i (if (zero? shift) 'ins `(bit-shift-right ~'ins ~shift))
         rf `(bit-and ~i 7)]
-  `(defmacro ~sym
-     ([] '(aget ~(with-meta 'r {:tag ints}) ~rf))
-     ([new] (concat '(aset ~'r ~rf) `(~new))))))
+    `(defmacro ~sym
+       ([] '(aget ~'r ~rf))
+       ([new] (concat '(aset ~'r ~rf) `(~new))))))

 (defregister C 0)
 (defregister B 3)
@@ -38,10 +38,10 @@
         free (volatile! '())
         r (int-array 8 0)]
     (aset arrays 0 code)
-    (loop [pc (int 0)
+    (loop [pc 0
            zero code
            arrays arrays]
-      (let [ins (aget ^ints zero pc)
+      (let [ins (aget zero pc)
             op (bit-and (bit-shift-right ins 28) 15)]
         ; (printf "%3d %d %d %d %d %d\n" pc op (A) (B) (C) (X))
         (case op
@@ -51,7 +51,7 @@
           3 (with-next (A (unchecked-add-int (B) (C))))
           4 (with-next (A (unchecked-multiply-int (B) (C))))
           5 (with-next (A (Integer/divideUnsigned (B) (C))))
-          6 (with-next (A (int (bit-not (bit-and (B) (C))))))
+          6 (with-next (A (bit-not (bit-and (B) (C)))))
           7 (do
               (binding [*out* *err*] (println "arrays:" @narrays))
               :halt)
@@ -81,13 +81,13 @@
                    (flush))))
           11 (with-next
                (flush)
-               (C (int (.read ^java.io.Reader *in*))))
+               (C (.read ^java.io.Reader *in*)))
           12 (if-not (zero? (B))
                (let [zero (aclone ^ints (aget arrays (B)))]
                  (aset arrays 0 zero)
                  (recur (C) zero arrays))
                (recur (C) zero arrays))
-          13 (with-next (X (int (bit-and ins 0x1ffffff))))
+          13 (with-next (X (bit-and ins 0x1ffffff)))
           (throw (ex-info "unknown opcode" {:opcode ins}))))
   )))


msg-id must be string

msg-id must be string

Former-commit-id: a6072e4c8266e52e217485be5192c9479e0ea419

--- src/syng_im/handlers/sign_up.cljs
+++ src/syng_im/handlers/sign_up.cljs
@@ -154,21 +154,21 @@

 (defn intro [db]
   (dispatch [:received-msg
-             {:msg-id :intro-message1
+             {:msg-id "intro-message1"
               :content "Hello there! It's Syng, a Dapp browser in your phone."
               :content-type text-content-type
               :outgoing false
               :from "console"
               :to "me"}])
   (dispatch [:received-msg
-             {:msg-id :intro-message2
+             {:msg-id "intro-message2"
               :content (str "Syng uses  a highly secure key-pair authentication type "
                             "to provide you a reliable way to access your account")
               :content-type text-content-type
               :outgoing false
               :from "console"
               :to "me"}])
-  (let [msg-id :intro-message3]
+  (let [msg-id "into-message3"]
     (dispatch [:received-msg
                {:msg-id msg-id
                 :content (commands/format-command-request-msg-content


formatting

formatting

--- src/test/om_css/tests.cljs
+++ src/test/om_css/tests.cljs
@@ -8,8 +8,8 @@

 (deftest test-format-class-name
   (are [cn res] (= (utils/format-class-name component-info cn) res)
-       :foo "ns_core_Foo_foo"
-       "foo" "ns_core_Foo_foo")
+    :foo "ns_core_Foo_foo"
+    "foo" "ns_core_Foo_foo")
   (is (= (utils/format-class-name
            {:ns-name "ns.core"
             :component-name "ns.core/Foo"}


setting puny connection in re-init

setting puny connection in re-init

--- data/celestial/fixtures/populate.clj
+++ data/celestial/fixtures/populate.clj
@@ -8,10 +8,10 @@
     [simple-check.generators :as g]
     [celestial.redis :as red]
     [celestial.persistency :as p]
+    [celestial.persistency.core :as c]
     [celestial.persistency.systems :as s]
     [celestial.persistency.actions :as a]
     [celestial.fixtures.data :refer (admin ronen) :as d]))
-

 (defn add-users
   "populates admin and ronen users"
@@ -59,15 +59,17 @@
   (doseq [s (g/sample systems-with-machines 100)]
     (s/add-system s)))

-(defn cleanup
+(defn re-initlize
+  "Re-init datastores"
    []
+  (c/initilize-puny)
   (es/clear)
   (red/clear-all))

 (defn populate-all
    "populates all data types"
    []
-   (cleanup)
+   (re-initlize)
    (add-users)
    (add-types)
    (add-actions)
@@ -76,7 +78,7 @@
 (defn populate-system
    "Adds single type and system"
    [t s]
-  (cleanup)
+  (re-initlize)
   (add-users)
   (p/add-type t)
   (s/add-system s))


Test differences between pmap and upmap

Test differences between pmap and upmap

--- src/atom_finder/questions/all_nodes.clj
+++ src/atom_finder/questions/all_nodes.clj
@@ -56,6 +56,31 @@
    time-mins
    ))

+;; Compare pmap to upmap using atom-finding
+(->> [pmap (partial cp/upmap :builtin)]
+     (map #(vector % (-<>> "~/opt/src/atom-finder"
+                           expand-home
+                           c-files-in-dir
+                           (take 10000)
+                           (% (fn [filename]
+                                (->> filename
+                                     parse-file
+                                     find-all-atoms-non-atoms)))
+                           dorun
+                          time-secs-data)))
+     (map prn))
+
+;; Compare pmap to upmap using Thread/sleep jobs
+'((->> [pmap (partial cp/upmap :builtin)]
+     (map #(vector % (-<>> (range 300)
+                           (% (fn [i]
+                                (if (= 0 (mod i 23))
+                                  (Thread/sleep 5000))
+                                ))
+                           dorun
+                          time-secs-data)))
+     (map prn)))
+
 ;; some files are much better parsed as C,
 ;; but unfortunately our classifiers are not bilingual
 '((-<>> "mysql-server/cmd-line-utils/libedit/el.c"


set: 'suppress-morph-exceptions' to true so that tests can pass if logging is set to DEBUG in generation-related namespaces

--- src/babel/espanol/morphology/verbs.cljc
+++ src/babel/espanol/morphology/verbs.cljc
@@ -17,7 +17,7 @@
 ;; issue is that logging requires partial morphological evaluation,
 ;; whereas generation and batch jobs should immediately raise an exception.
 ;; Correct solution should catch in logging code.
-(def suppress-morph-exceptions false)
+(def suppress-morph-exceptions true)

 (defn reflexive-to-infinitive [reflexive-infinitive]
   "e.g.: quedarse -> quedar"


Remove useless code from ui/messages.

Remove useless code from ui/messages.

--- src/uxbox/ui/messages.cljs
+++ src/uxbox/ui/messages.cljs
@@ -40,18 +40,9 @@
                         :timeout timeout
                         :content message}))))

-;; (set-timeout! 1000 #(error "Something wrong has happened 1"))
-;; (set-timeout! 2000 #(error "Something wrong has happened 2"))
-;; (set-timeout! 3000 #(error "Something wrong has happened 3"))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Component
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defn messages-will-update
-  [own]
-  (println "messages-will-update")
-  own)

 (defn messages-render
   [own]
@@ -69,6 +60,5 @@
 (def ^:const messages
   (mx/component
    {:render messages-render
-    :will-update messages-will-update
     :name "messages"
     :mixins [mx/static rum/reactive]}))


Always enable printing to the console, even in prod, since this is an app for devs to play with the DOM essentially.

--- src/cljs/reagent_toolbox_docs/core.cljs
+++ src/cljs/reagent_toolbox_docs/core.cljs
@@ -12,18 +12,13 @@
             [reagent-toolbox-docs.layout :as layout]
             [reagent-toolbox-docs.config :as config]))

-(defn dev-setup []
-  (when config/debug?
-    (enable-console-print!)
-    (println "dev mode")))
-
 (defn mount-root []
   (re-frame/clear-subscription-cache!)
   (reagent/render [layout/main-panel]
                   (.getElementById js/document "app")))

 (defn ^:export init []
-  (dev-setup)
+  (enable-console-print!)
   (re-frame/dispatch-sync [:initialize-db])
   (routing/start!)
   (mount-root))


ideas

ideas

--- src/cljs/triboard/logic/transition.cljs
+++ src/cljs/triboard/logic/transition.cljs
@@ -129,8 +129,7 @@
     ;; TODO - 12300 turns in loop (55 ms for a transduce) => need better algo
     ;; The add-destination removal makes us gain around 50 ms
     ;; Getting rid of the systematic conj does not win anything
-    ;; One dimentional arrow could gain us only 2-3 ms
-    ;; empty-cells is super slow: 36 ms.
+    ;; One dimentional array could gain us only 2-3 ms
     (time (dotimes [i 100]
             (doall
               (map


Simplify internal executors api.

Simplify internal executors api.

--- src/clojure/catacumba/impl/executor.clj
+++ src/clojure/catacumba/impl/executor.clj
@@ -58,41 +58,11 @@
                          (catch Throwable e
                            (reject e))))))))

-(defn- thread-factory-adapter
-  "Adapt a simple clojure function into a
-  ThreadFactory instance."
-  [func]
-  (reify ThreadFactory
-    (^Thread newThread [_ ^Runnable runnable]
-      (func runnable))))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Public Api
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

-(def ^:dynamic *default* (ForkJoinPool/commonPool))
-(def ^:dynamic *default-thread-factory* (Executors/defaultThreadFactory))
-
-(defn fixed
-  "A fixed thread pool constructor."
-  ([n]
-   (Executors/newFixedThreadPool n *default-thread-factory*))
-  ([n factory]
-   (Executors/newFixedThreadPool n (thread-factory-adapter factory))))
-
-(defn single-thread
-  "A single thread executor constructor."
-  ([]
-   (Executors/newSingleThreadExecutor *default-thread-factory*))
-  ([factory]
-   (Executors/newSingleThreadExecutor (thread-factory-adapter factory))))
-
-(defn cached
-  "A cached thread executor constructor."
-  ([]
-   (Executors/newCachedThreadPool *default-thread-factory*))
-  ([factory]
-   (Executors/newCachedThreadPool (thread-factory-adapter factory))))
+(def ^:redef default (ForkJoinPool/commonPool))

 (defn execute
   "Execute a task in a provided executor.
@@ -100,7 +70,7 @@
   A task is a plain clojure function or
   jvm Runnable instance."
   ([task]
-   (-execute *default* task))
+   (-execute default task))
   ([executor task]
    (-execute executor task)))

@@ -111,7 +81,7 @@

   A task is a plain clojure function."
   ([task]
-   (-submit *default* task))
+   (-submit default task))
   ([executor task]
    (-submit executor task)))


Rename android manifest file name

Rename android manifest file name

--- src/clojure/leiningen/new/game_java.clj
+++ src/clojure/leiningen/new/game_java.clj
@@ -60,7 +60,7 @@
                 (render "android-project.clj" data)]
                ["android/src/{{android-path}}.java"
                 (render "AndroidLauncher.java" data)]
-               ["android/AndroidManifest.xml"
+               ["android/AndroidManifest.template.xml"
                 (render "AndroidManifest.xml" data)]
                ["android/res/drawable-hdpi/ic_launcher.png"
                 (lein-droid-render "ic_launcher_hdpi.png")]


Replace deref that was lost in a merge conflict

Also, since we're at a branch point, log the choice we make so we have a
chance at understanding the pipeline.

--- src/vip/data_processor.clj
+++ src/vip/data_processor.clj
@@ -46,11 +46,14 @@
 (defn add-validations
   [{:keys [spec-version skip-validations?] :as ctx}]
   (if skip-validations?
-    ctx
-    (let [validations (condp = spec-version
+    (do
+      (log/info "Skipping validations")
+      ctx)
+    (let [validations (condp = @spec-version
                         "3.0" v3-validation-pipeline
                         "5.1" v5-1-validation-pipeline
                         nil)]
+      (log/info "Adding validations for" (pr-str @spec-version))
       (update ctx :pipeline (partial concat validations)))))

 (def pipeline


Use v3 end-point for import and benchmark tools

The function 'submit-command-via-http!' was still posting commands to the
/v2/command end-point which is no longer the latest. This wouldn't have
been a major problem, but it might have messed up some of the metrics based
http stats for users.

The patch switches the function to use the v3 endpoint, in this case an
unversioned end-point would be perfect but we lack that functionality.

Signed-off-by: Ken Barber <470bc578162732ac7f9d387d34c4af4ca6e1b6f7@bob.sh>

--- src/com/puppetlabs/puppetdb/command.clj
+++ src/com/puppetlabs/puppetdb/command.clj
@@ -225,7 +225,7 @@
            body    (format "checksum=%s&payload=%s"
                            (kitchensink/utf8-string->sha1 message)
                            (url-encode message))
-           url     (format "http://%s:%s/v2/commands" host port)]
+           url     (format "http://%s:%s/v3/commands" host port)]
        (client/post url {:body               body
                          :throw-exceptions   false
                          :content-type       :x-www-form-urlencoded


Fix old var referenced by git-monkey tests.

--- test/voom/git_monkey.clj
+++ test/voom/git_monkey.clj
@@ -65,7 +65,7 @@
   (doseq [repo repos]
     (sh/with-sh-dir root-path
       (sh "cp" "-a" repo (str repo "-upstream"))
-      (sh "git" "clone" (str repo "-upstream") (str voom/repos-home "/" repo)))))
+      (sh "git" "clone" (str repo "-upstream") (str voom/voom-repos "/" repo)))))

 (defn crank [root-path]
   (doto root-path


Minor: reformat

Minor: reformat

--- test/yadic/core_test.clj
+++ test/yadic/core_test.clj
@@ -71,7 +71,7 @@

 (fact "There's a handy macro for creating functions activators"
   (-> (->activators :a (act [b] (str "hello " b))
-        :b (constantly "world"))
+                    :b (constantly "world"))
       (->container)
       (:a)) => "hello world")

@@ -94,7 +94,7 @@

 (fact "Keys include parent container keys"
   (let [parent-container (->container (->activators :a (constantly "a")
-                                        :b (constantly "b")))
+                                                    :b (constantly "b")))
         child-container  (->container parent-container (->activators :b (constantly "b")))]
     (keys child-container) => (contains #{:a :b} :in-any-order)))


Test helper.

Test helper.

--- test/onyx/test_helper.clj
+++ test/onyx/test_helper.clj
@@ -52,4 +52,6 @@
             (assoc-in cfg [:peer-config :onyx.messaging/impl] :aeron)
             (= impl "netty")
             (assoc-in cfg [:peer-config :onyx.messaging/impl] :netty)
+            (= impl "core-async")
+            (assoc-in cfg [:peer-config :onyx.messaging/impl] :core.async)
             :else cfg))))


Fix test

Fix test

--- test/yada/conneg_test.clj
+++ test/yada/conneg_test.clj
@@ -9,4 +9,4 @@
   (is
    (=
     (best-allowed-content-type "text/html" ["text/plain" "text/html"])
-    ["text" "html"])))
+    "text/html")))


Add tooltip for merge button on build page

--- src-cljs/frontend/components/pages/build.cljs
+++ src-cljs/frontend/components/pages/build.cljs
@@ -73,9 +73,12 @@
       (let [pull-request-number (last (build-model/pull-request-numbers build))]
         (html
          [:div.merge-container
-          [:button {:on-click #(raise! owner [:merge-pull-request-clicked (build-model/merge-args build pull-request-number)])}
+          [:button {:on-click #(raise! owner [:merge-pull-request-clicked (build-model/merge-args build pull-request-number)])
+                    :data-toggle "tooltip"
+                    :data-placement "bottom"
+                    :title (str "Merge PR #" pull-request-number)}
            [:i.octicon.octicon-git-merge.merge-icon]
-           (str "Merge PR #" pull-request-number)]])))))
+           "Merge PR"]])))))

 (defn- header-actions
   [data owner]


Fix typo

Fix typo

--- src-cljs/acha.cljs
+++ src-cljs/acha.cljs
@@ -216,7 +216,7 @@
         (if-let [web-url (repo-web-url repo-url)]
           [:a.rp__url {:href web-url :target "_blank"} repo-url]
           [:.rp__url repo-url])))
-    (when (str/blank? (:repo/reason repo))
+    (when-not (str/blank? (:repo/reason repo))
       (list
         [:.rp__reason (:repo/reason repo)]
         [:button.rp__delete {:on-click (fn [_] (delete-repo (:db/id repo)))}]))


Removed :dimensions from state.

Removed :dimensions from state.

--- src/yourproject/state.cljs
+++ src/yourproject/state.cljs
@@ -4,9 +4,7 @@
 (def initial
   (atom {:app {:lc :nl-NL
                :logged-in? false ;;TODO derive from server state
-               :dimensions {:orientation :landscape
-                            :width 1024
-                            :height 768}}
+               }

          :navbar {:collapsed? true}


color for misc grid is changed

color for misc grid is changed

--- src_cljs/rrm/corecljs.cljs
+++ src_cljs/rrm/corecljs.cljs
@@ -2412,7 +2412,7 @@
                   ^{:key (.-id mt)}
                   [:tr
                    (when (and  (.-dispatcheddate mt) (.-receiveddate mt))
-                     {:style {:background-color "#e2fad3"}})
+                     {:style {:background-color "#b5f9c0"}})
                    [:td [button {:bs-style "success" :on-click  #(misc-update(.-id mt))} "Update"]]
                    (when (is-admin-or-super-admin)
                      [:td  [button {:bs-style "danger" :on-click #(misc-delete(.-id mt))} "Delete"]])


modify sum/mult functions

modify sum/mult functions

--- stuf/src/sandbox/deriv.clj
+++ stuf/src/sandbox/deriv.clj
@@ -7,8 +7,15 @@
 (defn same-variable? [v1 v2]
   (and (variable? v1) (variable? v2) (= v1 v2)))

-(defn make-sum [a1 a2] (list '+ a1 a2))
-(defn make-product [a1 a2] (list '* a1 a2))
+(defn make-sum [a1 a2]
+  (cond (=number? a1 0) a2
+        (=number? a2 0) a1
+        :else (list '+ a1 a2)))
+(defn make-product [a1 a2]
+  (cond (or (=number? m1 0) (=number? m2 0)) 0
+        (=number? m1 1) m2
+        (=number? m2 1) m1
+        :else (list '* a1 a2)))

 (defn sum? [[x :as s]]
   (and (seq s) (= x '+)))


Added docs and header to compojure package library

--- src/compojure.clj
+++ src/compojure.clj
@@ -1,7 +1,20 @@
+;; Copyright (c) James Reeves. All rights reserved.
+;; The use and distribution terms for this software are covered by the Eclipse
+;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which
+;; can be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other, from
+;; this software.
+
+;; compojure:
+;;
+;; Convenience library that includes every compojure.* namespace. If you want
+;; to access Compojure quickly, and don't care about having everything in one
+;; namespace, just use or require 'compojure.
+
 (ns compojure
   (:use compojure.ns-utils))

-;; Import all Compojure namespaces
 (immigrate
   'compojure.control
   'compojure.file-utils


Userlist divided between whitelist and blacklist mode

--- src/zg/server.clj
+++ src/zg/server.clj
@@ -132,7 +132,7 @@
           message   (add-word-message word proper-word)]
           (if (and proper-word (seq word))
               (store-word word description user-name))
-        (finish-processing request nil message true))) ; in zw mode every time!
+        (finish-processing request nil message true :unknown))) ; in zw mode every time!

 (defn process-add-words
     [request]
@@ -143,7 +143,7 @@
           message      (add-words-message proper-words)]
           (if (seq proper-words)
               (store-words proper-words user-name))
-        (finish-processing request nil message nil)))
+        (finish-processing request nil message nil :unknown)))

 (defn perform-operation
     [request]
@@ -160,19 +160,19 @@
     [request title]
     (perform-operation request)
     (let [search-results (db-interface/read-all-words)]
-        (finish-processing request search-results nil title)))
+        (finish-processing request search-results nil title :unknown)))

 (defn process-deleted-words
     [request title]
     (perform-operation request)
     (let [search-results (db-interface/read-deleted-words)]
-        (finish-processing request search-results nil title)))
+        (finish-processing request search-results nil title :unknown)))

 (defn process-active-words
     [request title]
     (perform-operation request)
     (let [search-results (db-interface/read-active-words)]
-        (finish-processing request search-results nil title)))
+        (finish-processing request search-results nil title :unknown)))

 (defn read-changes-statistic
     []
@@ -187,7 +187,7 @@
     (db-interface/read-changes-for-user user-name))

 (defn process-user-list
-    [request title]
+    [request title mode]
     (let [changes-statistic (read-changes-statistic)
           changes           (read-changes)
           user-name         (get-user-name request)
@@ -195,10 +195,10 @@
         (println "stat"    changes-statistic)
         (println "changes" changes)
         (if user-name
-            (-> (http-response/response (html-renderer/render-users user-name changes-statistic changes url-prefix title))
+            (-> (http-response/response (html-renderer/render-users user-name changes-statistic changes url-prefix title mode))
                 (http-response/set-cookie :user-name user-name {:max-age 36000000})
                 (http-response/content-type "text/html"))
-            (-> (http-response/response (html-renderer/render-users user-name changes-statistic changes url-prefix title))
+            (-> (http-response/response (html-renderer/render-users user-name changes-statistic changes url-prefix title mode))
                 (http-response/content-type "text/html")))))

 (defn process-user-info
@@ -313,7 +313,8 @@
             "/add-word"          (process-add-word      request)
             ;"/find-words"       (process-find-words    request)
             "/add-words"         (process-add-words     request)
-            "/users"             (process-user-list     request title)
+            "/users-whitelist"   (process-user-list     request title :whitelist)
+            "/users-blacklist"   (process-user-list     request title :blacklist)
             "/user"              (process-user-info     request title)
             "/wordlist/json"     (process-wordlist-json request)
             "/wordlist/text"     (process-wordlist-text request)


Only require clonure.java.shell when needed for sass or less

--- src/leiningen/new/chestnut/dev/user.clj
+++ src/leiningen/new/chestnut/dev/user.clj
@@ -1,16 +1,16 @@
 (ns user
   (:require [{{project-ns}}.server]
             [ring.middleware.reload :refer [wrap-reload]]
-            [figwheel-sidecar.repl-api :as figwheel]
-            [clojure.java.shell]))
+            [figwheel-sidecar.repl-api :as figwheel]{{#less?}}
+            [clojure.java.shell]{{/less?}}{{#sass?}}
+            [clojure.java.shell]{{/sass?}}))

 {{#less?}}
 (defn start-less []
   (future
     (println "Starting less.")
     (clojure.java.shell/sh "lein" "less" "auto")))
-{{/less?}}
-{{#sass?}}
+{{/less?}}{{#sass?}}
 (defn start-sass []
   (future
     (println "Starting sass.")


CMR-1438: Reformatted code

CMR-1438: Reformatted code

--- transmit-lib/src/cmr/transmit/metadata_db.clj
+++ transmit-lib/src/cmr/transmit/metadata_db.clj
@@ -71,7 +71,7 @@
                                    concept-type
                                    "Concept")]
              (format "%s with native id [%s] in provider [%s] does not exist."
-                   concept-type native-id provider-id))))
+                     concept-type native-id provider-id))))

        200
        (get body "concept-id")


Remove comments useful to me but not the audience linking variations to bars.

--- src/african_polyphony_and_polyrhythm/talk.clj
+++ src/african_polyphony_and_polyrhythm/talk.clj
@@ -252,9 +252,9 @@
   (let [model (->> (phrase [5/4 3/4 4/4] (repeat 1)) (after 4/4))
         a (split 9/4 1/4)
         b (comp (split 10/4 1/4) a)
-        c (comp (accent 11/4) (split 11/4 1/8) b) ; 17
+        c (comp (accent 11/4) (split 11/4 1/8) b)
         d (split 4/4 1/4)
-        e (comp (skip 10/4) c)] ; 8
+        e (comp (skip 10/4) c)]
     (part :horn model a b c d e)))

 (def ha
@@ -267,17 +267,17 @@

 (def tulule
   (let [model (phrase [8/4 8/4] (repeat 3))
-        a (comp (split 8/4 2/4) (split 0 2/4)) ; 28
-        b (comp (split 0 1/4) (split 2/4 1/4) a) ; 6
-        c (comp (accent 7/8) (split 3/4 1/8) b)] ; 5
+        a (comp (split 8/4 2/4) (split 0 2/4))
+        b (comp (split 0 1/4) (split 2/4 1/4) a)
+        c (comp (accent 7/8) (split 3/4 1/8) b)]
     (part :horn model a b c)))

 (def bongo
-  (let [model (->> (phrase [3/4 7/4] (repeat 4)) (after 6/4)) ; 5
-        a (split 9/4 5/4) ; 6
-        b (comp (split 6/4 1/4) a) ; 9
-        c (comp (split 14/4 1/4) b) ; 8
-        d (comp (accent 10/4) (split 9/4 1/4) b)] ; 19
+  (let [model (->> (phrase [3/4 7/4] (repeat 4)) (after 6/4))
+        a (split 9/4 5/4)
+        b (comp (split 6/4 1/4) a)
+        c (comp (split 14/4 1/4) b)
+        d (comp (accent 10/4) (split 9/4 1/4) b)]
     (part :horn model a b c d)))

 (defn ndereje-balendoro


clean up

clean up

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

--- buildscripts/buildcheck/src/buildcheck/core.clj
+++ buildscripts/buildcheck/src/buildcheck/core.clj
@@ -104,8 +104,8 @@
   (let [index-txt (slurp "http://valelab.ucsf.edu/~MM/MMwiki/index.php/Device%20Support")]
     (map second (re-seq #"a href=\"/~MM/MMwiki/index.php/(.*?)\"" index-txt))))

-(defn missing-device-pages [bits]
-  (let [dll-names (get-dll-names bits)
+(defn missing-device-pages []
+  (let [dll-names (get-dll-names 32)
         device-page-names (device-pages)]
     (sort (clojure.set/difference (set dll-names) (set device-page-names)))))

@@ -126,9 +126,7 @@
         javac-errs (javac-errors result-txt)
         outdated-jars (map #(.getName %)
                            (old-jars (File. micromanager "Install_AllPlatforms") 24))
-        installer-ok (exe-on-server? bits today-token)
-        missing-adapters (missing-device-adapters bits)
-        missing-pages (missing-device-pages bits)]
+        installer-ok (exe-on-server? bits today-token)]
     (when-not (and (empty? vs-error-text) (empty? outdated-dlls) false
                    (empty? javac-errs) (empty? outdated-jars)
                    installer-ok)
@@ -141,13 +139,13 @@
         (report-segment "Outdated device adapter DLLs" outdated-dlls)
         (report-segment "Errors reported by java compiler" javac-errs)
         (report-segment "Outdated jar files" outdated-jars)
-        (report-segment "Uncompiled device adapters" missing-adapters)
+        (report-segment "Uncompiled device adapters" (missing-device-adapters bits))
         "\n\nIs installer download available on website?\n"
         (if installer-ok
           "Yes"
           "No. (build missing)\n")
         (when (= 32 bits)
-          (report-segment "Missing device pages" missing-pages))
+          (report-segment "Missing device pages" (missing-device-pages)))
       ))))

 (defn make-full-report [mode send?]


4 character subdomains are ok

4 character subdomains are ok

--- src-cljs/frontend/components/outer.cljs
+++ src-cljs/frontend/components/outer.cljs
@@ -75,12 +75,12 @@
              "Begin your free trial & start using team features today."]
             (if (utils/logged-in? owner)
               [:p.early-access-copy
-               "Choose a name for your team to use on Precursor.
-               Make sure it starts with a letter and is longer than 4 characters.
-               Numbers and hyphens are okay."]
+               "Choose a name for your team to use on Precursor. "
+               "Make sure it starts with a letter and is at least 4 characters. "
+               "Numbers and hyphens are okay."]
               [:p.early-access-copy
-               "First, sign in with your Google account.
-               Then we'll just ask you to make a custom subdomain for you and your team."])
+               "First, sign in with your Google account. "
+               "Then we'll just ask you to make a custom subdomain for you and your team."])
             (when-not (utils/logged-in? owner)
               [:div.early-access-sign
                (om/build common/google-login {:source "Early Access Form"})])]


Extend generate_tasks to submodules

Extend generate_tasks to submodules

--- src/cider_ci/builder/jobs/tasks_generator.clj
+++ src/cider_ci/builder/jobs/tasks_generator.clj
@@ -4,6 +4,7 @@

 (ns cider-ci.builder.jobs.tasks-generator
   (:require
+    [cider-ci.builder.util :refer [json-write-str]]
     [cider-ci.utils.core :refer :all]
     [cider-ci.utils.http :as http]

@@ -22,8 +23,14 @@
 (defn- get-file-list_unmemoized [git-ref generate-spec]
   (let [url (http/build-service-url
               :repository "/ls-tree"
-              (merge generate-spec
-                     {:git_ref git-ref  }))]
+              (->> generate-spec
+                   (merge {:git_ref git-ref
+                           :include_match ""
+                           :exclude_match ""
+                           :submodule []
+                           })
+                   (map (fn [[k v]] [k (json-write-str v)]))
+                   (into {})))]
     (-> url
         (http/get {:socket-timeout 10000
                    :conn-timeout 10000


Explicit require

Explicit require

--- test/caesium/util_test.clj
+++ test/caesium/util_test.clj
@@ -1,7 +1,7 @@
 (ns caesium.util-test
   (:require
    [caesium.util :as u]
-   [clojure.test :refer :all]))
+   [clojure.test :refer [deftest testing are]]))

 (deftest array-eq-test
   (testing "array equality works"


filter+map -> keep.

filter+map -> keep.

--- src-cljs/pepa/workflows/inbox2.cljs
+++ src-cljs/pepa/workflows/inbox2.cljs
@@ -110,8 +110,8 @@
                     selection
                     (selection/click selection (selection/event->click dragged-page e)))
         ;; this approach makes sure the pages arrive in the correct order
-        page-ids (filterv (:selected selection)
-                          (map :id (column-pages column state)))]
+        page-ids (keep (comp (:selected selection) :id)
+                       (column-pages column state))]
     ;; Update `:selection' in `owner'
     (om/set-state! owner :selection selection)
     (doto e.dataTransfer


added comment about possible refactoring

--- src/frontend/cljs/alibi/activity_graphic.cljs
+++ src/frontend/cljs/alibi/activity_graphic.cljs
@@ -740,7 +740,7 @@
   (-> (input-entry post-entry-form-cursor
                    (:selected-date selected-date-cursor)
                    selected-item-cursor)
-      (post-entry-form/additional-entry)
+      (post-entry-form/additional-entry) ;TODO we shouldnt depend on post-entry-form here, or do we?
       (state/input-entry->data-entry)))

 (defn render-html [state owner]


Hash tests for maps with hash collisions

--- test/cljs/lean_map/test/core.cljs
+++ test/cljs/lean_map/test/core.cljs
@@ -19,4 +19,9 @@
 (deftest equal-hash-collision-maps
   (is (= hash-collision-map hash-collision-map-same))
   (is (not= hash-collision-map hash-collision-map-different-key))
-  (is (not= hash-collision-map hash-collision-map-different-value)))+  (is (not= hash-collision-map hash-collision-map-different-value)))
+
+(deftest equal-hash-collision-map-hashes
+  (is (== (hash hash-collision-map) (hash hash-collision-map-same)))
+  (is (== (hash hash-collision-map) (hash hash-collision-map-different-key)))
+  (is (not= (hash hash-collision-map) (hash hash-collision-map-different-value))))


Test design

Test design

--- test/clojure_fabric/core_test.clj
+++ test/clojure_fabric/core_test.clj
@@ -5,6 +5,12 @@
             [clojure-fabric.core :refer :all]
             [clojure-fabric.crypto-suite :as crypto-suite]
             [clojure-fabric.grpc-core :as grpc]))
+
+
+;;;
+;;; See:
+;;;     fabric-sdk-java/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java
+;;;

 ;;;
 ;;; Utility functions
@@ -33,11 +39,26 @@
   {:foo {:name "foo"}
    :bar {:name "bar"}})

+#_
 (defonce org-defs
   (into {}
         (map #(vector (:msp-id %)
                       (merge % (domain-name->cert-map (:domain-name %))))
-             [{:msp-id                  "Org1MSP"
+             [{:msp-id                  "OrdererMSP"
+               :domain-name             "example.com"
+               :ca-location             "???http://localhost:7054"
+               :ca-name                 "???ca0"
+               :peer-locations          ["???peer0.org1.example.com@grpc://localhost:7051"
+                                         "???peer1.org1.example.com@grpc://localhost:7056"]
+               :orderer-locations       ["???orderer.example.com@grpc://localhost:7050"]
+               :eventhub-locations      ["???peer0.org1.example.com@grpc://localhost:7053"
+                                         "???peer1.org1.example.com@grpc://localhost:7058"]
+               :pem-file                nil
+               :allow-all-host-names    false
+               :ca-client               nil
+               :users [{:name "admin" :type :admin :key "f1a9a940f57419a18a83a852884790d59b378281347dd3d4a88c2b820a0f70c9"}
+                       {:name "orderer" :type :orderer :key "30652478a0678558e8573fa33246175b33997226b63fa40503290187e0f99144"}]}
+              {:msp-id                  "Org1MSP"
                :domain-name             "org1.example.com"
                :ca-location             "http://localhost:7054"
                :ca-name                 "ca0"
@@ -48,7 +69,9 @@
                                          "peer1.org1.example.com@grpc://localhost:7058"]
                :pem-file                nil
                :allow-all-host-names    false
-               :ca-client               nil}
+               :ca-client               nil
+               :users [{:name "admin" :type :admin :key "6b32e59640c594cf633ad8c64b5958ef7e5ba2a205cfeefd44a9e982ce624d93"}
+                       {:name "user1" :type :user :key "f3c01db816069a226654d66a023c2260695f71e19b322a6564dad3e32ccf063b"}]}
               {:msp-id                  "Org2MSP"
                :domain-name             "org2.example.com"
                :ca-location             "http://localhost:8054"
@@ -60,7 +83,61 @@
                                          "peer1.org2.example.com@grpc://localhost:8058"]
                :pem-file                nil
                :allow-all-host-names    false
-               :ca-client               nil}])))
+               :ca-client               nil
+               :users [{:name "admin" :type :admin :key "b2e2536de633960859d965f02b296083d1e8aa1e868016417c4e4fb760270b96"}
+                       {:name "user1" :type :user :key "9f97934915db15db4c803b6eff5b6f4966bdef05d13f99e4d60c7128a6f22733"}]}])))
+
+
+(defn get-user-crypto-files
+  [{:keys [org-type domain-name]} {user-name :name}]
+  (let [org-type-name (name org-type)
+        user-name+domain-name (format "%s@%s" (clojure.string/capitalize user-name) domain-name)
+        dir (format "fixture/e2e-2Orgs/channel/crypto-config/%sOrganizations/%s/users/%s/msp/"
+                    org-type-name domain-name user-name+domain-name)
+        private-file (-> (str dir "keystore/") (io/resource) (io/as-file) (file-seq) (second))]
+    {:private-key private-file
+     :certificate (-> (format "%ssigncerts/%s-cert.pem" dir user-name+domain-name) (io/resource) (io/as-file))}))
+
+(defn get-node-end-crypto-files
+  [{:keys [org-type domain-name]} {node-end-name :name}]
+  (let [org-type-name (name org-type)
+        node-end-name+domain-name (format "%s.%s" (name node-end-name) domain-name)
+        end-node-dir (format "%s/%s"
+                             (case org-type
+                               :peer "peers"
+                               :orderer "orderers")
+                             node-end-name+domain-name)
+        dir (format "fixture/e2e-2Orgs/channel/crypto-config/%sOrganizations/%s/%s/msp/"
+                    org-type-name domain-name end-node-dir)]
+    {:pem (-> (format "%ssigncerts/%s-cert.pem" dir node-end-name+domain-name) (io/resource) (io/as-file))}))
+
+(defonce org-defs
+  [{:msp-id     "Org1MSP"
+    :org-type   :peer
+    :domain-name "org1.example.com"
+    :users [{:name "user1" :role :admin}
+            {:name "admin" :role :user}]
+    :peers          [{:name "peer0" :url "grpc://localhost:7051"}
+                     {:name "peer1" :url "grpc://localhost:7056"}]
+    :orderers       [{:name "orderer" :url "grpc://localhost:7050"}]}
+   {:msp-id     "Org2MSP"
+    :org-type   :peer
+    :domain-name "org2.example.com"
+    :users [{:name "user1" :role :admin
+             ;;:private-key "/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/f3c01db816069a226654d66a023c2260695f71e19b322a6564dad3e32ccf063b_sk"
+             ;;:certificate "resources/fixture/e2e-2Orgs/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem"
+             }
+            {:name "admin" :role :user
+             :private-key "resources/fixture/e2e-2Orgs/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/6b32e59640c594cf633ad8c64b5958ef7e5ba2a205cfeefd44a9e982ce624d93_sk"
+             :certificate "resources/fixture/e2e-2Orgs/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"}]
+
+    ;; For CA Client
+    ;; :ca-location             "http://localhost:7054"
+    ;; :ca-name                 "ca0"
+    :peers          [{:name "peer0" :url "grpc://localhost:8051" :pem "./msp/signcerts/peer0.org1.example.com-cert.pem"}
+                     {:name "peer01" :url "grpc://localhost:8056" :pem "./msp/signcerts/peer0.org1.example.com-cert.pem"}]
+    :orderers       [{:name "orderer" :url "grpc://localhost:7050" :pem "???" :domain "orderer.example.com"}]
+    }])

 (defonce chaincode-id-v1 (grpc/make-chaincode-id (get-in chaincode-id-defs [:v1 :name])
                                                  (get chaincode-id-defs :v1)))
@@ -81,10 +158,10 @@

 ;;;
 ;;; 1. create clients for org1 and org2
-(let []
-  (reset-clients!)
-  (doseq [[name _] org-defs]
-    (new-client! name)))
+(do
+  (doseq [[name org-map] org-defs]
+    (doseq [[[user-name ] ]]
+     (new-user! org-map ))))

 ;;; 2. Add a channel


Wrap :main value in symbol

Wrap :main value in symbol

This avoids triggering a ClassCastException when trying to use values from the
requires sorted set: string :main is a valid value and will always be
converted.

--- src/adzerk/boot_cljs/middleware.clj
+++ src/adzerk/boot_cljs/middleware.clj
@@ -73,7 +73,7 @@
         ;; We set out own shim ns as :main, but if user provides :main,
         ;; include that in our shim ns requires
         requires     (if-let [main (:main (:opts ctx))]
-                       (conj requires main)
+                       (conj requires (symbol main))
                        requires)
         init-nss     (into requires (->> init-fns (keep namespace) (map symbol)))]
     (.mkdirs out-file)


added quick search links urls to menu

added quick search links urls to menu

--- src/name_bazaar/ui/components/misc.cljs
+++ src/name_bazaar/ui/components/misc.cljs
@@ -8,6 +8,7 @@
     [name-bazaar.ui.components.icons :as icons]
     [name-bazaar.ui.constants :as constants]
     [name-bazaar.ui.styles :as styles]
+    [name-bazaar.ui.utils :refer [offerings-newest-url offerings-most-active-url offerings-ending-soon-url]]
     [re-frame.core :refer [subscribe dispatch]]
     [reagent.core :as r]))

@@ -46,21 +47,15 @@
              :routes constants/routes}]
            [d0x-misc/nav-menu-item
             {:primary-text "Latest"
-             :key :route.offerings.search/latest
-             :route :route.offerings/search
-             :routes constants/routes
+             :href offerings-newest-url
              :nested-level 1}]
            [d0x-misc/nav-menu-item
             {:primary-text "Most Active"
-             :key :route.offerings.search/most-active
-             :route :route.offerings/search
-             :routes constants/routes
+             :href offerings-most-active-url
              :nested-level 1}]
            [d0x-misc/nav-menu-item
             {:primary-text "Ending Soon"
-             :key :route.offerings.search/ending-soon
-             :route :route.offerings/search
-             :routes constants/routes
+             :href offerings-ending-soon-url
              :nested-level 1}]
            [d0x-misc/nav-menu-item
             {:primary-text "Requests"


Refactored get test so it doesn't rely on the exact concept id generated.

--- int_test/cmr/metadata_db/int_test/concepts/get_test.clj
+++ int_test/cmr/metadata_db/int_test/concepts/get_test.clj
@@ -6,37 +6,13 @@
             [cheshire.core :as cheshire]
             [cmr.metadata-db.int-test.utility :as util]))

-(def concept1 (util/collection-concept "PROV1" 1))
-(def concept2 (assoc (util/collection-concept "PROV1" 2) :concept-id "C2-PROV1"))
+(use-fixtures :each (util/reset-database-fixture "PROV1"))

-;;; fixtures
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defn setup-database-fixture
-  "Load the database with test data."
-  [f]
-
-  ;; clear out the database
-  (util/reset-database)
-  ;; setup database
-  (util/save-provider "PROV1")
-  (let [verify #(when-not (= 201 (:status %))
-                  (throw (ex-info "Failed to create concept" %)))]
-    ;; save a concept
-    (verify (util/save-concept concept1))
-    ;; save a revision
-    (verify (util/save-concept concept1))
-    ;; save it a third time
-    (verify (util/save-concept concept1))
-   	;; save another concept
-    (verify (util/save-concept concept2)))
-
-  (f)
-
-  ;; clear out the database
-  (util/reset-database))
-
-
-(use-fixtures :once setup-database-fixture)
+(defn verify
+  [result]
+  (if (= 201 (:status result))
+    result
+    (throw (ex-info "Failed to create concept" result))))

 ;; TODO this needs more tests for granules
 ;; This also needs a test where it retrieves granules and collections at the same time.
@@ -44,33 +20,40 @@

 ;;; tests
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(deftest get-concept-test
-  (testing "latest version"
-    (let [{:keys [status concept]} (util/get-concept-by-id "C1000000000-PROV1")]
-      (is (= 200 status))
-      (is (= 3 (:revision-id concept))))))
+(deftest get-test
+  (let [concept1 (util/collection-concept "PROV1" 1)
+        concept2 (assoc (util/collection-concept "PROV1" 2) :concept-id "C2-PROV1")
+        {:keys [concept-id]} (last (for [n (range 3)]
+                                     (verify (util/save-concept concept1))))
+        concept-id2 (:concept-id (verify (util/save-concept concept2)))]

-(deftest get-non-existant-concept-test
-  (testing "Non existant collection id"
-    (is (= 404 (:status (util/get-concept-by-id "C123-PROV1")))))
-  (testing "Non existant provider id"
-    (is (= 404 (:status (util/get-concept-by-id "C1000000000-PROV12"))))))
+    (testing "get-concept-test"
+      (testing "latest version"
+        (let [{:keys [status concept]} (util/get-concept-by-id concept-id)]
+          (is (= 200 status))
+          (is (= 3 (:revision-id concept))))))

-(deftest get-concept-with-version-test
-  "Get a concept by concept-id and version-id."
-  (let [{:keys [status concept]} (util/get-concept-by-id-and-revision "C1000000000-PROV1" 3)]
-    (is (= status 200))
-    (is (= (:revision-id concept) 3))))
+    (testing "get-non-existant-concept-test"
+      (testing "Non existant collection id"
+        (is (= 404 (:status (util/get-concept-by-id "C123-PROV1")))))
+      (testing "Non existant provider id"
+        (is (= 404 (:status (util/get-concept-by-id "C1000000000-PROV12"))))))

-(deftest get-concept-invalid-concept-id-or-revision-test
-  "Expect a status 4XX if we try to get a concept that doesn't exist or use an improper concept-id."
-  (testing "invalid concept-id"
-    (let [{:keys [status]} (util/get-concept-by-id "bad id")]
-      (is (= 400 status))))
-  (testing "out of range revision-id"
-    (let [concept (util/collection-concept "PROV1" 1)
-          {:keys [status]} (util/get-concept-by-id-and-revision "C1000000000-PROV1" 10)]
-      (is (= 404 status))))
-  (testing "non-integer revision-id"
-    (let [{:keys [status]}(util/get-concept-by-id-and-revision "C1000000000-PROV1" "NON-INTEGER")]
-      (is (= 422 status)))))+    (testing "get-concept-with-version-test"
+      "Get a concept by concept-id and version-id."
+      (let [{:keys [status concept]} (util/get-concept-by-id-and-revision concept-id 3)]
+        (is (= status 200))
+        (is (= (:revision-id concept) 3))))
+
+    (testing "get-concept-invalid-concept-id-or-revision-test"
+      "Expect a status 4XX if we try to get a concept that doesn't exist or use an improper concept-id."
+      (testing "invalid concept-id"
+        (let [{:keys [status]} (util/get-concept-by-id "bad id")]
+          (is (= 400 status))))
+      (testing "out of range revision-id"
+        (let [concept (util/collection-concept "PROV1" 1)
+              {:keys [status]} (util/get-concept-by-id-and-revision concept-id 10)]
+          (is (= 404 status))))
+      (testing "non-integer revision-id"
+        (let [{:keys [status]}(util/get-concept-by-id-and-revision concept-id "NON-INTEGER")]
+          (is (= 422 status)))))))


Kill off any accepted dead nodes.

Kill off any accepted dead nodes.

--- src/onyx/log/commands/leave_cluster.clj
+++ src/onyx/log/commands/leave_cluster.clj
@@ -10,12 +10,14 @@
         observer (get (map-invert (:pairs replica)) id)
         transitive (get (:pairs replica) id)
         pair (if (= observer transitive) {} {observer transitive})
-        prep-observer (get (map-invert (:prepared replica)) id)]
+        prep-observer (get (map-invert (:prepared replica)) id)
+        accep-observer (get (map-invert (:accepted replica)) id)]
     (-> replica
         (update-in [:peers] (partial remove #(= % id)))
         (update-in [:prepared] dissoc id)
         (update-in [:prepared] dissoc prep-observer)
         (update-in [:accepted] dissoc id)
+        (update-in [:accepted] dissoc accep-observer)
         (update-in [:pairs] merge pair)
         (update-in [:pairs] dissoc id)
         (update-in [:pairs] #(if-not (seq pair) (dissoc % observer) %)))))


Wrap :inline in :clj reader conditionals

--- src/cljc/mikron/runtime/buffer.cljc
+++ src/cljc/mikron/runtime/buffer.cljc
@@ -166,49 +166,49 @@

 (defn get-bit-buffer
   "Gets the bit buffer of `buffer`."
-  {:inline (fn [buffer] `(.-bit-buffer ~(vary-meta buffer assoc :tag `Buffer)))}
+  #?(:clj {:inline (fn [buffer] `(.-bit-buffer ~(vary-meta buffer assoc :tag `Buffer)))})
   ^mikron.runtime.buffer.IMikronBitBuffer [^Buffer buffer]
   (.-bit-buffer buffer))

 (defn get-byte-buffer
   "Gets the byte buffer of `buffer`."
-  {:inline (fn [buffer] `(.-byte-buffer ~(vary-meta buffer assoc :tag `Buffer)))}
+  #?(:clj {:inline (fn [buffer] `(.-byte-buffer ~(vary-meta buffer assoc :tag `Buffer)))})
   ^mikron.runtime.buffer.IMikronByteBuffer [^Buffer buffer]
   (.-byte-buffer buffer))

 (defn get-bit-pos
   "Gets the bit position of `buffer`."
-  {:inline (fn [buffer] `(get-bit-pos* (get-bit-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(get-bit-pos* (get-bit-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (get-bit-pos* (get-bit-buffer buffer)))

 (defn set-bit-pos
   "Sets the bit position of `buffer` to `value`."
-  {:inline (fn [buffer value] `(set-bit-pos* (get-bit-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(set-bit-pos* (get-bit-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (set-bit-pos* (get-bit-buffer buffer) value))

 (defn get-bit-index
   "Gets the bit index of `buffer`."
-  {:inline (fn [buffer] `(get-bit-index* (get-bit-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(get-bit-index* (get-bit-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (get-bit-index* (get-bit-buffer buffer)))

 (defn set-bit-index
   "Sets the bit index of `buffer` to `value`."
-  {:inline (fn [buffer value] `(set-bit-index* (get-bit-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(set-bit-index* (get-bit-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (set-bit-index* (get-bit-buffer buffer) value))

 (defn get-bit-value
   "Gets the bit value of `buffer`."
-  {:inline (fn [buffer] `(get-bit-value* (get-bit-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(get-bit-value* (get-bit-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (get-bit-value* (get-bit-buffer buffer)))

 (defn set-bit-value
   "Sets the bit value of `buffer` to `value`."
-  {:inline (fn [buffer value] `(set-bit-value* (get-bit-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(set-bit-value* (get-bit-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (set-bit-value* (get-bit-buffer buffer) value))

@@ -216,115 +216,115 @@

 (defn take-byte
   "Takes a byte from `buffer`."
-  {:inline (fn [buffer] `(take-byte* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-byte* (get-byte-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (take-byte* (get-byte-buffer buffer)))

 (defn put-byte
   "Puts a byte `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-byte* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-byte* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (put-byte* (get-byte-buffer buffer) value))

 (defn take-short
   "Takes a short from `buffer`."
-  {:inline (fn [buffer] `(take-short* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-short* (get-byte-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (take-short* (get-byte-buffer buffer)))

 (defn put-short
   "Puts a short `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-short* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-short* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (put-short* (get-byte-buffer buffer) value))

 (defn take-int
   "Takes an int from `buffer`."
-  {:inline (fn [buffer] `(take-int* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-int* (get-byte-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (take-int* (get-byte-buffer buffer)))

 (defn put-int
   "Puts an int `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-int* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-int* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (put-int* (get-byte-buffer buffer) value))

 (defn take-long
   "Takes a long from `buffer`."
-  {:inline (fn [buffer] `(take-long* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-long* (get-byte-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (take-long* (get-byte-buffer buffer)))

 (defn put-long
   "Puts a long `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-long* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-long* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (put-long* (get-byte-buffer buffer) value))

 (defn take-float
   "Takes a float from `buffer`."
-  {:inline (fn [buffer] `(take-float* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-float* (get-byte-buffer ~buffer)))})
   ^double [^Buffer buffer]
   (take-float* (get-byte-buffer buffer)))

 (defn put-float
   "Puts a float `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-float* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-float* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^double value]
   (put-float* (get-byte-buffer buffer) value))

 (defn take-double
   "Takes a double from `buffer`."
-  {:inline (fn [buffer] `(take-double* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-double* (get-byte-buffer ~buffer)))})
   ^double [^Buffer buffer]
   (take-double* (get-byte-buffer buffer)))

 (defn put-double
   "Puts a double `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-double* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-double* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^double value]
   (put-double* (get-byte-buffer buffer) value))

 (defn take-bytes
   "Takes `n` bytes from `buffer`."
-  {:inline (fn [buffer n] `(take-bytes* (get-byte-buffer ~buffer) ~n))}
+  #?(:clj {:inline (fn [buffer n] `(take-bytes* (get-byte-buffer ~buffer) ~n))})
   ^bytes [^Buffer buffer ^long n]
   (take-bytes* (get-byte-buffer buffer) n))

 (defn put-bytes
   "Puts some bytes `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-bytes* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(put-bytes* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^bytes value]
   (put-bytes* (get-byte-buffer buffer) value))

 (defn take-bytes-all
   "Takes all bytes from `buffer`."
-  {:inline (fn [buffer] `(take-bytes-all* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(take-bytes-all* (get-byte-buffer ~buffer)))})
   ^bytes [^Buffer buffer]
   (take-bytes-all* (get-byte-buffer buffer)))

 (defn get-pos
   "Gets the position of `buffer`."
-  {:inline (fn [buffer] `(get-pos* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(get-pos* (get-byte-buffer ~buffer)))})
   ^long [^Buffer buffer]
   (get-pos* (get-byte-buffer buffer)))

 (defn set-pos
   "Sets the position of `buffer`."
-  {:inline (fn [buffer value] `(set-pos* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(set-pos* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer ^long value]
   (set-pos* (get-byte-buffer buffer) value))

 (defn get-le
   "Gets the endianness of `buffer`."
-  {:inline (fn [buffer] `(get-le* (get-byte-buffer ~buffer)))}
+  #?(:clj {:inline (fn [buffer] `(get-le* (get-byte-buffer ~buffer)))})
   [^Buffer buffer]
   (get-le* (get-byte-buffer buffer)))

 (defn set-le
   "Sets the endianness of `buffer`."
-  {:inline (fn [buffer value] `(set-le* (get-byte-buffer ~buffer) ~value))}
+  #?(:clj {:inline (fn [buffer value] `(set-le* (get-byte-buffer ~buffer) ~value))})
   [^Buffer buffer value]
   (set-le* (get-byte-buffer buffer) value))

@@ -332,39 +332,39 @@

 (defn take-ubyte
   "Takes an unsigned byte from `buffer`."
-  {:inline (fn [buffer] `(bit-and (take-byte ~buffer) 0xFF))}
+  #?(:clj {:inline (fn [buffer] `(bit-and (take-byte ~buffer) 0xFF))})
   ^long [^Buffer buffer]
    (bit-and (take-byte buffer) 0xFF))

 (defn put-ubyte
   "Puts an unsigned byte `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-byte ~buffer (unchecked-byte (bit-and ~value 0xFF))))}
+  #?(:clj {:inline (fn [buffer value] `(put-byte ~buffer (unchecked-byte (bit-and ~value 0xFF))))})
   [^Buffer buffer ^long value]
   (put-byte buffer (unchecked-byte (bit-and value 0xFF))))

 (defn take-ushort
   "Takes an unsigned short from `buffer`."
-  {:inline (fn [buffer] `(bit-and (take-short ~buffer) 0xFFFF))}
+  #?(:clj {:inline (fn [buffer] `(bit-and (take-short ~buffer) 0xFFFF))})
   ^long [^Buffer buffer]
   (bit-and (take-short buffer) 0xFFFF))

 (defn put-ushort
   "Puts an unsigned short `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-short ~buffer (unchecked-short (bit-and ~value 0xFFFF))))}
+  #?(:clj {:inline (fn [buffer value] `(put-short ~buffer (unchecked-short (bit-and ~value 0xFFFF))))})
   [^Buffer buffer ^long value]
   (put-short buffer (unchecked-short (bit-and value 0xFFFF))))

 (defn take-uint
   "Takes an unsigned int from `buffer`."
-  {:inline (fn [buffer] #?(:clj  `(bit-and (take-int ~buffer) 0xFFFFFFFF)
-                           :cljs `(unsigned-bit-shift-right (take-int ~buffer) 0)))}
+  #?(:clj {:inline (fn [buffer] #?(:clj  `(bit-and (take-int ~buffer) 0xFFFFFFFF)
+                                   :cljs `(unsigned-bit-shift-right (take-int ~buffer) 0)))})
   ^long [^Buffer buffer]
   #?(:clj  (bit-and (take-int buffer) 0xFFFFFFFF)
      :cljs (unsigned-bit-shift-right (take-int buffer) 0)))

 (defn put-uint
   "Puts an unsigned int `value` to `buffer`."
-  {:inline (fn [buffer value] `(put-int ~buffer (unchecked-int (bit-and ~value 0xFFFFFFFF))))}
+  #?(:clj {:inline (fn [buffer value] `(put-int ~buffer (unchecked-int (bit-and ~value 0xFFFFFFFF))))})
   [^Buffer buffer ^long value]
   (put-int buffer (unchecked-int (bit-and value 0xFFFFFFFF))))


Add strength indicator

Add strength indicator

--- src/cljs/munchkin_toolbox/core.cljs
+++ src/cljs/munchkin_toolbox/core.cljs
@@ -1,7 +1,7 @@
 (ns munchkin-toolbox.core
-  (:require-macros [cljs.core.async.macros :refer [go]])
+  (:require-macros [cljs.core.async.macros :refer [go alt!]])
   (:require [om.core :as om :include-macros true]
-            [cljs.core.async :refer [put! chan <! go]]
+            [cljs.core.async :refer [put! chan <!]]
             [sablono.core :as html :refer-macros [html]]))

 (enable-console-print!)
@@ -10,7 +10,8 @@
   [n]
   "Creates a default description for n-th player."
   {:name (str "Player " n)
-   :level 1})
+   :level 1
+   :strength 0})

 (def app-state
   (atom {:players (mapv default-player (range 1 4))}))
@@ -29,7 +30,7 @@
            [:button
             {:class "btn btn-danger btn-lg btn-block"
              :on-click #(put! level-changed-c ::dec)}
-            "-"]]
+            [:i {:class "glyphicon glyphicon-chevron-down"}]]]
           [:div {:class "col-sm-8"}
            [:div {:class "progress"}
             [:div {:class "progress-bar"
@@ -43,6 +44,36 @@
            [:button
             {:class "btn btn-success btn-lg btn-block"
              :on-click #(put! level-changed-c ::inc)}
+            [:i {:class "glyphicon glyphicon-chevron-up"}]]]])))))
+
+(defn strength-indicator
+  "Editable strength indicator."
+  [player owner]
+  (reify
+    om/IRenderState
+    (render-state [_ state]
+      (let [strength-changed-c (:strength-changed state)
+            strength (max (+ (:level player) (:strength player)) 1)]
+        (html
+         [:div {:class "row"}
+          [:div {:class "col-sm-2"}
+           [:button
+            {:class "btn btn-info btn-lg btn-block"
+             :on-click #(put! strength-changed-c ::dec)}
+            "-"]]
+          [:div {:class "col-sm-8"}
+           [:div {:class "progress"}
+            [:div {:class "progress-bar progress-bar-warning"
+                   :role "progressbar"
+                   :aria-valuenow strength
+                   :aria-valuemin "0"
+                   :aria-valuemax "50"
+                   :style {:width (str (* strength 2) "%")}}
+             strength]]]
+          [:div {:class "col-sm-2"}
+           [:button
+            {:class "btn btn-info btn-lg btn-block"
+             :on-click #(put! strength-changed-c ::inc)}
             "+"]]])))))

 (defn editable-label
@@ -90,28 +121,43 @@
 (defmethod change-level ::inc [op] (fn [l] (if (< l 10) (inc l) l)))
 (defmethod change-level ::dec [op] (fn [l] (if (> l 1) (dec l) l)))

+(defmulti change-strength identity)
+(defmethod change-strength ::inc [op] inc)
+(defmethod change-strength ::dec [op] (fn [s] (if (> s 0) (dec s) s)))
+
 (defn player-info
   "Row with info about the player."
   [{:keys [name level] :as player} owner]
   (reify
     om/IInitState
     (init-state [_]
-      {:level-changed (chan)})
+      {:level-changed (chan)
+       :strength-changed (chan)})
     om/IWillMount
     (will-mount [_]
-      (let [level-changed-c (om/get-state owner :level-changed)]
+      (let [level-changed-c (om/get-state owner :level-changed)
+            strength-changed-c (om/get-state owner :strength-changed)]
         (go (loop []
-              (let [op (<! level-changed-c)]
-                (om/transact! player :level (change-level op))
-                (recur))))))
+              (go (loop []
+                    (alt!
+                      level-changed-c
+                      ([op] (om/transact! player :level (change-level op)))
+                      strength-changed-c
+                      ([op] (om/transact! player :strength (change-strength op))))
+                    (recur)))))))
     om/IRenderState
     (render-state [_ state]
       (html
        [:div {:class "row"}
         (om/build (editable-label :name) player)
+        [:h4 "Level"]
         (om/build level-counter
                   level
                   {:init-state (select-keys state [:level-changed])})
+        [:h4 "Strength"]
+        (om/build strength-indicator
+                  player
+                  {:init-state (select-keys state [:strength-changed])})
         [:hr]]))))

 (defn players-list