Fix clj-aws-s3 deps

Fix clj-aws-s3 deps

--- project.clj
+++ project.clj
@@ -13,7 +13,7 @@
                  [environ "1.1.0"]
                  [ring "1.5.0"]
                  [clj-bugsnag "0.2.9"]
-                 [clj-aws-s3 "0.3.10" :exclusions [joda-time com.fasterxml.jackson.core/jackson-core com.fasterxml.jackson.core/jackson-annotations]]
+                 [clj-aws-s3 "0.3.10" :exclusions [joda-time]]
                  [pandect "0.6.1"]
                  [com.taoensso/carmine "2.15.1"]
                  [org.slf4j/slf4j-nop "1.7.21"]


updates server deps

updates server deps

--- project.clj
+++ project.clj
@@ -4,13 +4,13 @@
   ; use lein deps :tree to check dependency problems and actual versions used
   :dependencies [[org.clojure/clojure "1.10.3"]
                  [ring "1.9.3" :exclusions [org.eclipse.jetty/jetty-server]]
-                 [org.eclipse.jetty/jetty-server "9.4.42.v20210604"]
+                 [org.eclipse.jetty/jetty-server "9.4.43.v20210629"]
                  [compojure "1.6.2" :exclusions [ring/ring-codec]]
                  [environ "1.2.0"]
-                 [cheshire "5.10.0"]
+                 [cheshire "5.10.1"]
                  [clj-cctray "2.0.0"]
                  ; commons-codec is excluded as ring pulls in a newer version
-                 [clj-http "3.12.2" :exclusions [commons-codec]]
+                 [clj-http "3.12.3" :exclusions [commons-codec]]
                  [ring-curl "1.0.1"]
                  [ring/ring-json "0.5.1"]
                  [ring/ring-defaults "0.3.3"]
@@ -37,7 +37,7 @@
             "check-updates" ["ancient" ":all"]
             "audit"         ["nvd" "check"]}
   :profiles {:dev  {:plugins [[lein-ancient "0.7.0"]
-                              [jonase/eastwood "0.5.2"]
+                              [jonase/eastwood "0.8.1"]
                               [lein-cloverage "1.2.2"]
                               [lein-nvd "1.5.0"]
                               [lein-eftest "0.5.9"]]}


Add cljfmt plugin

Add cljfmt plugin

--- project.clj
+++ project.clj
@@ -5,6 +5,7 @@
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.8.0"]
                  [org.onyxplatform/onyx "0.8.2"]]
