(defproject io.curtis/boilerpipe-clj "0.2.0"
  :description "A simple wrapper around the Boilerpipe library for extracting text from html articles/pages"
  :url "http://curtis.io"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.0"]
                 [org.thnetos/cd-client "0.3.4" :exclusions [org.clojure/clojure cheshire]]
                 [net.sourceforge.nekohtml/nekohtml "1.9.15"]
                 [xerces/xercesImpl "2.9.1"]
                 [de.l3s.boilerpipe/boilerpipe "1.2.0"]]
  :repositories  {"boilerpipe"
                  {:url "http://boilerpipe.googlecode.com/svn/repo/"}})

(defproject io.curtis/boilerpipe-clj "0.2.1-SNAPSHOT"
  :description "A simple wrapper around the Boilerpipe library for extracting text from html articles/pages"
  :url "http://curtis.io"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.thnetos/cd-client "0.3.4" :exclusions [org.clojure/clojure cheshire]]
                 [net.sourceforge.nekohtml/nekohtml "1.9.15"]
                 [xerces/xercesImpl "2.9.1"]
                 [de.l3s.boilerpipe/boilerpipe "1.2.0"]]
  :repositories  {"boilerpipe"
                  {:url "http://boilerpipe.googlecode.com/svn/repo/"}})

Use latest version of clojure

Use latest version of clojure


(defproject reply "0.1.0-SNAPSHOT"
  :description "REPL-y: A fitter, happier, more productive REPL for Clojure."
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.clojars.trptcolin/jline "2.7-alpha2"]
                 [org.thnetos/cd-client "0.3.4"]
                 [clj-stacktrace "0.2.4"]
                 [org.clojure/tools.nrepl "0.2.0-beta6"]
                 [com.cemerick/drawbridge "0.0.3"]
                 [clojure-complete "0.2.1"]]
  :dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
                     [lein-midje "[1.0.0,)"]]
  :aot [reply.reader.jline.JlineInputReader]
  :source-path "src/clj"
  :java-source-path "src/java"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :main ^{:skip-aot true} reply.main)

(defproject reply "0.1.0-SNAPSHOT"
  :description "REPL-y: A fitter, happier, more productive REPL for Clojure."
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.clojars.trptcolin/jline "2.7-alpha3"]
                 [org.thnetos/cd-client "0.3.4"]
                 [clj-stacktrace "0.2.4"]
                 [org.clojure/tools.nrepl "0.2.0-beta6"]
                 [com.cemerick/drawbridge "0.0.3"]
                 [clojure-complete "0.2.1"]]
  :dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
                     [lein-midje "[1.0.0,)"]]
  :aot [reply.reader.jline.JlineInputReader]
  :source-path "src/clj"
  :java-source-path "src/java"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :main ^{:skip-aot true} reply.main)

Bump jline version to get rid of jlinerc message

closes #54


(defproject incise "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :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"]
                 [dieter "0.4.1"]]
  :plugins [[speclj "2.1.2"]]
  :test-paths ["spec/"]
  :main incise.core)

(defproject incise "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :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"]
                 [watchtower "0.1.1"]
                 [markdown-clj "0.9.29"]
                 [org.clojure/java.classpath "0.2.0"]
                 [org.clojure/tools.namespace "0.2.4"]
                 [dieter "0.4.1"]]
  :plugins [[speclj "2.1.2"]]
  :test-paths ["spec/"]
  :main incise.core)

Add watchtower, markdown and namespace deps.


