Cosmetic changes

Cosmetic changes

Some string here and there plus a better (mapcat identity ...) for the options.

--- resources/leiningen/new/lambone/common/dev/boot.clj
+++ resources/leiningen/new/lambone/common/dev/boot.clj
@@ -71,17 +71,17 @@
 (defn build-backend
   "Return a boot task for building the backend.

-   The artifact is the result of (comp (aot) (uber) (jar)) but no target
-  is appended."
+   The artifact is the result of (comp (aot) (uber) (jar)) but no target is
+   appended."
   [options]
   (apply-options! options)
   (let [jar-name (get-in options [:jar :file])]
     (comp (with-pass-thru _
-            (util/dbug "Options:\n%s\n" (with-out-str (pprint options))))
+            (util/dbug "[build-backend] options:\n%s\n" (with-out-str (pprint options))))
           (version-file)
-          (apply built-in/aot (flatten (seq (:aot options))))
-          (apply built-in/uber (flatten (seq (:uber options))))
-          (apply built-in/jar (flatten (seq (:jar options))))
+          (apply built-in/aot (mapcat identity (:aot options)))
+          (apply built-in/uber (mapcat identity (:uber options)))
+          (apply built-in/jar (mapcat identity (:jar options)))
           (built-in/sift :include #{(re-pattern jar-name)}))))

 (defn dev-backend-pod-env
@@ -97,14 +97,13 @@

    Repl in a pod, inspired by https://github.com/juxt/edge"
   [options]
-  (util/dbug "Options:\n%s\n" (with-out-str (pprint options)))
   (let [pod-env (dev-backend-pod-env (:env options))
         pod (future (pod/make-pod pod-env))
         {:keys [port init-ns]} (:repl options)]
     (comp
      (with-pass-thru _
-       (util/dbug "Options:\n%s\n" (with-out-str (pprint options)))
-       (util/dbug "Pod env:\n%s\n" (with-out-str (pprint pod-env))))
+       (util/dbug "[dev-backend] options:\n%s\n" (with-out-str (pprint options)))
+       (util/dbug "[dev-backend] pod env:\n%s\n" (with-out-str (pprint pod-env))))
      (with-pass-thru _
        (pod/with-eval-in @pod
          (require '[boot.pod :as pod])
@@ -128,15 +127,15 @@
     exclusions (assoc-in [:test :exclusions] exclusions)))

 (defn test-backend
-  "Run tests once for the backend (it uses clojure.test)."
+  "Run tests once for the backend (uses clojure.test)."
   [options]
   (comp (with-pass-thru _
-          (util/dbug "Options:\n%s\n" (with-out-str (pprint options)))
+          (util/dbug "[test-backend] options:\n%s\n" (with-out-str (pprint options)))
           (apply-options! options)
           (require 'adzerk.boot-test))
         (with-pre-wrap fs
           (let [test (resolve 'adzerk.boot-test/test)
-                middleware (apply test (flatten (seq (:test options))))]
+                middleware (apply test (mapcat identity (:test options)))]
             ((middleware identity) fs)))))<% endif %>
 <% if any frontend %>
 (defn build-frontend
@@ -151,10 +150,10 @@
   (let [cljs (resolve 'adzerk.boot-cljs/cljs)
         sass (resolve 'deraen.boot-sass/sass)]
     (comp (with-pass-thru _
-            (util/dbug "Options:\n%s\n" (with-out-str (pprint options))))
+            (util/dbug "[build-frontend] options:\n%s\n" (with-out-str (pprint options))))
           (version-file)
-          (apply sass (flatten (seq (:sass options))))
-          (apply cljs (flatten (seq (:cljs options))))
+          (apply sass (mapcat identity (:sass options)))
+          (apply cljs (mapcat identity (:cljs options)))
           (if-not out-folder?
             (built-in/sift :include #{#"main.out"} :invert true)
             identity))))
@@ -175,13 +174,13 @@
         cljs-build-deps (resolve 'adzerk.boot-cljs/deps)
         sass (resolve 'deraen.boot-sass/sass)
         serve (resolve 'pandeiro.boot-http/serve)]
-    (comp (apply serve (flatten (seq (:serve options))))
+    (comp (apply serve (mapcat identity (:serve options)))
           (built-in/watch)
           (version-file)
-          (apply sass (flatten (seq (:sass options))))
-          (apply reload (flatten (seq (:reload options))))
-          (apply cljs-repl (flatten (seq (:cljs-repl options))))
-          (apply cljs (flatten (seq (:cljs options))))
+          (apply sass (mapcat identity (:sass options)))
+          (apply reload (mapcat identity (:reload options)))
+          (apply cljs-repl (mapcat identity (:cljs-repl options)))
+          (apply cljs (mapcat identity (:cljs options)))
           (if (> @boot.util/*verbosity* 1)
             (built-in/show :fileset true)
             identity))))
@@ -200,10 +199,10 @@
   some namespaces."
   [options]
   (comp (with-pass-thru _
-          (util/dbug "Options:\n%s\n" (with-out-str (pprint options)))
+          (util/dbug "[test-frontend] options:\n%s\n" (with-out-str (pprint options)))
           (apply-options! options)
           (require 'crisptrutski.boot-cljs-test))
         (with-pre-wrap fs
           (let [test-cljs (resolve 'crisptrutski.boot-cljs-test/test-cljs)
-                middleware (apply test-cljs (flatten (seq (:test-cljs options))))]
-            ((middleware identity) fs)))))<% endif %>+                middleware (apply test-cljs (mapcat identity (:test-cljs options)))]
+            ((middleware identity) fs)))))<% endif %>


never mind, not specifying slave resources

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jchli/jepsen-aurora.git/'


wait for jetty startup in conn-mgr, whitespace fixes

--- test/clj_http/test/conn_mgr.clj
+++ test/clj_http/test/conn_mgr.clj
@@ -25,24 +25,24 @@
     (is (> (.size ks) 0))))

 (deftest keystore-scheme-factory
-  (let [sr (conn-mgr/get-keystore-scheme-registry {:keystore client-ks
-                                                   :keystore-pass client-ks-pass
-                                                   :trust-store client-ks
-                                                   :trust-store-pass client-ks-pass})
+  (let [sr (conn-mgr/get-keystore-scheme-registry
+            {:keystore client-ks :keystore-pass client-ks-pass
+             :trust-store client-ks :trust-store-pass client-ks-pass})
         socket-factory (.getSchemeSocketFactory (.get sr "https"))]
     (is (instance? SSLSocketFactory socket-factory))))

 (deftest ^{:integration true} ssl-client-cert-get
   (let [t (doto (Thread. #(ring/run-jetty secure-handler
-                                          {:port 18083 :ssl-port 18084 :ssl? true
+                                          {:port 18083 :ssl-port 18084
+                                           :ssl? true
                                            :keystore "test-resources/keystore"
                                            :key-password "keykey"
                                            :client-auth :want})) .start)]
-    (try
-      (let [resp (core/request {:request-method :get :uri "/get" :server-port 18084
-                           :scheme :https :insecure? true :server-name "localhost"})]
-        (is (= 403 (:status resp))))
-      (let [resp (core/request secure-request)]
-        (is (= 200 (:status resp))))
-      (finally
-        (.stop t)))))
+    ;; wait for jetty to start up completely
+    (Thread/sleep 3000)
+    (let [resp (core/request {:request-method :get :uri "/get"
+                              :server-port 18084 :scheme :https
+                              :insecure? true :server-name "localhost"})]
+      (is (= 403 (:status resp))))
+    (let [resp (core/request secure-request)]
+      (is (= 200 (:status resp))))))


saioa-hasi txukundu

saioa-hasi txukundu

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.bez.git/'


Adding clojure implementation

Adding clojure implementation

error: pathspec 'clojure/ebeats.clj' did not match any file(s) known to git

--- clojure/ebeats.clj
+++ clojure/ebeats.clj
@@ -0,0 +1,10 @@
+(import '(java.util Calendar TimeZone))
+
+(def beats
+	(let [now (. Calendar (getInstance (. TimeZone (getTimeZone "UTC"))))]
+		(+
+			(* (. now (get (. Calendar HOUR_OF_DAY))) (/ 1000.0 24.0))
+			(* (. now (get (. Calendar MINUTE))) (/ 1000.0 (* 24.0 60.0)))
+			(* (. now (get (. Calendar SECOND))) (/ 1000.0 (* 24.0 60.0 60.0))))))
+
+(println (format "@%.2f" beats))


Bit cleaner migrations.

Bit cleaner migrations.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


missed a chunk in handler merge

missed a chunk in handler merge

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Fix get-in bug

Fix get-in bug

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/micbie/evemm.git/'


add protocols namespace

add protocols namespace

error: pathspec 'src/cortex/protocols.clj' did not match any file(s) known to git

--- src/cortex/protocols.clj
+++ src/cortex/protocols.clj
@@ -0,0 +1,2 @@
+(ns cortex.protocols)
+


Seven Languages in Seven Weeks: Clojure day 3.

error: pathspec 'SevenLanguages/Clojure/day3.clj' did not match any file(s) known to git

--- SevenLanguages/Clojure/day3.clj
+++ SevenLanguages/Clojure/day3.clj
@@ -0,0 +1,52 @@
+(def accounts (ref {}))
+
+(defn create-account [n]
+    (dosync
+        (ref-set accounts (assoc @accounts n 0))))
+
+(defn deposit [n a]
+    (dosync
+        (let [new-amount (+ (@accounts n) a)]
+            (ref-set accounts (assoc @accounts n new-amount))
+            new-amount)))
+
+
+
+(def haircuts-done (atom 0))
+(def customers-waiting (ref 0))
+(def chairs-free (ref 3))
+
+(defn barber-go []
+    (if (dosync
+        (if
+            (> @customers-waiting 0)
+            (do
+                (ref-set chairs-free (inc @chairs-free))
+                (ref-set customers-waiting (dec @customers-waiting))
+                true)
+            false))
+        (do
+            (Thread/sleep 20)
+            (future (barber-go))
+            (swap! haircuts-done inc))
+        (recur)))
+
+(defn customer-loop []
+    (Thread/sleep (+ (rand 20) 10))
+    (future (customer-loop))
+    (dosync
+        (if
+            (> @chairs-free 0)
+            (do
+                (ref-set chairs-free (dec @chairs-free))
+                (ref-set customers-waiting (inc @customers-waiting))))))
+
+
+(future (customer-loop))
+(future (barber-go))
+
+(Thread/sleep 10000)
+(println @haircuts-done)
+
+
+


Renaming to the catchy Clojuroids.

Renaming to the catchy Clojuroids.

error: pathspec 'Clojure/clojuroids.clj' did not match any file(s) known to git

--- Clojure/clojuroids.clj
+++ Clojure/clojuroids.clj
@@ -0,0 +1,102 @@
+; :mode=clojure:
+
+(import
+    '(java.awt Color Dimension Polygon RenderingHints)
+    '(javax.swing JComponent JFrame JLabel Timer)
+    '(java.awt.event ActionListener KeyAdapter)
+)
+
+(defn do-mod [coll func v]
+    (dosync (alter coll (fn [x] (apply func [x v])))))
+
+(defn player-shape []
+    (doto
+        (new Polygon)
+        (.addPoint 10 0)
+        (.addPoint -3 5)
+        (.addPoint -3 -5)))
+
+(defn draw-player [player g]
+    (do
+        (.setColor g (Color/WHITE))
+        (let [old-transform (.getTransform g)]
+            (.translate g (:x player) (:y player))
+            (.fill g (player-shape))
+            (.setTransform g old-transform))))
+
+(defn game-render [state g]
+    (do
+        (.setRenderingHint g
+            RenderingHints/KEY_ANTIALIASING
+            RenderingHints/VALUE_ANTIALIAS_ON)
+        (.setRenderingHint g
+            RenderingHints/KEY_RENDERING
+            RenderingHints/VALUE_RENDER_QUALITY)
+        (.setColor g (Color/BLACK))
+        (let [rect (.getClipBounds g)]
+            (.fillRect g (.x rect) (.y rect) (.width rect) (.height rect)))
+        (draw-player (:player state) g)))
+
+(defn create-component [game-state]
+    (doto
+        (proxy [JComponent] []
+            (paint [g] (dosync (game-render (deref game-state) g))))
+        (.setPreferredSize (new Dimension 640 480))
+        (.setDoubleBuffered true)
+        (.setFocusable true)))
+
+(defn now [] (* 0.001 (System/currentTimeMillis)))
+
+(defn default-state [] {
+    :time (now)
+    :player { :x 100.0 :y 100.0 :xv 10.0 :yv 5.0 } } )
+
+(defn player-step [player time-step]
+    (assoc player
+        :x (+ (:x player) (* (:xv player) time-step))
+        :y (+ (:y player) (* (:yv player) time-step))))
+
+(defn game-step [state keys-pressed]
+    (let [new-time (now) time-step (- new-time (:time state))]
+        (assoc state
+            :time new-time
+            :player (player-step (:player state) time-step))))
+
+(defn create-game []
+    (let [
+        keys-pressed (ref (hash-set))
+        game-state (ref (default-state))
+        result (create-component game-state)
+        ]
+        (do
+            (doto
+                result
+                (.addKeyListener (proxy [KeyAdapter] []
+                    (keyPressed [event] (if (not (.isConsumed event)) (do
+                        (do-mod keys-pressed conj (.getKeyCode event))
+                        (.consume event))))
+                    (keyReleased [event] (if (not (.isConsumed event)) (do
+                        (do-mod keys-pressed disj (.getKeyCode event))
+                        (.consume event)))))))
+
+            (doto
+                (new Timer (/ 1000 60)
+                    (reify ActionListener
+                        (actionPerformed [this event] (.repaint result))))
+                (.start))
+
+            (future (loop []
+                (do
+                    (Thread/sleep 1)
+                    (dosync (alter game-state (fn [state] (game-step state (deref keys-pressed)))))
+                    (recur))))
+
+            result)))
+
+(let [frame (new JFrame)]
+    (do
+        (.add (.getContentPane frame) (create-game))
+        (.pack frame)
+        (.setResizable frame false)
+        (.show frame)))
+


Add chapter 03 code examples

Add chapter 03 code examples

error: pathspec 'clojure-lang/src/clojure_lang/chapter03.clj' did not match any file(s) known to git

--- clojure-lang/src/clojure_lang/chapter03.clj
+++ clojure-lang/src/clojure_lang/chapter03.clj
@@ -0,0 +1,275 @@
+(ns clojure-lang.chapter03
+  (:require [taoensso.carmine :as car]
+            [clojure-lang.util :refer [wcar* server-conn]]))
+
+;;;;;;;;;;;;;;;;;
+;; 3.1 Strings ;;
+;;;;;;;;;;;;;;;;;
+
+;; Listing 3.1: A sample interaction showing INCR and DECR operations in Redis
+(wcar* (car/get "key"))
+;; => nil
+(wcar* (car/incr "key"))
+;; => 1
+(wcar* (car/incrby "key" 15))
+;; => 16
+(wcar* (car/decrby "key" 5))
+;; => 11
+(wcar* (car/get "key"))
+;; => "11"
+(wcar* (car/set "key" "13"))
+;; => "OK"
+(wcar* (car/incr "key"))
+;; => 14
+
+;; Listing 3.2: A sample interaction showing substring and bit operations in Redis
+(wcar* (car/append "new-string-key" "hello "))
+;; => 6
+(wcar* (car/append "new-string-key" "world!"))
+;; => 12
+(wcar* (car/getrange "new-string-key" 3 7))
+;; => "lo wo"
+(wcar* (car/setrange "new-string-key" 0 "H"))
+;; => 12
+(wcar* (car/setrange "new-string-key" 6 "W"))
+;; => 12
+(wcar* (car/get "new-string-key"))
+;; => "Hello World!"
+(wcar* (car/setrange "new-string-key"11 ", how are you?"))
+;; => 25
+(wcar* (car/get "new-string-key"))
+;; => "Hello World, how are you?"
+(wcar* (car/setbit "another" 7 1))
+;; => 0
+(wcar* (car/get "another"))
+;; => "!"
+
+;;;;;;;;;;;;;;;
+;; 3.2 Lists ;;
+;;;;;;;;;;;;;;;
+
+;; Listing 3.3: A sample interaction showing LIST push and pop commands in Redis
+(wcar* (car/rpush "list-key" "last"))
+;; => 1
+(wcar* (car/lpush "list-key" "first"))
+;; => 2
+(wcar* (car/rpush "list-key" "new last"))
+;; => 3
+(wcar* (car/lrange "list-key" 0 -1))
+;; => ["first" "last" "new last"]
+(wcar* (car/lpop "list-key"))
+;; => "first"
+(wcar* (car/lpop "list-key"))
+;; => "last"
+(wcar* (car/lrange "list-key" 0 -1))
+;; => ["new last"]
+(wcar* (car/rpush "list-key" "a" "b" "c"))
+;; => 4
+(wcar* (car/lrange "list-key" 0 -1))
+;; => ["new last" "a" "b" "c"]
+(wcar* (car/ltrim "list-key" 2 -1))
+;; => "OK"
+(wcar* (car/lrange "list-key" 0 -1))
+;; => ["b" "c"]
+
+;; Listing 3.4:  Blocking LIST pop and movement commands in Redis
+(wcar* (car/rpush "list" "item1"))
+;; => 1
+(wcar* (car/rpush "list" "item2"))
+;; => 2
+(wcar* (car/rpush "list2" "item3"))
+;; => 1
+(wcar* (car/brpoplpush "list2" "list" 1))
+;; => "item3"
+(wcar* (car/brpoplpush "list2" "list" 1))
+;; => nil
+(wcar* (car/lrange "list" 0 -1))
+;; => ["item3" "item1" "item2"]
+(wcar* (car/brpoplpush "list" "list2" 1))
+;; => "item2"
+(wcar* (car/blpop "list" "list2" 1))
+;; => ["list" "item3"]
+(wcar* (car/blpop "list" "list2" 1))
+;; => ["list" "item1"]
+(wcar* (car/blpop "list" "list2" 1))
+;; => ["list2" "item2"]
+(wcar* (car/blpop "list" "list2" 1))
+;; => nil
+
+;;;;;;;;;;;;;;
+;; 3.3 Sets ;;
+;;;;;;;;;;;;;;
+
+;; Listing 3.5: A sample interaction showing some common SET commands in Redis
+(wcar* (car/sadd "set-key" "a" "b" "c"))
+;; => 3
+(wcar* (car/srem "set-key" "c" "d"))
+;; => 1
+(wcar* (car/srem "set-key" "c" "d"))
+;; => 0
+(wcar* (car/scard "set-key"))
+;; => 2
+(wcar* (car/smembers "set-key"))
+;; => ["a" "b"]
+(wcar* (car/smove "set-key" "set-key2" "a"))
+;; => 1
+(wcar* (car/smove "set-key" "set-key2" "c"))
+;; => 0
+(wcar* (car/smembers "set-key2"))
+;; => ["a"]
+
+;; Listing 3.6: A sample interaction showing SET difference, intersection, and union in Redis
+
+(wcar* (car/sadd "skey1" "a" "b" "c" "d"))
+;; => 4
+(wcar* (car/sadd "skey2" "c" "d" "e" "f"))
+;; => 4
+(wcar* (car/sdiff "skey1" "skey2"))
+;; => ["a" "b"]
+(wcar* (car/sinter "skey1" "skey2"))
+;; => ["d" "c"]
+(wcar* (car/sunion "skey1" "skey2"))
+;; => ["c" "f" "a" "d" "b" "e"]
+
+;;;;;;;;;;;;;;;;
+;; 3.4 Hashes ;;
+;;;;;;;;;;;;;;;;
+
+;; Listing 3.7: A sample interaction showing some common HASH commands in Redis
+
+(wcar* (car/hmset "hash-key" "k1" "v1" "k2" "v2" "k3" "v3"))
+;; => "OK"
+(wcar* (car/hmget "hash-key" "k2" "k3"))
+;; => ["v2" "v3"]
+(wcar* (car/hlen "hash-key"))
+;; => 3
+(wcar* (car/hdel "hash-key" "k1" "k3"))
+;; => 2
+
+;; Listing 3.8: A sample interaction showing some more advanced features of Redis HASHes
+
+(wcar* (car/hmset "hash-key2" "short" "hello" "long" (apply str (take 1000 (repeat "1")))))
+;; => "OK"
+(wcar* (car/hkeys "hash-key2"))
+;; => ["long" "short"]
+(wcar* (car/hexists "hash-key2" "num"))
+;; => 0
+(wcar* (car/hincrby "hash-key2" "num" 1))
+;; => 1
+(wcar* (car/hexists "hash-key2" "num"))
+;; => 1
+
+;;;;;;;;;;;;;;;;;;;;;
+;; 3.5 Sorted sets ;;
+;;;;;;;;;;;;;;;;;;;;;
+
+;; Listing 3.9: A sample interaction showing some common ZSET commands in Redis
+
+(wcar* (car/zadd "zset-key" 3 "a" 2 "b" 1 "c"))
+;; => 3
+(wcar* (car/zcard "zset-key"))
+;; => 3
+(wcar* (car/zincrby "zset-key" 3 "c"))
+;; => "4"
+(wcar* (car/zscore "zset-key" "b"))
+;; => "2"
+(wcar* (car/zrank "zset-key" "c"))
+;; => 2
+(wcar* (car/zcount "zset-key" 0 3))
+;; => 2
+(wcar* (car/zrem "zset-key" "b"))
+;; => 1
+(wcar* (car/zrange "zset-key" 0 -1 "withscores"))
+;; => ["a" "3" "c" "4"]
+
+;; Listing 3.10: A sample interaction showing ZINTERSTORE and ZUNIONSTORE
+
+(wcar* (car/zadd "zset-1" 1 "a" 2 "b" 3 "c"))
+;; => 3
+(wcar* (car/zadd "zset-2" 4 "b" 1 "c" 0 "d"))
+;; => 3
+(wcar* (car/zinterstore "zset-i" 2 "zset-1" "zset-2"))
+;; => 2
+(wcar* (car/zrange "zset-i" 0 -1 "withscores"))
+;; => ["c" "4" "b" "6"]
+(wcar* (car/zunionstore "zset-u" 2 "zset-1" "zset-2" "AGGREGATE" "MIN"))
+;; => 4
+(wcar* (car/zrange "zset-u" 0 -1 "withscores"))
+;; => ["d" "0" "a" "1" "c" "1" "b" "2"]
+(wcar* (car/sadd "set-1" "a" "d"))
+;; => 2
+(wcar* (car/zunionstore "zset-u2" 3 "zset-1" "zset-2" "set-1"))
+;; => 4
+(wcar* (car/zrange "zset-u2" 0 -1 "withscores"))
+;; => ["d" "1" "a" "2" "c" "4" "b" "6"]
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; 3.6 Publish/Subscribe ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Listing 3.11: Using PUBLISH and SUBSCRIBE in Redis
+
+(def listener
+  (car/with-new-pubsub-listener (:spec server-conn)
+    {"channel" (fn [msg] (println msg))}
+    (car/subscribe "channel")))
+
+
+(defn publish
+  [msg]
+  (wcar* (car/publish "channel" msg)))
+
+
+;; (car/close-listener listener)
+
+;;;;;;;;;;;;;;;;;;;;;;;;
+;; 3.7 Other Commands ;;
+;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Listing 3.12: A sample interaction showing some uses of SORT
+
+(wcar* (car/rpush "sort-input" 23 15 110 7))
+;; => 4
+(wcar* (car/sort "sort-input"))
+;; => ["7" "15" "23" "110"]
+(wcar* (car/sort "sort-input" "ALPHA"))
+;; => ["110" "15" "23" "7"]
+(wcar* (car/hset "d-7" "field" 5))
+;; => 1
+(wcar* (car/hset "d-15" "field" 1))
+;; => 1
+(wcar* (car/hset "d-23" "field" 9))
+;; => 1
+(wcar* (car/hset "d-110" "field" 3))
+;; => 1
+(wcar* (car/sort "sort-input" "BY" "d-*->field"))
+;; => ["15" "110" "7" "23"]
+(wcar* (car/sort "sort-input" "BY" "d-*->field" "GET" "d-*->field"))
+;; => ["1" "3" "5" "9"]
+
+
+;; Listing 3.14: What can happen with transactions during parallel execution
+
+(car/atomic server-conn
+            1
+            (car/multi)
+            (car/incr "trans:")
+            (car/incrby "trans:" -1))
+;; => [["OK" "QUEUED" "QUEUED"] [1 0]]
+
+;; Listing 3.15: A sample interaction showing the use of expiration-related commands in Redis
+
+(wcar* (car/set "key" "value"))
+;; => "OK"
+(wcar* (car/get "key"))
+;; => "value"
+(wcar* (car/expire "key" 2))
+;; => 1
+(wcar* (car/get "key"))
+;; => nil
+(wcar* (car/set "key" "value"))
+;; => "OK"
+(wcar* (car/expire "key" 100))
+;; => 1
+(wcar* (car/ttl "key"))
+;; => 87


output in tasks-test

output in tasks-test

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fhirbase/fhirterm.git/'


Test against multiple DBs

Test against multiple DBs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leif47/immutabledb-experimental.git/'


New tests for worker ns

New tests for worker ns

error: pathspec 'test/myshelf/test/worker.clj' did not match any file(s) known to git

--- test/myshelf/test/worker.clj
+++ test/myshelf/test/worker.clj
@@ -0,0 +1,53 @@
+(ns myshelf.test.worker
+  (:require [clojure.test :refer :all]
+            [myshelf.auth :refer [get-access-token
+                                  get-user-id]]
+            [myshelf.db :as db]
+            [myshelf.worker :refer :all]))
+
+(use-fixtures :once
+  db/migrate-db-fixture)
+
+(use-fixtures :each
+  db/clean-db-fixture)
+
+(deftest t-goodreads-access-for-user
+  ;; arbitrary handles should be false
+  (let [user-handle "prefect"
+        user-access-token {:oauth_token "pinfeathers"
+                           :oauth_token_secret "gollyfluff"}]
+    (is (not (goodreads-access-for-user? user-handle)))
+    ;; insert user into db
+    (db/insert-user "42" user-handle user-access-token)
+    ;; should now return true
+    (is (goodreads-access-for-user? user-handle))
+    ;; creds should include handle and info
+    (let [creds (:prefect @goodreads-creds)]
+      (is (= "42"
+             (:user-id creds)))
+      (is (= user-access-token
+             (:access-token creds)))))
+  ;; another arbitrary handle should be false
+  (let [user-handle "ford"
+        user-access-token {:oauth_token "pinfeathers"
+                           :oauth_token_secret "gollyfluff"}]
+    (is (not (goodreads-access-for-user? user-handle)))
+    ;; mock out access token and user id
+    (with-redefs [get-access-token (fn [& args] user-access-token)
+                  get-user-id (fn [& args] "7")]
+      ;; call again; should be true now
+      (is (goodreads-access-for-user? user-handle)))
+    ;; should have updated db
+    (let [user (db/find-by-id "7")]
+      (is (= "ford"
+             (:handle user)))
+      (is (= "pinfeathers"
+             (:access_token user)))
+      (is (= "gollyfluff"
+             (:access_token_secret user))))
+    ;; should have updated creds atom
+    (let [creds (:ford @goodreads-creds)]
+      (is (= "7"
+             (:user-id creds)))
+      (is (= user-access-token
+             (:access-token creds))))))


Support passing args to quorum queues

Support passing args to quorum queues

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Yleisradio/rabid.git/'


Add tests for filler

Add tests for filler

error: pathspec 'test/subman/t_filler.clj' did not match any file(s) known to git

--- test/subman/t_filler.clj
+++ test/subman/t_filler.clj
@@ -0,0 +1,32 @@
+(ns subman.t-filler
+  (:require [midje.sweet :refer [fact facts => provided anything truthy]]
+            [clojure.data.json :as json]
+            [subman.models :as models]
+            [subman.sources.addicted :as addicted]
+            [subman.sources.podnapisi :as podnapisi]
+            [subman.sources.opensubtitles :as opensubtitles]
+            [subman.sources.subscene :as subscene]
+            [subman.filler :as filler]))
+
+(defn new-getter
+  "Fake getter for tests"
+  [page] (case page
+           3 [:exists]
+           2 [:fresh :exists]
+           1 [:fresh :fresh]))
+
+(fact "should get new before"
+      (-> (filler/get-new-before new-getter #(= % :exists))
+          count) => 3)
+
+(fact "should get all new from nth getters"
+      (-> (filler/get-all-new #(= % :exists) new-getter new-getter new-getter)
+          count) => 9)
+
+(fact "update from all sources"
+      (filler/update-all) => truthy
+      (provided
+       (subscene/get-release-page-result 1) => []
+       (opensubtitles/get-release-page-result 1) => []
+       (addicted/get-release-page-result 1) => []
+       (podnapisi/get-release-page-result 1) => []))


removed bin/ directory content

removed bin/ directory content

--- bin/paredit/core.clj
+++ bin/paredit/core.clj
@@ -1,322 +0,0 @@
-(ns paredit.core
-  (:use clojure.contrib.def)
-  (:use clojure.test)
-  (:use paredit.parser)
-  (:require clojure.contrib.pprint)
-  (:require [clojure.contrib.str-utils2 :as str2]))
-
-(set! *warn-on-reflection* true)
-
-;;; -*- Mode: Emacs-Lisp; outline-regexp: "\n;;;;+" -*-
-
-;;;;;; Paredit: Parenthesis-Editing Minor Mode
-;;;;;; Version 21
-
-;;; Copyright (c) 2008, Taylor R. Campbell
-;;;
-;;; Redistribution and use in source and binary forms, with or without
-;;; modification, are permitted provided that the following conditions
-;;; are met:
-;;;
-;;; * Redistributions of source code must retain the above copyright
-;;;   notice, this list of conditions and the following disclaimer.
-;;;
-;;; * Redistributions in binary form must reproduce the above copyright
-;;;   notice, this list of conditions and the following disclaimer in
-;;;   the documentation and/or other materials provided with the
-;;;   distribution.
-;;;
-;;; * Neither the names of the authors nor the names of contributors
-;;;   may be used to endorse or promote products derived from this
-;;;   software without specific prior written permission.
-;;;
-;;; THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
-;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
-;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-;;; This file is permanently stored at
-;;;   <http://mumble.net/~campbell/emacs/paredit-21.el>.
-;;;
-;;; The currently released version of paredit is available at
-;;;   <http://mumble.net/~campbell/emacs/paredit.el>.
-;;;
-;;; The latest beta version of paredit is available at
-;;;   <http://mumble.net/~campbell/emacs/paredit-beta.el>.
-;;;
-;;; Release notes are available at
-;;;   <http://mumble.net/~campbell/emacs/paredit.release>.
-
-;;; Install paredit by placing `paredit.el' in `/path/to/elisp', a
-;;; directory of your choice, and adding to your .emacs file:
-;;;
-;;;   (add-to-list 'load-path "/path/to/elisp")
-;;;   (autoload 'paredit-mode "paredit"
-;;;     "Minor mode for pseudo-structurally editing Lisp code."
-;;;     t)
-;;;
-;;; Toggle Paredit Mode with `M-x paredit-mode RET', or enable it
-;;; always in a major mode `M' (e.g., `lisp' or `scheme') with:
-;;;
-;;;   (add-hook M-mode-hook (lambda () (paredit-mode +1)))
-;;;
-;;; Customize paredit using `eval-after-load':
-;;;
-;;;   (eval-after-load 'paredit
-;;;     '(progn ...redefine keys, &c....))
-;;;
-;;; Paredit should run in GNU Emacs 21 or later and XEmacs 21.5 or
-;;; later.  Paredit is highly unlikely to work in earlier versions of
-;;; GNU Emacs, and it may have obscure problems in earlier versions of
-;;; XEmacs due to the way its syntax parser reports conditions, as a
-;;; result of which the code that uses the syntax parser must mask all
-;;; error conditions, not just those generated by the syntax parser.
-;;;
-;;; Questions, bug reports, comments, feature suggestions, &c., may be
-;;; addressed via email to the author's surname at mumble.net or via
-;;; IRC to the user named Riastradh on irc.freenode.net in the #paredit
-;;; channel.
-;;;
-;;; Please contact the author rather than forking your own versions, to
-;;; prevent the dissemination of random variants floating about the
-;;; internet unbeknownst to the author.  Laziness is not an excuse:
-;;; your laziness costs me confusion and time trying to support
-;;; paredit, so if you fork paredit, you make the world a worse place.
-;;;
-;;; *** WARNING *** IMPORTANT *** DO NOT SUBMIT BUGS BEFORE READING ***
-;;;
-;;; If you plan to submit a bug report, where some sequence of keys in
-;;; Paredit Mode, or some sequence of paredit commands, doesn't do what
-;;; you wanted, then it is helpful to isolate an example in a very
-;;; small buffer, and it is **ABSOLUTELY**ESSENTIAL** that you supply,
-;;; along with the sequence of keys or commands,
-;;;
-;;;   (1) the version of Emacs,
-;;;   (2) the version of paredit.el[*], and
-;;;   (3) the **COMPLETE** state of the buffer used to reproduce the
-;;;       problem, including major mode, minor modes, local key
-;;;       bindings, entire contents of the buffer, leading line breaks
-;;;       or spaces, &c.
-;;;
-;;; It is often extremely difficult to reproduce problems, especially
-;;; with commands like `paredit-kill'.  If you do not supply **ALL** of
-;;; this information, then it is highly probable that I cannot
-;;; reproduce your problem no matter how hard I try, and the effect of
-;;; submitting a bug without this information is only to waste your
-;;; time and mine.  So, please, include all of the above information.
-;;;
-;;; [*] If you are using a beta version of paredit, be sure that you
-;;;     are using the *latest* edition of the beta version, available
-;;;     at <http://mumble.net/~campbell/emacs/paredit-beta.el>.  If you
-;;;     are not using a beta version, then upgrade either to that or to
-;;;     the latest release version; I cannot support older versions,
-;;;     and I can't fathom any reason why you might be using them.  So
-;;;     the answer to item (2) should be either `release' or `beta'.
-
-;;; The paredit minor mode, Paredit Mode, binds a number of simple
-;;; keys, notably `(', `)', `"', and `\', to commands that more
-;;; carefully insert S-expression structures in the buffer.  The
-;;; parenthesis delimiter keys (round or square) are defined to insert
-;;; parenthesis pairs and move past the closing delimiter,
-;;; respectively; the double-quote key is multiplexed to do both, and
-;;; also to insert an escape if within a string; and backslashes prompt
-;;; the user for the next character to input, because a lone backslash
-;;; can break structure inadvertently.  These all have their ordinary
-;;; behaviour when inside comments, and, outside comments, if truly
-;;; necessary, you can insert them literally with `C-q'.
-;;;
-;;; The key bindings are designed so that when typing new code in
-;;; Paredit Mode, you can generally use exactly the same keystrokes as
-;;; you would have used without Paredit Mode.  Earlier versions of
-;;; paredit.el did not conform to this, because Paredit Mode bound `)'
-;;; to a command that would insert a newline.  Now `)' is bound to a
-;;; command that does not insert a newline, and `M-)' is bound to the
-;;; command that inserts a newline.  To revert to the former behaviour,
-;;; add the following forms to an `eval-after-load' form for paredit.el
-;;; in your .emacs file:
-;;;
-;;;   (define-key paredit-mode-map (kbd ")")
-;;;     'paredit-close-round-and-newline)
-;;;   (define-key paredit-mode-map (kbd "M-)")
-;;;     'paredit-close-round)
-;;;
-;;; Paredit Mode also binds the usual keys for deleting and killing, so
-;;; that they will not destroy any S-expression structure by killing or
-;;; deleting only one side of a parenthesis or quote pair.  If the
-;;; point is on a closing delimiter, `DEL' will move left over it; if
-;;; it is on an opening delimiter, `C-d' will move right over it.  Only
-;;; if the point is between a pair of delimiters will `C-d' or `DEL'
-;;; delete them, and in that case it will delete both simultaneously.
-;;; `M-d' and `M-DEL' kill words, but skip over any S-expression
-;;; structure.  `C-k' kills from the start of the line, either to the
-;;; line's end, if it contains only balanced expressions; to the first
-;;; closing delimiter, if the point is within a form that ends on the
-;;; line; or up to the end of the last expression that starts on the
-;;; line after the point.
-;;;
-;;; The behaviour of the commands for deleting and killing can be
-;;; overridden by passing a `C-u' prefix argument: `C-u DEL' will
-;;; delete a character backward, `C-u C-d' will delete a character
-;;; forward, and `C-u C-k' will kill text from the point to the end of
-;;; the line, irrespective of the S-expression structure in the buffer.
-;;; This can be used to fix mistakes in a buffer, but should generally
-;;; be avoided.
-;;;
-;;; Paredit performs automatic reindentation as locally as possible, to
-;;; avoid interfering with custom indentation used elsewhere in some
-;;; S-expression.  Only the advanced S-expression manipulation commands
-;;; automatically reindent, and only the forms that were immediately
-;;; operated upon (and their subforms).
-;;;
-;;; This code is written for clarity, not efficiency.  It frequently
-;;; walks over S-expressions redundantly.  If you have problems with
-;;; the time it takes to execute some of the commands, let me know, but
-;;; first be sure that what you're doing is reasonable: it is
-;;; preferable to avoid immense S-expressions in code anyway.
-
-;;; This assumes Unix-style LF line endings.
-
-(defmacro defconst [& body] `(clojure.contrib.def/defvar ~@body))
-
-(defconst paredit-version 21)
-(defconst paredit-beta-p nil)
-
-(defvar paredit-mode-map {}
-  "Keymap for the paredit minor mode.")
-
-(defn check-parens "TODO LAP: implement it !" [text] true)
-(defn can-enable-paredit? [text] (check-parens text))
-
-(def
-  #^{ :doc "
-    The format for documenting the commands is simple, and a slight varation of
-    the original paredit.el format :
-    paredit-commands := [ group* ]
-    group := [ group-name-str command* ]
-    command := [ default-triggering-keys
-                 command-name-keyword
-                 { before-after-documentation-pair* }
-                 { before-after-non-regression-pair* }* ]
-    before-after-documentation-pair := before-after-non-regression-pair
-    before-after-non-regression-pair := before-text-spec after-text-spec
-    before-text-spec := after-text-spec := text-spec
-    text-spec := a string, with the caret position indicated by a pipe character |,
-                 and if there is a selected portion of the text, the end of the text
-                 selection is marked with another pipe character |"}
-  *paredit-commands*
-  [
-    ["Basic Insertion Commands"
-	    ["("         :paredit-open-round
-	                {"(a b |c d)"
-	                 "(a b (|) c d)"
-	                 "(foo \"bar |baz\" quux)"
-	                 "(foo \"bar (|baz\" quux)"}
-	                {"(a b|c d)" "(a b (|) c d)"
-	                 "(|)" "((|))"
-	                 "|" "(|)"
-	                 "a|" "a (|)"}]
-	    #_[")"         :paredit-close-round
-	                {"(a b |c   )" "(a b c)|"
-	                "; Hello,| world!"
-	                 "; Hello,)| world!"}]
-	    #_["M-)"       :paredit-close-round-and-newline
-	                {"(defun f (x|  ))"
-	                 "(defun f (x)\n  |)"
-	                "; (Foo.|"
-	                 "; (Foo.)|"}]
-    ]
-  ])
-
-(def *spaces* #{\newline \tab \space \,})
-(def *open-brackets* (conj (set "([{") nil)) ; we add nil to the list to also match beginning of text
-(def *close-brackets* (conj (set ")]}") nil)) ; we add nil to the list to also match end of text
-
-(defn text-spec-to-text
-  "Converts a text spec to text map"
-  [#^String text-spec]
-  (let [offset (.indexOf text-spec "|")
-        second-pipe (dec (.indexOf text-spec "|" (inc offset)))]
-  {:text (str2/replace text-spec "|" "")
-   :offset offset
-   :length (if (> second-pipe 0) (- second-pipe offset) 0)}))
-
-(defn text-to-text-spec
-  "Converts a text map to text spec"
-  [text]
-  (let [insert (fn [#^String s i c] (str (.substring s 0 i) c (.substring s i)))
-        spec (insert (:text text) (:offset text) "|")
-        spec (if (zero? (:length text)) spec (insert spec (+ 1 (:offset text) (:length text)) "|"))]
-    spec))
-
-(defn in-code?
-  "true if character at offset offset is in a code
-   position, e.g. not in a string, regexp or comment"
-  [s offset]
-  (not (#{\" \;} (-> (parse s offset) :parents peek :type))))
-
-(defn insert
-  "insert what at offset. offset shifted by what's length, selection length unchanged"
-  [{:keys [#^String text offset length] :as where} #^String what]
-  (assoc where
-    :text (str (.substring text 0 offset) what (.substring text offset))
-    :offset (+ offset (.length what))))
-
-(defn shift-offset
-  "shift offset, the selection is also shifted"
-  [{:keys [text offset length] :as where} shift]
-  (assoc where :offset (+ offset shift)))
-
-; TODO faire comme next-char sur l'utilisation de length
-; !! attention pas de gestion de length negative
-(defn previous-char [{:keys [#^String text offset length] :as t}]
-  (assert (>= length 0))
-  (when (> offset 0)
-    (.charAt text (dec offset))))
-
-(defn next-char [{:keys [#^String text offset length] :as t}]
-  (assert (>= length 0))
-  (when (< (+ offset length) (.length text))
-    (.charAt text (+ offset length))))
-
-(defmulti paredit (fn [k & args] k))
-
-(defmethod paredit
-  :paredit-open-round
-  [cmd {:keys [text offset length] :as t}]
-  (println "t:" t)
-  (if (in-code? text offset)
-    (let [add-pre-space? (not (contains? (into *spaces* *open-brackets*) (previous-char t)))
-          add-post-space? (not (contains? (into *spaces* *close-brackets*) (next-char t)))
-          ins-str (str (if add-pre-space? " " "")
-                       "()"
-                       (if add-post-space? " " ""))
-          offset-shift (if add-post-space? -2 -1)]
-      (prn "ins-str:" ins-str)
-      (-> t (insert ins-str) (shift-offset offset-shift)))
-    (-> t (insert "("))))
-
-(defn test-command [title-prefix command]
-  (testing (str title-prefix " " (second command) " (\"" (first command) "\")")
-    (doseq [[input expected] (get command 2)]
-      (is (= expected (text-to-text-spec (paredit (second command) (text-spec-to-text input))))))))
-
-(deftest paredit-tests
-  (doseq [group *paredit-commands*]
-		(testing (str (first group) ":")
-		  (doseq [command (rest group)]
-		    (test-command "public documentation of paredit command" command)
-		    (test-command "additional non regression tests of paredit command " (assoc command 2 (get command 3)))))))
-
-(def pts paredit-tests)
-
-(defvar *text* (atom {:text "" :offset 0 :length 0})
-  "defines a text, with :offset being the cursor position,
-   and :length being a possible selection (may be negative)")
-


replace jsonb with json (pg 9.3 compatibility)


Adds two clojure solutions

Adds two clojure solutions

error: pathspec 'problem1/m.clj' did not match any file(s) known to git


gehitu! txukundu

gehitu! txukundu

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'


Small perf tweaks

Small perf tweaks

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/thinktopic/netlib-ccm.git/'


Factor out build-llvm-ptr-index-load and build-llvm-port-buffer-var-map from gen-component-fn

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kkroening/jackal.git/'


[WM] use vec in order-significant test

[WM] use vec in order-significant test

Odd that this passed locally w/o this. It failed in CI.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/electorate-works.git/'


documenting code

documenting code

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tiagoantao/turtle.git/'


Use reply/launch

Use reply/launch

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

--- src/scripts/conexp-clj.clj
+++ src/scripts/conexp-clj.clj
@@ -25,7 +25,7 @@
     (contains? options :gui)
     (binding [conexp.contrib.gui.repl-utils/*main-frame*
               (conexp.contrib.gui/gui :default-close-operation :exit)]
-      (reply/launch-standalone
+      (reply/launch
        {:custom-eval '(do
                         (use 'conexp.main)
                         (use 'clojure.repl)
@@ -39,7 +39,7 @@
         (load-file (options :load)))
     ;;
     true
-    (do (reply/launch-standalone
+    (do (reply/launch
          {:custom-eval '(do (use 'conexp.main) (use 'clojure.repl))}))))

 (System/exit 0)


picture additions now more finely incremented than API fetches

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/talexand/kittens-gallery.git/'


initial draft for oatuh 2.0 client

initial draft for oatuh 2.0 client

error: pathspec 'src/org/zalando/stups/friboo/system/o2c.clj' did not match any file(s) known to git

--- src/org/zalando/stups/friboo/system/o2c.clj
+++ src/org/zalando/stups/friboo/system/o2c.clj
@@ -0,0 +1,57 @@
+(ns org.zalando.stups.friboo.system.o2c
+  (:require [com.stuartsierra.component :as component]
+            [clj-http.lite.client :as client]))
+
+(defprotocol Client
+  (get [this url [req]] "GET")
+  (post [this url [req]] "GET")
+  (put [this url [req]] "GET")
+  (delete [this url [req]] "GET"))
+
+(defn get-access-token
+  "Tries to get a new token with the given credentials for the given scopes and returns either the new token or the
+   old one."
+  [old-access-token access-token-url credentials scopes]
+  (let [application_username (clojure.core/get credentials "application_password")
+        application_password (clojure.core/get credentials "application_username")]
+    (if (or (empty? application_username) (empty? application_password))
+      old-access-token
+      (let [result (client/post access-token-url {:form-params      {"grant_type" "password"
+                                                                     "username"   application_username
+                                                                     "password"   application_password
+                                                                     "scope"      (apply str scopes)}
+                                                  :throw-exceptions false})]
+        ; TODO get new access token from result
+        old-access-token))))
+
+(defn add-token-header
+  "Adds the access token as a bearer token to the authorization header."
+  [request access-token]
+  (assoc-in request [:headers "Authorization"] (str "Bearer " access-token)))
+
+; configuration has to be given
+; credentials is the CredentialsUpdater dependency
+; access-token will be an atom containing the current access token
+(defrecord OAUth2Client [configuration credentials access-token]
+  component/Lifecycle
+
+  (start [this]
+    (let [{:keys [access-token-url scopes]} configuration
+          scopes (split-with #{","} scopes)
+          access-token (atom (get-access-token nil access-token-url @credentials scopes))]
+      ; TODO keep access token constantly up to date with a job every X seconds
+      (assoc this :access-token access-token)))
+
+  (stop [this]
+    (assoc this :access-token nil))
+
+  Client
+
+  (get [_ url [req]]
+    (client/get url (add-token-header req @access-token)))
+  (post [_ url [req]]
+    (client/post url (add-token-header req @access-token)))
+  (put [_ url [req]]
+    (client/put url (add-token-header req @access-token)))
+  (delete [_ url [req]]
+    (client/delete url (add-token-header req @access-token))))


Update prismatic schema coercion to support relations

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/brendanyounger/plinth.git/'


add ",copy" to default service code when copying a service

otherwise there's weirdness

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


trace functions

trace functions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/m1dnight/a-slack-and-irc-bot.git/'


Reducing default timeout values.

Reducing default timeout values.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-Digital/pdg-core.git/'


Added support for token operations.

Added support for token operations.

error: pathspec 'src/cmr/opendap/auth/token.clj' did not match any file(s) known to git

--- src/cmr/opendap/auth/token.clj
+++ src/cmr/opendap/auth/token.clj
@@ -0,0 +1,55 @@
+(ns cmr.opendap.auth.token
+  (:require
+   [clojure.data.xml :as xml]
+   [cmr.opendap.components.caching :as caching]
+   [cmr.opendap.const :as const]
+   [cmr.opendap.http.request :as request]
+   [cmr.opendap.http.response :as response]
+   [org.httpkit.client :as httpc]
+   [taoensso.timbre :as log]))
+
+(def token-info-resource "/legacy-services/rest/tokens/get_token_info")
+
+(defn token-data-key
+  [token]
+  (str "token-data:" token))
+
+(defn user-id-key
+  [token]
+  (str "user-id:" token))
+
+(defn extract
+  [request]
+  (request/get-header request "echo-token"))
+
+(defn parse-token-data
+  [xml-str]
+  (log/debug "Got token XML data:" xml-str)
+  (first
+    (remove nil?
+      (mapcat #(when (map? %)
+                (when (= :user_name (:tag %)) (:content %)))
+              (:content (xml/parse-str xml-str))))))
+
+(defn get-token-info
+  [base-url token]
+  (let [url (str base-url token-info-resource)
+        data (str "id=" token)]
+    (httpc/request (-> request/default-options
+                       (request/options :method :post :url url :body data)
+                       (request/add-token-header token)
+                       (request/add-form-ct)
+                       (request/add-client-id)
+                       ((fn [x] (log/trace "Prepared request:" x) x)))
+                   #(response/client-handler % parse-token-data))))
+
+(defn ->user
+  [base-url token]
+  @(get-token-info base-url token))
+
+(defn ->cached-user
+  [system base-url token]
+  (caching/lookup
+   system
+   (user-id-key token)
+   #(->user base-url token)))


turn off scraper background job

turn off scraper background job

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/vincentstorme/clojureme.git/'


New rspec file

New rspec file

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aarkerio/cmsclj.git/'


Created new utils namespace in filters to hold general filter helper functions.

error: pathspec 'src/funimage/filters/utils.clj' did not match any file(s) known to git

--- src/funimage/filters/utils.clj
+++ src/funimage/filters/utils.clj
@@ -0,0 +1,13 @@
+(ns funimage.filters.utils
+  (:use [brevis random]))
+
+(defn make-odd [n] (if (not (odd? n))
+                     (+ n 1)
+                     n))
+
+(defn random-negate
+  [num]
+  (let [negate? (lrand-int 2)]
+    (if (= negate? 0)
+      num
+      (unchecked-negate num))))


this guy dumps uris from the 2013 corpus

error: pathspec 'src/kba_2013_clj/dump_uris.clj' did not match any file(s) known to git

--- src/kba_2013_clj/dump_uris.clj
+++ src/kba_2013_clj/dump_uris.clj
@@ -0,0 +1,24 @@
+(ns kba-2013-clj.dump-uri
+  "Module to dump URIs which
+   will serve as starting points
+   for the Clueweb12++ crawl"
+  (:require [kba-2013-clj.core :as core]
+            [clojure.string :as string]
+            [clojure.java.io :as io]))
+
+(defn handle-file
+  [a-file]
+  (map :url (core/read-file a-file)))
+
+(defn -main
+  [files-list]
+  (let [files (string/split-lines
+               (slurp files-list))
+
+        out-file (str files-list "-abs-uris.txt")
+
+        out-file-handle (io/writer out-file :append true)]
+    (doseq [a-file files]
+      (doseq [uri (handle-file a-file)]
+        (binding [*out* out-file-handle]
+          (println uri))))))


[WM DG] fix resource-config call to lookup google-api-key

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


CMR-1983: Added migration for tags table

error: pathspec 'metadata-db-app/src/migrations/019_setup_tags_table.clj' did not match any file(s) known to git

--- metadata-db-app/src/migrations/019_setup_tags_table.clj
+++ metadata-db-app/src/migrations/019_setup_tags_table.clj
@@ -0,0 +1,59 @@
+(ns migrations.019-setup-tags-table
+  (:require [clojure.java.jdbc :as j]
+            [config.migrate-config :as config]
+            [config.mdb-migrate-helper :as h]))
+
+(def ^:private tags-column-sql
+  "id NUMBER,
+  concept_id VARCHAR(255) NOT NULL,
+  native_id VARCHAR(1030) NOT NULL,
+  metadata BLOB NOT NULL,
+  format VARCHAR(255) DEFAULT 'application/edn' NOT NULL,
+  revision_id INTEGER DEFAULT 1 NOT NULL,
+  revision_date TIMESTAMP WITH TIME ZONE DEFAULT SYSTIMESTAMP NOT NULL,
+  deleted INTEGER DEFAULT 0 NOT NULL,
+  delete_time TIMESTAMP WITH TIME ZONE,
+  namespace VARCHAR(1024) NOT NULL,
+  value VARCHAR(255) NOT NULL,
+  user_id VARCHAR(30)")
+
+(def ^:private tags-constraint-sql
+  (str "CONSTRAINT tags_pk PRIMARY KEY (id), "
+       ;; Unique constraint on native id and revision id
+       "CONSTRAINT tags_con_rev UNIQUE (native_id, revision_id)
+       USING INDEX (create unique index tags_ucr_i ON tags (native_id, revision_id)), "
+
+       ;; Unique constraint on concept id and revision id
+       "CONSTRAINT tags_cid_rev UNIQUE (concept_id, revision_id)
+       USING INDEX (create unique index tags_cri ON tags (concept_id, revision_id))"))
+
+(defn- create-tags-table
+  []
+  (h/sql (format "CREATE TABLE METADATA_DB.tags (%s, %s)" tags-column-sql tags-constraint-sql)))
+
+
+(defn- create-tags-indices
+  []
+  (h/sql "CREATE INDEX tags_crdi ON tags (concept_id, revision_id, deleted, delete_time)")
+  (h/sql "CREATE INDEX tags_nsval_i ON tags (namespace, value)"))
+
+(defn- create-tags-sequence
+  []
+  (h/sql "CREATE SEQUENCE tags_seq"))
+
+(defn up
+  "Migrates the database up to version 19."
+  []
+  (println "migrations.019-setup-tags-table up...")
+  (create-tags-table)
+  (create-tags-indices)
+  (create-tags-sequence))
+
+(defn down
+  "Migrates the database down from version 19."
+  []
+  (println "migrations.019-setup-tags-table down...")
+  (try
+    (h/sql "DROP SEQUENCE METADATA_DB.tags_seq")
+    (h/sql "DROP TABLE METADATA_DB.tags")
+    (catch Exception e)))


CMR_2297: Added migration to revert entry-id separator to _

error: pathspec 'metadata-db-app/src/migrations/027_revert_entry_ids.clj' did not match any file(s) known to git

--- metadata-db-app/src/migrations/027_revert_entry_ids.clj
+++ metadata-db-app/src/migrations/027_revert_entry_ids.clj
@@ -0,0 +1,19 @@
+(ns migrations.027-revert-entry-ids
+  (:require [clojure.java.jdbc :as j]
+            [config.migrate-config :as config]
+            [config.mdb-migrate-helper :as h]))
+
+(defn up
+  "Migrates the database up to version 27. Need to fix migration 26 changes to SIT and WL."
+  []
+  (println "migrations.027-revert-entry-ids up...")
+  (doseq [t (h/get-collection-tablenames)]
+    (println (str "Table: " t))
+    (h/sql (format "update %s set entry_id = short_name || '_' || version_id where version_id != 'Not provided'" t))))
+
+
+(defn down
+  "Migrates the database down from version 27."
+  []
+  (println "migrations.027-revert-entry-ids down...")
+  (throw (Exception. "This migration does not support 'down'")))


Adding proper query support

Adding proper query support

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/screen6/bigquery-clj.git/'


Add frame rendering implementation in postal.renderer namespace.

error: pathspec 'src/postal/renderer.cljc' did not match any file(s) known to git

--- src/postal/renderer.cljc
+++ src/postal/renderer.cljc
@@ -0,0 +1,18 @@
+(ns postal.renderer
+  "A frame rendering implementation."
+  (:require [cuerdas.core :as str]
+            [postal.parser :as parser]))
+
+(defn render
+  [frame]
+  (with-out-str
+    (print (str (str/upper (name (:command frame))) parser/*line-end*))
+
+    ;; the headers
+    (doseq [[key val] (:headers frame)]
+      (print (str (name key) ":" (str/trim val) parser/*line-end*)))
+
+    ;; the body
+    (print parser/*line-end*)
+    (print (str (:body frame)))))
+


Default PORT is "3000"

Default PORT is "3000"

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


sorta fixing the GET "/" listing page.  it's still not fully functional yet :/

--- src/metabase/api/query.clj
+++ src/metabase/api/query.clj
@@ -21,14 +21,14 @@
      :databases dbs}))

-;(defendpoint GET "/" [org f]
-;  ;; TODO - permissions check
-;  (let [filter-org (where {:database_id [in (subselect Database
-;                                     (fields :id)
-;                                     (where {:organization_id org}))]})
-;        filter-perms (where {:public_perms (> 0)}))]
-;    )
-;  (sel :many Query ))
+(defendpoint GET "/" [org f]
+  ;; TODO - permissions check
+  ;; TODO - filter by f == "mine"
+  ;; TODO - filter by creator == self OR public_perms > 0
+  (-> (sel :many Query
+        (where {:database_id [in (subselect Database (fields :id) (where {:organization_id org}))]})
+        (where {:public_perms [> common/perms-none]}))
+      (hydrate :creator :database)))

 (defn query-clone


(SERVER-885) Add integration test that exercises ShellUtils

Previously no tests exercised the command execution methods in
Puppet::Server::Execution. This commit adds a simple manifest that
executes a custom function that calls out to the system using the baked
in jruby and java execution layer.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/briancain/puppet-server.git/'


Cambiando colores

Cambiando colores

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/just-cloud/uxtweet-client.git/'


Added some transducer comparison logic

Added some transducer comparison logic

error: pathspec 'src/main/cljc/clojure_club/playground/brock_transducer.cljc' did not match any file(s) known to git

--- src/main/cljc/clojure_club/playground/brock_transducer.cljc
+++ src/main/cljc/clojure_club/playground/brock_transducer.cljc
@@ -0,0 +1,36 @@
+(ns clojure-club.playground.brock-transducer)
+
+(defmacro time-forms [coll & forms]
+  (->> `(->> ~coll ~@forms count time)
+       (repeat 10)
+       (into `((prn "finished threading")))
+       (concat (->> `(-> (comp ~@forms)
+                         (sequence ~coll)
+                         count
+                         time)
+                    (repeat 10)
+                    (into `((prn "finished seq transducing")))))
+       (concat (->> `(-> (into [] (comp ~@forms) ~coll)
+                         count
+                         time)
+                    (repeat 10)
+                    (into `((prn "finished into transducing")))))
+      (concat (->> `(-> (comp ~@forms)
+                        (transduce (fn ([] 0)([x# & r#](inc x#))) ~coll)
+                        time)
+                   (repeat 10)
+                   (into `((prn "finished eager transducing")))))
+       (concat (->> `(->> (eduction ~@forms ~coll)
+                          (into [])
+                          count
+                          time)
+                    (repeat 10)
+                    (into `((prn "finished eduction")))))
+       (cons `do)
+       seq))
+
+#_(time-forms (range 10000) (map inc))
+
+#_(time-forms (range 1000000) (map (partial * 2)) (map inc) (map (partial str "stuff-")))
+
+#_(time-forms (range 1000) (map (partial * 2)) (map inc) (mapcat range) (map (partial str "stuff-")))


Added missing file

Added missing file

error: pathspec 'src/layzee/adapters/twitter.clj' did not match any file(s) known to git

--- src/layzee/adapters/twitter.clj
+++ src/layzee/adapters/twitter.clj
@@ -0,0 +1,4 @@
+(ns layzee.adapters.twitter)
+
+(defn lazy-web[]
+  '({:url "http://abc/xyz"}))


Remove unused requires & imports from service-test

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/turbovote-http-api.git/'


Removed string nonsense from core.clj response method

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/OttoJursch/sched-system.git/'


repeatedly rand-int take

repeatedly rand-int take

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/carolove/clojure-ring-app.git/'


subst understand lat and cons

subst understand lat and cons


Config module

Config module

error: pathspec 'src/emender_service/config.clj' did not match any file(s) known to git

--- src/emender_service/config.clj
+++ src/emender_service/config.clj
@@ -0,0 +1,39 @@
+;
+;  (C) Copyright 2016  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns emeder-service.config)
+
+(require '[clojure.pprint :as pprint])
+
+(require '[clojure-ini.core :as clojure-ini])
+
+(defn parse-int
+    "Parse the given string as an integer number."
+    [string]
+    (java.lang.Integer/parseInt string))
+
+(defn parse-float
+    "Parse the given string as a float number."
+    [string]
+    (java.lang.Float/parseFloat string))
+
+(defn load-configuration
+    "Load configuration from the provided INI file."
+    [ini-file-name]
+    (-> (clojure-ini/read-ini ini-file-name :keywordize? true)
+    ))
+
+(defn print-configuration
+    "Print actual configuration to the output."
+    [configuration]
+    (pprint/pprint configuration))
+


remove Cards when a Database is deleted.  this now allows a Database to be deleted at any time without failing on an FK error from the database.

--- src/metabase/models/database.clj
+++ src/metabase/models/database.clj
@@ -31,6 +31,7 @@
         :tables (delay (sel :many 'metabase.models.table/Table :db_id id :active true (order :display_name :ASC))))))

   (pre-cascade-delete [_ {:keys [id] :as database}]
+    (cascade-delete 'metabase.models.card/Card :database_id id)
     (cascade-delete 'metabase.models.table/Table :db_id id)))

 (extend-ICanReadWrite DatabaseEntity :read :always, :write :superuser)


add a quick unit test on permissions of the send_invite endpoint.

--- test/metabase/api/user_test.clj
+++ test/metabase/api/user_test.clj
@@ -251,3 +251,9 @@
 ;; Check that a non-superuser CANNOT update someone else's password
 (expect "You don't have permissions to do that."
   ((user->client :rasta) :delete 403 (format "user/%d" (user->id :rasta)) {}))
+
+
+;; ## POST /api/user/:id/send_invite
+;; Check that non-superusers are denied access to resending invites
+(expect "You don't have permissions to do that."
+  ((user->client :rasta) :post 403 (format "user/%d/send_invite" (user->id :crowberto))))


Add initial version of graphviz generator for synth designs. Still needs to be taught how to handle control proxies correctly.

error: pathspec 'src/overtone/repl/graphviz.clj' did not match any file(s) known to git

--- src/overtone/repl/graphviz.clj
+++ src/overtone/repl/graphviz.clj
@@ -0,0 +1,91 @@
+(ns overtone.repl.graphviz
+  (:use [overtone.repl.debug :only [unify-synthdef]]
+        [overtone.sc.machinery.ugen.metadata.unaryopugen]
+        [overtone.sc.machinery.ugen.metadata.binaryopugen]
+        [overtone.helpers.system :only [mac-os?]]
+        [clojure.java.shell]))
+
+(defn- safe-name
+  [n]
+  (let [n (name n)]
+    (.replaceAll (.toLowerCase (str n)) "[-]" "____")))
+
+(defn- simple-ugen?
+  [ug]
+  (or
+   (some #{(:name ug)} (keys unnormalized-unaryopugen-docspecs))
+   (some #{(:name ug)} (keys unnormalized-binaryopugen-docspecs))))
+
+(defn- chop-last-char
+  [s]
+  (subs s 0 (dec (count s))))
+
+(defn- generate-node-info
+  [ugs]
+  (with-out-str
+    (doseq [ug ugs]
+      (if (= "control" (:name ug))
+        (println (str (:id ug) " [label = \"" "Control"  "\" shape=doubleoctagon ]; "))
+        (println (str (:id ug)
+                      (with-out-str
+                        (print " [label = \"{{ ")
+                        (print
+                         (chop-last-char
+                          (with-out-str
+                            (doseq [[in-name in-val] (reverse (:inputs ug))]
+                              (print (str "<"
+                                          (safe-name in-name)
+                                          "> "
+                                          (cond
+                                           (simple-ugen? ug) (if (number? in-val)
+                                                               in-val
+                                                               "")
+
+                                           (number? in-val) (str (name in-name) " " in-val)
+
+                                           :else (name in-name))
+                                          "|"))))))
+                        (print "} |"))
+                      (:name ug)
+
+                      " }\" style=" (cond
+                                     (= :ar (:rate ug)) "rounded"
+                                     :else "solid") " shape=record rankdir=LR];"))))))
+
+(defn- print-connection
+  [n input ug]
+  (cond
+   (vector? input)      (doseq [i input] (print-connection n i ug))
+   (associative? input) (println (str (:id input) " -> " (:id ug) ":" (safe-name n) " ;"))))
+
+(defn- generate-node-connections
+  [ugs]
+  (with-out-str
+    (doseq [ug ugs]
+      (doseq [[n input] (:inputs ug)]
+        (print-connection n input ug))))) ;
+
+(defn- generate-unified-synth-gv
+  [unified-synth]
+  (let [ugs (:ugens unified-synth)]
+    (str (generate-node-info ugs)
+         "\n"
+         (generate-node-connections ugs))))
+
+(defn graphviz
+  "Generate dot notation for synth design.
+   (see overtone.repl.deub/unify-synthdef)"
+  [s]
+  (str "digraph synthdef {\n"
+       (generate-unified-synth-gv (unify-synthdef s))
+       "\n}"))
+
+(defn show-graphviz-synth
+  "Generate pdf of synth design. On Mac OSX also opens pdf."
+  [s]
+  (let [f-name (str "/tmp/" (or (:name s) (gensym)) ".pdf") ]
+    (do
+      (sh "dot" "-Tpdf" "-o" f-name  :in (graphviz s))
+      (when (mac-os?)
+        (sh "open" f-name)))
+    (str "PDF generated in " f-name)))


Add own defc macro for more easy define components with less boilerplate.

error: pathspec 'src/uxbox/util/mixins.clj' did not match any file(s) known to git

--- src/uxbox/util/mixins.clj
+++ src/uxbox/util/mixins.clj
@@ -0,0 +1,40 @@
+;; This Source Code Form is subject to the terms of the Mozilla Public
+;; License, v. 2.0. If a copy of the MPL was not distributed with this
+;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;;
+;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
+
+(ns uxbox.util.mixins
+  (:require [rum.core :as rum]
+            [sablono.compiler :as s]))
+
+(defn- parse-defc
+  [args]
+  (loop [r {}
+         s 0
+         v (first args)
+         n (rest args)]
+    (case s
+      0 (if (symbol? v)
+          (recur (assoc r :name v) (inc s) (first n) (rest n))
+          (throw (ex-info "Invalid" {})))
+      1 (if (string? v)
+          (recur (assoc r :doc v) (inc s) (first n) (rest n))
+          (recur r (inc s) v n))
+      2 (if (map? v)
+          (if-let [mixins (:mixins v)]
+            (let [spec (dissoc v :mixins)
+                  mixins (if (empty? spec)
+                           mixins
+                           (conj mixins spec))]
+              (recur (assoc r :mixins mixins) (inc s) (first n) (rest n)))
+            (recur (assoc r :mixins [v]) (inc s) (first n) (rest n)))
+          (recur r (inc s) v n))
+      3 (let [sym (:name r)
+              func `(fn ~sym ~v ~(s/compile-html `(do ~@n)))]
+          [func (:doc r) (:mixins r) sym]))))
+
+(defmacro defc
+  [& args]
+  (let [[render doc mixins cname] (parse-defc args)]
+    `(def ~cname ~doc (rum/build-defc ~render ~mixins ~(str cname)))))


enable Java HashMap for zmq messaging

enable Java HashMap for zmq messaging

--- storm-core/src/clj/backtype/storm/messaging/zmq.clj
+++ storm-core/src/clj/backtype/storm/messaging/zmq.clj
@@ -59,11 +59,11 @@
                      ^{:unsynchronized-mutable true} local?]
   IContext
   (^void prepare [this ^Map storm-conf]
-    (let [num-threads (storm-conf ZMQ-THREADS)]
+    (let [num-threads (.get storm-conf ZMQ-THREADS)]
       (set! context (mq/context num-threads))
-      (set! linger-ms (storm-conf ZMQ-LINGER-MILLIS))
-      (set! hwm (storm-conf ZMQ-HWM))
-      (set! local? (= (storm-conf STORM-CLUSTER-MODE) "local"))))
+      (set! linger-ms (.get storm-conf ZMQ-LINGER-MILLIS))
+      (set! hwm (.get storm-conf ZMQ-HWM))
+      (set! local? (= (.get storm-conf STORM-CLUSTER-MODE) "local"))))
   (^IConnection bind [this ^String storm-id ^int port]
     (require 'backtype.storm.messaging.zmq)
     (-> context


Add smoke tests for core entrypoint functionss

error: pathspec 'test/clj_gatling/core_test.clj' did not match any file(s) known to git

--- test/clj_gatling/core_test.clj
+++ test/clj_gatling/core_test.clj
@@ -0,0 +1,31 @@
+(ns clj-gatling.core-test
+  (:require [clojure.test :refer :all]
+            [clj-gatling.test-helpers :refer :all]
+            [clj-containment-matchers.clojure-test :refer :all]
+            [clj-gatling.core :refer [run run-simulation]]
+            [clj-async-test.core :refer :all]
+            [clojure.core.async :refer [go <! <!! timeout]]
+            [clj-time.core :as time]))
+
+(use-fixtures :once setup-error-file-path)
+
+(def legacy-scenario
+  {:name "Test scenario"
+   :context {}
+   :requests [{:name "Request1" :fn successful-request}
+              {:name "Request2" :fn failing-request}]})
+
+(def simulation
+  {:name "Test simulation"
+   :scenarios [{:name "Test scenario"
+                :steps [(step "Step1" true)
+                        (step "Step2" false)]}]})
+
+(deftest legacy-simulation-returns-summary
+  (let [summary (run-simulation [legacy-scenario] 1 {})]
+    (is (= {:ok 1 :ko 1} summary))))
+
+(deftest simulation-returns-summary
+  (let [summary (run simulation {:concurrency 1})]
+    (is (= {:ok 1 :ko 1} summary))))
+


Added all keys to keys test.

Added all keys to keys test.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/inchingforward/eon.git/'


Fix double-compensation for cram duration

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jtbeckha/alda.git/'


(TK-171) Use pmap when calling status functions

pmap will be faster so long as more than one service is registered and at
least one of the `status-fn`s is somewhat computationally intensive. When this
is not the case, it is not vastly slower than `map` or `mapvals`. Thus, `pmap`
provides a significant performance improvement in the slow cases, and in
comparison is negligibly less performant when `status-fn` is fast.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nathanielksmith/trapperkeeper-status.git/'


bump version to 3.5.5

bump version to 3.5.5

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-Digital/pdg-core.git/'


Adding min-lein-version to project

Adding min-lein-version to project

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/micbie/evemm.git/'


Kehaar 0.7.0 with bounded thread pools

Kehaar 0.7.0 with bounded thread pools

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-authority-works.git/'


Kasu batzuetan badago? lortu-erabiltzailea ordez

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'


Tests for token auth

Tests for token auth

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Further clean up imports.

Further clean up imports.

--- src/clj/freefrog/rest.clj
+++ src/clj/freefrog/rest.clj
@@ -21,17 +21,12 @@
   (:require [liberator.core :refer [resource defresource]]
             [liberator.representation :refer [ring-response]]
             [liberator.dev]
-            [ring.middleware.params :refer [wrap-params]]
             [freefrog.governance :as g]
             [freefrog.governance-logs :as gl]
             [freefrog.persistence :as p]
-            [clojure.walk :refer [keywordize-keys]]
-            [clojure.string :refer [split]]
             [clj-json.core :as json]
-            [clojure.java.io :as io]
             [compojure.route :as route]
             [compojure.core :refer [defroutes ANY GET]])
-  (:use [ring.util.codec :only [url-encode url-decode]])
   (:import java.net.URL
            [javax.persistence EntityNotFoundException]))


add insertL

add insertL


str should only work for atoms - control flow seems to depend on this exception to be raised?

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


cleaning

cleaning

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/narkisr/cloujsearch.git/'


kata5: Add some dependencies to the lein project

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/schaueho/clojure-codekata.git/'


Starts on #138

Starts on #138

error: pathspec 'src/onyx/static/default_vals.clj' did not match any file(s) known to git

--- src/onyx/static/default_vals.clj
+++ src/onyx/static/default_vals.clj
@@ -0,0 +1,13 @@
+(ns onyx.static.default-vals)
+
+(def defaults
+  {:onyx/replay-interval 1000
+   :onyx/pending-timeout 60000
+   :onyx/batch-timeout 1000
+   :onyx/max-pending 10000
+
+   :onyx.peer/inbox-capacity 1000
+   :onyx.peer/outbox-capacity 1000
+   :onyx.peer/drained-back-off 400
+   :onyx.peer/sequential-back-off 2000
+   :onyx.peer/job-not-ready-back-off 500})


fixed scaling

fixed scaling

--- src/gif_to_html/convert.clj
+++ src/gif_to_html/convert.clj
@@ -31,8 +31,8 @@
       (.append sb "\n"))
     (.toString sb)))

-(defn scale [x y]
-  [100 (int (* (/ 100 x) y))])
+(defn scale [a b]
+  (int (* (/ 100 a) b)))

 (defn gif->html [input]
   (let [rdr  (.next (ImageIO/getImageReadersByFormatName "gif"))
@@ -41,7 +41,7 @@
     (let [frame-count (.getNumImages rdr true)
           w           (.getWidth rdr 0)
           h           (.getHeight rdr 0)
-          [w h]       (if (> w h) (scale w h) (scale h w))]
+          [w h]       (if (> w h) [100 (scale w h)] [(scale h w) 100])]
       {:data
        (html5
          [:div.animation


Begin work on an API server

Begin work on an API server

error: pathspec 'src/circle/api/server.clj' did not match any file(s) known to git

--- src/circle/api/server.clj
+++ src/circle/api/server.clj
@@ -0,0 +1,24 @@
+(ns circle.api.server
+  (:use noir.core)
+  (:require [noir.server :as server])
+  (:use [clojure.tools.logging :only (infof)])
+  (:use [circle.util.core :only (defn-once)]))
+
+(defn logging [handler]
+  (fn [request]
+    (infof "request: %s" request)
+    (let [resp (handler request)]
+      (infof "resp: %s" resp)
+      resp)))
+
+(defn-once init
+  (server/add-middleware (var logging))
+  (def server (server/start 8080)))
+
+(defn stop []
+  (server/stop server))
+
+(defpage "/api/v1/hello" []
+  "Welcome to Noir!")
+
+


use boot-jar2bin to create executables

use boot-jar2bin to create executables


Used updated instaparse that works with Clojure 1.7.0

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/brendanyounger/plinth.git/'


Rough outline of reader

Rough outline of reader

error: pathspec 'src/cljs/cljs/reader.cljs' did not match any file(s) known to git

--- src/cljs/cljs/reader.cljs
+++ src/cljs/cljs/reader.cljs
@@ -0,0 +1,80 @@
+;   Copyright (c) Rich Hickey. 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.
+
+(ns cljs.reader
+  (:require [goog.string :as gstring
+             goog.string.StringBuffer :as gstringbuf]))
+
+(defn- whitespace?
+  "Checks whether the character at the index is Clojurescript whitespace"
+  [s idx]
+  (let [ch (.charAt s idx)]
+    (or (gstring/isBreakingWhitespace ch) (= \, ch))))
+
+(defn- comment?
+  "Checks whether the character at the index begins a comment"
+  [s idx]
+  (= \; (.charAt s idx)))
+
+(defn- number-literal?
+  "Checks whether a character at the index is the first digit of a number"
+  [s idx]
+  (let [ch (.charAt s idx)]
+    (or (gstring/isNumeric ch)
+        (and (or (= \+ ch) (= \- ch))
+             (gstring/isNumeric (.charAt s (inc idx)))))))
+
+(defn- string-literal?
+  "Checks whether the character at the index is the first character of a string literal"
+  [s idx])
+
+(defn- vector-literal?
+  "Checks whether the character at the index is the first character of a vector literal"
+  [s idx])
+
+(defn- map-literal?
+  "Checks whether the character at the index is the first character of a map literal"
+  [s idx])
+
+(declare read)
+
+(defn read-number
+  [s idx])
+
+(defn read-string
+  [s idx])
+
+(defn read-vector
+  [s idx])
+
+(defn read-map
+  [s idx])
+
+(defn read-symbol
+  [s idx])
+
+(defn read-first
+  "Reads the first object from a string, starting at the specified index.
+Returns a tuple of the object read and the last index read.
+Returns nil of the string did not contain any forms."
+  [s idx]
+  (if (< idx (.length s))
+    (cond
+     (whitespace? s idx) (recur s (inc idx))
+     (number-literal? s idx) (read-number s idx)
+     (string-literal? s idx) (read-string s idx)
+     (vector-literal? s idx) (read-vector s idx)
+     (map-literal? s idx) (read-map s idx)
+     :default (read-symbol s idx))))
+
+(defn read
+  "Reads a lazy sequence of objects from a string, starting at the specified index.
+Reads to the end of the string."
+  [s idx]
+  (let [obj (read-first s idx)]
+    (lazy-seq (cons (first obj) (read s (second obj))))))


Formatting

Formatting

--- src/kixi/datastore/cloudwatch.clj
+++ src/kixi/datastore/cloudwatch.clj
@@ -49,7 +49,7 @@
   [table-name {:keys [read-provision write-provision
                       threshold-percentage alarm-period]
                :or {threshold-percentage default-threshold-percentage
-                    alarm-period default-alarm-period}:as opts}]
+                    alarm-period default-alarm-period} :as opts}]
   (let [read-threshold (int (Math/ceil (* threshold-percentage alarm-period read-provision)))
         write-threshold (int (Math/ceil (* threshold-percentage alarm-period write-provision)))]
     (read-dynamo-alarm (assoc opts


Fixing deploy

Fixing deploy

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/iot-paas-home/telegram-iot-gateway.git/'


look cards for repositioning using their dashcard id.  fixes #899

--- src/metabase/api/dash.clj
+++ src/metabase/api/dash.clj
@@ -88,8 +88,9 @@
               :col} ...]}"
   [id :as {{:keys [cards]} :body}]
   (write-check Dashboard id)
-  (doseq [{:keys [card_id sizeX sizeY row col]} cards]
-    (let [{dashcard-id :id} (sel :one [DashboardCard :id] :card_id card_id :dashboard_id id)]
+  (doseq [{dashcard-id :id :keys [sizeX sizeY row col]} cards]
+    ;; we lookup the dashcard purely to ensure the card is part of the given dashboard
+    (let [_ (sel :one [DashboardCard :id] :id dashcard-id :dashboard_id id)]
       (upd DashboardCard dashcard-id :sizeX sizeX :sizeY sizeY :row row :col col)))
   (push-revision :entity Dashboard, :object (Dashboard id))
   {:status :ok})


output <text> element during JSON => XML conversion

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fhirbase/fhirplace.git/'


Make name and humi optional

Make name and humi optional

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/MitchellJThomas/medir.git/'


.html suffix is not required, files without suffix are assumed to be html files. Also fixed bug in index.html handling.

--- src/ruuvi_server/core.clj
+++ src/ruuvi_server/core.clj
@@ -1,17 +1,12 @@
 (ns ruuvi-server.core
   (:require [ruuvi-server.api :as api])
   (:use ruuvi-server.common)
-  (:use ruuvi-server.database)
-  (:require [ruuvi-server.models.entities :as db])
   (:use compojure.core)
   (:require [compojure.route :as route]
             [compojure.handler :as handler])
   (:use ring.adapter.jetty)
   (:use ring.middleware.reload)
   (:use ring.middleware.stacktrace)
-  (:use ring.middleware.json-params)
-  (:use ring.middleware.params)
-  (:use ring.middleware.session)
   (:use [clojure.tools.logging :only (debug info warn error)])
   )

@@ -23,18 +18,30 @@
        "
"
        ))

+(defn- wrap-add-html-suffix
+  "Adds .html URI:s without dots and without / ending"
+  [handler]
+  (fn [req]
+    (handler
+     (update-in req [:uri]
+                #(if (and (not (.endsWith % "/")) (< (.indexOf % ".") 0))
+                   (str % ".html")
+                   %)))))
+
 (defn- wrap-dir-index
   "Convert paths ending in / to /index.html"
   [handler]
   (fn [req]
     (handler
      (update-in req [:uri]
-                #(if (.endsWith "/" %) "/index.html" %)))))
+                #(if (.endsWith % "/" )
+                   (str % "index.html")
+                   %)))))

 (defroutes main-routes
   (GET "/api" [] api-doc-response)
   (context "/api" [] api/api-routes)
-  (wrap-dir-index (route/resources "/"))
+  (wrap-dir-index (wrap-add-html-suffix (route/resources "/")))
   (route/not-found "
not found
")
   )


bump deps

bump deps

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/bsima/aristotl.git/'


add app test

add app test

error: pathspec 'test/src/dda/pallet/dda_managed_vm/app_test.clj' did not match any file(s) known to git

--- test/src/dda/pallet/dda_managed_vm/app_test.clj
+++ test/src/dda/pallet/dda_managed_vm/app_test.clj
@@ -0,0 +1,25 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+(ns dda.pallet.dda-managed-vm.app-test
+  (:require
+    [clojure.test :refer :all]
+    [schema.core :as s]
+    [dda.pallet.dda-managed-vm.app :as sut]))
+
+(deftest plan-def
+  (testing
+    "test plan-def"
+      (is (map? sut/with-dda-vm))))


Gogokoena saioa hasitakoan bakarrik erakutsi

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.bez.git/'


solution for "Opposite number" Kata

solution for "Opposite number" Kata

error: pathspec 'clojure/8' did not match any file(s) known to git
error: pathspec 'kyu/opposite-number.clj' did not match any file(s) known to git


adding-solace, testing "that it notifies persistence"

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ben-biddington/solace.git/'


Added more test cases

Added more test cases

error: pathspec 'test/clinvar_submitter/form_test.clj' did not match any file(s) known to git

--- test/clinvar_submitter/form_test.clj
+++ test/clinvar_submitter/form_test.clj
@@ -0,0 +1,53 @@
+(ns clinvar-submitter.form-test
+  (:require [clojure.test :refer :all]
+            [clinvar-submitter.core :refer :all]
+            [clinvar-submitter.ld :as ld]
+            [clinvar-submitter.form :as form]))
+
+(def interp-path "data/dmwg2.json")
+(def context-path "data/cg-interpretation.jsonld")
+(def t (ld/generate-symbol-table interp-path context-path))
+(def m (vals t))
+(def interps ((ld/prop= t "VariantInterpretation" "type") m))
+(def i (first interps))
+(def variant (form/get-variant t i))
+(def expectedvalue (construct-variant t i))
+(def id "4fc46e87-fad0-4fe7-8776-95cf901243aa")
+(def significance "Pathogenic")
+(def eval-date "2017-01-24")
+(def c (ld/ld-> t i "condition"))
+(def name "")
+(def idtype "DOID")
+(def idvalue "11984")
+(def moi "Autosomal Dominant")
+(def e (ld/ld-> t i "evidence"  (ld/prop= t "met" "information" "outcome" "code")))
+(def summary "The following criteria were met: PM2, PP3, PP2, PP1, PS4")
+(def rules ["PM2" "PP3" "PP2" "PP1" "PS4"])
+(def pmid-citations "PMID:15358028, PMID:15858117, PMID:21511876, PMID:23396983, PMID:24510615")
+
+
+(deftest test-get-interpretation
+ (testing "Test interpretation id"
+   (is (= id (form/interp-id i)))
+   (is (= significance (form/interp-significance t i)))
+   (is (= eval-date (form/interp-eval-date t i)))
+   (print :id id "\n":significance significance "\n":eval-date eval-date"\n")))
+
+(deftest test-get-condition
+  (testing "If conditions are retrieved correctly"
+  (is (= name (form/condition-name t c)))
+  (is (= idtype (form/condition-idtype t c)))
+  (is (= idvalue (form/condition-idvals t c)))
+  (is (= moi (form/condition-moi t c)))
+  (print :name "" "\n":idtype idtype "\n":idvalue idvalue"\n":moi moi"\n")
+  (print "---------------------------------------------------------\n")))
+
+(deftest test-get-met-evidence
+  (testing "if evidence met"
+  (is (= summary (form/evidence-summary t e)))
+  (is (= rules (form/evidence-rules t e)))
+  (is (= pmid-citations (form/evidence-pmid-citations t e)))
+  (print :summary summary "\n":rules rules "\n":pmid-citations pmid-citations"\n")
+  (print "---------------------------------------------------------\n")))
+
+(run-tests)


[up] Fix events api.

[up] Fix events api.

error: pathspec 'src/ombs/handler/api.clj' did not match any file(s) known to git

--- src/ombs/handler/api.clj
+++ src/ombs/handler/api.clj
@@ -0,0 +1,24 @@
+(ns ombs.handler.api
+  (:require
+    [clojure.string :as s]
+    [ombs.db.old :as db]
+    [ombs.db.payment :as dbp]
+    [cheshire.core :as json]
+    [ombs.funcs :refer [with-log]]
+    ))
+
+(defn help []
+  (json/generate-string
+    {
+     :help "Print this help"
+     :get-events "Gets json array of events types(in-progress, finished,
+                 initial).  Return events with type in given types."
+     }))
+
+(defn get-events
+  "Gets json array of events types(in-progress, finished, initial).  Return
+  events with type in given types."
+  [types]
+  (if-let [parsed (json/parse-string types true)]
+    (db/get-events (mapv keyword parsed)))
+  (db/get-events))


add basic tests for JOIN, TOPIC, and NAMES

error: pathspec 'test/subrosa/test/rooms.clj' did not match any file(s) known to git

--- test/subrosa/test/rooms.clj
+++ test/subrosa/test/rooms.clj
@@ -0,0 +1,46 @@
+(ns subrosa.test.rooms
+  (:use [clojure.test]
+        [clojure.string :only [join]]
+        [subrosa.test.expect :only [connect transmit with-connection]]
+        [subrosa.test.utils :only [run-test-server setup-bindings]]))
+
+(use-fixtures :each setup-bindings run-test-server)
+
+(deftest basic-join
+  (with-connection s
+    (transmit s "NICK dan")
+    (transmit s "USER dan 0 * :Dan Larkin")
+    (transmit s "JOIN")
+    (is (received? s #"Not enough parameters"))
+    (transmit s "JOIN foo bar baz")
+    (is (received? s #"Too many parameters"))
+    (transmit s "JOIN #foo")
+    (is (received? s #"JOIN #foo"))
+    (is (received? s #"No topic is set"))
+    (is (received? s #"353 dan = #foo :dan"))
+    (is (received? s #"End of NAMES list"))))
+
+(deftest topic-command
+  (with-connection s
+    (transmit s "NICK dan")
+    (transmit s "USER dan 0 * :Dan Larkin")
+    (transmit s "TOPIC")
+    (is (received? s #":Not enough parameters"))
+    (transmit s "TOPIC #notachannel")
+    (is (received? s #":No such channel"))
+    (transmit s "JOIN #foo")
+    (transmit s "TOPIC #foo")
+    (is (received? s #"331 dan #foo :No topic is set"))))
+
+(deftest names-command
+  (with-connection s
+    (transmit s "NICK dan")
+    (transmit s "USER dan 0 * :Dan Larkin")
+    (transmit s "NAMES")
+    (is (received? s #"End of NAMES list"))
+    (transmit s "NAMES #foo")
+    (is (received? s #"End of NAMES list"))
+    (transmit s "JOIN #foo")
+    (transmit s "NAMES #foo")
+    (is (received? s #"353 dan = #foo :dan"))
+    (is (received? s #"End of NAMES list"))))


add test for {:follow-redirects false} in requests

--- test/clj_http/client_test.clj
+++ test/clj_http/client_test.clj
@@ -62,6 +62,12 @@
     (is (= 200 (:status resp)))
     (is (= "ok" (:body resp)))))

+(deftest pass-on-follow-redirects-false
+  (let [client (fn [req] {:status 302 :body (:body req)})
+        r-client (client/wrap-redirects client)
+        resp (r-client {:body "ok" :follow-redirects false})]
+    (is (= 302 (:status resp)))
+    (is (= "ok" (:body resp)))))

 (deftest throw-on-exceptional
   (let [client (fn [req] {:status 500})


update lein profiles.clj

update lein profiles.clj

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pervezfunctor/lean-dotfiles.git/'


:bug: Fix reading of default config.edn

:bug: Fix reading of default config.edn

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/maoo/bot-unfurl.git/'