+  :plugins [[lein-cljfmt "0.3.0"]]
   :profiles {:uberjar {:aot [desdemona.launcher.aeron-media-driver
                              desdemona.launcher.launch-prod-peers]}
              :dev {:dependencies [[org.clojure/tools.namespace "0.2.11"]]


(MAINT) Add nexus URLs to project.clj

(MAINT) Add nexus URLs to project.clj

Add nexus URLs to project.clj so that dujour-version-check will
release to nexus.

--- project.clj
+++ project.clj
@@ -1,6 +1,13 @@
 (def ks-version "1.0.0")
 (def tk-version "1.0.0")
 (def tk-jetty-version "1.0.0")
+
+(defn deploy-info
+  [url]
+  {:url           url
+   :username      :env/nexus_jenkins_username
+   :password      :env/nexus_jenkins_password
+   :sign-releases false})

 (defproject puppetlabs/dujour-version-check "0.1.0-SNAPSHOT"
   :description "Dujour Version Check library"
@@ -14,6 +21,12 @@
                  [trptcolin/versioneer "0.1.0"]
                  [slingshot "0.10.3"]]

+  :repositories [["releases" "http://nexus.delivery.puppetlabs.net/content/repositories/releases/"]
+                 ["snapshots" "http://nexus.delivery.puppetlabs.net/content/repositories/snapshots/"]]
+
+  :deploy-repositories [["releases" ~(deploy-info "http://nexus.delivery.puppetlabs.net/content/repositories/releases/")]
+                        ["snapshots" ~(deploy-info "http://nexus.delivery.puppetlabs.net/content/repositories/snapshots/")]]
+
   :profiles {:dev {:dependencies [[puppetlabs/trapperkeeper ~tk-version :classifier "test" :scope "test"]
                                   [puppetlabs/kitchensink ~ks-version :classifier "test" :scope "test"]
                                   [puppetlabs/trapperkeeper-webserver-jetty9 ~tk-jetty-version]


Use zaffre 0.4.0-b4

Use zaffre 0.4.0-b4

--- project.clj
+++ project.clj
@@ -11,7 +11,7 @@
                  [lein-jlink "0.2.0"]
                  [lein-binplus "0.6.4"]
                  [lein-launch4j "0.1.2"]]
-  :dependencies [[org.clojure/clojure "1.9.0"]
+  :dependencies [[org.clojure/clojure "1.10.0"]
                  [org.clojure/core.async "0.4.474"]
                  [org.clojure/core.cache "0.7.1"]
                  [org.clojure/core.match "0.3.0-alpha4"]
@@ -34,7 +34,7 @@
                  [rockpick "0.1.0"]
                  [aaron-santos/tinter "0.1.1"]
                  [aaron-santos/clj-tiny-astar "0.1.1-SNAPSHOT"]
-                 [zaffre "0.4.0-b1"]
+                 [zaffre "0.4.0-b4"]
                  [alandipert/enduro "1.2.0"]
                  [dorothy "0.0.7"]
                  [com.taoensso/nippy "2.14.0"]


Update AHC to latest version.

Update AHC to latest version.

--- project.clj
+++ project.clj
@@ -5,7 +5,7 @@
   :source-paths ["src/clj"]
   :java-source-paths ["src/jvm"]
   :dependencies     [[org.clojure/clojure "1.4.0"]
-		     [com.ning/async-http-client "1.7.5"]]
+		     [com.ning/async-http-client "1.7.10"]]
   :min-lein-version "2.0.0"
   :plugins [[codox "0.6.1"]
             [lein-difftest "1.3.3"


bumped up version

bumped up version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject reagent/lein-template "0.3.5"
+(defproject reagent/lein-template "0.3.6"
   :description "A Leiningen template for a ClojureScript setup with Figwheel, Austin, and Reagent."
   :url "https://github.com/reagent-project/reagent-template"
   :license {:name "MIT License"


Update version

Update version

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject lein-postgres "0.1.6-SNAPSHOT"
+(defproject lein-postgres "0.1.6"
   :description "Lein plugin wrapping the open table java embedded postgres component"
   :url "http://github.com/whostolebenfrog/lein-postgres"
   :license {:name "Eclipse Public License"


Update dependencies, prepare for release.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject afterglow "0.2.2"
+(defproject afterglow "0.2.3"
   :description "A live-coding environment for light shows, built on the Open Lighting Architecture, using bits of Overtone."
   :url "https://github.com/brunchboy/afterglow"
   :license {:name "Eclipse Public License"
@@ -37,7 +37,7 @@
                  [markdown-clj "0.9.89"]
                  [compojure "1.5.0" :exclusions [org.eclipse.jetty/jetty-server
                                                  clj-time]]
-                 [ring/ring-defaults "0.2.0"]
+                 [ring/ring-defaults "0.2.1"]
                  [ring/ring-session-timeout "0.1.0"]
                  [ring-middleware-format "0.7.0" :exclusions [ring/ring-jetty-adapter
                                                               org.clojure/tools.reader
@@ -62,7 +62,7 @@
   ;; :env {:repl-port 16002}

   :profiles {:dev {:dependencies [[ring-mock "0.1.5"]
-                                  [ring/ring-devel "1.4.0"]]
+                                  [ring/ring-devel "1.5.0"]]
                    :repl-options {:init-ns afterglow.examples
                                   :welcome (println "afterglow loaded.")}
                    :jvm-opts ["-XX:-OmitStackTraceInFastThrow" "-Dapple.awt.UIElement=true"]


lein-ancient update.

lein-ancient update.

--- project.clj
+++ project.clj
@@ -13,7 +13,7 @@
   :profiles
   {:dev
    {:resource-paths ["test-resources"]
-    :dependencies [[lein-ancient "0.6.0"]
+    :dependencies [[lein-ancient "0.6.1"]
                    [lein-bikeshed "0.2.0"]
                    [lein-kibit "0.0.8"]]
     :aliases {"check-update" ^{:doc "Check for upgrades to dependencies and plugins."}


Version 0.0.1

Version 0.0.1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject pe-apptxn-restsupport "0.0.1-SNAPSHOT"
+(defproject pe-apptxn-restsupport "0.0.1"
   :description "A Clojure library encapsulating the REST API of the PEAppTransaction Logging Framework."
   :url "https://github.com/evanspa/pe-apptxn-restsupport"
   :license {:name "MIT"


Add ring 1.2.0 dependency to get middlewares.

--- project.clj
+++ project.clj
@@ -3,8 +3,9 @@
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[speclj "2.1.2"]
-                 [org.clojure/clojure "1.5.1"]
+  :dependencies [[org.clojure/clojure "1.5.1"]
+                 [speclj "2.1.2"]
+                 [ring "1.2.0"]
                  [hiccup "1.0.2"]
                  [compojure "1.1.5"]
                  [http-kit "2.1.1"]


Version 1.0.0

Version 1.0.0

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject aws-lambda-serverless/lein-template "1.0.0-SNAPSHOT"
+(defproject aws-lambda-serverless/lein-template "1.0.0"
   :description "Leiningen template for generating AWS Lambdas"
   :url "https://github.com/jsyrjala/aws-lambda-serverless"
   :scm {:name "git"


quicker compiles for testing

quicker compiles for testing

--- project.clj
+++ project.clj
@@ -39,7 +39,7 @@
                :test {:source-paths ["src/cljs" "test/cljs"]
                       :notify-command ["phantomjs" :cljs.test/runner "target/test.js"]
                       :compiler {:output-to     "target/test.js"
-                                 :optimizations :simple
+                                 :optimizations :whitespace
                                  :pretty-print true}}}}

   :profiles {:dev {:repl-options {:init-ns fatlip.server


fixes uberjar build

fixes uberjar build

--- project.clj
+++ project.clj
@@ -68,7 +68,7 @@
                                              :compiler {:main doctopus.main
                                                         :source-map "resources/public/assets/scripts/main.js.map"
                                                         :output-to "resources/public/assets/scripts/main.js"
-                                                        :asset-path "/assets/scripts"
+                                                        :asset-path "/assets/scripts/main"
                                                         :optimizations :advanced
                                                         :pretty-print false}}
                                             {:id "prod-omni"
@@ -77,7 +77,7 @@
                                              :compiler {:main doctopus.omni
                                                         :source-map "resources/public/assets/scripts/omni.js.map"
                                                         :output-to "resources/public/assets/scripts/omni.js"
-                                                        :asset-path "/assets/scripts"
+                                                        :asset-path "/assets/scripts/omni"
                                                         :optimizations :advanced
                                                         :pretty-print false}}]}}
              :figwheel {:cljsbuild {:builds [{:id "dev"


Version 0.2.12-SNAPSHOT

Version 0.2.12-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sbsk "0.2.11"
+(defproject sbsk "0.2.12-SNAPSHOT"
   :description "FIXME: write description"
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"


Version 0.3.21

Version 0.3.21

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject re-frame/lein-template "0.3.21-SNAPSHOT"
+(defproject re-frame/lein-template "0.3.21"
   :description "Leiningen template for a Reagent web app that implements the re-frame pattern."
   :url "https://github.com/Day8/re-frame-template"
   :license {:name "MIT"}


Bump to latest orchestra version

Bump to latest orchestra version

--- project.clj
+++ project.clj
@@ -86,7 +86,7 @@
                                                      :target-path]}
              :test-common {:dependencies [[org.clojure/test.check "0.9.0"]
                                           [com.gfredericks/test.chuck "0.2.7"]
-                                          [orchestra "2017.07.04-1"]]}
+                                          [orchestra "2017.08.13"]]}
              :test-web [:test-common
                         {:source-paths ["test"]
                          :dependencies [[figwheel-sidecar "0.5.10"]


(maint) Upgrade to Jetty v9.4.18

(maint) Upgrade to Jetty v9.4.18

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
-(def jetty-version "9.4.11.v20180605")
+(def jetty-version "9.4.18.v20190429")

-(defproject puppetlabs/trapperkeeper-webserver-jetty9 "2.4.2-SNAPSHOT"
+(defproject puppetlabs/trapperkeeper-webserver-jetty9 "3.0.0-SNAPSHOT"
   :description "A jetty9-based webserver implementation for use with the puppetlabs/trapperkeeper service framework."
   :url "https://github.com/puppetlabs/trapperkeeper-webserver-jetty9"
   :license {:name "Apache License, Version 2.0"


Minor additions to project metadata

Minor additions to project metadata

--- project.clj
+++ project.clj
@@ -1,8 +1,11 @@
 (defproject fleet "0.10.2"
   :description "Templating System for Clojure"
   :url "http://github.com/Flamefork/fleet"
+  :scm {:name "git"
+        :url "https://github.com/Flamefork/fleet"}
   :license {:name "MIT License"
             :url "http://www.opensource.org/licenses/mit-license.php"}
+  :signing {:gpg-key "ilia@flamefork.ru"}

   :dependencies [[org.clojure/clojure "1.4.0"]]
   :java-source-paths ["src"])


modify profile.clj to resolve dependencies via private nexus repositories

--- project.clj
+++ project.clj
@@ -3,6 +3,8 @@
   :url "http://example.com/FIXME"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
+  :repositories [["snapshots" {:url "https://nexus.xcoo.jp/content/repositories/snapshots"}]
+                 ["releases" {:url "https://nexus.xcoo.jp/content/repositories/releases"}]]
   :dependencies [[org.clojure/clojure "1.5.1"]
                  [org.clojure/clojure-contrib "1.2.0"]
                  [org.utgenome.thirdparty/picard "1.86p"]


Updating version of clojure.math.combinatorics

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

--- project.clj
+++ project.clj
@@ -19,7 +19,7 @@
   :dependencies [[org.clojure/clojure             "1.6.0"]
                  [org.clojure/tools.cli           "0.3.1"]
                  [org.clojure/core.incubator      "0.1.3"]
-                 [org.clojure/math.combinatorics  "0.0.7"]
+                 [org.clojure/math.combinatorics  "0.1.1"]
                  [org.clojure/math.numeric-tower  "0.0.4"]
                  [org.apache.commons/commons-math "2.2"]
                  [conexp-clj/G                    "0.1.1"]


0.10.2-beta1

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject re-frame "0.10.2-SNAPSHOT"
+(defproject re-frame "0.10.2-beta1"
   :description  "A Clojurescript MVC-like Framework For Writing SPAs Using Reagent."
   :url          "https://github.com/Day8/re-frame.git"
   :license      {:name "MIT"}


let's not duplicate deps for no reason

let's not duplicate deps for no reason

--- project.clj
+++ project.clj
@@ -8,7 +8,6 @@
   :plugins [[lein-cljfmt "0.3.0"]
             [lein-cloverage "1.0.7-SNAPSHOT"]
             [lein-kibit "0.1.2"]
-            [lein-kibit "0.1.2"]
             [jonase/eastwood "0.2.3"]]
   :profiles {:uberjar {:aot [desdemona.launcher.aeron-media-driver
                              desdemona.launcher.launch-prod-peers]}


Fixed ninjudd's booboo. :repos instead of :repositories and not well formed.

--- project.clj
+++ project.clj
@@ -7,4 +7,4 @@
                  [org.apache.ant/ant "1.8.1"]
                  [org.clojars.ninjudd/maven-ant-tasks "2.1.0" :exclusions [ant/ant]]]
   :dev-dependencies [[com.stuartsierra/lazytest "1.1.2" :exclusions [swank-clojure]]]
-  :repos ["http://stuartsierra.com/maven2"])
+  :repositories [["lazytest" "http://stuartsierra.com/maven2"]])


Add Mailgun

Add Mailgun

--- project.clj
+++ project.clj
@@ -16,6 +16,7 @@
                  [org.webjars/jquery "2.2.4"]
                  [clj-http "3.1.0"]
                  [hickory "0.6.0"]
+                 [clj-mailgun "0.2.0"]
                  [org.clojure/tools.logging "0.3.1"]
                  [compojure "1.5.1"]
                  [ring-webjars "0.1.1"]


Version 2.28.0-1-SNAPSHOT [ci skip]

Version 2.28.0-1-SNAPSHOT [ci skip]

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojush "2.28.0"
+(defproject clojush "2.28.0-1-SNAPSHOT"
   :description "The Push programming language and the PushGP genetic programming
                 system implemented in Clojure. See http://pushlanguage.com"
   :license {:name "Eclipse Public License"


Update GitHub path to clojure-android

Update GitHub path to clojure-android

--- project.clj
+++ project.clj
@@ -1,6 +1,6 @@
 (defproject neko "3.0.2-SNAPSHOT"
   :description "Neko is a toolkit designed to make Android development using Clojure easier and more fun."
-  :url "https://github.com/alexander-yakushev/neko"
+  :url "https://github.com/clojure-android/neko"
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure-android/clojure "1.5.1-jb"]]


clj-info 0.2.2 dependency added

clj-info 0.2.2 dependency added

--- project.clj
+++ project.clj
@@ -2,7 +2,7 @@
   :description "Smalltalk-like namespace/class/var/function browser."
   :dependencies [[org.clojure/clojure "1.3.0"]
                  [seesaw "1.4.0"]
-                 [clj-info "0.2.1"]
+                 [clj-info "0.2.2"]
                  [hiccup "0.3.8"]
                  [lein-repls "1.9.7"]
                  [clojure-complete "0.2.1" :exclusions [org.clojure/clojure]]


v0.2.0

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject employeerepublic/er-cassandra "0.1.1"
+(defproject employeerepublic/er-cassandra "0.2.0"
   :description "a simple cassandra conector"
   :url "https://github.com/employeerepublic/er-cassandra"
   :license {:name "Eclipse Public License"


Remove special jvm options from project.clj

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

--- project.clj
+++ project.clj
@@ -24,7 +24,6 @@
         conexp.contrib.gui
         conexp.contrib.java]
   :keep-non-project-classes true
-  :jvm-opts ["-server", "-Xmx1g"]
   :warn-on-reflection true
   :test-path "src/test/")


(maint) Merge up 149b366 to main

(maint) Merge up 149b366 to main

Generated by CI

* commit '149b366ae2b34a7d1809bb400fc49f8faed704e9':
  (SERVER-2941) Remove unused jackson-afterburner dep

--- project.clj
+++ project.clj
@@ -45,7 +45,6 @@
                  [liberator]
                  [org.apache.commons/commons-exec]
                  [io.dropwizard.metrics/metrics-core]
-                 [com.fasterxml.jackson.module/jackson-module-afterburner]

                  ;; We do not currently use this dependency directly, but
                  ;; we have documentation that shows how users can use it to


Update project.clj file

Update project.clj file

--- project.clj
+++ project.clj
@@ -1,18 +1,27 @@
-(defproject dependable "0.2.0"
-            :description "Dependency resolution for the impatient."
-            :url "http://example.com/FIXME"
-            :license {:name "Eclipse Public License"
-                      :url "http://www.eclipse.org/legal/epl-v10.html"}
-            :dependencies [[org.clojure/clojure "1.8.0"]
-                           [org.clojure/core.match "0.3.0-alpha4"]]
-            :main ^:skip-aot dependable.core
-            :target-path "target/%s"
-            :test-selectors
-            {
-             :default :resolve-basic
-             :resolve-basic :resolve-basic
-             :resolve-harden :resolve-harden
+(defproject dependable "0.2.1-SNAPSHOT"
+  :description "Dependency resolution for the impatient."
+  :url "http://github.com/djhaskin987/dependable"
+  :license {:name "Eclipse Public License"
+            :url "http://www.eclipse.org/legal/epl-v10.html"}
+  :dependencies [[org.clojure/clojure "1.8.0"]
+                 [org.clojure/core.match "0.3.0-alpha4"]]
+  :main ^:skip-aot dependable.core
+  :target-path "target/%s"
+  :test-selectors
+  {
+   :default :resolve-basic
+   :resolve-basic :resolve-basic
+   :resolve-harden :resolve-harden
+   }
+  :profiles {
+             :test {:dependencies [[org.apache.commons/commons-io "1.3.2"]]}
+             :uberjar {:aot :all}
              }
-            :profiles {:uberjar {:aot :all}})
-
-
+  :main ^:skip-aot dependable.main
+  :target-path "target/%s")
+                                        ;:test-selectors
+                                        ;{
+                                        ; :default :resolve-basic
+                                        ; :resolve-basic :resolve-basic
+                                        ; :resolve-harden :resolve-harden
+                                        ; }


0.3.7

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def project-version "0.3.6")
+(def project-version "0.3.7")
 (def current :1.0)
 (defn bin [profile]
   (str "hbase-region-inspector-" project-version (when (not= profile current)


Declaring 'midje' dependency as provided.

--- project.clj
+++ project.clj
@@ -5,8 +5,8 @@
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.6.0"]
                  [org.clojars.brenton/google-diff-match-patch "0.1"]
-                 [midje "1.6.3"]
                  [clansi "1.0.0"]]
-  :profiles {:dev {:injections [(require 'flare.clojure-test)
+  :profiles {:provided {:dependencies [[midje "1.6.3"]]}
+             :dev {:injections [(require 'flare.clojure-test)
                                 (flare.clojure-test/install!)]}}
   :lein-release {:deploy-via :clojars})


New version after reorg

New version after reorg

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject useful "0.7.4"
+(defproject useful "0.7.5-alpha1"
   :description "A collection of generally-useful Clojure utility functions"
   :dependencies [[clojure "1.2.0"]
                  [org.clojure/tools.macro "0.1.1"]])


Version 5.3.15

Version 5.3.15

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(def ps-version "5.3.15-SNAPSHOT")
+(def ps-version "5.3.15")
 (def jruby-1_7-version "1.7.27-1")
 (def jruby-9k-version "9.1.16.0-1")


Version 2.6.2-SNAPSHOT

Version 2.6.2-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject dda/dda-managed-vm "2.6.1"
+(defproject dda/dda-managed-vm "2.6.2-SNAPSHOT"
   :description "The managed vm desktop crate"
   :url "https://www.domaindrivenarchitecture.org"
   :license {:name "Apache License, Version 2.0"


Version 2.4.7-SNAPSHOT

Version 2.4.7-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject wb-es "2.4.6"
+(defproject wb-es "2.4.7-SNAPSHOT"
   :description "FIXME: write description"
   :url "http://example.com/FIXME"
   :min-lein-version "2.7.0"


Upgrade day8/lein-git-inject to 0.0.4

Upgrade day8/lein-git-inject to 0.0.4

--- project.clj
+++ project.clj
@@ -12,7 +12,7 @@
                  [re-frame                        "0.10.9" :scope "provided"]
                  [day8.re-frame/forward-events-fx "0.0.6"]]

-  :plugins      [[day8/lein-git-inject "0.0.2"]
+  :plugins      [[day8/lein-git-inject "0.0.4"]
                  [lein-shadow          "0.1.7"]]

   :middleware   [leiningen.git-inject/middleware]


lein-release plugin: bumped version from 2.0.3 to 2.0.4-SNAPSHOT for next development cycle

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject dda/dda-managed-ide "2.0.3"
+(defproject dda/dda-managed-ide "2.0.4-SNAPSHOT"
   :description "module to install and configure ide based on ubuntu vm."
   :url "https://www.domaindrivenarchitecture.org"
   :license {:name "Apache License, Version 2.0"


lein-release plugin: preparing 0.2.6 release

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject se.haleby/stub-http "0.2.6-SNAPSHOT"
+(defproject se.haleby/stub-http "0.2.6"
   :description "A client library agonistic way to stub HTTP responses"
   :url "https://github.com/johanhaleby/stub-http"
   :license {:name         "MIT License"


Upgrade to fop 2.4

Upgrade to fop 2.4

Previously this caused some stacktraces but now on a local
installation with Wildfly 11 and mysql-connector-java-8.0.19.jar this
works.

--- project.clj
+++ project.clj
@@ -10,7 +10,7 @@
                  [clj-time "0.14.2"]
                  [comb "0.1.0" :exclusions [org.clojure/clojure]]
                  [org.clojure/data.xml "0.1.0-beta2"]
-                 [org.apache.xmlgraphics/fop "2.2" :exclusions [xalan commons-io commons-logging]]
+                 [org.apache.xmlgraphics/fop "2.4" :exclusions [xalan commons-io commons-logging]]
                  [hiccup "1.0.5"]
                  [org.immutant/web "2.1.9"]
                  [ring/ring-defaults "0.3.1"]


updating dependencies

updating dependencies

--- project.clj
+++ project.clj
@@ -4,7 +4,7 @@
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies [[org.clojure/clojure "1.8.0"]
-                 [thinktopic/think.datatype "0.3.9"]
+                 [thinktopic/think.datatype "0.3.10"]
                  [net.mikera/imagez "0.12.0"]]

   :source-paths ["src/clj" "src/cljc"]


more tweaks

more tweaks

--- src/main/shadow/cljs/npm/cli.cljs
+++ src/main/shadow/cljs/npm/cli.cljs
@@ -485,14 +485,14 @@
     (println (path/resolve project-root source-path)))
   (println)

-  (println "=== Dependencies")
   (when (and (not (:lein config))
              (not (:deps config)))
+    (println "=== Dependencies")
     (let [{:keys [deps-hierarchy] :as cp-data}
           (get-classpath project-root config)]

-      (print-classpath-tree deps-hierarchy)))
-  (println))
+      (print-classpath-tree deps-hierarchy))
+    (println)))

 (defn- getenv [envname]
   (str (aget js/process.env envname)))


Split up email addresses to allow searching by hostname and username.

Added a query mangler to make this work automatically when searching against the "to" and "from" fields.

--- src/net/dishevelled/mailindex.clj
+++ src/net/dishevelled/mailindex.clj
@@ -11,6 +11,7 @@
            (org.apache.lucene.store FSDirectory)
            (org.apache.lucene.util Version)
            (org.apache.lucene.queryParser QueryParser$Operator
+                                          QueryParser
                                           MultiFieldQueryParser)
            (java.net ServerSocket InetAddress BindException)
            (java.util Calendar Date SimpleTimeZone Vector Properties)
@@ -56,26 +57,50 @@
           (.getAddress address)))

+(defn address-to-tokens [^InternetAddress address]
+  (.replace (str (.getAddress address))
+            "@" " "))
+
+
 (defvar parse-rules
   {
-   "date"    {:value-fn (fn [^MimeMessage msg]
-                          (DateTools/dateToString
-                           (or (.getSentDate msg)
-                               (.getReceivedDate msg))
-                           DateTools$Resolution/DAY))
-              :boost 10}
+   "date" {:value-fn (fn [^MimeMessage msg]
+                       (DateTools/dateToString
+                        (or (.getSentDate msg)
+                            (.getReceivedDate msg))
+                        DateTools$Resolution/DAY))
+           :boost 10}

    "subject" {:value-fn (fn [^MimeMessage msg] (.getSubject msg)) :boost 5}
-   "to"      {:value-fn
-              (fn [^MimeMessage msg] (join
-                         " "
-                         (map address-to-str
-                              (.getRecipients msg Message$RecipientType/TO))))
-              :boost 2}
-   "from"    {:value-fn (fn [^MimeMessage msg] (address-to-str (first (.getFrom msg))))
-              :boost 3}
-   "body"    {}
-   "msgid"   {:value-fn (fn [^MimeMessage msg] (.getMessageID msg))}
+
+   "to" {:value-fn
+         (fn [^MimeMessage msg] (join
+                                 " "
+                                 (map address-to-str
+                                      (.getRecipients msg Message$RecipientType/TO))))
+         :boost 2
+         :linked-fields ["to_tokens"]}
+
+   "to_tokens" {:value-fn (fn [^MimeMessage msg]
+                            (join " "
+                                  (map address-to-tokens
+                                       (.getRecipients
+                                        msg
+                                        Message$RecipientType/TO))))
+                :boost 2}
+
+   "from" {:value-fn (fn [^MimeMessage msg] (address-to-str (first (.getFrom msg))))
+           :boost 3
+           :linked-fields ["from_tokens"]}
+
+   "from_tokens" {:value-fn (fn [^MimeMessage msg]
+                              (address-to-tokens
+                               (first (.getFrom msg))))
+                  :boost 2}
+
+   "body" {}
+
+   "msgid" {:value-fn (fn [^MimeMessage msg] (.getMessageID msg))}
    })

@@ -166,9 +191,9 @@
   (doseq [[field rule] parse-rules]
     (when (:value-fn rule)
       (when-let [value (try ((:value-fn rule) msg)
-                            (catch Exception _
-                              (error "Warning: missing value for field '%s'"
-                                     field)
+                            (catch Exception e
+                              (error "Warning: missing value for field '%s': %s"
+                                     field e)
                               nil))]
         (.add doc (fieldpool/tokenized-field field value))))))

@@ -351,17 +376,42 @@
           ["and" "or" "not"]))

+(defn expand-query [query]
+  (cond (instance? BooleanQuery query)
+        (do (doseq [clause (.clauses query)]
+              (.setQuery clause (expand-query (.getQuery clause))))
+            query)
+
+        (instance? TermQuery query)
+        (let [term (.getTerm query)]
+          (if-let [linked-fields (:linked-fields (parse-rules (.field term)))]
+            (let [new-query (BooleanQuery.)]
+              (.add new-query query BooleanClause$Occur/SHOULD)
+
+              (doseq [field linked-fields]
+                (.add new-query (TermQuery. (Term. field (.text term)))
+                      BooleanClause$Occur/SHOULD))
+
+              new-query)
+            query))
+
+        :else query))
+
+
 (defn build-query
   "Construct a Lucene query from `querystr'."
   [querystr reader]
   (let [query (BooleanQuery.)
-        all-fields (.parse (doto (MultiFieldQueryParser.
-                                  Version/LUCENE_30
-                                  (into-array (keys parse-rules))
-                                  (StandardAnalyzer. Version/LUCENE_30))
-                             (.setDefaultOperator QueryParser$Operator/AND))
-                           (normalcase querystr))]
+        all-fields (expand-query
+                    (.rewrite (.parse (doto (MultiFieldQueryParser.
+                                             Version/LUCENE_30
+                                             (into-array (keys parse-rules))
+                                             (StandardAnalyzer. Version/LUCENE_30))
+                                        (.setDefaultOperator QueryParser$Operator/AND))
+                                      (normalcase querystr))
+                              reader))]
     (.setBoost all-fields 20)
+
     (.add query all-fields BooleanClause$Occur/MUST)

     (when-let [terms (seq (set (map #(.getTerm %)


Only ack messages if entries are written to BK successfully

--- src/onyx/state/log/bookkeeper.clj
+++ src/onyx/state/log/bookkeeper.clj
@@ -14,7 +14,8 @@
             [onyx.log.commands.common :refer [peer-slot-id]]
             [onyx.log.zookeeper :as zk]
             [onyx.static.default-vals :refer [arg-or-default defaults]])
-  (:import [org.apache.bookkeeper.client LedgerHandle LedgerEntry BookKeeper BookKeeper$DigestType AsyncCallback$AddCallback]
+  (:import [org.apache.bookkeeper.client LedgerHandle LedgerEntry BookKeeper BookKeeper$DigestType
+            BKException BKException$Code AsyncCallback$AddCallback]
            [org.apache.bookkeeper.conf ClientConfiguration]
            [org.apache.curator.framework CuratorFramework CuratorFrameworkFactory]))

@@ -62,8 +63,9 @@

 (def HandleWriteCallback
   (reify AsyncCallback$AddCallback
-    (addComplete [this rc lh entry-id callback-fn]
-      (callback-fn))))
+    (addComplete [this rc lh entry-id ack-fn]
+      (when (= rc (BKException$Code/OK))
+        (ack-fn)))))

 (defn compaction-transition
   "Transitions to a new compacted ledger, plus a newly created ledger created


Added logic to check for required model keywords in interop, however this is disabled for now due to an issue with the UID

--- src/onyx_java/utility/interop.clj
+++ src/onyx_java/utility/interop.clj
@@ -28,10 +28,21 @@

 (defn check-choices [choices value]
     (if (boolean (some #{:all} (flatten choices))) value
-        (if (some #{value} choices) value nil)))
+        (if (some #{value} choices) value (throw (Exception. "Not a valid choice.")))))
+
+(defn get-required-keymap [section]
+    (let [required-keys (vec (keys (filter (fn [[k v]] (and (-> v :optional? not)
+                                    (not (contains? v :deprecated-version))))
+                                    (get-in model [section :model]))))]
+     (apply merge (map #(hash-map % nil) required-keys))))
+
+(defn update-required-keymap [required-keymap keyword]
+    ;(println keyword)
+    (if (boolean (some #{keyword} (keys required-keymap))) (assoc required-keymap keyword true) required-keymap))

 (defn cast-types [section m]
   (let [section* (keyword section)]
+        ;required-keymap (get-required-keymap section*)]
     (reduce-kv
      (fn [m* k v]
        (let [k* (keyword k)


(maint) Add function version of drop-public-tables for RBAC

This commit helps remove some of the cyclic dependency of Activity and
RBAC by pulling out the drop-public-functions function into jdbc-util so
that RBAC can depend on this version instead.

--- src/puppetlabs/jdbc_util/core.clj
+++ src/puppetlabs/jdbc_util/core.clj
@@ -49,15 +49,28 @@
 (defn public-tables
   "Get the names of all public tables in a database"
   [db-spec]
-  (let [query "SELECT table_name FROM information_schema.tables WHERE LOWER(table_schema) = 'public'"
-        results (jdbc/query db-spec [query])]
-    (map :table_name results)))
+  (let [query "SELECT table_name FROM information_schema.tables WHERE LOWER(table_schema) = 'public'"]
+    (jdbc/query db-spec [query] {:row-fn :table_name})))

 (defn drop-public-tables!
   "Drops all public tables in a database. Super dangerous."
   [db-spec]
-  (if-let [tables (seq (public-tables db-spec))]
+  (when-let [tables (seq (public-tables db-spec))]
     (jdbc/db-do-commands db-spec (map #(format "DROP TABLE %s CASCADE" %) tables))))
+
+(defn public-functions
+  "Get the names of all public functions in a database"
+  [db-spec]
+  (let [query (str "SELECT ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ')' AS function"
+                   "  FROM pg_proc INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid)"
+                   "  WHERE ns.nspname = 'public'")]
+    (jdbc/query db-spec [query] {:row-fn :function})))
+
+(defn drop-public-functions!
+  "Drops all public functions in a database. Super dangerous."
+  [db-spec]
+  (when-let [functions (seq (public-functions db-spec))]
+    (jdbc/db-do-commands db-spec (map #(format "DROP FUNCTION %s CASCADE" %) functions))))

 (defn convert-result-arrays
   "Converts Java and JDBC arrays in a result set using the provided


Fix query api tests

Fix query api tests

--- test/clojure/clojurewerkz/cassaforte/new_query_api_test.clj
+++ test/clojure/clojurewerkz/cassaforte/new_query_api_test.clj
@@ -3,460 +3,418 @@
   (:require [clojure.test                          :refer :all]
             [clojurewerkz.cassaforte.new-query-api :refer :all]))

+(def force-novalues #(.setForceNoValues % true))
+
 (defn normalize-string
   [s]
-  (clojure.string/replace s "\t" "  "))
+  (-> s
+      ;; (.setForceNoValues true)
+      (.getQueryString)
+      (clojure.string/replace "\t" "  ")
+      (clojure.string/replace #"^\n" "")
+      (clojure.string/replace #"^\s+" "")
+      ))
+
+(defmacro renders-to
+  [query result]
+  `(= ~query
+      (-> ~result
+          force-novalues
+          normalize-string)))

 (deftest test-select-query
-
-  (is (= "SELECT asd FROM \"table-name\";"
-         (normalize-string
-          (select "table-name"
-                  (column "asd")))))
-
-  (is (= "SELECT first,second FROM \"table-name\";"
-         (normalize-string
-          (select "table-name"
-                  (column "first")
-                  (column "second")))))
-
-  (is (= "SELECT first,second FROM \"table-name\";"
-         (normalize-string
-          (select "table-name"
-                  (columns "first" "second")))))
-
-  (is (= "SELECT * FROM foo WHERE foo=1 AND bar=2;"
-         (normalize-string
-          (select :foo
-                  ;; Normally, hashmap can be used. Array map is used here to guarantee order.
-                  (where (array-map :foo 1
-                                    :bar 2))))))
-  (is (=  "SELECT * FROM foo WHERE foo='bar' AND moo>3 AND meh>4 AND baz IN (5,6,7);"
-          (normalize-string
-           (select :foo
-                   (where [[:= :foo "bar"]
-                           [:> :moo 3]
-                           [:> :meh 4]
-                           [:in :baz [5 6 7]]
-                           ])))))
-
-  (is (=  "SELECT * FROM foo WHERE foo='bar' ORDER BY foo ASC;"
-          (normalize-string
-           (select :foo
-                   (order-by (asc :foo))
-                   (where [[= :foo "bar"]])))))
-
-  (is (=  "SELECT * FROM foo WHERE foo='bar' ORDER BY foo ASC LIMIT 10;"
-          (normalize-string
-           (select :foo
-                   (order-by (asc :foo))
-                   (limit 10)
-                   (where [[= :foo "bar"]])))))
-
-  (is (=  "SELECT * FROM foo WHERE foo='bar' ORDER BY foo ASC LIMIT 10 ALLOW FILTERING;"
-          (normalize-string
-           (select :foo
-                   (where [[= :foo "bar"]])
-                   (order-by (asc :foo))
-                   (limit 10)
-                   (allow-filtering)
-                   ))))
-
-  (is (=  "SELECT * FROM foo WHERE k=4 AND c>'a' AND c<='z';";
-          (normalize-string
-           (select :foo
-                   (where [[= :k 4]
-                           [> :c "a"]
-                           [<= :c "z"]])
-                   ))))
-
-  (is (= "SELECT DISTINCT asd AS bsd FROM foo;"
-         (normalize-string
-          (select :foo
-                  (columns (-> "asd"
-                               distinct*
-                               (as "bsd")))))))
-
-  (is (= "SELECT DISTINCT longName AS a,ttl(longName) AS ttla FROM foo LIMIT :limit;";
-         (normalize-string
-          (select :foo
-                  (columns (-> "longName"
-                               distinct*
-                               (as "a"))
-                           (-> "longName"
-                               ttl-column
-                               (as "ttla")))
-                  (limit (bind-marker "limit"))))))
-
-  (is (= "SELECT a,b,\"C\" FROM foo WHERE a IN ('127.0.0.1','127.0.0.3') AND \"C\"='foo' ORDER BY a ASC,b DESC LIMIT 42;";
-         (normalize-string
-          (select :foo
-                  (columns "a"
-                           "b"
-                           (quote* "C"))
-                  (where [[:in :a ["127.0.0.1", "127.0.0.3"]]
-                          [:= (quote* "C") "foo"]])
-                  (order-by (asc :a)
-                            (desc :b))
-                  (limit (int 42))))))
-
-
-  (is (= "SELECT writetime(a),ttl(a) FROM foo ALLOW FILTERING;"
-         (normalize-string
-          (select :foo
-                  (columns (write-time :a)
-                           (ttl-column :a))
-                  (allow-filtering)))))
-
-
-  (is (= "SELECT DISTINCT longName AS a,ttl(longName) AS ttla FROM foo WHERE k IN () LIMIT :limit;";
-         (normalize-string
-          (select :foo
-                  (columns (-> "longName"
-                               (distinct*)
-                               (as "a"))
-                           (-> "longName"
-                               (ttl-column)
-                               (as "ttla")))
-                  (where [[:in :k []]])
-                  (limit (bind-marker "limit"))))))
-
-  (is (= "SELECT * FROM foo WHERE bar=:barmark AND baz=:bazmark LIMIT :limit;"
-         (normalize-string
-          (select :foo
-                  (where [[:= :bar (bind-marker "barmark")]
-                          [:= :baz (bind-marker "bazmark")]])
-                  (limit (bind-marker "limit"))))))
-
-  (is (= "SELECT a FROM foo WHERE k IN ?;";
-         (normalize-string
-          (select :foo
-                  (column :a)
-                  (where [[:in :k [?]]])))))
-
-  (is (= "SELECT count(*) FROM foo;";
-         (normalize-string
-          (select :foo
-                  (count-all)))))
-
-  (is (= "SELECT intToBlob(b) FROM foo;"
-         (normalize-string
-          (select :foo
-                  (fcall "intToBlob"
-                         (cname "b"))))))
-
-
-  (is (= "SELECT * FROM foo WHERE k>42 LIMIT 42;";
-         (normalize-string
-          (select :foo
-                  (where [[:> :k 42]])
-                  (limit 42)))))
-
-  (is (= "SELECT * FROM foo WHERE token(k)>token(42);"
-         (normalize-string
-          (select :foo
-                  (where [[:> (token "k") (function-call "token" 42)]])))))
-
-  (is (= "SELECT * FROM foo2 WHERE token(a,b)>token(42,101);";
-         (normalize-string
-          (select :foo2
-                  (where [[:> (token "a" "b") (function-call "token" 42 101)]])))))
-
-  (is (= "SELECT * FROM words WHERE w='):,ydL ;O,D';"
-         (normalize-string
-          (select :words
-                  (where {:w "):,ydL ;O,D"})))))
-
-  (is (= "SELECT * FROM words WHERE w='WA(!:gS)r(UfW';"
-         (normalize-string
-          (select :words
-                  (where {:w "WA(!:gS)r(UfW"})))))
-
-  (is (= "SELECT * FROM foo WHERE d=1234325;"
-         (normalize-string
-          (select :foo
-                  (where {:d (java.util.Date. 1234325)})))))
-
-  (is (= "SELECT * FROM foo WHERE b=0xcafebabe;"
-         (normalize-string
-          (select :foo
-                  (where {:b (Bytes/fromHexString "0xCAFEBABE")})))))
+  (is (renders-to
+       "SELECT asd FROM \"table-name\";"
+       (select "table-name"
+               (column "asd"))))
+
+  (is (renders-to
+       "SELECT first,second FROM \"table-name\";"
+       (select "table-name"
+               (column "first")
+               (column "second"))))
+
+  (is (renders-to "SELECT first,second FROM \"table-name\";"
+                  (select "table-name"
+                          (columns "first" "second"))))
+
+  (is (renders-to "SELECT * FROM foo WHERE foo=1 AND bar=2;"
+                  (select :foo
+                          ;; Normally, hashmap can be used. Array map is used here to guarantee order.
+                          (where (array-map :foo 1
+                                            :bar 2)))))
+  (is (renders-to  "SELECT * FROM foo WHERE foo='bar' AND moo>3 AND meh>4 AND baz IN (5,6,7);"
+                   (select :foo
+                           (where [[:= :foo "bar"]
+                                   [:> :moo 3]
+                                   [:> :meh 4]
+                                   [:in :baz [5 6 7]]
+                                   ]))))
+
+  (is (renders-to  "SELECT * FROM foo WHERE foo='bar' ORDER BY foo ASC;"
+                   (select :foo
+                           (order-by (asc :foo))
+                           (where [[= :foo "bar"]]))))
+
+  (is (renders-to  "SELECT * FROM foo WHERE foo='bar' ORDER BY foo ASC LIMIT 10;"
+                   (select :foo
+                           (order-by (asc :foo))
+                           (limit 10)
+                           (where [[= :foo "bar"]]))))
+
+  (is (renders-to  "SELECT * FROM foo WHERE foo='bar' ORDER BY foo ASC LIMIT 10 ALLOW FILTERING;"
+                   (select :foo
+                           (where [[= :foo "bar"]])
+                           (order-by (asc :foo))
+                           (limit 10)
+                           (allow-filtering)
+                           )))
+
+  (is (renders-to  "SELECT * FROM foo WHERE k=4 AND c>'a' AND c<='z';";
+                   (select :foo
+                           (where [[= :k 4]
+                                   [> :c "a"]
+                                   [<= :c "z"]])
+                           )))
+
+  (is (renders-to "SELECT DISTINCT asd AS bsd FROM foo;"
+                  (select :foo
+                          (columns (-> "asd"
+                                       distinct*
+                                       (as "bsd"))))))
+
+  (is (renders-to "SELECT DISTINCT longName AS a,ttl(longName) AS ttla FROM foo LIMIT :limit;";
+                  (select :foo
+                          (columns (-> "longName"
+                                       distinct*
+                                       (as "a"))
+                                   (-> "longName"
+                                       ttl-column
+                                       (as "ttla")))
+                          (limit (bind-marker "limit")))))
+
+  (is (renders-to "SELECT a,b,\"C\" FROM foo WHERE a IN ('127.0.0.1','127.0.0.3') AND \"C\"='foo' ORDER BY a ASC,b DESC LIMIT 42;";
+                  (select :foo
+                          (columns "a"
+                                   "b"
+                                   (quote* "C"))
+                          (where [[:in :a ["127.0.0.1", "127.0.0.3"]]
+                                  [:= (quote* "C") "foo"]])
+                          (order-by (asc :a)
+                                    (desc :b))
+                          (limit (int 42)))))
+
+
+  (is (renders-to "SELECT writetime(a),ttl(a) FROM foo ALLOW FILTERING;"
+                  (select :foo
+                          (columns (write-time :a)
+                                   (ttl-column :a))
+                          (allow-filtering))))
+
+
+  (is (renders-to "SELECT DISTINCT longName AS a,ttl(longName) AS ttla FROM foo WHERE k IN () LIMIT :limit;";
+                  (select :foo
+                          (columns (-> "longName"
+                                       (distinct*)
+                                       (as "a"))
+                                   (-> "longName"
+                                       (ttl-column)
+                                       (as "ttla")))
+                          (where [[:in :k []]])
+                          (limit (bind-marker "limit")))))
+
+  (is (renders-to "SELECT * FROM foo WHERE bar=:barmark AND baz=:bazmark LIMIT :limit;"
+                  (select :foo
+                          (where [[:= :bar (bind-marker "barmark")]
+                                  [:= :baz (bind-marker "bazmark")]])
+                          (limit (bind-marker "limit")))))
+
+  (is (renders-to "SELECT a FROM foo WHERE k IN ?;";
+                  (select :foo
+                          (column :a)
+                          (where [[:in :k [?]]]))))
+
+  (is (renders-to "SELECT count(*) FROM foo;";
+                  (select :foo
+                          (count-all))))
+
+  (is (renders-to "SELECT intToBlob(b) FROM foo;"
+                  (select :foo
+                          (fcall "intToBlob"
+                                 (cname "b")))))
+
+
+  (is (renders-to "SELECT * FROM foo WHERE k>42 LIMIT 42;";
+                  (select :foo
+                          (where [[:> :k 42]])
+                          (limit 42))))
+
+  (is (renders-to "SELECT * FROM foo WHERE token(k)>token(42);"
+                  (select :foo
+                          (where [[:> (token "k") (function-call "token" 42)]]))))
+
+  (is (renders-to "SELECT * FROM foo2 WHERE token(a,b)>token(42,101);";
+                  (select :foo2
+                          (where [[:> (token "a" "b") (function-call "token" 42 101)]]))))
+
+  (is (renders-to "SELECT * FROM words WHERE w='):,ydL ;O,D';"
+                  (select :words
+                          (where {:w "):,ydL ;O,D"}))))
+
+  (is (renders-to "SELECT * FROM words WHERE w='WA(!:gS)r(UfW';"
+                  (select :words
+                          (where {:w "WA(!:gS)r(UfW"}))))
+
+  (is (renders-to "SELECT * FROM foo WHERE d=1234325;"
+                  (select :foo
+                          (where {:d (java.util.Date. 1234325)}))))
+
+  (is (renders-to "SELECT * FROM foo WHERE b=0xcafebabe;"
+                  (select :foo
+                          (where {:b (Bytes/fromHexString "0xCAFEBABE")}))))

   (is (thrown? java.lang.IllegalStateException
-               (normalize-string
-                (select :foo
-                        (count-all)
-                        (order-by (asc "a") (desc "b"))
-                        (order-by (asc "a") (desc "b"))))))
+               (select :foo
+                       (count-all)
+                       (order-by (asc "a") (desc "b"))
+                       (order-by (asc "a") (desc "b")))))

   (is (thrown? java.lang.IllegalArgumentException
-               (normalize-string
-                (select :foo
-                        (limit -42)))))
+               (select :foo
+                       (limit -42))))

   (is (thrown? java.lang.IllegalStateException
-               (normalize-string
-                (select :foo
-                        (limit 42)
-                        (limit 42)))))
-
-  (is (= "INSERT INTO foo(asd) VALUES ('bsd');"
-         (normalize-string
-          (insert :foo
-                  {"asd" "bsd"}))))
-  (is (= "INSERT INTO foo(asd) VALUES ('bsd');"
-         (normalize-string
-          (insert :foo
-                  {"asd" "bsd"}))))
-
-  (is (= "INSERT INTO foo(asd) VALUES ('bsd');"
-         (normalize-string
-          (insert :foo
-                  {"asd" "bsd"}))))
-
-
-  (is (= "INSERT INTO foo(a,b,\"C\",d) VALUES (123,'127.0.0.1','foo''bar',{'x':3,'y':2}) USING TIMESTAMP 42 AND TTL 24;"
-         (normalize-string
-          (insert :foo
-                  (array-map "a"          123
-                             "b"          (java.net.InetAddress/getByName "127.0.0.1")
-                             (quote* "C") "foo'bar"
-                             "d"          (array-map "x" 3 "y" 2))
-                  (using (array-map :timestamp 42
-                                    :ttl       24))))))
-
-  (is (= "INSERT INTO foo(a,b,\"C\",d) VALUES (123,'127.0.0.1','foo''bar',{'x':3,'y':2}) USING TIMESTAMP 42 AND TTL 24;"
-         (normalize-string
-          (insert :foo
-                  (array-map "a"          123
-                             "b"          (java.net.InetAddress/getByName "127.0.0.1")
-                             (quote* "C") "foo'bar"
-                             "d"          {"x" 3 "y" 2})
-                  (using (array-map :timestamp 42
-                                    :ttl       24))))))
-
-  (is (= "INSERT INTO foo(a,b) VALUES ({2,3,4},3.4) USING TIMESTAMP 42 AND TTL 24;"
-         (normalize-string
-          (insert :foo
-                  (array-map "a" (sorted-set 2 3 4)
-                             "b" 3.4)
-                  (using (array-map :timestamp 42
-                                    :ttl       24))))))
-
-  (is (= "INSERT INTO foo(a,b) VALUES ({2,3,4},3.4) USING TTL ? AND TIMESTAMP ?;"
-         (normalize-string
-          (insert :foo
-                  (array-map :a (sorted-set 2 3 4)
-                             :b 3.4)
-                  (using (array-map :ttl       ?
-                                    :timestamp ?))))))
-
-  (is (= "INSERT INTO foo(c,a,b) VALUES (123,{2,3,4},3.4) USING TIMESTAMP 42;"
-         (normalize-string
-          (insert :foo
-                  (array-map :c 123
-                             :a (sorted-set 2 3 4)
-                             :b 3.4)
-                  (using {:timestamp 42})))))
-
-  (is (= "INSERT INTO foo(k,x) VALUES (0,1) IF NOT EXISTS;";
-         (normalize-string
-          (insert :foo
-                  (array-map :k 0
-                             :x 1)
-                  (if-not-exists)))))
-
-
-  (is (= "INSERT INTO foo(k,x) VALUES (0,(1));";
-         (normalize-string
-          (insert :foo
-                  (array-map :k 0
-                             :x (tuple-of [:int] [(int 1)]))))))
-
-  (is (= "UPDATE foo USING TIMESTAMP 42 SET a=12,b=[3,2,1],c=c+3 WHERE k=2;"
-         (normalize-string
-          (update :foo
-                  (array-map :a 12
-                             :b [3 2 1]
-                             :c (increment-by 3))
-                  (where {:k 2})
-                  (using {:timestamp 42})))))
-
-
-  (is (= "UPDATE foo SET b=null WHERE k=2;"
-         (normalize-string
-          (update :foo
-                  (array-map :b nil)
-                  (where {:k 2})))))
-
-
-  (is (= "UPDATE foo SET a[2]='foo',b=[3,2,1]+b,c=c-{'a'} WHERE k=2 AND l='foo' AND m<4 AND n>=1;"
-         (normalize-string
-          (update :foo
-                  (array-map :a (set-idx 2 "foo")
-                             :b (prepend-all [3,2,1])
-                             :c (remove-tail "a"))
-                  (where [[= :k 2]
-                          [= :l "foo"]
-                          [< :m 4]
-                          [>= :n 1]])
-                  ))))
-
-
-  (is (= "UPDATE foo SET b=[3]+b,c=c+['a'],d=d+[1,2,3],e=e-[1];"
-         (normalize-string
-          (update :foo
-                  (array-map :b (prepend 3)
-                             :c (append "a")
-                             :d (append-all [1 2 3])
-                             :e (discard 1))))))
-
-  (is (= "UPDATE foo SET b=b-[1,2,3],c=c+{1},d=d+{4,3,2};"
-         (normalize-string
-          (update :foo
-                  (array-map :b (discard-all [1 2 3])
-                             :c (add-tail 1)
-                             :d (add-all-tail #{2 3 4}))))))
-
-  (is (= "UPDATE foo SET b=b-{2,3,4},c['k']='v',d=d+{'x':3,'y':2};"
-         (normalize-string
-          (update :foo
-                  (array-map :b (remove-all-tail (sorted-set 2 3 4))
-                             :c (put-value "k" "v")
-                             :d (put-values (array-map "x" 3
-                                                       "y" 2)))))))
-
-  (is (= "UPDATE foo USING TTL 400;"
-         (normalize-string
-          (update :foo
-                  {}
-                  (using {:ttl 400})))))
-
-
-  (is (= (str "UPDATE foo SET a=" (BigDecimal. 3.2) ",b=42 WHERE k=2;")
-         (normalize-string
-          (update :foo
-                  (array-map :a (BigDecimal. 3.2)
-                             :b (BigInteger. "42"))
-                  (where {:k 2})))))
-
-  (is (= "UPDATE foo USING TIMESTAMP 42 SET b=[3,2,1]+b WHERE k=2 AND l='foo';"
-         (normalize-string
-          (update :foo
-                  (array-map :b (prepend-all [3 2 1]))
-                  (where (array-map :k 2
-                                    :l "foo"))
-                  (using {:timestamp 42})))))
+               (select :foo
+                       (limit 42)
+                       (limit 42)))))
+
+(deftest test-insert-query
+  (is (renders-to "INSERT INTO foo(asd) VALUES ('bsd');"
+                  (insert :foo
+                          {"asd" "bsd"})))
+  (is (renders-to "INSERT INTO foo(asd) VALUES ('bsd');"
+                  (insert :foo
+                          {"asd" "bsd"})))
+
+  (is (renders-to "INSERT INTO foo(asd) VALUES ('bsd');"
+                  (insert :foo
+                          {"asd" "bsd"})))
+
+
+  (is (renders-to "INSERT INTO foo(a,b,\"C\",d) VALUES (123,'127.0.0.1','foo''bar',{'x':3,'y':2}) USING TIMESTAMP 42 AND TTL 24;"
+                  (insert :foo
+                          (array-map "a"          123
+                                     "b"          (java.net.InetAddress/getByName "127.0.0.1")
+                                     (quote* "C") "foo'bar"
+                                     "d"          (array-map "x" 3 "y" 2))
+                          (using (array-map :timestamp 42
+                                            :ttl       24)))))
+
+  (is (renders-to "INSERT INTO foo(a,b,\"C\",d) VALUES (123,'127.0.0.1','foo''bar',{'x':3,'y':2}) USING TIMESTAMP 42 AND TTL 24;"
+                  (insert :foo
+                          (array-map "a"          123
+                                     "b"          (java.net.InetAddress/getByName "127.0.0.1")
+                                     (quote* "C") "foo'bar"
+                                     "d"          {"x" 3 "y" 2})
+                          (using (array-map :timestamp 42
+                                            :ttl       24)))))
+
+  (is (renders-to "INSERT INTO foo(a,b) VALUES ({2,3,4},3.4) USING TIMESTAMP 42 AND TTL 24;"
+                  (insert :foo
+                          (array-map "a" (sorted-set 2 3 4)
+                                     "b" 3.4)
+                          (using (array-map :timestamp 42
+                                            :ttl       24)))))
+
+  (is (renders-to "INSERT INTO foo(a,b) VALUES ({2,3,4},3.4) USING TTL ? AND TIMESTAMP ?;"
+                  (insert :foo
+                          (array-map :a (sorted-set 2 3 4)
+                                     :b 3.4)
+                          (using (array-map :ttl       ?
+                                            :timestamp ?)))))
+
+  (is (renders-to "INSERT INTO foo(c,a,b) VALUES (123,{2,3,4},3.4) USING TIMESTAMP 42;"
+                  (insert :foo
+                          (array-map :c 123
+                                     :a (sorted-set 2 3 4)
+                                     :b 3.4)
+                          (using {:timestamp 42}))))
+
+  (is (renders-to "INSERT INTO foo(k,x) VALUES (0,1) IF NOT EXISTS;";
+                  (insert :foo
+                          (array-map :k 0
+                                     :x 1)
+                          (if-not-exists))))
+
+
+  (is (renders-to "INSERT INTO foo(k,x) VALUES (0,(1));";
+                  (insert :foo
+                          (array-map :k 0
+                                     :x (tuple-of [:int] [(int 1)]))))))
+
+(deftest update-test
+  (is (renders-to "UPDATE foo USING TIMESTAMP 42 SET a=12,b=[3,2,1],c=c+3 WHERE k=2;"
+                  (update :foo
+                          (array-map :a 12
+                                     :b [3 2 1]
+                                     :c (increment-by 3))
+                          (where {:k 2})
+                          (using {:timestamp 42}))))
+
+
+  (is (renders-to "UPDATE foo SET b=null WHERE k=2;"
+                  (update :foo
+                          (array-map :b nil)
+                          (where {:k 2}))))
+
+
+  (is (renders-to "UPDATE foo SET a[2]='foo',b=[3,2,1]+b,c=c-{'a'} WHERE k=2 AND l='foo' AND m<4 AND n>=1;"
+                  (update :foo
+                          (array-map :a (set-idx 2 "foo")
+                                     :b (prepend-all [3,2,1])
+                                     :c (remove-tail "a"))
+                          (where [[= :k 2]
+                                  [= :l "foo"]
+                                  [< :m 4]
+                                  [>= :n 1]]))))
+
+
+  (is (renders-to "UPDATE foo SET b=[3]+b,c=c+['a'],d=d+[1,2,3],e=e-[1];"
+                  (update :foo
+                          (array-map :b (prepend 3)
+                                     :c (append "a")
+                                     :d (append-all [1 2 3])
+                                     :e (discard 1)))))
+
+  (is (renders-to "UPDATE foo SET b=b-[1,2,3],c=c+{1},d=d+{4,3,2};"
+                  (update :foo
+                          (array-map :b (discard-all [1 2 3])
+                                     :c (add-tail 1)
+                                     :d (add-all-tail #{2 3 4})))))
+
+  (is (renders-to "UPDATE foo SET b=b-{2,3,4},c['k']='v',d=d+{'x':3,'y':2};"
+                  (update :foo
+                          (array-map :b (remove-all-tail (sorted-set 2 3 4))
+                                     :c (put-value "k" "v")
+                                     :d (put-values (array-map "x" 3
+                                                               "y" 2))))))
+
+  (is (renders-to "UPDATE foo USING TTL 400;"
+                  (update :foo
+                          {}
+                          (using {:ttl 400}))))
+
+
+  (is (renders-to (str "UPDATE foo SET a=" (BigDecimal. 3.2) ",b=42 WHERE k=2;")
+                  (update :foo
+                          (array-map :a (BigDecimal. 3.2)
+                                     :b (BigInteger. "42"))
+                          (where {:k 2}))))
+
+  (is (renders-to "UPDATE foo USING TIMESTAMP 42 SET b=[3,2,1]+b WHERE k=2 AND l='foo';"
+                  (update :foo
+                          (array-map :b (prepend-all [3 2 1]))
+                          (where (array-map :k 2
+                                            :l "foo"))
+                          (using {:timestamp 42}))))

   (is (thrown? IllegalArgumentException
-               (normalize-string
-                (update :foo
-                        {}
-                        (using {:ttl -400})))))
-
-  (is (= "UPDATE foo SET x=4 WHERE k=0 IF x=1;"
-         (normalize-string
-          (update :foo
-                  {:x 4}
-                  (where {:k 0})
-                  (only-if {:x 1})))))
-
-  (is (= "UPDATE foo SET x=4 WHERE k=0 IF foo='bar' AND moo>3 AND meh>4 AND baz IN (5,6,7);"
-         (normalize-string
-          (update :foo
-                  {:x 4}
-                  (where {:k 0})
-                  (only-if [[:= :foo "bar"]
-                            [:> :moo 3]
-                            [:> :meh 4]
-                            [:in :baz [5 6 7]]
-                            ])))))
-
-  (is (= "DELETE a,b,c FROM foo;"
-         (normalize-string
-          (delete :foo
-                  (columns :a :b :c)))))
-
-  (is (= "DELETE a,b,c FROM foo WHERE k=0;"
-         (normalize-string
-          (delete :foo
-                  (columns :a :b :c)
-                  (where {:k 0})
-                  ))))
-
-  (is (= "DELETE a[3],b['foo'],c FROM foo WHERE k=1;"
-         (normalize-string
-          (delete :foo
-                  (columns (list-elt :a 3)
-                           (map-elt :b "foo")
-                           :c)
-                  (where {:k 1})))))
-
-  (is (= "DELETE FROM foo USING TIMESTAMP 1240003134 WHERE k='value';"
-         (normalize-string
-          (delete :foo
-                  (using {:timestamp 1240003134})
-                  (where {:k "value"})))))
-
-  (is (= "DELETE FROM foo WHERE k1='foo' IF EXISTS;"
-         (normalize-string
-          (delete :foo
-                  (where {:k1 "foo"})
-                  (if-exists)))))
-
-  (is (= "DELETE FROM foo WHERE k1='foo' IF a=1 AND b=2;"
-         (normalize-string
-          (delete :foo
-                  (where {:k1 "foo"})
-                  (only-if (array-map :a 1
-                                      :b 2))))))
-
-  (is (= "DELETE FROM foo WHERE k1=:key;"
-         (normalize-string
-          (delete :foo
-                  (where {:k1 (bind-marker "key")})))))
-
-
-  (is (= "TRUNCATE a;"
-         (normalize-string
-          (truncate :a))))
-
-  (is (= "TRUNCATE b.a;"
-         (normalize-string
-          (truncate :a :b))))
-
-  (is (= (str "BEGIN BATCH INSERT INTO foo(asd) VALUES ('bsd');"
-              "INSERT INTO foo(asd) VALUES ('bsd');"
-              "INSERT INTO foo(asd) VALUES ('bsd');"
-              "APPLY BATCH;")
-         (batch
-          (queries
-           (insert :foo
-                   {"asd" "bsd"})
-           (insert :foo
-                   {"asd" "bsd"})
-           (insert :foo
-                   {"asd" "bsd"})))))
-
-  (is (= (str "BEGIN COUNTER BATCH USING TIMESTAMP 42 "
-              "UPDATE foo SET a=a+1;"
-              "UPDATE foo SET b=b+1;"
-              "UPDATE foo SET c=c+1;"
-              "APPLY BATCH;")
-         (normalize-string
-          (batch
-           (using {:timestamp 42})
-           (queries
-            (update :foo
-                    (array-map :a (increment-by 1)))
-            (update :foo
-                    (array-map :b (increment-by 1)))
-            (update :foo
-                    (array-map :c (increment-by 1))))))))
-
-
-  (is (= "
-  CREATE TABLE foo(
+               (update :foo
+                       {}
+                       (using {:ttl -400}))))
+
+  (is (renders-to "UPDATE foo SET x=4 WHERE k=0 IF x=1;"
+                  (update :foo
+                          {:x 4}
+                          (where {:k 0})
+                          (only-if {:x 1}))))
+
+  (is (renders-to "UPDATE foo SET x=4 WHERE k=0 IF foo='bar' AND moo>3 AND meh>4 AND baz IN (5,6,7);"
+                  (update :foo
+                          {:x 4}
+                          (where {:k 0})
+                          (only-if [[:= :foo "bar"]
+                                    [:> :moo 3]
+                                    [:> :meh 4]
+                                    [:in :baz [5 6 7]]
+                                    ])))))
+
+(deftest test-delete
+  (is (renders-to "DELETE a,b,c FROM foo;"
+                  (delete :foo
+                          (columns :a :b :c))))
+
+  (is (renders-to "DELETE a,b,c FROM foo WHERE k=0;"
+                  (delete :foo
+                          (columns :a :b :c)
+                          (where {:k 0}))))
+
+  (is (renders-to "DELETE a[3],b['foo'],c FROM foo WHERE k=1;"
+                  (delete :foo
+                          (columns (list-elt :a 3)
+                                   (map-elt :b "foo")
+                                   :c)
+                          (where {:k 1}))))
+
+  (is (renders-to "DELETE FROM foo USING TIMESTAMP 1240003134 WHERE k='value';"
+                  (delete :foo
+                          (using {:timestamp 1240003134})
+                          (where {:k "value"}))))
+
+  (is (renders-to "DELETE FROM foo WHERE k1='foo' IF EXISTS;"
+                  (delete :foo
+                          (where {:k1 "foo"})
+                          (if-exists))))
+
+  (is (renders-to "DELETE FROM foo WHERE k1='foo' IF a=1 AND b=2;"
+                  (delete :foo
+                          (where {:k1 "foo"})
+                          (only-if (array-map :a 1
+                                              :b 2)))))
+
+  (is (renders-to "DELETE FROM foo WHERE k1=:key;"
+                  (delete :foo
+                          (where {:k1 (bind-marker "key")})))))
+
+
+(deftest test-truncate
+  (is (renders-to "TRUNCATE a;"
+                  (truncate :a)))
+
+  (is (renders-to "TRUNCATE b.a;"
+                  (truncate :a :b))))
+
+(deftest test-batch
+  (is (renders-to (str "BEGIN BATCH INSERT INTO foo(asd) VALUES ('bsd');"
+                       "INSERT INTO foo(asd) VALUES ('bsd');"
+                       "INSERT INTO foo(asd) VALUES ('bsd');"
+                       "APPLY BATCH;")
+                  (batch
+                   (queries
+                    (insert :foo
+                            {"asd" "bsd"})
+                    (insert :foo
+                            {"asd" "bsd"})
+                    (insert :foo
+                            {"asd" "bsd"})))))
+
+  (is (renders-to (str "BEGIN COUNTER BATCH USING TIMESTAMP 42 "
+                       "UPDATE foo SET a=a+1;"
+                       "UPDATE foo SET b=b+1;"
+                       "UPDATE foo SET c=c+1;"
+                       "APPLY BATCH;")
+                  (batch
+                   (using {:timestamp 42})
+                   (queries
+                    (update :foo
+                            (array-map :a (increment-by 1)))
+                    (update :foo
+                            (array-map :b (increment-by 1)))
+                    (update :foo
+                            (array-map :c (increment-by 1))))))))
+
+(deftest test-create-table
+  (is (= "CREATE TABLE foo(
     a int,
     b varchar,
     c int,
@@ -472,8 +430,7 @@
                                                        :e :int
                                                        :primary-key [[:a :b] :c :d]))))))

-  (is (= "
-  CREATE TABLE foo(
+  (is (= "CREATE TABLE foo(
     a int,
     c int,
     d int,
@@ -490,8 +447,7 @@
                                                        :primary-key [:a :c :d]))))))

-  (is (= "
-  CREATE TABLE foo(
+  (is (= "CREATE TABLE foo(
     a varchar,
     b varchar,
     c varchar,
@@ -508,8 +464,7 @@
                         (with {:compact-storage true})
                         ))))

-  (is (= "
-  CREATE TABLE foo(
+  (is (= "CREATE TABLE foo(
     a int,
     b map<varchar, varchar>,
     PRIMARY KEY(a))"
@@ -519,8 +474,7 @@
                                                        :b (map-type :varchar :varchar)
                                                        :primary-key [:a]))))))

-  (is (= "
-  CREATE TABLE IF NOT EXISTS foo(
+  (is (= "CREATE TABLE IF NOT EXISTS foo(
     a int,
     b varchar,
     PRIMARY KEY(a))"
@@ -530,68 +484,67 @@
                                                        :b :varchar
                                                        :primary-key [:a]))
                         (if-not-exists)
-                        ))))
-
-  (is (= "
-  ALTER TABLE foo ALTER foo TYPE int"
+                        )))))
+
+(deftest test-alter-table
+  (is (= "ALTER TABLE foo ALTER foo TYPE int"
          (normalize-string
           (alter-table :foo
                        (alter-column :foo :int)))))

-  (is (= "
-  ALTER TABLE foo ADD bar varchar"
+  (is (= "ALTER TABLE foo ADD bar varchar"
          (normalize-string
           (alter-table :foo
                        (add-column :bar :varchar)))))

-  (is (= "
-  ALTER TABLE foo DROP bar"
+  (is (= "ALTER TABLE foo DROP bar"
          (normalize-string
           (alter-table :foo
                        (drop-column :bar)))))

-  (is (= "
-  ALTER TABLE foo ALTER foo TYPE int"
+  (is (= "ALTER TABLE foo ALTER foo TYPE int"
          (normalize-string
           (alter-table :foo
                        (alter-column :foo :int)
-                       (with {:default-ttl 100})
-                       ))))
-
+                       (with {:default-ttl 100}))))))
+
+(deftest test-drop-table
   (is (= "DROP TABLE foo"
-         (drop-table :foo)))
-
-  (is (= "
-  CREATE INDEX foo ON bar(baz)"
+         (normalize-string
+          (drop-table :foo)))))
+
+(deftest test-create-index
+  (is (= "CREATE INDEX foo ON bar(baz)"
          (normalize-string
           (create-index "foo"
                         (on-table "bar")
                         (and-column "baz")))))

-  (is (= "
-  CREATE INDEX foo ON bar(KEYS(baz))"
+  (is (= "CREATE INDEX foo ON bar(KEYS(baz))"
          (normalize-string
           (create-index "foo"
                         (on-table "bar")
-                        (and-keys-of-column "baz")))))
-
-
+                        (and-keys-of-column "baz"))))))
+
+(deftest test-drop-keyspace
   (is (= "DROP KEYSPACE foo;"
-         (drop-keyspace "foo")))
+         (normalize-string
+          (drop-keyspace "foo"))))
   (is (= "DROP KEYSPACE IF EXISTS foo;"
-         (drop-keyspace "foo" (if-exists))))
-
-
+         (normalize-string
+          (drop-keyspace "foo" (if-exists))))))
+
+(deftest test-create-keyspace
   (is (= "CREATE KEYSPACE IF NOT EXISTS foo;"
-         (create-keyspace "foo"
-                          (if-not-exists))))
-
-  (is (= "CREATE KEYSPACE IF NOT EXISTS foo WITH REPLICATION = {class: 'SimpleStrategy', replication_factor: 1};"
-         (create-keyspace "foo"
-                          (with
+         (normalize-string
+          (create-keyspace "foo"
+                           (if-not-exists)))))
+
+  (is (= "CREATE KEYSPACE IF NOT EXISTS foo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"
+         (normalize-string
+          (create-keyspace "foo"
+                           (with
                             {:replication
                              {"class"              "SimpleStrategy"
                               "replication_factor" 1}})
-                          (if-not-exists))))
-
-  )
+                           (if-not-exists))))))


update password update api endpoint to always check the current password when a user is updating their own account.

--- src/metabase/api/user.clj
+++ src/metabase/api/user.clj
@@ -84,7 +84,7 @@
   {password     [Required ComplexPassword]}
   (check-self-or-superuser id)
   (let-404 [user (sel :one [User :password_salt :password] :id id :is_active true)]
-    (when-not (:is_superuser @*current-user*)
+    (when (= id (:id @*current-user*))
       (checkp (creds/bcrypt-verify (str (:password_salt user) old_password) (:password user)) "old_password" "Invalid password")))
   (set-user-password id password)
   (User id))


Minor fix: move log to proper place

Minor fix: move log to proper place

--- src/muon_clojure/core.clj
+++ src/muon_clojure/core.clj
@@ -224,11 +224,9 @@

 (defn request! [service-url params]
   (let [item-json (mcu/dekeywordize params)
-        _ (log/info ":::::::: CLIENT REQUESTING" service-url item-json)
         payload (mcu/keywordize
                  (into {} (request *muon-config* service-url item-json)))
         payload (if (contains? payload :_muon_wrapped_value)
                   (:_muon_wrapped_value payload) payload)]
+    (log/info ":::::::: CLIENT REQUESTING" service-url item-json)
     payload))
-
-


Fix some keyword conversions for blob functions.

--- src/mvxcvi/vault/blob.clj
+++ src/mvxcvi/vault/blob.clj
@@ -56,9 +56,10 @@
   [address]
   (let [address (if (re-find #"^urn:" address) (subs address 4) address)
         address (if (re-find #"^hash:" address) (subs address 5) address)
-        [algorithm digest] (string/split address #":" 2)]
+        [algorithm digest] (string/split address #":" 2)
+        algorithm (keyword algorithm)]
     (assert-valid-digest algorithm)
-    (BlobRef. (keyword algorithm) digest)))
+    (BlobRef. algorithm digest)))

 (defn make-blobref
@@ -68,5 +69,6 @@
      x
      (parse-address (str x))))
   ([algorithm digest]
-   (assert-valid-digest algorithm)
-   (BlobRef. algorithm digest)))
+   (let [algorithm (keyword algorithm)]
+     (assert-valid-digest algorithm)
+     (BlobRef. algorithm digest))))


Remove duped fn.

Remove duped fn.

--- src/onyx/plugin/kafka.clj
+++ src/onyx/plugin/kafka.clj
@@ -7,6 +7,7 @@
             [cheshire.core :refer [parse-string]]
             [zookeeper :as zk]
             [onyx.peer.pipeline-extensions :as p-ext]
+            [onyx.peer.operation :refer [kw->fn]]
             [taoensso.timbre :as log :refer [fatal]])
   (:import [clj_kafka.core KafkaMessage]))

@@ -65,13 +66,7 @@
     (catch Throwable e
       (fatal e))))

-(defn kw->fn [kw]
-  (try
-    (let [user-ns (symbol (name (namespace kw)))
-          user-fn (symbol (name kw))]
-      (or (ns-resolve user-ns user-fn) (throw (Exception.))))
-    (catch Throwable e
-      (throw (ex-info "Could not resolve symbol on the classpath, did you require the file that contains this symbol?" {:symbol kw})))))
+

 (defn reader-loop [m client-id group-id topic partitions kpartition task-map ch pending-commits]
   (try


small ui fix

small ui fix

--- src/cljs/salava/extra/application/ui/helper.cljs
+++ src/cljs/salava/extra/application/ui/helper.cljs
@@ -115,7 +115,7 @@
    [:div {:class "col-sm-12" :id "sharelinks"}
     [:div#share
      [:div#share-buttons
-      [:div.share-link {:style {:margin-left "unset"}}
+      [:div.share-link ;{:style {:margin-left "unset"}}
        [:a {:href "#" :on-click #(do (.preventDefault %) (reset! link-or-embed-atom (if (= "link" @link-or-embed-atom) nil "link")))} (t :core/Link)]]
       [:div.share-link
        [:a {:href "#" :on-click #(do (.preventDefault %) (reset! link-or-embed-atom (if (= "embed" @link-or-embed-atom) nil "embed")))} (t :core/Embedcode)]]]


Put in the right magic around `:advanced` Dead Code Elimination

--- src/re_frame/interop.cljs
+++ src/re_frame/interop.cljs
@@ -9,9 +9,11 @@

 (def after-render reagent.core/after-render)

-;; make sure the Google Closure compiler see this as a boolean constatnt
+;; Make sure the Google Closure compiler sees this as a boolean constatnt,
+;; otherwise Dead Code Elimination won't happen in `:advanced` builds.
+;; Type hints have been liberally sprinkled.
 ;; https://developers.google.com/closure/compiler/docs/js-for-compiler
-(def ^:boolean debug-enabled? "@const  @define {boolean}" js/goog.DEBUG)
+(def ^boolean DEBUG? "@define {boolean}" ^boolean js/goog.DEBUG)

 (defn ratom [x]
   (reagent.core/atom x))


Updated ns-tracker to fix wrap-reload bug

--- ring-devel/project.clj
+++ ring-devel/project.clj
@@ -4,4 +4,4 @@
   :dependencies [[ring/ring-core "1.1.3"]
                  [hiccup "1.0.0"]
                  [clj-stacktrace "0.2.4"]
-                 [ns-tracker "0.1.1"]])
+                 [ns-tracker "0.1.2"]])


begin/end-shape take keywords as first arg

--- src/rosado/processing.clj
+++ src/rosado/processing.clj
@@ -16,6 +16,11 @@
 ;; used by functions in this lib. Use binding to set it
 ;; to an instance of processing.core.PApplet
 (def #^PApplet *applet*)
+
+(def #^{:private true} toupper (memfn toUpperCase))
+
+(defn- tosymb [kw]
+  (-> kw name toupper symbol))

 (defn abs-int [n] (PApplet/abs (int n)))

@@ -93,9 +98,21 @@

 ;; $$beginRecord

-(defn begin-shape
-  ([] (.beginShape *applet*))
-  ([kind] (.beginShape *applet* (int kind))))
+(def shapes {:points POINTS
+             :lines LINES
+             :triangles TRIANGLES
+             :triangle-strip TRIANGLE_STRIP
+             :triangle-fan TRIANGLE_FAN
+             :quads QUADS
+             :quad-strip QUAD_STRIP})
+
+(defmacro begin-shape
+  "Takes an optional keyword argument:  One  of: :points, :lines, :triangles,
+  :triangle-fan, :triangle-strip, :quads, :quad-strip."
+  ([] `(.beginShape *applet*))
+  ([kind]
+     (let [kind (shapes kind)]
+       `(.beginShape *applet* (int ~kind)))))

 (defn bezier
   ([x1 y1 x2 y2 x3 y3 x4 y4]
@@ -327,9 +344,11 @@

 (defn end-raw [] (.endRaw *applet*))

-(defn end-shape
-  ([] (.endShape *applet*))
-  ([mode] (.endShape *applet* (int mode))))
+(defmacro end-shape
+  ([] `(.endShape *applet*))
+  ([kind]
+     (let [kind (tosymb kind)]
+       `(.endShape *applet* (int ~kind)))))

 ;; $$exec

@@ -844,7 +863,7 @@
      (pop-matrix)))

 (defmacro with-rotation
-  "Berforms body with rotation, restores current transformation on exit.
+  "Performs body with rotation, restores current transformation on exit.
   Accepts a vector [angle] or [angle x-axis y-axis z-axis].

   Example:


Make sure :position tag is included in bursts

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

--- acqEngine/src/org/micromanager/sequence_generator.clj
+++ acqEngine/src/org/micromanager/sequence_generator.clj
@@ -362,6 +362,7 @@
                     :wait-time-ms 0.0
                     :exposure exposure
                     :position-index position-index
+                    :position position-index
                     :autofocus (if first-plane use-autofocus false)
                     :channel-index c
                     :channel (get channels c)
@@ -380,13 +381,14 @@

 (defn generate-multiposition-bursts [positions num-frames use-autofocus
                                      channels default-exposure triggers]
-    (process-new-position
-      (flatten
-        (for [pos-index (range (count positions))]
-          (map #(assoc % :position-index pos-index
-                         :position (nth positions pos-index))
-               (generate-simple-burst-sequence
-                 num-frames use-autofocus channels default-exposure triggers pos-index))))))
+  (println "generate-multiposition-bursts")
+  (process-new-position
+    (flatten
+      (for [pos-index (range (count positions))]
+        (map #(assoc % :position-index pos-index
+                     :position (nth positions pos-index))
+             (generate-simple-burst-sequence
+               num-frames use-autofocus channels default-exposure triggers pos-index))))))

 (defn generate-acq-sequence [settings runnables]
   (let [{:keys [numFrames time-first positions slices channels


Removed parameter parsing to integer - now handled in core

--- kuona/src/kuona_api/handler.clj
+++ kuona/src/kuona_api/handler.clj
@@ -52,8 +52,7 @@

 (defn get-repositories
   [search page]
-  (let [page-number (. Integer parseInt  page)]
-    (response (store/search repositories search 100 page-number repository-page-link))))
+  (response (store/search repositories search 100 page repository-page-link)))

 (defroutes app-routes
   (GET "/" [] (response service-data))


Remove test code

Remove test code

--- src/sparql_to_csv/cli.clj
+++ src/sparql_to_csv/cli.clj
@@ -150,10 +150,7 @@
           :as params} :options
          :keys [arguments errors summary]} (parse-opts args cli-options)
         [template] (filter (partial not= "-") arguments)]
-    (if (> (.available System/in) 0)
-      (println "STDIN: " (slurp *in*))
-      (println "No Input"))
-    #_(cond (or help? (not (seq args))) (util/info (usage summary))
+    (cond (or help? (not (seq args))) (util/info (usage summary))
           errors (util/die (error-msg errors))
           (not endpoint) (util/die "You must provide a SPARQL endpoint URL.")
           (not template) (util/die "You must provide a query template.")


Container cube

Container cube

--- src/try_lwjgl/display.clj
+++ src/try_lwjgl/display.clj
@@ -104,6 +104,53 @@
              (GL11/glVertex3f 0.0 VERTEXT-WIDTH  1.0)
              (GL11/glVertex3f 0.0 VERTEXT-WIDTH -1.0))))

+(defn draw-container-cube []
+  (drawing-object
+   (GL11/glScaled 10.0 10.0 10.0)
+   (GL11/glLineWidth 2.5)
+   (GL11/glColor3f 1.0 0.0 0.0)
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f 0 0 0)
+             (GL11/glVertex3f 1 1 1))
+
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f 1 1 -1)
+             (GL11/glVertex3f -1 1 -1))
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f -1 1 -1)
+             (GL11/glVertex3f -1 -1 -1))
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f -1 -1 -1)
+             (GL11/glVertex3f 1 -1 -1))
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f 1 -1 -1)
+             (GL11/glVertex3f 1 1 -1))
+
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f 1 1 1)
+             (GL11/glVertex3f -1 1 1))
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f -1 1 1)
+             (GL11/glVertex3f -1 -1 1))
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f -1 -1 1)
+             (GL11/glVertex3f 1 -1 1))
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f 1 -1 1)
+             (GL11/glVertex3f 1 1 1))
+
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f -1 -1 -1)
+             (GL11/glVertex3f -1 -1 1)
+             (GL11/glVertex3f -1 1 1)
+             (GL11/glVertex3f -1 1 -1))
+
+   (do-shape GL11/GL_LINES
+             (GL11/glVertex3f 1 -1 -1)
+             (GL11/glVertex3f 1 -1 1)
+             (GL11/glVertex3f 1 1 1)
+             (GL11/glVertex3f 1 1 -1))))
+
 (defn translate-position [position vector]
   (let [position-buf (Vector4f. (float (position 0))
                                 (float (position 1))
@@ -131,6 +178,7 @@
                    (float 0.0) (float 1.0) (float 0.0)))

   (draw-vertices)
+  (draw-container-cube)
   (draw-rectangle))

 (defn init []


Fix bugs on quartz abstraction layer impl.

--- src/uxbox/util/quartz.clj
+++ src/uxbox/util/quartz.clj
@@ -6,13 +6,21 @@

 (ns uxbox.util.quartz
   "A lightweight abstraction layer for quartz job scheduling library."
-  (:import org.quartz.Scheduler
+  (:import java.util.Properties
+           org.quartz.Scheduler
            org.quartz.SchedulerException
            org.quartz.impl.StdSchedulerFactory
            org.quartz.Job
            org.quartz.JobBuilder
+           org.quartz.JobDataMap
+           org.quartz.JobExecutionContext
            org.quartz.TriggerBuilder
-           org.quartz.SimpleScheduleBuilder))
+           org.quartz.CronScheduleBuilder
+           org.quartz.SimpleScheduleBuilder
+           org.quartz.PersistJobDataAfterExecution
+           org.quartz.DisallowConcurrentExecution))
+
+;; --- Implementation

 (defn- map->props
   [data]
@@ -20,21 +28,70 @@
     (run! (fn [[k v]] (.setProperty p (name k) (str v))) (seq data))
     p))

+(deftype ^{org.quartz.PersistJobDataAfterExecution true
+           org.quartz.DisallowConcurrentExecution true}
+    PersistentJobImpl []
+  Job
+  (execute [_ context]
+    (let [data (.. context getJobDetail getJobDataMap)
+          callable (.get ^JobDataMap data "callable")
+          state (.get ^JobDataMap data "state")
+          result (callable state)]
+      (.put ^JobDataMap data "state" result))))
+
+(deftype JobImpl []
+  Job
+  (execute [_ context]
+    (let [data (.. context getJobDetail getJobDataMap)
+          callable (.get ^JobDataMap data "callable")]
+      (callable))))
+
+(defn- build-trigger
+  [{:keys [cron group name repeat? interval]
+    :or {repeat? true}
+    :as opts}]
+  (let [schedule (if cron
+                   (CronScheduleBuilder/cronSchedule cron)
+                   (let [schd (SimpleScheduleBuilder/simpleSchedule)
+                         schd (if (number? repeat?)
+                                (.withRepeatCount schd repeat?)
+                                (.repeatForever schd))]
+                     (.withIntervalInMilliseconds schd interval)))
+        name (str name "-trigger")
+        builder (doto (TriggerBuilder/newTrigger)
+                  (.startNow)
+                  (.withIdentity name group)
+                  (.withSchedule schedule))]
+    (.build builder)))
+
+(defn- build-job-detail
+  [f {:keys [group name state] :or {group "uxbox"} :as opts}]
+  (let [name (or name (str (gensym "uxbox-job")))
+        data (JobDataMap. {"callable" f "state" state})
+        builder (doto (JobBuilder/newJob (if state PersistentJobImpl JobImpl))
+                  (.storeDurably true)
+                  (.usingJobData data)
+                  (.withIdentity name group))]
+    (.build builder)))
+
+;; --- Public Api
+
 (defn scheduler
   "Create a new scheduler instance."
-  [{:keys [name daemon? threads]
-    :or {name "uxbox-scheduler"
-         daemon? true
-         threads 1
-         thread-priority Thread/MIN_PRIORITY}}]
-  (let [params {"org.quartz.threadPool.threadCount" threads
-                "org.quartz.threadPool.threadPriority" thread-priority
-                "org.quartz.threadPool.makeThreadsDaemons" (if daemon? "true" "false")
-                "org.quartz.scheduler.instanceName" name
-                "org.quartz.scheduler.makeSchedulerThreadDaemon" (if daemon? "true" "false")}
-        props (map->props params)
-        factory (StdSchedulerFactory. props)]
-    (.getScheduler factory)))
+  ([] (scheduler nil))
+  ([{:keys [name daemon? threads thread-priority]
+     :or {name "uxbox-scheduler"
+          daemon? true
+          threads 1
+          thread-priority Thread/MIN_PRIORITY}}]
+   (let [params {"org.quartz.threadPool.threadCount" threads
+                 "org.quartz.threadPool.threadPriority" thread-priority
+                 "org.quartz.threadPool.makeThreadsDaemons" (if daemon? "true" "false")
+                 "org.quartz.scheduler.instanceName" name
+                 "org.quartz.scheduler.makeSchedulerThreadDaemon" (if daemon? "true" "false")}
+         props (map->props params)
+         factory (StdSchedulerFactory. props)]
+     (.getScheduler factory))))

 (defn start!
   ([scheduler]
@@ -46,45 +103,11 @@
   [scheduler]
   (.shutdown ^Scheduler scheduler true))

-(defn- make-simple-trigger-schedule
-  [{:keys [repeat? interval name group]
-    :or {repeat? true group "uxbox"}}]
-  (assert (pos? interval) "interval should be specified")
-  (let [schd (doto (SimpleScheduleBuilder/simpleSchedule)
-               (.withIdentity ("job1", "group1")
-        schd (if (number? repeat?)
-               (.withRepeatCount schd repeat?)
-               (.repeatForever schd))]
-    (.withIntervalInMilliseconds schd interval)))
-
-(defn- make-cron-trigger-schedule
-  [expr]
-  (CronScheduleBuilder/cronSchedule expr))
-
-(defn- make-trigger
-  [{:keys [cron group name]
-    :as opts}]
-  (let [schedule (if cron
-                   (make-cron-trigger-schedule cron)
-                   (make-simple-trigger-schedule opts))
-        name (str name "-trigger")
-        trigger (doto (TriggerBuilder/newTrigger)
-                  (.withIdentity name group))]
-    (.build trigger)))
-
-(defn- make-job
-  [f {:keys [group name] :or {group "uxbox"} :as opts}]
-  (let [instance (reify Job (execute [_ _] (f)))
-        name (or name (str (gensym "uxbox-job")))
-        detail (doto (JobBuilder/newJob (class instance))
-                 (.withIdentity name group))]
-    (.build detail)))
-
 (defn schedule!
-  ([schd f] (schedule! sched f nil))
+  ([schd f] (schedule! schd f nil))
   ([schd f {:keys [name group] :as opts}]
    (let [name (or name (str (gensym "uxbox")))
          opts (assoc opts :name name :group "uxbox")
-         job (make-job f opts)
-         trigger (make-trigger opts)]
+         job (build-job-detail f opts)
+         trigger (build-trigger opts)]
      (.scheduleJob ^Scheduler schd job trigger))))


Remove dosync

Remove dosync

--- src/zaffre/glterminal.clj
+++ src/zaffre/glterminal.clj
@@ -1018,7 +1018,7 @@
           \s (zat/apply-font! terminal "Consolas" "Monospaced" 12 true)
           \m (zat/apply-font! terminal "Consolas" "Monospaced" 18 true)
           \l (zat/apply-font! terminal "Consolas" "Monospaced" 24 true)
-          \q (dosync (zat/destroy! terminal))
+          \q (zat/destroy! terminal)
           nil)
         (if (= new-key :exit)
           (do


Added compliment/fix brackets.

Added compliment/fix brackets.

--- lein/.lein/profiles.d/cider.clj
+++ lein/.lein/profiles.d/cider.clj
@@ -1,6 +1,7 @@
 {:plugins [[cider/cider-nrepl "0.15.1-SNAPSHOT"]
            [refactor-nrepl "2.4.0-SNAPSHOT"]]
- :dependencies [[acyclic/squiggly-clojure "0.1.8"]]
+ :dependencies [[acyclic/squiggly-clojure "0.1.8"]
+                [compliment "0.3.4"]]
  :env {:squiggly
        ;; Quote options to avoid warnings
        ;; introduced with `lein-environ 1.1.0` plugin


Rework patterns protocols

Rework patterns protocols

--- src/beehive/patterns.clj
+++ src/beehive/patterns.clj
@@ -26,23 +26,26 @@
 (defn- transform-map [service->context]
   (into {} (map (fn [[k v]] [(.service ^CLJServiceImpl k) v]) service->context)))

-(defprotocol CLJComposedService
-  (submit-action [this action-fn timeout-millis])
+(defprotocol CLJAsyncPattern
+  (submit-action [this action-fn timeout-millis]))
+
+(defprotocol CLJSyncPattern
   (run-action [this action-fn]))

 (deftype CLJLoadBalancer [^MultiLoadBalancer balancer]
-  CLJComposedService
-  (submit-action [this action-fn timeout-millis]
+  CLJAsyncPattern
+  (submit-action [_ action-fn timeout-millis]
     (try (f/->CLJResilientFuture
            (.submit balancer
                     (c/wrap-pattern-action-fn action-fn)
                     timeout-millis))
          (catch RejectedActionException e
            (f/rejected-action-future (.reason e)))))
-  (run-action [this action-fn]
+  CLJSyncPattern
+  (run-action [_ action-fn]
     (try
       (.run balancer (c/wrap-pattern-action-fn action-fn))
-      (catch RejectedActionException e
+      (catch RejectedActionException _
         :all-services-rejected))))

 (defn load-balancer [service->context]
@@ -51,17 +54,14 @@
     (->CLJLoadBalancer balancer)))

 (deftype CLJShotgun [^Shotgun shotgun]
-  CLJComposedService
-  (submit-action [this action-fn timeout-millis]
+  CLJAsyncPattern
+  (submit-action [_ action-fn timeout-millis]
     (try (f/->CLJResilientFuture
            (.submit shotgun
                     (c/wrap-pattern-action-fn action-fn)
                     timeout-millis))
          (catch RejectedActionException e
-           (f/rejected-action-future (.reason e)))))
-
-  (run-action [this action-fn]
-    (throw (UnsupportedOperationException. "Cannot perform action with Shotgun"))))
+           (f/rejected-action-future (.reason e))))))

 (defn shotgun [service->context submission-count]
   (let [service->context (transform-map service->context)


Trashing cruft

Trashing cruft

--- src/vdquil/chapter6/figure6-1.clj
+++ src/vdquil/chapter6/figure6-1.clj
@@ -24,9 +24,6 @@
 (def max-longitude 0.35192886)
 (def max-latitude 0.87044954)

-(map-range 0.26091918 min-latitude max-latitude (- canvas-height 20) 20)
-(map-range 0.6702453 min-longitude max-longitude 30  (- canvas-width 30) )
-
 (defn draw []
   (background 255)
   (with-open [zips (io/reader "data/zips-modified.tsv")]


clojure 1.6.0

clojure 1.6.0

--- src/blackbox/project.clj
+++ src/blackbox/project.clj
@@ -8,7 +8,7 @@
   :dependencies [[pandect "0.3.0"]
                  [clj-time "0.6.0"]
                  [org.zeromq/jzmq "2.2.2"]
-                 [org.clojure/clojure "1.5.1"]
+                 [org.clojure/clojure "1.6.0"]
                  [org.clojure/tools.cli "0.2.4"]
                  [clojurewerkz/cassaforte "2.0.0-rc1"]
                  [org.clojure/tools.logging "0.2.6"]


spec restore

spec restore

--- test/celestial/integration/workflows/freenas.clj
+++ test/celestial/integration/workflows/freenas.clj
@@ -18,7 +18,7 @@
       (fact "freenas creation workflows" :integration :freenas :workflow
           (wf/create (spec)) => nil
           ;; (wf/create (spec)) => (throws ExceptionInfo  (is-type? :celestial.workflows/machine-exists))
-          ;; (wf/stop (spec)) => nil
+          (wf/stop (spec)) => nil
           ;; (wf/create (spec)) => (throws ExceptionInfo  (is-type? :celestial.workflows/machine-exists))
-          ;; (wf/destroy (spec)) => nil)
+          (wf/destroy (spec)) => nil
       ))))


TIL about `lein test :only test/some/filename.clj`

* which means I can uncomment all the tests I'm not running right now


add exploration pipeline

add exploration pipeline

--- src/clj/signet/graph.clj
+++ src/clj/signet/graph.clj
@@ -1,13 +1,6 @@
 (ns signet.graph
   (:require [clojure.set :refer [difference]]
             [aprint.core :refer [aprint]]))
-
-
-(defmacro filter-map [bindings pred m]
-  `(select-keys ~m
-                (for [~bindings ~m
-                      :when ~pred]
-                  ~(first bindings))))

 (defn branches->nodes [c causal-order heads]
@@ -80,8 +73,10 @@
 (defn find-merge-links [{:keys [causal-order branches] :as cg}]
   (let [branch-heads (into {} (map (fn [[k v]] [v k]) branches))]
     (assoc cg :merge-links
-      (->> causal-order
-           (filter-map [key val] (> (count val) 1))
+      (->> (select-keys causal-order
+                (for [[k v] causal-order
+                      :when (> (count v) 1)]
+                  k))
            (into {})
            (map (fn [[k v]] (map (fn [b] [b [(branches b) k]]) (remove nil? (map branch-heads v)))))
            (apply concat)
@@ -95,10 +90,21 @@
          (map
           (fn [[k v]]
             [k
-             (map
+             (mapv
               (fn [i]
                 [(get v i) (get v (inc i))])
               (range (count v)))])))))
+
+
+(defn explore-commit-graph
+  "Run the pipeline"
+  [cg]
+  (->> cg
+       commit-graph->nodes
+       distinct-nodes
+       nodes->order
+       find-merge-links
+       nodes->links))

 (comment

@@ -122,11 +128,7 @@
                 "dev" 120
                 "fix-2" 140}})

-  (->> test-cg
-       commit-graph->nodes
-       distinct-nodes
-       nodes->order
-       find-merge-links
-       nodes->links)
+
+  (explore-commit-graph test-cg)

   )


Added check for object already being there

--- src/cljs/drawer/api.cljs
+++ src/cljs/drawer/api.cljs
@@ -70,7 +70,8 @@
 (defn ^:export setRotation
   [obj-name do-rotate]
   (fn [state]
-    (assoc-in state [:objects obj-name :rotation :active] do-rotate)))
+    (if (contains? (state :objects) obj-name)
+      (assoc-in state [:objects obj-name :rotation :active] do-rotate))))

 (defn ^:export setRotationOnAll
   "Returns a function that activates/deactivates the rotation on all objects."


Getting rid of go-public in munge

Getting rid of go-public in munge

--- src/cljs/go/compiler.clj
+++ src/cljs/go/compiler.clj
@@ -94,7 +94,7 @@
       (let [{:keys [name field] :as info} s
             depth (shadow-depth s)
             renamed (*lexical-renames* (System/identityHashCode s))
-            munged-name (munge (cond field (str "self__."  (go-public name)) ;; note use of go-public, needs to be consolidated.
+            munged-name (munge (cond field (str "self__." name)
                                      renamed renamed
                                      :else name)
                                reserved)]
@@ -263,7 +263,8 @@
       (emits (munge arg))
       (when-not (= :statement (:context env))
         (emit-wrap env (emits (munge (cond ;; this runs munge in a different order from most other things.
-                                      ((hash-set ana/*cljs-ns* 'cljs.core) (:ns info))
+                                      (or ((hash-set ana/*cljs-ns* 'cljs.core) (:ns info))
+                                          (:field info))
                                       (update-in info [:name] (comp go-public name))
                                       (:ns info)
                                       (update-in info [:name] #(str (namespace %) "." (go-public %)))


Faces to Tris

Faces to Tris