(defproject onyx-app/lein-template "0.10.0.0-beta3"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

(defproject onyx-app/lein-template "0.10.0.0-SNAPSHOT"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

Prepare for next release cycle.

Prepare for next release cycle.


(ns icecap.schema-test
  (:require [icecap.schema :refer :all]
            [clojure.test :refer :all]
            [schema.core :as s]))

(def simple-http-request {:target "http://example.test"})
(def simple-https-request {:target "https://example.test"})
(def simple-ftp-request {:target "ftp://example.test"})

(deftest RequestSpecTests
  (testing "Correct request specs validate"
    (are [example] (s/validate RequestSpec example)
         simple-http-request
         simple-https-request
         #{simple-http-request simple-https-request}))
  (testing "Empty collections don't validate"
    (are [example] (some? (s/check RequestSpec example))
         []
         #{}))
  (testing "Request specs with unknown/unsupported schemes don't validate"
    (are [example reason] (= (s/check RequestSpec example) reason)
         simple-ftp-request {:target (not ("supported-scheme?" "ftp://example.test"))})))

(ns icecap.schema-test
  (:require [icecap.schema :refer :all]
            [clojure.test :refer :all]
            [schema.core :as s]))

(def simple-http-request {:target "http://example.test"})
(def simple-https-request {:target "https://example.test"})
(def simple-ftp-request {:target "ftp://example.test"})

(deftest RequestSpecTests
  (testing "Correct request specs validate"
    (are [example] (s/validate RequestSpec example)
         simple-http-request
         simple-https-request
         #{simple-http-request simple-https-request}))
  (testing "Empty collections don't validate"
    (are [example] (some? (s/check RequestSpec example))
         []
         #{}))
  (testing "Request specs with unknown/unsupported schemes don't validate"
    ;; Comparing string representations isn't great, but it's the best
    ;; easily available tool until maybe one day cddr/integrity's
    ;; humanize function is on Clojars + can humanize these errors :-)
    (are [example reason] (= (pr-str (s/check RequestSpec example))
                             (pr-str reason))
         simple-ftp-request {:target '(not ("supported-scheme?" "ftp://example.test"))})))

Fix the test (in an unfortunate fashion)


(ns circle.backend.test-git
  (:use midje.sweet)
  (:use circle.backend.git)
  (:require [circle.model.project :as project])
  (:require [circle.backend.build.test-utils :as test])
  (:require [circle.backend.github-url :as github])
  (:require fs))

(test/ensure-test-project)

(fact "clone works"
  (let [test-url (-> test/test-project :vcs_url)
        test-git-url (github/->ssh test-url)
        test-repo-path (default-repo-path test-url)
        ssh-key (project/ssh-key-for-url test-url)]
    (fs/deltree test-repo-path)
    (repo-exists? test-repo-path) => false
    (clone test-git-url :ssh-key ssh-key :path test-repo-path)
    (repo-exists? test-repo-path) => true))

(ns circle.backend.test-git
  (:use midje.sweet)
  (:use circle.backend.git)
  (:require [circle.model.project :as project])
  (:require [circle.backend.build.test-utils :as test])
  (:require [circle.backend.github-url :as github])
  (:require fs))

(test/ensure-test-project)

(fact "clone works"
  (let [test-url (-> test/test-project :vcs_url)
        test-git-url (github/->ssh test-url)
        test-repo-path (default-repo-path test-url)
        ssh-key (project/ssh-key-for-url test-url)]
    (fs/deltree test-repo-path)
    (repo-exists? test-repo-path) => false
    (clone test-git-url :ssh-key ssh-key :path test-repo-path)
    (repo-exists? test-repo-path) => true
    (fs/exists? (fs/join test-repo-path "README.md")) => true))

Make the git clone test a little more specific


(ns ^{:added "2.0.0" :author "Pedro Santos"}
  obb-rules.logger
  "Specific logger that can be turned on and off"
  (:require [obb-rules.simplifier :as simplify]))

(def ^:dynamic *verbose* false)

(defmacro log
  "Logs the given data"
  [& args]
  `(when *verbose*
    (println ~@args)))

(defn ai-turn
  "Logs ai-turn header"
  [ai-name game]
  (log "## ~~~~~~~~~~~~~~~~~~~~~~")
  (log "## AI Turn:" ai-name)
  (log "Game:")
  (log (simplify/clean-result {:board game})))

(defmacro with-verbose
  "Runs the given code in verbose mode"
  [& body]
  `(binding [*verbose* true]
    ~@body))

(defn ai-option
  "Logs an AI option"
  [option]
  (log (:actions option))
  (log "\tValue:" (:value option)
       "(" (:old-value option) ")"
       "Cost:" (:cost option)))

(ns ^{:added "2.0.0" :author "Pedro Santos"}
  obb-rules.logger
  "Specific logger that can be turned on and off"
  (:require [obb-rules.simplifier :as simplify]))

(def ^:dynamic *verbose* false)

#?(:clj
  (defmacro log
    "Logs the given data"
    [& args]
    `(when *verbose*
      (println ~@args))))

#?(:cljs
  (defn log
    "Logs the given data"
    [& args]
    (when *verbose*
      (apply println args))))

(defn ai-turn
  "Logs ai-turn header"
  [ai-name game]
  (log "## ~~~~~~~~~~~~~~~~~~~~~~")
  (log "## AI Turn:" ai-name)
  (log "Game:")
  (log (simplify/clean-result {:board game})))

(defmacro with-verbose
  "Runs the given code in verbose mode"
  [& body]
  `(binding [*verbose* true]
    ~@body))

(defn ai-option
  "Logs an AI option"
  [option]
  (log (:actions option))
  (log "\tValue:" (:value option)
       "(" (:old-value option) ")"
       "Cost:" (:cost option)))

Use log fn instead of macro on cljs

Use log fn instead of macro on cljs


;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>

(ns uxbox.data.core
  "Worker related api and initialization events."
  (:require [beicon.core :as rx]
            [uxbox.rstore :as rs]
            [uxbox.constants :as c]
            [uxbox.util.workers :as uw]))

(defonce worker (uw/init "/js/worker.js"))

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>

(ns uxbox.data.core
  "Worker related api and initialization events."
  (:require [beicon.core :as rx]
            [uxbox.rstore :as rs]
            [uxbox.constants :as c]
            [uxbox.util.workers :as uw]))

;; This excludes webworker instantiation on nodejs where
;; the tests are run.

(when (not= *target* "nodejs")
  (defonce worker (uw/init "/js/worker.js")))

Initialize webworker only on browser environment.


(defproject todomvc-re-frame "0.8.0"
  :dependencies [[org.clojure/clojure        "1.8.0"]
                 [org.clojure/clojurescript  "1.9.89"]
                 [reagent "0.6.0-rc"]
                 [re-frame "0.8.0-SNAPSHOT"]
                 [binaryage/devtools "0.7.0"]
                 [secretary "1.2.3"]
                 [prismatic/schema "1.0.3"]]

  :plugins [[lein-cljsbuild "1.1.3"]
            [lein-figwheel "0.5.4-5"]]

  :hooks [leiningen.cljsbuild]

  :profiles {:dev {:cljsbuild
                   {:builds {:client {:source-paths ["devsrc"]
                                      :compiler     {:main "todomvc.dev"
                                                     :asset-path "js"
                                                     :optimizations :none
                                                     :source-map true
                                                     :source-map-timestamp true}}}}}

             :prod {:cljsbuild
                    {:builds {:client {:compiler    {:optimizations :advanced
                                                     :elide-asserts true
                                                     :pretty-print false}}}}}}

  :figwheel {:server-port 3450
             :repl        true}

  :clean-targets ^{:protect false} ["resources/public/js" "target"]

  :cljsbuild {:builds {:client {:source-paths ["src" "../../src"]
                                :compiler     {:output-dir "resources/public/js"
                                               :output-to  "resources/public/js/client.js"}}}})

(defproject todomvc-re-frame "0.8.0"
  :dependencies [[org.clojure/clojure        "1.8.0"]
                 [org.clojure/clojurescript  "1.9.89"]
                 [reagent "0.6.0-rc"]
                 [re-frame "0.8.0-SNAPSHOT"]
                 [binaryage/devtools "0.7.0"]
                 [secretary "1.2.3"]
                 [prismatic/schema "1.1.2"]]

  :plugins [[lein-cljsbuild "1.1.3"]
            [lein-figwheel "0.5.4-5"]]

  :hooks [leiningen.cljsbuild]

  :profiles {:dev {:cljsbuild
                   {:builds {:client {:source-paths ["devsrc"]
                                      :compiler     {:main "todomvc.dev"
                                                     :asset-path "js"
                                                     :optimizations :none
                                                     :source-map true
                                                     :source-map-timestamp true}}}}}

             :prod {:cljsbuild
                    {:builds {:client {:compiler    {:optimizations :advanced
                                                     :elide-asserts true
                                                     :pretty-print false}}}}}}

  :figwheel {:server-port 3450
             :repl        true}

  :clean-targets ^{:protect false} ["resources/public/js" "target"]

  :cljsbuild {:builds {:client {:source-paths ["src" "../../src"]
                                :compiler     {:output-dir "resources/public/js"
                                               :output-to  "resources/public/js/client.js"}}}})

Update deps for Prismatic Schema in todomvs example


(ns ^:no-doc onyx.messaging.messenger-buffer
  (:require [clojure.core.async :refer [chan >!! <!! thread alts!! close!]]
            [com.stuartsierra.component :as component]
            [taoensso.timbre :as timbre]))

(defrecord MessengerBuffer [opts]
  component/Lifecycle

  (start [component]
    (taoensso.timbre/info "Starting Messenger Buffer")

    (let [inbound-ch (chan (or (:onyx.messenger/inbound-capacity opts) 20000))]
      (assoc component :inbound-ch inbound-ch)))

  (stop [component]
    (taoensso.timbre/info "Stopping Messenger Buffer")

    (close! (:inbound-ch component))

    component))

(defn messenger-buffer [opts]
  (map->MessengerBuffer {:opts opts}))

(ns ^:no-doc onyx.messaging.messenger-buffer
  (:require [clojure.core.async :refer [chan >!! <!! thread alts!! close! sliding-buffer]]
            [com.stuartsierra.component :as component]
            [taoensso.timbre :as timbre]))

(defrecord MessengerBuffer [opts]
  component/Lifecycle

  (start [component]
    (taoensso.timbre/info "Starting Messenger Buffer")

    (let [inbound-ch (chan (sliding-buffer (or (:onyx.messenger/inbound-capacity opts) 20000)))]
      (assoc component :inbound-ch inbound-ch)))

  (stop [component]
    (taoensso.timbre/info "Stopping Messenger Buffer")

    (close! (:inbound-ch component))

    component))

(defn messenger-buffer [opts]
  (map->MessengerBuffer {:opts opts}))

Switch the messenger inbound-ch to a sliding buffer


(ns hyphen-keeper.db
  "Persistence for the hyphenation dictionary"
  (:require [yesql.core :refer [defqueries]]))

(def ^:private db {:name "java:jboss/datasources/old-productions"})

(defqueries "db/queries.sql" {:connection db})

(defn read-words
  "Return a coll of words for given `spelling`"
  [spelling]
  (-> {:spelling spelling} words))

(defn read-words-paginated
  "Return a coll of words for given `spelling` using `max-rows` and `offset` for pagination"
  [spelling offset max-rows]
  (-> {:spelling spelling :max_rows max-rows :offset offset}
      words-paginated))

(defn search-words
  "Return a coll of words for given `spelling` and given `search` term"
  [spelling search]
  (-> {:spelling spelling :search search}
      words-search))

(defn save-word!
  "Persist `word` with given `hyphenation` and `spelling`"
  [word hyphenation spelling]
  (-> {:word word :hyphenation hyphenation :spelling spelling}
      save-word-internal!))

(defn remove-word! [word spelling]
  (-> {:word word :spelling spelling}
      remove-word-internal!))

(ns hyphen-keeper.db
  "Persistence for the hyphenation dictionary"
  (:require [yesql.core :refer [defqueries]]))

(def ^:private db {:name "java:jboss/datasources/hyphenations"})

(defqueries "db/queries.sql" {:connection db})

(defn read-words
  "Return a coll of words for given `spelling`"
  [spelling]
  (-> {:spelling spelling} words))

(defn read-words-paginated
  "Return a coll of words for given `spelling` using `max-rows` and `offset` for pagination"
  [spelling offset max-rows]
  (-> {:spelling spelling :max_rows max-rows :offset offset}
      words-paginated))

(defn search-words
  "Return a coll of words for given `spelling` and given `search` term"
  [spelling search]
  (-> {:spelling spelling :search search}
      words-search))

(defn save-word!
  "Persist `word` with given `hyphenation` and `spelling`"
  [word hyphenation spelling]
  (-> {:word word :hyphenation hyphenation :spelling spelling}
      save-word-internal!))

(defn remove-word! [word spelling]
  (-> {:word word :spelling spelling}
      remove-word-internal!))

Fix the JNDI name for the datasource

Fix the JNDI name for the datasource


(ns lab-notebook.core
  (:require [om.core :as om]
            [om.dom :as dom]))

(defonce appstate (atom {}))

(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (apply dom/div nil
        (dom/h1 nil "Lab notebook")
        nil
        (for [entry (:entries cursor)]
          (dom/div nil
            (dom/div nil (:summary entry))
            (dom/div nil (:date-time entry))
            (dom/div nil (:notes entry))))))))

(om/root app-container appstate
  {:target (. js/document (getElementById "app"))})

(ns lab-notebook.core
  (:require [om.core :as om]
            [om.dom :as dom]))

(defonce appstate (atom {}))

(defn item-view [cursor component]
  (reify
    om/IRender
    (render [this]
      (dom/div nil
        (dom/div nil (:summary cursor))
        (dom/div nil (:date-time cursor))
        (dom/div nil (:notes cursor))))))

(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (apply dom/div nil
        (dom/h1 nil "Lab notebook")
        nil
        (for [entry (:entries cursor)]
          (om/build item-view entry))))))

(om/root app-container appstate
  {:target (. js/document (getElementById "app"))})

Move item-view into its own component.

Move item-view into its own component.


(ns demo.messaging-test
  (:use clojure.test
        immutant.messaging))

(if (immutant.util/in-immutant?)
  (deftest ^:integration listening
    (start "test.topic")
    (let [expected (promise)
          handler (listen "test.topic" #(deliver expected %))]
      (try
        (publish "test.topic" :success)
        (is (= :success (deref expected 500 :fail)))
        (finally
          @(unlisten handler)
          (stop "test.topic"))))))

(ns demo.messaging-test
  (:use clojure.test
        immutant.messaging))

(when (immutant.util/in-immutant?)
  (deftest ^:integration listening
    (start "test.topic")
    (let [expected (promise)
          handler (listen "test.topic" #(deliver expected %))]
      (try
        (publish "test.topic" :success)
        (is (= :success (deref expected 1000 :fail)))
        (finally
          @(unlisten handler)
          (stop "test.topic"))))))

Allow for the possibility of more than one test


(ns braid.server.search.elasticsearch
  (:require
    [braid.server.conf :refer [config]]
    [braid.server.db :as db]
    [clojure.data.json :as json]
    [org.httpkit.client :as http]))

(defn elasticsearch-enabled? []
  (some? (config :elasticsearch-url)))

(defn search-for
  [{:keys [text group-id user-id]}]
  (some->
    @(http/get (str (config :elasticsearch-url)
                    "/braid-messages/_search")
       {:body (json/write-str {:query {:match {:content text}}})})
    :body
    json/read-str
    (get-in ["hits" "hits"])
    (->>
      (into #{}
            (comp
              (map #(get-in % ["_source" "thread-id"]))
              (map #(java.util.UUID/fromString %))
              (filter #(= group-id (db/thread-group-id %)))
              (map (fn [t-id] [t-id (db/thread-newest-message t-id)])))))
    seq
    set))

(ns braid.server.search.elasticsearch
  (:require
    [braid.server.conf :refer [config]]
    [braid.server.db :as db]
    [clojure.data.json :as json]
    [datomic.api :as d]
    [org.httpkit.client :as http]))

(defn elasticsearch-enabled? []
  (some? (config :elasticsearch-url)))

(defn search-for
  [{:keys [text group-id user-id]}]
  (let [resp (->
               @(http/get (str (config :elasticsearch-url)
                               ; TODO: page results properly
                               "/braid-messages/_search?size=500")
                  {:body (json/write-str {:query {:match {:content text}}})})
               :body
               json/read-str
               (get "hits"))
        more (- (get resp "total") (count (get resp "hits")))]
    (->> (get resp "hits")
         (map #(Long. (get % "_id")))
         (d/pull-many (d/db db/conn) [{:message/thread [:thread/id]}])
         (into #{}
               (comp
                 (map #(get-in % [:message/thread :thread/id]))
                 (filter #(= group-id (db/thread-group-id %)))
                 (map (fn [t-id] [t-id (db/thread-newest-message t-id)]))))
         seq
         set)))

Load message by entity-id from search

Load message by entity-id from search

Instead of having elasticsearch index thread-id, just get the entity id
of the messages & use pull-many to get the thread-ids


(ns circle.backend.build.test-queue
  (:use circle.backend.build.queue)
  (:use circle.backend.build.run)
  (:use circle.backend.build.test-utils)
  (:require [circle.model.build :as build])
  (:use midje.sweet)
  (:use [circle.util.retry :only (wait-for)]))

(fact "queuing builds works"
  (let [builds (take 10 (repeatedly #(minimal-build)))]
    (doall (map enqueue-build builds)) => anything
    (wait-for
     {:sleep 1000
      :tries 30}
     (fn []
       (->> builds
            (map #(build/fetch-build (-> @% :_id)))
            (every? build/successful?)))) => true))

(ns circle.backend.build.test-queue
  (:use circle.backend.build.queue)
  (:use circle.backend.build.run)
  (:use circle.backend.build.test-utils)
  (:require [circle.model.build :as build])
  (:use [circle.backend.build.test-utils])
  (:use midje.sweet)
  (:use [circle.util.retry :only (wait-for)]))

(test-ns-setup)

(fact "queuing builds works"
  (let [builds (take 10 (repeatedly #(minimal-build)))]
    (doall (map enqueue-build builds)) => anything
    (wait-for
     {:sleep 1000
      :tries 30}
     (fn []
       (->> builds
            (map #(build/fetch-build (-> @% :_id)))
            (every? build/successful?)))) => true))

Add test-ns-setup to the new test file

Add test-ns-setup to the new test file


(ns caesium.magicnonce.secretbox-test
  (:require [caesium.magicnonce.secretbox :as s]
            [clojure.test :refer [deftest is]]
            [caesium.util :as u]))

(deftest xor-test
  (let [one (byte-array [1 0 1])
        two (byte-array [0 1 0])
        out (byte-array [0 0 0])]
    (is (identical? (#'s/xor! out one two) out))
    (is (u/array-eq (byte-array [1 1 1]) out)))
  (let [one (byte-array [1 0 1])
        two (byte-array [0 1 0])]
    (is (identical? (#'s/xor-inplace! one two) one))
    (is (u/array-eq (byte-array [1 1 1]) one))))

(ns caesium.magicnonce.secretbox-test
  (:require [caesium.magicnonce.secretbox :as ms]
            [caesium.crypto.secretbox :as s]
            [caesium.crypto.secretbox-test :as st]
            [clojure.test :refer [deftest is]]
            [caesium.util :as u]))

(deftest xor-test
  (let [one (byte-array [1 0 1])
        two (byte-array [0 1 0])
        out (byte-array [0 0 0])]
    (is (identical? (#'ms/xor! out one two) out))
    (is (u/array-eq (byte-array [1 1 1]) out)))
  (let [one (byte-array [1 0 1])
        two (byte-array [0 1 0])]
    (is (identical? (#'ms/xor-inplace! one two) one))
    (is (u/array-eq (byte-array [1 1 1]) one))))

(deftest secretbox-pfx-test
  (let [nonce (byte-array (range s/noncebytes))
        ctext (ms/secretbox-pfx st/ptext nonce st/secret-key)]
    (is (= (+ s/noncebytes
              (alength ^bytes st/ptext)
              s/macbytes)
           (alength ^bytes ctext)))))

Add a test for secretbox-pfx

Add a test for secretbox-pfx


(ns lab-notebook.core
  (:require [om.core :as om]
            [om.dom :as dom]))

(defonce appstate (atom {}))

(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (dom/div nil
        (dom/h1 nil "Lab notebook")
        (:message cursor)))))

(om/root app-container appstate
  {:target (. js/document (getElementById "app"))})

(ns lab-notebook.core
  (:require [om.core :as om]
            [om.dom :as dom]))

(defonce appstate (atom {}))

(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (apply dom/div nil
        (dom/h1 nil "Lab notebook")
        nil
        (for [x (range 10)]
          (str x " "))))))

(om/root app-container appstate
  {:target (. js/document (getElementById "app"))})

Use apply and a list.

Use apply and a list.


(defproject fulcro-todo "0.0.1"
  :description "Fulcro Todo"
  :dependencies [[org.clojure/clojure "1.9.0-alpha17"]
                 [org.clojure/clojurescript "1.9.908"]
                 [org.omcljs/om "1.0.0-beta1"]
                 [fulcrologic/fulcro "1.0.0-beta10"]]

  :source-paths ["src/main"]
  :resource-paths ["resources"]
  :clean-targets ^{:protect false} ["resources/public/js" "target" "out"]

  :plugins [[lein-cljsbuild "1.1.6"]]

  :cljsbuild {:builds
              [{:id           "dev"
                :source-paths ["src/main" "src/dev"]
                :figwheel     {:on-jsload "cljs.user/refresh"}
                :compiler     {:main                 cljs.user
                               :output-to            "resources/public/js/app.js"
                               :output-dir           "resources/public/js/app"
                               :preloads             [devtools.preload]
                               :asset-path           "js/app"
                               :optimizations        :none}}]}

  :profiles {:dev {:source-paths ["src/dev" "src/main"]
                   :dependencies [[binaryage/devtools "0.9.4"]
                                  [org.clojure/tools.namespace "0.3.0-alpha4"]
                                  [figwheel-sidecar "0.5.13"]]}})

(defproject fulcro-todo "0.0.1"
  :description "Fulcro Todo"
  :dependencies [[org.clojure/clojure "1.9.0-alpha17"]
                 [org.clojure/clojurescript "1.9.908"]
                 [org.omcljs/om "1.0.0-beta1"]
                 [fulcrologic/fulcro "1.0.0-beta10"]]

  :source-paths ["src/main"]
  :resource-paths ["resources"]
  :clean-targets ^{:protect false} ["resources/public/js" "target" "out"]

  :plugins [[lein-cljsbuild "1.1.6"]]

  :cljsbuild {:builds
              [{:id           "dev"
                :source-paths ["src/main" "src/dev"]
                :figwheel     {:on-jsload "cljs.user/refresh"}
                :compiler     {:main                 cljs.user
                               :output-to            "resources/public/js/app.js"
                               :output-dir           "resources/public/js/app"
                               :preloads             [devtools.preload]
                               :asset-path           "js/app"
                               :optimizations        :none}}]}

  :profiles {:dev {:source-paths ["src/dev" "src/main"]
                   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
                   :dependencies [[binaryage/devtools "0.9.4"]
                                  [com.cemerick/piggieback "0.2.1"]
                                  [org.clojure/tools.namespace "0.3.0-alpha4"]
                                  [figwheel-sidecar "0.5.13"]
                                  [org.clojure/tools.nrepl "0.2.13"]]}})

Add piggieback to local profile

Add piggieback to local profile


(ns immutant.init
  (:require [immutant.messaging :as msg]
            [immutant.web       :as web]))

(msg/start "/topic/gravy")
(msg/start (msg/as-topic "toddball"))

(let [p (promise)
      l (msg/listen "/topic/gravy" (fn [v] (deliver p v)))]
  (try
    (msg/publish "/topic/gravy" :success)
    (let [delivery (deref p 1000 :fail)]
      (if-not (= :success delivery)
        (throw (Exception. (str "Should have received :success, but got " delivery)))))
    (finally
     (msg/unlisten l))))

(msg/start "queue.198")
(msg/start "topic.198")

;;; Topic listeners are additive, not idempotent
(msg/listen "topic.198" #(msg/publish "queue.198" (inc %)))
(msg/listen "topic.198" #(msg/publish "queue.198" (dec %)))

(msg/start "queue.result")
(msg/start "topic.echo")

(let [responder (atom nil)]
  (web/start
   (fn [request]
     (if @responder
       (do
         (msg/unlisten @responder)
         (reset! responder nil))
       (reset! responder (msg/listen "topic.echo" #(msg/publish "queue.result"
                                                                (identity %)))))
     {:status 200
      :body ":success"})))

(ns immutant.init
  (:require [immutant.messaging :as msg]
            [immutant.web       :as web]))

(msg/start "/topic/gravy")
(msg/start (msg/as-topic "toddball"))

(let [p (promise)
      l (msg/listen "/topic/gravy" (fn [v] (deliver p v)))]
  (try
    (msg/publish "/topic/gravy" :success)
    (let [delivery (deref p 1000 :fail)]
      (if-not (= :success delivery)
        (throw (Exception. (str "Should have received :success, but got " delivery)))))
    (finally
     (msg/unlisten l))))

(msg/start "queue.198")
(msg/start "topic.198")

;;; Topic listeners are additive, not idempotent
@(msg/listen "topic.198" #(msg/publish "queue.198" (inc %)))
@(msg/listen "topic.198" #(msg/publish "queue.198" (dec %)))

(msg/start "queue.result")
(msg/start "topic.echo")

(let [responder (atom nil)]
  (web/start
   (fn [request]
     (if @responder
       (do
         (msg/unlisten @responder)
         (reset! responder nil))
       (reset! responder @(msg/listen "topic.echo" #(msg/publish "queue.result"
                                                                 (identity %)))))
     {:status 200
      :body ":success"})))

Synchronize topic listeners to account for slow CI hardware.


{
 :name "STAR",
 :path "STAR",
 ;; instructional data used in /help
 :description  "splice aware utility for aligning reads to reference",
}

{
 :name "STAR",
 :path "STAR",

 :argcard {"--outSAMunmapped"              1 ; include unmapped reads
           "--runThreadN"                  1 ; number of threads
           "--outFileNamePrefix"           1 ; prefix for summary files
           "--outFilterScoreMinOverLread"  1 ; too short fix
           "--outFilterMatchNminOverLread" 1 ; too short fix
           "--outFilterMatchNmin"          1 ; too short fix
           "--outFilterMismatchNmax"       1 ; too short fix
           "--readFilesCommand"            1 ; zcat, others
           }

 :description  "splice aware utility for aligning reads to reference",
}

Add command config argument cardinalities


(defproject ring/ring-jetty-adapter "1.9.4"
  :description "Ring Jetty adapter."
  :url "https://github.com/ring-clojure/ring"
  :scm {:dir ".."}
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [ring/ring-core "1.9.4"]
                 [ring/ring-servlet "1.9.4"]
                 [org.eclipse.jetty/jetty-server "9.4.42.v20210604"]]
  :aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]}
  :profiles
  {:dev  {:dependencies [[clj-http "3.12.3"]
                         [less-awful-ssl "1.0.6"]]
          :jvm-opts ["-Dorg.eclipse.jetty.server.HttpChannelState.DEFAULT_TIMEOUT=500"]}
   :1.8  {:dependencies [[org.clojure/clojure "1.8.0"]]}
   :1.9  {:dependencies [[org.clojure/clojure "1.9.0"]]}
   :1.10 {:dependencies [[org.clojure/clojure "1.10.3"]]}})

(defproject ring/ring-jetty-adapter "1.9.4"
  :description "Ring Jetty adapter."
  :url "https://github.com/ring-clojure/ring"
  :scm {:dir ".."}
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [ring/ring-core "1.9.4"]
                 [ring/ring-servlet "1.9.4"]
                 [org.eclipse.jetty/jetty-server "9.4.44.v20210927"]]
  :aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]}
  :profiles
  {:dev  {:dependencies [[clj-http "3.12.3"]
                         [less-awful-ssl "1.0.6"]]
          :jvm-opts ["-Dorg.eclipse.jetty.server.HttpChannelState.DEFAULT_TIMEOUT=500"]}
   :1.8  {:dependencies [[org.clojure/clojure "1.8.0"]]}
   :1.9  {:dependencies [[org.clojure/clojure "1.9.0"]]}
   :1.10 {:dependencies [[org.clojure/clojure "1.10.3"]]}})

Update Jetty to version 9.4.44

Update Jetty to version 9.4.44

CVE-2021-34429 is fixed in version 9.4.43 but it makes sense to
update to the latest 9.x series release with further fixes.


(ns cmr.common.test.cache
  (:require [clojure.test :refer :all]
            [cmr.common.cache :as c]))

(def counter (atom 0))

(defn increment-counter
  "Increments the counter atom and returns it"
  []
  (swap! counter inc))

(deftest cache-test
  (testing "cache hit, miss and reset"
    (let [cache-atom (c/create-cache)]
      (is (= 1 (c/cache-lookup cache-atom "key" increment-counter)))
      ;; look up again will not call the increment-counter function
      (is (= 1 (c/cache-lookup cache-atom "key" increment-counter)))
      (c/reset-cache cache-atom)
      (is (= 2 (c/cache-lookup cache-atom "key" increment-counter)))
      (is (= 2 (c/cache-lookup cache-atom "key" increment-counter))))))

(ns cmr.common.test.cache
  (:require [clojure.test :refer :all]
            [cmr.common.cache :as c]))

(def counter (atom 0))

(defn increment-counter
  "Increments the counter atom and returns it"
  []
  (swap! counter inc))

(deftest cache-test
  (testing "cache hit, miss and reset"
    (let [cache-atom (c/create-cache)]
      (reset! counter 0)
      (is (= 1 (c/cache-lookup cache-atom "key" increment-counter)))
      ;; look up again will not call the increment-counter function
      (is (= 1 (c/cache-lookup cache-atom "key" increment-counter)))
      (c/reset-cache cache-atom)
      (is (= 2 (c/cache-lookup cache-atom "key" increment-counter)))
      (is (= 2 (c/cache-lookup cache-atom "key" increment-counter))))))

Reset counter so the test can be run multiple times in repl.


(defproject ring/ring-jetty-adapter "1.4.0"
  :description "Ring Jetty adapter."
  :url "https://github.com/ring-clojure/ring"
  :scm {:dir ".."}
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [ring/ring-core "1.4.0"]
                 [ring/ring-servlet "1.4.0"]
                 [org.eclipse.jetty/jetty-server "9.2.10.v20150310"]]
  :profiles
  {:dev {:dependencies [[clj-http "1.1.2"]]}
   :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
   :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}
   :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})

(defproject ring/ring-jetty-adapter "1.4.0"
  :description "Ring Jetty adapter."
  :url "https://github.com/ring-clojure/ring"
  :scm {:dir ".."}
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [ring/ring-core "1.4.0"]
                 [ring/ring-servlet "1.4.0"]
                 [org.eclipse.jetty/jetty-server "9.2.10.v20150310"]]
  :profiles
  {:dev {:dependencies [[clj-http "2.2.0"]]}
   :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
   :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}
   :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})

Update clj-http to fix error with Clojure 1.8


(ns leiningen.bootstrap
  "Bootstrap the project by running lein deps and lein git-deps."
  (:require leiningen.deps
            leiningen.git-deps))

(defn bootstrap
  "Bootstrap the project by running lein deps and lein git-deps."
  [project]
  (leiningen.deps/deps project)
  (leiningen.git-deps/git-deps project))

(ns leiningen.bootstrap
  "Bootstrap the project by running lein deps and lein git-deps."
  (:use [leiningen.git-deps :only [git-deps]]
        [leiningen.core :only [default-repos]]
        [leiningen.deps :only [deps]]
        [leiningen.util.maven :only [container make-remote-artifact
                                     make-remote-repo make-local-repo]])
  (:import (org.apache.maven.artifact.resolver ArtifactResolver)))

;; There is a bug in Leiningen 1.6.2 which requires that you have
;; Clojure 1.2.1 in the local maven repository when you are working on a
;; Clojure 1.3 project. If the first project that someone works on
;; with Leiningen is a Clojure 1.3 based project then they will
;; encounter this problem.

;; A lot of people have run into this with ClojureScript One so we
;; have added a workaround.

;; Leiningen includes an `install` task which, for some unknown reason,
;; takes a long time to run. Below, we have extracted just the part
;; of that task that we need to get a dependency from a maven repository.

(defn- standalone-download
  "Download a dependency from a maven repository."
  [name group version]
  (.resolveAlways (.lookup container ArtifactResolver/ROLE)
                  (make-remote-artifact name group version)
                  (map make-remote-repo default-repos)
                  (make-local-repo)))

(defn bootstrap
  "Bootstrap the project by running lein deps and lein git-deps."
  [project]
  ;; Workarond for Leiningen 1.6.2 bug. Ensure that we have Clojure 1.2.1 in
  ;; the local maven repository.
  (standalone-download "clojure" "org.clojure" "1.2.1")
  (git-deps project)
  (deps project))

Add a workaround for bug in Leiningen 1.6.2.


(set-env!
 :source-paths #{"src/main/java" "src/test/java"}
 :dependencies '[[radicalzephyr/boot-junit "0.1.0" :scope "test"]])

(def +version+ "0.1.0")

(require '[radicalzephyr.boot-junit :refer [junit]])

(task-options!
 pom {:project 'http-server
      :version +version+
      :description "A Java HTTP server."
      :url "https://github.com/RadicalZephyr/http-server"
      :scm {:url "https://github.com/RadicalZephyr/http-server.git"}
      :licens {"MIT" "http://opensource.org/licenses/MIT"}}
 jar {:file "server.jar"}
 junit {:packages '#{net.zephyrizing.http_server}})

(deftask test
  "Compile and run my jUnit tests."
  []
  (comp (javac)
        (junit)))

(deftask build
  "Build my http server."
  []
  (comp (javac)
        (pom)
        (jar)))

(set-env!
 :source-paths #{"src/main/java" "src/test/java"}
 :dependencies '[[radicalzephyr/boot-junit "0.1.0" :scope "test"]])

(def +version+ "0.1.0")

(require '[radicalzephyr.boot-junit :refer [junit]])

(task-options!
 pom {:project 'http-server
      :version +version+
      :description "A Java HTTP server."
      :url "https://github.com/RadicalZephyr/http-server"
      :scm {:url "https://github.com/RadicalZephyr/http-server.git"}
      :licens {"MIT" "http://opensource.org/licenses/MIT"}}
 jar {:file "server.jar"}
 junit {:packages '#{net.zephyrizing.http_server_test}})

(deftask test
  "Compile and run my jUnit tests."
  []
  (comp (javac)
        (junit)))

(deftask build
  "Build my http server."
  []
  (comp (javac)
        (pom)
        (jar)))

Configure junit task with the correct package


(ns braid.ui.styles.body)

(def body
  [:body
   {:margin 0
    :padding 0
    :font-family "\"Open Sans\", Helvetica, Arial, sans-serif"
    :font-size "12px"
    :background "#eee"}
   [:textarea :input
    {:font-family "inherit"
     :font-size "1em"}]])

(ns braid.ui.styles.body)

(def body
  [:body
   {:margin 0
    :padding 0
    :font-family "\"Open Sans\", Helvetica, Arial, sans-serif"
    :font-size "12px"
    :background "#F2F2F2"}
   [:textarea :input
    {:font-family "inherit"
     :font-size "1em"}]])

Make page background a tad lighter

Make page background a tad lighter


(ns word-count.test (:require [clojure.test :refer :all]))
(load-file "word-count.clj")

(deftest count-one-word
  (is (= {"word" 1}
         (phrase/word-count "word"))))

(deftest count-one-of-each
  (is (= {"one" 1 "of" 1 "each" 1}
         (phrase/word-count "one of each"))))

(deftest count-multiple-occurrences
  (is (= {"one" 1 "fish" 4 "two" 1 "red" 1 "blue" 1}
         (phrase/word-count "one fish two fish red fish blue fish"))))

(deftest ignore-punctuation
  (is (= {"car" 1, "carpet" 1 "as" 1 "java" 1 "javascript" 1}
         (phrase/word-count "car : carpet as java : javascript!!&@$%^&"))))

(deftest include-numbers
  (is (= {"testing" 2 "1" 1 "2" 1}
         (phrase/word-count "testing, 1, 2 testing"))))

(deftest normalize-case
  (is (= {"go" 3}
         (phrase/word-count "go Go GO"))))

(run-tests)

(ns word-count.test (:require [clojure.test :refer :all]))
(load-file "word_count.clj")

(deftest count-one-word
  (is (= {"word" 1}
         (word-count/word-count "word"))))

(deftest count-one-of-each
  (is (= {"one" 1 "of" 1 "each" 1}
         (word-count/word-count "one of each"))))

(deftest count-multiple-occurrences
  (is (= {"one" 1 "fish" 4 "two" 1 "red" 1 "blue" 1}
         (word-count/word-count "one fish two fish red fish blue fish"))))

(deftest ignore-punctuation
  (is (= {"car" 1, "carpet" 1 "as" 1 "java" 1 "javascript" 1}
         (word-count/word-count "car : carpet as java : javascript!!&@$%^&"))))

(deftest include-numbers
  (is (= {"testing" 2 "1" 1 "2" 1}
         (word-count/word-count "testing, 1, 2 testing"))))

(deftest normalize-case
  (is (= {"go" 3}
         (word-count/word-count "go Go GO"))))

(run-tests)

Replace hyphen in filename with underscore & rename ns


(ns clj-record.test.validation-built-ins-test
  (:use clojure.contrib.test-is)
  (:require [clj-record.validation.built-ins :as vfn]))

(deftest match-creates-a-matching-fn-for-the-given-pattern
  (let [matches-foo? (vfn/match #"foo")]
    (is (matches-foo? "yes foo does"))
    (are (not (matches-foo? _1))
      "no bar doesn't"
      nil)))

(deftest non-match-creates-an-anti-matching-fn-for-the-given-pattern
  (let [non-matches-foo? (vfn/non-match #"foo")]
    (is (not (non-matches-foo? "foo doesn't not")))
    (are (non-matches-foo? _1)
      "bar non-matches"
      nil)))

(ns clj-record.test.validation-built-ins-test
  (:use clojure.contrib.test-is)
  (:require [clj-record.validation.built-ins :as vfn]))

(deftest match-creates-a-matching-fn-for-the-given-pattern
  (let [matches-foo? (vfn/match #"foo")]
    (is (matches-foo? "yes foo does"))
    (are (not (matches-foo? _1))
      "no bar doesn't"
      nil
      123)))

(deftest non-match-creates-an-anti-matching-fn-for-the-given-pattern
  (let [non-matches-foo? (vfn/non-match #"foo")]
    (is (not (non-matches-foo? "foo doesn't not")))
    (are (non-matches-foo? _1)
      "bar non-matches"
      nil
      123)))

Handle nil values in match validations.

Handle nil values in match validations.


(defproject org.onyxplatform/onyx-datomic "0.8.1.0-alpha3"
  :description "Onyx plugin for Datomic"
  :url "https://github.com/MichaelDrogalis/onyx-datomic"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                 [org.onyxplatform/onyx "0.8.1-alpha3"]]
  :profiles {:dev {:dependencies [[midje "1.7.0"]
                                  [com.datomic/datomic-free "0.9.5153"]]
                   :plugins [[lein-midje "3.1.3"]
                             [lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}
             :circle-ci {:jvm-opts ["-Xmx4g"]}})

(defproject org.onyxplatform/onyx-datomic "0.8.1.0-SNAPSHOT"
  :description "Onyx plugin for Datomic"
  :url "https://github.com/MichaelDrogalis/onyx-datomic"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                 [org.onyxplatform/onyx "0.8.1-alpha3"]]
  :profiles {:dev {:dependencies [[midje "1.7.0"]
                                  [com.datomic/datomic-free "0.9.5153"]]
                   :plugins [[lein-midje "3.1.3"]
                             [lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}
             :circle-ci {:jvm-opts ["-Xmx4g"]}})

Prepare for next release cycle.

Prepare for next release cycle.


(defproject onyx-app/lein-template "0.13.3.0"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

(defproject onyx-app/lein-template "0.13.3.1-SNAPSHOT"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

Prepare for next release cycle.

Prepare for next release cycle.


;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License.  You may obtain a copy of the License at
;;
;;   http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership.  Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied.  See the License for the specific language governing permissions
;; and limitations under the License.

(defproject com.climate/claypoole
  "0.3.2"
  :description "Claypoole: Threadpool tools for Clojure."
  :url "http://github.com/TheClimateCorporation/claypoole/"
  :license {:name "Apache License Version 2.0"
            :url http://www.apache.org/licenses/LICENSE-2.0
            :distribution :repo}
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :pedantic? :warn
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :plugins [[jonase/eastwood "0.1.4"]])

;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License.  You may obtain a copy of the License at
;;
;;   http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership.  Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied.  See the License for the specific language governing permissions
;; and limitations under the License.

(defproject com.climate/claypoole
  "0.3.2-SNAPSHOT"
  :description "Claypoole: Threadpool tools for Clojure."
  :url "http://github.com/TheClimateCorporation/claypoole/"
  :license {:name "Apache License Version 2.0"
            :url http://www.apache.org/licenses/LICENSE-2.0
            :distribution :repo}
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :pedantic? :warn
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :plugins [[jonase/eastwood "0.1.4"]])

Change version to snapshot again

Change version to snapshot again


(ns riemann.test.common
  (:use riemann.common)
  (:use clojure.test))

Revert "kill tests for funcs that do not exist anymore"

This reverts commit 70c3caf8b047080f759713cb4085c64af893e0c0.


;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>

(ns uxbox.main.repo.projects
  "A main interface for access to remote resources."
  (:require [beicon.core :as rx]
            [uxbox.config :refer (url)]
            [uxbox.main.repo.impl :refer (request send!)]))

(defmethod request :fetch/projects
  [type data]
  (let [url (str url "/projects")]
    (send! {:url url :method :get})))

(defmethod request :create/project
  [_ data]
  (let [params {:url (str url "/projects")
                :method :post
                :body data}]
    (send! params)))

(defmethod request :delete/project
  [_ id]
  (let [url (str url "/projects/" id)]
    (send! {:url url :method :delete})))

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>

(ns uxbox.main.repo.projects
  "A main interface for access to remote resources."
  (:require [beicon.core :as rx]
            [uxbox.config :refer (url)]
            [uxbox.main.repo.impl :refer (request send!)]))

(defmethod request :fetch/projects
  [type data]
  (let [url (str url "/projects")]
    (send! {:url url :method :get})))

(defmethod request :fetch/project
  [_ id]
  (let [url (str url "/projects/" id)]
    (send! {:url url :method :get})))

(defmethod request :fetch/project-by-token
  [_ token]
  (let [url (str url "/projects-by-token/" token)]
    (send! {:url url :method :get})))

(defmethod request :create/project
  [_ data]
  (let [params {:url (str url "/projects")
                :method :post
                :body data}]
    (send! params)))

(defmethod request :delete/project
  [_ id]
  (let [url (str url "/projects/" id)]
    (send! {:url url :method :delete})))

Add fetch project by token repo functions.


(ns cljparse.core
  (:require [instaparse.core :as insta]
            [clojure.java.io :as io]
            [clojure.tools.cli :refer [parse-opts]]
            [cljparse.config.parser :as config])
  (:gen-class))

(def configname "chaincode.conf")

(def cli-options
  ;; An option with a required argument
  [["-p" "--path PATH" "path to project to build" :default "./"]
   ["-h" "--help"]])

(defn exit [status msg]
  (do
    (println msg)
    status))

(defn -main [& args]
  (let [ {:keys [options arguments errors summary]} (parse-opts args cli-options) ]
         (cond (:help options)
               (exit 0 summary)

               (not= errors nil)
               (exit -1 (str "Error: " errors))

               :else (let [ path (:path options)
                           file (io/file path configname) ]
                      (do
                        (cond (not (.isFile file))
                            (exit -1 (str ("Configuration not found at " path)))
                            :else
                            (do
                              (println "Starting cljparse on:" (.getAbsolutePath file) "and errors:" errors)
                              (config/parser file))))))))

(ns cljparse.core
  (:require [instaparse.core :as insta]
            [clojure.java.io :as io]
            [clojure.tools.cli :refer [parse-opts]]
            [cljparse.config.parser :as config])
  (:gen-class))

(def configname "chaincode.conf")

(def cli-options
  ;; An option with a required argument
  [["-p" "--path PATH" "path to project to build" :default "./"]
   ["-h" "--help"]])

(defn exit [status msg & rest]
  (do
    (println msg rest)
    status))

(defn -main [& args]
  (let [ {:keys [options arguments errors summary]} (parse-opts args cli-options) ]
         (cond (:help options)
               (exit 0 summary)

               (not= errors nil)
               (exit -1 "Error: " errors)

               :else (let [ path (:path options)
                           file (io/file path configname) ]
                      (do
                        (cond (not (.isFile file))
                            (exit -1 "Configuration not found at " path)
                            :else
                            (do
                              (println "Starting cljparse on:" (.getAbsolutePath file) "and errors:" errors)
                              (config/parser file))))))))

Fix dumbass mistake in string concat. Do it the easy way

Signed-off-by: Eric Baur <a1c9c5f8609c68027db0779b39e5f932d4cb0053@robeybaur.org>


(ns clj-json
  (:import (clj_json JsonExt)
           (org.codehaus.jackson JsonFactory JsonParser)
           (java.io StringWriter StringReader BufferedReader))
  (:use (clojure.contrib [def :only (defvar-)])))

(defvar- #^JsonFactory factory (JsonFactory.))

(defn generate-string [obj]
  (let [sw        (StringWriter.)
        generator (.createJsonGenerator factory sw)]
    (JsonExt/generate generator obj)
    (.flush generator)
    (.toString sw)))

(defn parse-string [string]
  (JsonExt/parse (.createJsonParser factory (StringReader. string)) true nil))

(defn- parsed-seq* [#^JsonParser parser]
  (let [eof (Object.)]
    (lazy-seq
      (let [elem (JsonExt/parse parser true eof)]
        (if-not (identical? elem eof)
          (cons elem (parsed-seq* parser)))))))

(defn parsed-seq [#^BufferedReader reader]
  (parsed-seq* (.createJsonParser factory reader)))

(ns clj-json
  (:import (clj_json JsonExt)
           (org.codehaus.jackson JsonFactory JsonParser)
           (java.io StringWriter StringReader BufferedReader))
  (:use (clojure.contrib [def :only (defvar-)])))

(defvar- #^JsonFactory factory (JsonFactory.))

(defn generate-string
  {:tag String}
  [obj]
  (let [sw        (StringWriter.)
        generator (.createJsonGenerator factory sw)]
    (JsonExt/generate generator obj)
    (.flush generator)
    (.toString sw)))

(defn parse-string [string]
  (JsonExt/parse (.createJsonParser factory (StringReader. string)) true nil))

(defn- parsed-seq* [#^JsonParser parser]
  (let [eof (Object.)]
    (lazy-seq
      (let [elem (JsonExt/parse parser true eof)]
        (if-not (identical? elem eof)
          (cons elem (parsed-seq* parser)))))))

(defn parsed-seq [#^BufferedReader reader]
  (parsed-seq* (.createJsonParser factory reader)))

Tag generated json as a String.

Tag generated json as a String.


(ns com.wsscode.pathom.book.intro.demo
  (:require [com.wsscode.pathom.core :as p]
            [com.wsscode.pathom.connect :as pc]))

(pc/defresolver answer [_ _]
  {::pc/output [:answer-to-everything]}
  {:answer-to-everything 42})

(pc/defresolver answer-plus-one [_ {:keys [answer-to-everything]}]
  {::pc/input  #{:answer-to-everything}
   ::pc/output [:answer-plus-one]}
  {:answer-plus-one (inc answer-to-everything)})

(def parser
  (p/parallel-parser
    {::p/env     {::p/reader [p/map-reader
                              pc/parallel-reader
                              pc/open-ident-reader
                              p/env-placeholder-reader]
                  ::p/placeholder-prefixes #{">"}}
     ::p/mutate  pc/mutate-async
     ::p/plugins [(pc/connect-plugin {::pc/register [answer answer-plus-one]})
                  p/trace-plugin]}))

(ns com.wsscode.pathom.book.intro.demo
  (:require [com.wsscode.pathom.core :as p]
            [com.wsscode.pathom.connect :as pc]))

(pc/defresolver answer [_ _]
  {::pc/output [:answer-to-everything]}
  {:answer-to-everything 42})

(pc/defresolver answer-plus-one [_ {:keys [answer-to-everything]}]
  {::pc/input  #{:answer-to-everything}
   ::pc/output [:answer-plus-one]}
  {:answer-plus-one (inc answer-to-everything)})

(def parser
  (p/parallel-parser
    {::p/env     {::p/reader [p/map-reader
                              pc/parallel-reader
                              pc/open-ident-reader
                              p/env-placeholder-reader]
                  ::p/placeholder-prefixes #{">"}}
     ::p/mutate  pc/mutate-async
     ::p/plugins [(pc/connect-plugin {::pc/register [answer answer-plus-one]})
                  p/error-handler-plugin
                  p/trace-plugin]}))

Add error handler plugin to intro example


(ns rule110.core
  (:require [rule110.midi :as midi]))

(def grid-size 1024 )
(def max-steps 100)

(def step-rule {
                [1 1 1] 0,
                [1 1 0] 1,
                [1 0 1] 1,
                [1 0 0] 0,
                [0 1 1] 1,
                [0 1 0] 1,
                [0 0 1] 1,
                [0 0 0] 0
                })

(defn step
  "Apply the rule to each cell in the grid and return a new grid"
  [grid]
  (let [torus (concat [(last grid)] grid [(first grid)])]
    (map step-rule (partition 3 1 torus))))

(defn random-grid
  "Generate a random grid of size size with x percent of the cells set to 1"
  [size percent-on]
  (mapv (fn [_] (if (<= (rand-int 100) percent-on)
                  1 0))
        (range size)))

(defn draw-grid
  "Simple drawing of grid to terminal and return grid"
  [grid]
  (doseq [c grid]
    (print (if (= 1 c) "*" " ")))
  (println "")
  grid)

(defn -main
  [& args]
  (reduce (fn [s v] (-> s step draw-grid midi/play-grid))
          (random-grid 100 25)
          (range 250))
  nil)

(ns rule110.core
  (:require [rule110.midi :as midi]))

(def grid-size 1024 )
(def max-steps 100)

(def step-rule {
                [1 1 1] 0,
                [1 1 0] 1,
                [1 0 1] 1,
                [1 0 0] 0,
                [0 1 1] 1,
                [0 1 0] 1,
                [0 0 1] 1,
                [0 0 0] 0
                })

(defn step
  "Apply the rule to each cell in the grid and return a new grid"
  [grid]
  (let [torus (concat [(last grid)] grid [(first grid)])]
    (map step-rule (partition 3 1 torus))))

(defn random-grid
  "Generate a random grid of size size with x percent of the cells set to 1"
  [size percent-on]
  (mapv (fn [_] (if (<= (rand-int 100) percent-on)
                  1 0))
        (range size)))

(defn draw-grid
  "Simple drawing of grid to terminal and return grid"
  [grid]
  (doseq [c grid]
    (print (if (= 1 c) "*" " ")))
  (println "")
  grid)

(defn -main
  [& args]
  (reduce (fn [s v] (-> s step draw-grid midi/play-grid))
          (random-grid 100 25)
          (range 250))
  (midi/stop)
  nil)

Make sure to stop the synth. This prevents it from making some garbage noise at the end of the program.


(ns chess.core
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
            [chess.board :as board]))

(defonce app-state (atom {:board board/start-position}))

(defn piece [p owner]
  (reify
    om/IRender
    (render [_]
      (dom/div #js {:className (str "piece " (board/colour p) " " (board/pieces p))} nil))))

(defn main []
  (om/root
    (fn [app owner]
      (reify
        om/IRender
        (render [_]
          (apply dom/div #js {:className "board"}
                   (map-indexed
                    (fn [i r] (apply dom/div #js {:className "row"}
                                   (map-indexed (fn [j s] (dom/div #js {:className "square" :id (board/from-board-ks j i)}
                                                         (if s
                                                           (om/build piece s)))) r)))
                    (:board app))))))
    app-state
    {:target (. js/document (getElementById "app"))}))

(ns chess.core
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
            [chess.board :as board]))

(defonce app-state (atom {:board board/start-position}))

(defn piece-class-name
  [p]
  (str "piece " (board/colour p) " " (board/pieces p)))

(defn piece [p owner]
  (reify
    om/IRender
    (render [_]
      (dom/div #js {:className (piece-class-name p)} nil))))

(defn main []
  (om/root
    (fn [app owner]
      (reify
        om/IRender
        (render [_]
          (apply dom/div #js {:className "board"}
                   (map-indexed
                    (fn [i r] (apply dom/div #js {:className "row"}
                                   (map-indexed (fn [j s] (dom/div #js {:className "square" :id (board/from-board-ks j i)}
                                                         (if s
                                                           (om/build piece s)))) r)))
                    (:board app))))))
    app-state
    {:target (. js/document (getElementById "app"))}))

Break out function for calculating piece css class


(ns baustellen)

(defn distance [p1 p2]
  (Math/sqrt
    (apply +
           (map (fn [c1 c2] (Math/pow (- c1 c2) 2))
                p1 p2))))

(defn cost
  "Returns the cost for transporting cnt units of skill over a dist. The basis
  cost for transporting one unit of skill over one unit of distance is taken
  from skill-costs.

  Currently the cost increases linearly with the distance and squareroot-ly with
  the number of skill-units transported."
  [dist skill cnt skill-costs]
  (* dist (Math/sqrt cnt) (get skill-costs skill)))

(defn sum-allocations
  [skill allocation]
  (apply + (vals (get allocation skill))))

(defn sufficient-allocation?
  "True if the allocated skills meet the demand of the site."
  [{:keys [site allocation]} sites]
  (let [demand (:skills (get sites site))]
    (every?
      (fn [skill]
        (>= (sum-allocations skill allocation) (get demand skill)))
      (keys demand))))

(defn cost-in-coal
  [agent {:keys [site allocation]} sites agents skill-costs]
  (let [skill (:skill (get agents agent))
        cnt (get-in allocation [skill agent])]
    (cost (distance (:location (get sites site))
                    (:location (get agents agent)))
          skill cnt skill-costs)))

(defn total-cost
  [{:keys [site allocation] :as coal} sites agents skill-costs]
  (let [agents-in-coal (mapcat keys (vals allocation))]
    (apply + (map (fn [a] (cost-in-coal a coal sites agents skill-costs))
                  agents-in-coal))))

(defn coalition-value
  [coalition sites agents skill-costs]
  (if (sufficient-allocation? coalition sites)
    (- (:payoff (get sites (:site coalition)))
       (total-cost coalition sites agents skill-costs))
    0))

Add function for calculating value of coalition


;; Copyright © 2014 JUXT LTD.

;; We call this project modular to make the invocation: lein new modular appname
(defproject modular/lein-template "0.6.13"
  :description "Leiningen template for a full-featured component based app using modular extensions."
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[org.clojure/clojure "1.7.0-alpha4"]
                 ;; EDN reader with location metadata
                 [org.clojure/tools.reader "0.8.3"]
                 [org.clojure/tools.logging "0.2.6"]]
  :eval-in-leiningen true)

;; Copyright © 2014 JUXT LTD.

;; We call this project modular to make the invocation: lein new modular appname
(defproject modular/lein-template "0.6.13"
  :description "Leiningen template for a full-featured component based app using modular extensions."
  :url "http://modularity.org/"
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[org.clojure/clojure "1.7.0-alpha4"]
                 ;; EDN reader with location metadata
                 [org.clojure/tools.reader "0.8.3"]
                 [org.clojure/tools.logging "0.2.6"]]
  :eval-in-leiningen true)

Add url to silence Leiningen

Add url to silence Leiningen


(ns robot-kata.server-test
  (:require [clojure.test :refer :all]
            [robot-kata.server :refer :all]))

(deftest robot-kata-routes-test
         (testing "Routes work as expected"
                  (testing "Default route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/"})]
                             (is (= 302 (:status resp)) "Default route redirects")
                             (is (= "/robot-kata.html" ((:headers resp) "Location")) "Default route redirects to '/robot-kata.html'") ) )
                  (testing "Resource route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/robot-kata.html" :headers {"if-modified-since" "Sat, 29 Oct 1994 19:43:31 GMT"}})]
                             (is (= 200 (:status resp)) "GET of '/robot-kata.html' returns 200 status")
                             (is (= "text/html" ((:headers resp) "Content-Type")) "GET of '/robot-kata.html' returns content type 'text/html'")
                             (is (> ((:headers resp) "Content-Length") 0) "GET of '/robot-kata.html' returns content of length > 0") ) )
                  (testing "Page not found"
                           (is (= 0 1) "Implement page not found tests!") ) ) )

(ns robot-kata.server-test
  (:require [clojure.test :refer :all]
            [robot-kata.server :refer :all]))

(deftest robot-kata-routes-test
         (testing "Routes work as expected"
                  (testing "Default route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/"})]
                             (is (= 302 (:status resp)) "Default route redirects")
                             (is (= "/robot-kata.html" ((:headers resp) "Location")) "Default route redirects to '/robot-kata.html'") ) )
                  (testing "Resource route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/robot-kata.html" :headers {"if-modified-since" "Sat, 29 Oct 1994 19:43:31 GMT"}})]
                             (is (= 200 (:status resp)) "GET of '/robot-kata.html' returns 200 status")
                             (is (= "text/html" ((:headers resp) "Content-Type")) "GET of '/robot-kata.html' returns content type 'text/html'")
                             (is (> (Integer. ((:headers resp) "Content-Length")) 0) "GET of '/robot-kata.html' returns content of length > 0") ) )
                  (testing "Page not found"
                           (is (= 0 1) "Implement page not found tests!") ) ) )

Fix bug in robot-kata-routes test

Fix bug in robot-kata-routes test


(ns time-tracker.core
  (:gen-class)
  (:require [time-tracker.web.service :as web-service]
            [time-tracker.db :as db]
            [time-tracker.logging :as log]
            [org.httpkit.server :as httpkit]
            [time-tracker.util :as util]))

(defn init! []
  (log/configure-logging!)
  (db/init-db!))

(defn teardown! []
  (log/teardown-logging!))

(defn start-server!
  ([] (start-server! (web-service/app)))
  ([app-handler]
   (init!)
   (log/info {:event ::server-start})
   (let [stop-fn (httpkit/run-server app-handler
                                     {:port (Integer/parseInt (util/from-config :port))})]
     (fn []
       (stop-fn)
       (log/info {:event ::server-stop})
       (teardown!)))))

(defn -main
  [& args]
  (start-server!))

(ns time-tracker.core
  (:gen-class)
  (:require [org.httpkit.server :as httpkit]
            [time-tracker.migration :refer [migrate-db rollback-db]]
            [time-tracker.db :as db]
            [time-tracker.logging :as log]
            [time-tracker.util :as util]
            [time-tracker.web.service :as web-service]))

(defn init! []
  (log/configure-logging!)
  (db/init-db!))

(defn teardown! []
  (log/teardown-logging!))

(defn start-server!
  ([] (start-server! (web-service/app)))
  ([app-handler]
   (init!)
   (log/info {:event ::server-start})
   (let [stop-fn (httpkit/run-server app-handler
                                     {:port (Integer/parseInt (util/from-config :port))})]
     (fn []
       (stop-fn)
       (log/info {:event ::server-stop})
       (teardown!)))))

(defn -main
  [& args]
  (condp = (first args)
    "migrate"  (migrate-db)
    "rollback" (rollback-db)
    (start-server!)))

Allow uberjar to run migration/rollback

Allow uberjar to run migration/rollback


(defproject kukui "0.1.0-pre"
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2227"]]
  :profiles {:dev {:plugins [[lein-cljsbuild "1.0.3"]
                             [com.cemerick/clojurescript.test "0.3.1"]]
                   :hooks        [leiningen.cljsbuild]}}
  :cljsbuild {:builds
              {:whitespace {:source-paths ["test"]
                            :compiler
                            {:output-to "target/cljsbuild/whitespace/kukui.js"
                             :optimizations :whitespace
                             :pretty-print true}}
               :advanced {:source-paths ["test"]
                          :compiler
                          {:output-to "target/cljsbuild/advanced/kukui.js"
                           :pretty-print  false
                           :optimizations :advanced}}}
              :test-commands {"whitespace" ["phantomjs" :runner
                                            "target/cljsbuild/whitespace/kukui.js"]
                              "advanced" ["phantomjs" :runner
                                          "target/cljsbuild/advanced/kukui.js"]}})

(defproject kukui "0.1.0-pre"
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2227"]]
  :profiles {:dev {:plugins [[lein-cljsbuild "1.0.3"]
                             [com.cemerick/clojurescript.test "0.3.1"]]
                   :hooks        [leiningen.cljsbuild]}}
  :cljsbuild {:builds
              {:whitespace {:source-paths ["test"] ;; can't include src because of LT
                            :compiler
                            {:output-to "target/cljsbuild/whitespace/kukui.js"
                             :optimizations :whitespace
                             :pretty-print true}}
               ;; avoid advanced recompilation when testing
               ;; :advanced {:source-paths ["src" "test"]
               ;;            :compiler
               ;;            {:output-to "target/cljsbuild/advanced/kukui.js"
               ;;             :pretty-print  false
               ;;             :optimizations :advanced}}
               }
              :test-commands {"whitespace" ["phantomjs" :runner
                                            "target/cljsbuild/whitespace/kukui.js"]
                              "advanced" ["phantomjs" :runner
                                          "target/cljsbuild/advanced/kukui.js"]}})

Disable advanced target to speed up "lein cljsbuild test whitespace"


(defproject statuses "1.0.0-SNAPSHOT"
  :description "Statuses app for innoQ"
  :url "https://github.com/innoq/statuses"
  :license {:name "Apache License, Version 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"
            :distribution :repo
            :comments "A business-friendly OSS license"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [ring "1.4.0"]
                 [compojure "1.3.3"]
                 [clj-time "0.9.0"]
                 [org.clojure/data.json "0.2.6"]
                 [org.clojure/tools.cli "0.3.3"]]
  :pedantic? :abort
  :plugins [[jonase/eastwood "0.2.0"]]
  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
             :uberjar {:aot [statuses.server]}}
  :main statuses.server
  :aliases {"lint" "eastwood"}
  :eastwood {:exclude-linters [:constant-test]})

(defproject statuses "1.0.0-SNAPSHOT"
  :description "Statuses app for innoQ"
  :url "https://github.com/innoq/statuses"
  :license {:name "Apache License, Version 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"
            :distribution :repo
            :comments "A business-friendly OSS license"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [ring "1.4.0"]
                 [compojure "1.4.0"]
                 [clj-time "0.9.0"]
                 [org.clojure/data.json "0.2.6"]
                 [org.clojure/tools.cli "0.3.3"]]
  :pedantic? :abort
  :plugins [[jonase/eastwood "0.2.0"]]
  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
             :uberjar {:aot [statuses.server]}}
  :main statuses.server
  :aliases {"lint" "eastwood"}
  :eastwood {:exclude-linters [:constant-test]})

Update compojure from 1.3.3 to 1.4.0

Update compojure from 1.3.3 to 1.4.0


(ns metrics.counters
  (:use [metrics.utils :only (metric-name)])
  (:import (com.yammer.metrics Metrics))
  (:import (com.yammer.metrics.core Counter)))

; Create ----------------------------------------------------------------------
(defn counter
  "Create and return a new Counter metric with the given title.

  Title can be a plain string like \"foo\" or a vector of three strings (group,
  type, and title) like:

      [\"myapp\" \"webserver\" \"connections\"]

  "
  [title]
  (Metrics/newCounter (metric-name title)))

(defmacro defcounter
  "Define a new Counter metric with a given title, or group, type and title."
  ([title]
     `(def ~title (counter ~(str title))))

  ([group type title]
     `(def ~title (counter ~(vec (map str [group type title]))))))

; Read ------------------------------------------------------------------------
(defn value
  "Return the current value of the counter."
  [^Counter c]
  (.count c))

; Write -----------------------------------------------------------------------
(defn inc!
  "Increment the counter by the given amount (or 1 if not specified)."
  ([^Counter c] (inc! c 1))
  ([^Counter c n]
   (.inc c n)
   c))

(defn dec!
  "Decrement the counter by the given amount (or 1 if not specified)."
  ([^Counter c] (dec! c 1))
  ([^Counter c n]
   (.dec c n)
   c))

(defn clear!
  "Clear the given counter, resetting its value to zero."
  [^Counter c]
  (.clear c)
  c)

Make some indentation more Clojurey.

Make some indentation more Clojurey.


(ns telegenic.core
  (:import [org.jcodec.api FrameGrab]))

(ns telegenic.core
  (:import [org.jcodec.api FrameGrab])
  (:import [java.io File])
  (:import [java.awt.image BufferedImage])
  (:import [org.jcodec.common.model Picture])
  )

(set! *warn-on-reflection* true)
(set! *unchecked-math* true)

(defprotocol PGetFrame
  (get-frame [video frame-number]))

(extend-protocol PGetFrame
  String
    (get-frame [s frame-number] (get-frame (File. s) frame-number))
  File
    (get-frame [file frame-number]
      (let [^Picture nf (FrameGrab/getNativeFrame file (int frame-number))
            bi (.toBufferedImage nf)]
        bi)))

Work on frame grab code

Work on frame grab code


(defproject asystant "0.1.1-SNAPSHOT"
  :description "A simple, flexible helper for building modular systems with clojure/core.async"
  :url "https://github.com/monteithpj/asystant"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                 [org.clojure/core.match "0.3.0-alpha4"]
                 [aysylu/loom "0.5.4"]]
  :aliases
  {"repl" ["with-profile" "+test" "repl"]}
  :profiles
  {:test
   {:dependencies [[org.clojure/test.check "0.8.2"]
                   [com.gfredericks/test.chuck "0.2.0"]
                   [com.velisco/herbert "0.7.0-alpha1"]]}}
  :plugins [[codox "0.8.15"]]
  :codox {:src-dir-uri "https://github.com/monteithpj/asystant/blob/master"})

(defproject asystant "0.1.1-SNAPSHOT"
  :description "A simple, flexible helper for building modular systems with clojure/core.async"
  :url "https://github.com/monteithpj/asystant"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                 [org.clojure/core.match "0.3.0-alpha4"]]
  :aliases
  {"repl" ["with-profile" "+test" "repl"]}
  :profiles
  {:test
   {:dependencies [[org.clojure/test.check "0.8.2"]
                   [com.gfredericks/test.chuck "0.2.0"]
                   [com.velisco/herbert "0.7.0-alpha1"]
                   [aysylu/loom "0.5.4"]]}}
  :plugins [[codox "0.8.15"]]
  :codox {:src-dir-uri "https://github.com/monteithpj/asystant/blob/master"})

Move loom dependency to tests

Move loom dependency to tests


(defproject org.onyxplatform/onyx-datomic "0.7.2.0"
  :description "Onyx plugin for Datomic"
  :url "https://github.com/MichaelDrogalis/onyx-datomic"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                 [org.onyxplatform/onyx "0.7.3-20150901_140443-g6e4750b"]]
  :profiles {:dev {:dependencies [[midje "1.7.0"]
                                  [com.datomic/datomic-free "0.9.5153"]]
                   :plugins [[lein-midje "3.1.3"]]}
             :circle-ci {:jvm-opts ["-Xmx4g"]}})

(defproject org.onyxplatform/onyx-datomic "0.7.2.0"
  :description "Onyx plugin for Datomic"
  :url "https://github.com/MichaelDrogalis/onyx-datomic"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                 [org.onyxplatform/onyx "0.7.3-20150901_142736-gd0de107"]]
  :profiles {:dev {:dependencies [[midje "1.7.0"]
                                  [com.datomic/datomic-free "0.9.5153"]]
                   :plugins [[lein-midje "3.1.3"]]}
             :circle-ci {:jvm-opts ["-Xmx4g"]}})

Update dependency org.onyxplatform/onyx to version 0.7.3-20150901_142736-gd0de107.

Automatic commit by lein-unison.


(defproject com.draines/postal "1.12-SNAPSHOT"
  :repositories {"java.net" "http://download.java.net/maven/2"}
  :dependencies [[commons-codec "1.9"]
                 [javax.mail/mail "1.4.4"
                  :exclusions [javax.activation/activation]]]
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]]}
             :1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
             :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}})

(defproject com.draines/postal "1.12-SNAPSHOT"
  :description "JavaMail on Clojure"
  :url "https://github.com/drewr/postal"
  :license {:name "MIT"
            :url "http://en.wikipedia.org/wiki/MIT_License"
            :distribution :repo
            :comments "Use at your own risk"}
  :repositories {"java.net" "http://download.java.net/maven/2"}
  :dependencies [[commons-codec "1.9"]
                 [javax.mail/mail "1.4.4"
                  :exclusions [javax.activation/activation]]]
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]]}
             :1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
             :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}})

Add metadata to appease clojars

Add metadata to appease clojars

Conflicts:
	project.clj


(defproject org.onyxplatform/onyx-datomic "0.7.4"
  :description "Onyx plugin for Datomic"
  :url "https://github.com/MichaelDrogalis/onyx-datomic"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                 [org.onyxplatform/onyx "0.7.4-20150916_205458-gf33df5b"]]
  :profiles {:dev {:dependencies [[midje "1.7.0"]
                                  [com.datomic/datomic-free "0.9.5153"]]
                   :plugins [[lein-midje "3.1.3"]
                             [lein-set-version "0.4.1"]
                             [lein-pprint "1.1.1"]]}
             :circle-ci {:jvm-opts ["-Xmx4g"]}})

(defproject org.onyxplatform/onyx-datomic "0.7.5-SNAPSHOT"
  :description "Onyx plugin for Datomic"
  :url "https://github.com/MichaelDrogalis/onyx-datomic"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
                 [org.onyxplatform/onyx "0.7.4-20150916_205458-gf33df5b"]]
  :profiles {:dev {:dependencies [[midje "1.7.0"]
                                  [com.datomic/datomic-free "0.9.5153"]]
                   :plugins [[lein-midje "3.1.3"]
                             [lein-set-version "0.4.1"]
                             [lein-pprint "1.1.1"]]}
             :circle-ci {:jvm-opts ["-Xmx4g"]}})

Prepare for next release cycle.

Prepare for next release cycle.


(defproject se.haleby/stub-http "0.2.8"
  :description "A client library agonistic way to stub HTTP responses"
  :url "https://github.com/johanhaleby/stub-http"
  :license {:name         "MIT License"
            :url          "http://www.opensource.org/licenses/mit-license.php"
            :distribution :repo}
  :lein-release {:deploy-via :clojars}
  :min-lein-version "2.0.0"
  :dependencies [[org.nanohttpd/nanohttpd "2.3.1"]]
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"]
                                  [cheshire "5.5.0"]
                                  [clj-http-lite "0.3.0"]
                                  ;; needed for java>=11:
                                  [javax.xml.bind/jaxb-api "2.3.1"]
                                  ;; needed for clj-release
                                  [org.clojure/clojure-contrib "1.20"]]}}
  :repositories [["releases" {:url "http://clojars.org/repo" :creds :gpg}]]
  :plugins [[lein-codox "0.9.4"]])

(defproject se.haleby/stub-http "0.2.8"
  :description "A client library agonistic way to stub HTTP responses"
  :url "https://github.com/johanhaleby/stub-http"
  :license {:name         "MIT License"
            :url          "http://www.opensource.org/licenses/mit-license.php"
            :distribution :repo}
  :lein-release {:deploy-via :clojars}
  :min-lein-version "2.0.0"
  :dependencies [[org.nanohttpd/nanohttpd "2.3.1"]]
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"]
                                  [cheshire "5.5.0"]
                                  [clj-http-lite "0.3.0"]
                                  ;; needed for java>=11:
                                  [javax.xml.bind/jaxb-api "2.3.1"]]}}
  :repositories [["releases" {:url "http://clojars.org/repo" :creds :gpg}]]
  :plugins [[lein-codox "0.9.4"]])

Revert "Trying to add contrib dep to make lein-release work"

This reverts commit 73a2a0dfcc2468a48c352c5a1ca4ba4392d96301.


(defproject cadence "0.2.0-SNAPSHOT"
  :description "Use pattern recognition to match users with Cadence.js
               output."
  :min-lein-version "2.0.0"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [net.tanesha.recaptcha4j/recaptcha4j "0.0.7"]
                 [com.novemberain/monger "1.0.0-beta4"]
                 ;[clauth "1.0.0-rc1"]
                 [amalloy/ring-gzip-middleware "0.1.1"]
                 [fuziontech/ring-json-params "0.2.0"]
                 [com.cemerick/friend "0.0.8"]
                 [svm-clj "0.0.1-SNAPSHOT"]
                 ;[ring-middleware-format "0.1.1"]
                 ;[noir-cljs "0.2.5"]
                 [noir "1.2.2"]]
  :main cadence.server)

(defproject cadence "0.2.0-SNAPSHOT"
  :description "Use pattern recognition to match users with Cadence.js
               output."
  :min-lein-version "2.0.0"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [net.tanesha.recaptcha4j/recaptcha4j "0.0.7"]
                 [com.novemberain/monger "1.0.0-beta4"]
                 ;[clauth "1.0.0-rc1"]
                 [amalloy/ring-gzip-middleware "0.1.1"]
                 [fuziontech/ring-json-params "0.2.0"]
                 [com.cemerick/friend "0.0.8"]
                 ;[com.ml/libsvm "2.89"]
                 ;[svm-clj "0.0.1-SNAPSHOT"]
                 ;[edu.berkely.compbio/jlibsvm "0.902"]
                 ;[clj-ml "0.0.3-SNAPSHOT"]
                 [com.leadtune/clj-ml "0.2.1"]
                 ;[ring-middleware-format "0.1.1"]
                 ;[noir-cljs "0.2.5"]
                 [noir "1.2.2"]]
  :main cadence.server)

Add clj-ml dependency for patrec.

Add clj-ml dependency for patrec.


(ns desdemona.launcher.utils
  (:require
   [clojure.core.async :as a]))

(defn block-forever!
  []
  (a/<!! (a/chan)))

(ns desdemona.launcher.utils
  (:require
   [clojure.core.async :as a]))

(defn block-forever!
  "Blocks forever."
  []
  (a/<!! (a/chan)))

Add a docstring for block-forever!

Add a docstring for block-forever!


;; Copyright © 2014 JUXT LTD.

(defproject juxt.modular/clostache "0.6.0"
  :description "A modular extension that provides a Clostache templater for juxt.modular/template"
  :url "https://github.com/juxt/modular/tree/master/modules/clostache"
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[com.stuartsierra/component "0.2.1"]
                 [de.ubercode.clostache/clostache "1.3.1"]
                 [juxt.modular/template "0.6.0"]
                 ])

;; Copyright © 2014 JUXT LTD.

(defproject juxt.modular/clostache "0.6.1"
  :description "A modular extension that provides a Clostache templater for juxt.modular/template"
  :url "https://github.com/juxt/modular/tree/master/modules/clostache"
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :dependencies [[com.stuartsierra/component "0.2.2"]
                 [de.ubercode.clostache/clostache "1.4.0"]
                 [juxt.modular/template "0.6.2"]
                 ])

Update library dependencies and release clostache


(ns oc.storage.util.sort)

(defn- activity-sort
  "
  Compare function to sort 2 entries and/or activity by their `created-at` or `published-at` order respectively,
  in the order (:asc or :desc) provided.
  "
  [order x y]
  (let [order-flip (if (= order :desc) -1 1)]
    (* order-flip (compare (or (:published-at x) (:created-at x))
                           (or (:published-at y) (:created-at y))))))

(defn sort-activity
  "Given a set of entries, return up to the default limit of them, intermixed and sorted."
  [entries order limit]
  (take limit (sort (partial activity-sort order) entries)))

(ns oc.storage.util.sort
  (:require [clojure.pprint :as pp]
            [clj-time.core :as t]
            [clj-time.format :as f]))

(defn- max-comment-timestamp
  "Return a map {entry-uuid most-recent-comment-timestap} excluding the user authored comments"
  [user-id entry]
  (let [all-comments (filterv #(and (:body %) (not= (-> % :author :user-id) user-id)) (:interactions entry))
        sorted-comments (sort-by :updated-at all-comments)]
    (when (seq sorted-comments)
      (hash-map (:uuid entry) (-> sorted-comments last :updated-at)))))

(defn sort-activity
  "Given a set of entries, return up to the default limit of them, intermixed and sorted."
  [entries sorting order limit user-id]
  (let [all-published-at (apply merge (map #(hash-map (:uuid %) (:published-at %)) entries))
        sorting-by-most-recent? (= sorting :most-recent)
        all-comments (if sorting-by-most-recent?
                       (apply merge (remove nil? (map (partial max-comment-timestamp user-id) entries)))
                       {})
        to-sort-map (merge all-published-at all-comments)
        order-flip (if (= order :desc) -1 1)
        sorted-map (into (sorted-map-by (fn [key1 key2]
                          (* order-flip (compare [(get to-sort-map key1) key1]
                                                 [(get to-sort-map key2) key2]))))
                    to-sort-map)
        limited-uuids (take limit (keys sorted-map))]
    (remove nil? (map (fn [entry-uuid] (first (filter #(= (:uuid %) entry-uuid) entries))) limited-uuids))))

Sort posts by updated-at or the most recent comment updated-at, return only the first tot posts.


{:user {:plugins [[lein-marginalia "0.7.1"]
                  [cider/cider-nrepl "0.7.0-SNAPSHOT"]
                  [lein-try "0.4.1"]
                  [lein-clojars "0.9.1"]
                  [lein-ancient  "0.5.5"]
                  [lein-pprint "1.1.1"]]
        :dependencies [[com.gfredericks/clj-usage-graph "0.1.3"]] }}

{:user {:plugins [[lein-marginalia "0.7.1"]
                  [cider/cider-nrepl "0.7.0-SNAPSHOT"]
                  [lein-try "0.4.1"]
                  [lein-clojars "0.9.1"]
                  [lein-ancient  "0.5.5"]
                  [lein-exec "0.3.4"]
                  [lein-pprint "1.1.1"]]
        :dependencies [[com.gfredericks/clj-usage-graph "0.1.3"]
                       [org.clojure/tools.trace "0.7.8"]]}}

Add more stuff to my .lein.

Add more stuff to my .lein.


(ns app.analysis
  "GitHub releases URL analysis"
  (:require
    [taoensso.timbre :as timbre :refer-macros [info]]))

(defn get-os
  [url]
  (cond
    (boolean (re-find #"windows" url)) "Windows"
    (boolean (re-find #"linux" url)) "Linux"
    (boolean (re-find #".dmg" url)) "Mac OS X"
    :else "Other"))

(defn get-word-size
  [url]
  (cond
    (boolean (re-find #"x86_64" url)) "64-bit"
    (boolean (re-find #"x64" url)) "64-bit"
    (boolean (re-find #"x86" url)) "32-bit"
    :else ""))

(defn get-file-type
  [url]
  (cond
    (boolean (re-find #".zip" url)) "Portable"
    (boolean (re-find #".tar.gz" url)) "Portable"
    (boolean (re-find #".dmg" url)) "Disk Image"
    :else "Installer"))

(defn analyze-download-url
  [asset-info]
  (let [{url :browser-download-url} asset-info]
    {:os (get-os url) :word-size (get-word-size url)
     :file-type (get-file-type url) :url url}))

(defn build-download-map
  [asset-info-vector]
  (group-by :os (map analyze-download-url asset-info-vector)))

(ns app.analysis
  "GitHub releases URL analysis"
  (:require
    [taoensso.timbre :as timbre :refer-macros [info]]))

(defn get-os
  [url]
  (cond
    (boolean (re-find #"windows" url)) "Windows"
    (boolean (re-find #"linux" url)) "Linux"
    (boolean (re-find #"mac|.dmg" url)) "Mac OS X"
    :else "Other"))

(defn get-word-size
  [url]
  (cond
    (boolean (re-find #"x86_64" url)) "64-bit"
    (boolean (re-find #"x64" url)) "64-bit"
    (boolean (re-find #"x86" url)) "32-bit"
    :else ""))

(defn get-file-type
  [url]
  (cond
    (boolean (re-find #".zip" url)) "Portable"
    (boolean (re-find #".tar.gz" url)) "Portable"
    (boolean (re-find #".dmg" url)) "Disk Image"
    :else "Installer"))

(defn analyze-download-url
  [asset-info]
  (let [{url :browser-download-url} asset-info]
    {:os (get-os url) :word-size (get-word-size url)
     :file-type (get-file-type url) :url url}))

(defn build-download-map
  [asset-info-vector]
  (group-by :os (map analyze-download-url asset-info-vector)))

Update Mac file name possibilities

Update Mac file name possibilities


;; See: https://github.com/kumarshantanu/lein-localrepo
{:user {:plugins [;; Try new api quickly using the repl
                  [lein-try "0.4.3"]

                  ;;[lein-localrepo "0.5.4"]

                  ;; Convert pom.xml to project.clj
                  ;; Note: from https://github.com/thickey/lein-nevam
                  [lein-nevam "0.1.2"]

                  ;; A Leiningen plugin for a superior development environment
                  ;; See: [Introduction Blog Post](https://blog.venanti.us/ultra/)
                  ;; https://github.com/venantius/ultra
                  ;;[venantius/ultra "0.5.2"]

                  ;; Pretty-print a representation of the project map
                  [lein-pprint "1.2.0"]
                  ;; Keep adding more stuff here
                  ]
        ;; Experimental
        :dependencies [[pjstadig/humane-test-output "0.8.3"]
                       ;; See: https://github.com/pallet/alembic
                       [alembic "0.3.2"]]
        :injections [(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]}}

;; See: https://github.com/kumarshantanu/lein-localrepo
{:user {:plugins [;; Try new api quickly using the repl
                  [lein-try "0.4.3"]
                  ;;[lein-localrepo "0.5.4"]

                  ;; Convert pom.xml to project.clj
                  ;; Note: from https://github.com/thickey/lein-nevam
                  [lein-nevam "0.1.2"]

                  ;; A Leiningen plugin for a superior development environment
                  ;; See: [Introduction Blog Post](https://blog.venanti.us/ultra/)
                  ;; https://github.com/venantius/ultra
                  ;;[venantius/ultra "0.5.2"]

                  ;; Pretty-print a representation of the project map
                  [lein-pprint "1.2.0"]

                  ;; For quick typing
                  [com.palletops/lein-shorthand "0.4.0"]]

        ;; See: https://github.com/pallet/alembic
        :shorthand {. [alembic.still/distill alembic.still/lein]}

        ;; Experimental
        :dependencies [[pjstadig/humane-test-output "0.8.3"]
                       ;; See: https://github.com/pallet/alembic
                       [alembic "0.3.2"]]
        :injections [(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]}}

Add more setup for alembic

Add more setup for alembic