(ns prime.clj
  (:gen-class))

(require '[clojure.math.numeric-tower :as math])

(defn prime? [x]
  (cond
    (integer? (math/sqrt x)) false
    :else (every?
            (fn [y] (not= (mod x y) 0))
            (range 2 (math/ceil (math/sqrt x))))))

(defn -main
  [& args]
  (def v [])
  (def i 0)
  (while (< (count v) (Integer/parseInt (first args)))
    (cond (prime? i) (def v (conj v i)))
    (def i (inc i)))
  (println v))

(ns prime.clj
  (:gen-class))

(require '[clojure.math.numeric-tower :as math])

(defn prime? [x]
  (if
    (integer? (math/sqrt x)) false
    (every?
       (fn [y] (not= (mod x y) 0))
       (range 2 (math/ceil (math/sqrt x))))))

(defn -main
  [& args]
  (def v [])
  (def i 0)
  (while (< (count v) (Integer/parseInt (first args)))
    (cond (prime? i) (def v (conj v i)))
    (def i (inc i)))
  (println v))

Replace cond with if for shorter, clearer code.


(ns radicalzephyr.boot-junit
  {:boot/export-tasks true}
  (:require [boot.core :as core])
  (:import org.junit.runner.JUnitCore))

(defn failure->map [failure]
  {:description (.. failure (getDescription) (toString))
   :exception (.getException failure)
   :message (.getMessage failure)})

(defn result->map [result]
  {:successful? (.wasSuccessful result)
   :run-time (.getRunTime result)
   :run     (.getRunCount result)
   :ignored (.getIgnoredCount result)
   :failed  (.getFailureCount result)
   :failures (map failure->map (.getFailures result))})

(core/deftask junit
  "Run the jUnit test runner."
  [p packages PACKAGE #{sym} "The set of Java packages to run tests in."]
  (core/with-pre-wrap fileset
    (if (seq packages)
      (let [result (JUnitCore/runClasses
                    (into-array Class
                                [#_ (magic goes here to find all test classes)]))]
        (when (> (.getFailureCount result) 0)
          (throw (ex-info "There were some test failures."
                          (result->map result)))))
      (println "No packages were tested."))
    fileset))

(ns radicalzephyr.boot-junit
  {:boot/export-tasks true}
  (:require [boot.core :as core])
  (:import org.junit.runner.JUnitCore))

(defn failure->map [failure]
  {:description (.. failure (getDescription) (toString))
   :exception (.getException failure)
   :message (.getMessage failure)})

(defn result->map [result]
  {:successful? (.wasSuccessful result)
   :run-time (.getRunTime result)
   :run     (.getRunCount result)
   :ignored (.getIgnoredCount result)
   :failed  (.getFailureCount result)
   :failures (map failure->map (.getFailures result))})

(defn find-all-tests [packages]
  [])

(core/deftask junit
  "Run the jUnit test runner."
  [p packages PACKAGE #{sym} "The set of Java packages to run tests in."]
  (core/with-pre-wrap fileset
    (if (seq packages)
      (let [result (JUnitCore/runClasses
                    (into-array Class
                                (find-all-tests packages)))]
        (when (> (.getFailureCount result) 0)
          (throw (ex-info "There were some test failures."
                          (result->map result)))))
      (println "No packages were tested."))
    fileset))

Add a fn for finding all tests

Add a fn for finding all tests


(ns leiningen.new.re-frame
  (:require [leiningen.new.templates :refer [renderer name-to-path ->files]]
            [leiningen.core.main :as main]))

(def render (renderer "re-frame"))

(defn re-frame
  "FIXME: write documentation"
  [name]
  (let [data {:name name
              :sanitized (name-to-path name)}]
    (main/info "Generating fresh 'lein new' re-frame project.")
    (->files data
             ["README.md" (render "README.md" data)]
             ["project.clj" (render "project.clj" data)]
             ["{{sanitized}}.css" (render "project_name.css" data)]
             ["{{sanitized}}.html" (render "project_name.html" data)]

             ["devsrc/{{sanitized}}/dev.cljs" (render "devsrc/project_name/dev.cljs")]

             ["devsrc/{{sanitized}}/core.cljs" (render "src/project_name/core.cljs")])))

(ns leiningen.new.re-frame
  (:require [leiningen.new.templates :refer [renderer name-to-path ->files]]
            [leiningen.core.main :as main]))

(def render (renderer "re-frame"))

(defn re-frame
  "FIXME: write documentation"
  [name]
  (let [data {:name name
              :sanitized (name-to-path name)}]
    (main/info "Generating fresh 'lein new' re-frame project.")
    (->files data
             ["README.md" (render "README.md" data)]
             ["project.clj" (render "project.clj" data)]
             ["{{sanitized}}.css" (render "project_name.css" data)]
             ["{{sanitized}}.html" (render "project_name.html" data)]

             ["devsrc/{{sanitized}}/dev.cljs" (render "devsrc/project_name/dev.cljs" data)]

             ["src/{{sanitized}}/core.cljs" (render "src/project_name/core.cljs" data)])))

Fix rendering entries for devsrc and src files


(ns snake.terminal-reader)

(defn read-input [input-receiver]
  (loop [data (read)]
    (case data
      "\u001B[A" ( ;(send input-receiver move 'up)
              (print "UP")
              ; (recur [data (read)])
              )
      "\u001B[B" (print "DOWN")

      (print (str "DEFAULT" data)))
    (recur (str data (read)))))

(defn start [input-receiver]
  (send (agent nil) read-input input-receiver))

(ns snake.terminal-reader)

(defn get-input
  "Reads a string from the given input-reader if there is anything to be read"
  [input-reader]

  (def buffer (char-array 1024))
  (if (.ready input-reader)
    (do
      (def num-chars-read (.read input-reader buffer))
      (String/valueOf buffer 0 num-chars-read))
    ""))

(defn read-input
  "Read from standard input and decode the input into symbols
   to be understoud be the input-receiver."
  [input-receiver input-reader]
  (loop [data (get-input input-reader)]
    (case data
      "\u001B[A" ;(send input-receiver move 'up)
              (do
                (print "UP")
                (flush))
              ; (recur [data (read)])

      "\u001B[B" (print "DOWN")
      "\u001B[D" (print "LEFT")
      "\u001B[C" (print "RIGHT")
      :nothing)
    (recur (get-input input-reader))))

(defn start
  "Starts a new thread that is reading from standard in and will
   notify an agent about all read input."
  [input-receiver]
  (def input-reader (new java.io.InputStreamReader System/in))
  (.start (Thread. (fn [] (read-input input-receiver input-reader)))))

Read input directly from the System/in

Read input directly from the System/in

- the (read) function did not work for me, using System/in allows me to get the input to interpret cursor keys like done in the Java Snake

Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>


(defproject guangyin/guangyin "0.2.1"
  :description "Clojure date and time library wrapping java.time"
  :url "https://github.com/juhovh/guangyin"
  :license {:name "MIT License"
            :url "http://opensource.org/licenses/MIT"
            :distribution :repo}
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :javac-options ["-target" "1.8" "-source" "1.8"]
  :profiles {:dev {:plugins [[codox "0.8.11"]
                             [lein-cloverage "1.0.2"]]
                   :codox {:include [guangyin.core guangyin.format guangyin.chrono]}}
             :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
             :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
             :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
             :1.7 {:dependencies [[org.clojure/clojure "1.7.0-beta1"]]}})

(defproject guangyin/guangyin "0.2.2"
  :description "Clojure date and time library wrapping java.time"
  :url "https://github.com/juhovh/guangyin"
  :license {:name "MIT License"
            :url "http://opensource.org/licenses/MIT"
            :distribution :repo}
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :javac-options ["-target" "1.8" "-source" "1.8"]
  :profiles {:dev {:plugins [[codox "0.8.11"]
                             [lein-cloverage "1.0.2"]]
                   :codox {:include [guangyin.core guangyin.format guangyin.chrono]}}
             :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
             :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
             :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
             :1.7 {:dependencies [[org.clojure/clojure "1.7.0-beta1"]]}})

Update version number to 0.2.2.

Update version number to 0.2.2.


(ns circle.init
  (:require circle.env) ;; env needs to be loaded before any circle source files containing tests
  (:require circle.swank)
  (:require circle.db)
  (:require circle.repl)
  (:require circle.logging)
  (:require circle.util.chdir)
  (:require fs))

(defn maybe-change-dir
  "Change the current working directory to backend/. Although changing it to the project root makes
  more conceptual sense, there are lots of entrypoints to the clojure code (for example, tests,
  swank, etc) which are hard to get a hook on, but making sure there is a hook into the Rails code
  is easy. It makes more code to write this in JRuby, but it's written now, so why change it.cl" []
  (when (= (-> (fs/cwd) fs/normpath fs/split last) "CircleCI")
    (circle.util.chdir/chdir "backend")
    (println "Changing current working directory to" (fs/abspath (fs/cwd)))))

(defonce init*
  (delay
   (try
     (println "circle.init/init")
     (circle.logging/init)
     (when (System/getenv "CIRCLE_SWANK")
       (circle.swank/init))
     (circle.db/init)
     (circle.repl/init)
     (println (java.util.Date.))
     true
     (catch Exception e
       (println "caught exception on startup:")
       (.printStackTrace e)
       (println "exiting")
       (System/exit 1)))))

(defn init
  "Start everything up. idempotent."
  []
  @init*)

(defn -main []
  (init))

(ns circle.init
  (:require circle.env) ;; env needs to be loaded before any circle source files containing tests
  (:require circle.swank)
  (:require circle.db)
  (:require circle.repl)
  (:require circle.logging)
  (:require circle.util.chdir)
  (:require fs))

(defn maybe-change-dir
  "Change the current working directory to backend/. Although changing it to the project root makes
  more conceptual sense, there are lots of entrypoints to the clojure code (for example, tests,
  swank, etc) which are hard to get a hook on, but making sure there is a hook into the Rails code
  is easy. It makes more code to write this in JRuby, but it's written now, so why change it.cl" []
  (when (= (fs/exists? "Gemfile"))
    (circle.util.chdir/chdir "backend")
    (println "Changing current working directory to" (fs/abspath (fs/cwd)))))

(defonce init*
  (delay
   (try
     (println "circle.init/init")
     (circle.logging/init)
     (when (System/getenv "CIRCLE_SWANK")
       (circle.swank/init))
     (circle.db/init)
     (circle.repl/init)
     (println (java.util.Date.))
     true
     (catch Exception e
       (println "caught exception on startup:")
       (.printStackTrace e)
       (println "exiting")
       (System/exit 1)))))

(defn init
  "Start everything up. idempotent."
  []
  @init*)

(defn -main []
  (init))

Make chdir directory agnostic. Now keys off the presence of the Gemfile


;; Utility functions and functions for manipulating state
(ns robinson.macros)

(defmacro log-time
  "Log the time it takes to execute body."
  [msg & body]
  `(time
     (let [result# (do ~@body)]
       (println ~msg)
       result#)))

(defn vec-match?
  [test-expr expr]
  (let [arg-match?   (fn [[test-term term]]
                       (cond
                         (fn? test-term)  (test-term term)
                         (= :* test-term) true
                         (set? test-term) (contains? test-term term)
                         :else            (= test-term term)))
        found-match  (every? arg-match? (map vector test-expr expr))]
    (if found-match
      (println "Found match" test-expr expr)
      (println "Did not find match" test-expr expr))
    found-match))

(defmacro first-vec-match
  [match & body]
  `(condp vec-match? ~match
     ~@body))

;; Utility functions and functions for manipulating state
(ns robinson.macros)

(defmacro log-time
  "Log the time it takes to execute body."
  [msg & body]
  `(time
     (let [result# (do ~@body)]
       (println ~msg)
       result#)))

(defn vec-match?
  [test-expr expr]
  (let [arg-match?   (fn [[test-term term]]
                       (cond
                         (fn? test-term)  (test-term term)
                         (= :* test-term) true
                         (set? test-term) (contains? test-term term)
                         :else            (= test-term term)))
        found-match  (every? arg-match? (map vector test-expr expr))]
    #_(if found-match
      (println "Found match" test-expr expr)
      (println "Did not find match" test-expr expr))
    found-match))

(defmacro first-vec-match
  [match & body]
  `(condp vec-match? ~match
     ~@body))

Disable verbose matching log statements

Disable verbose matching log statements


(defproject {{name}} "0.1.0-SNAPSHOT"
  :description "FIXME: write this!"
  :url "http://example.com/FIXME"
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/clojurescript "1.7.28" :classifier "aot"
                  :exclusion [org.clojure/data.json]]
                 [org.clojure/data.json "0.2.6" :classifier "aot"]]
  :jvm-opts ^:replace ["-Xmx1g" "-server"]
  :node-dependencies [[source-map-support "0.3.2"]]
  :plugins [[lein-npm "0.5.0"]]
  :source-paths ["src" "target/classes"]
  :clean-targets ["out" "release"]
  :target-path "target")

(defproject {{name}} "0.1.0-SNAPSHOT"
  :description "FIXME: write this!"
  :url "http://example.com/FIXME"
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/clojurescript "1.7.28" :classifier "aot"
                  :exclusion [org.clojure/data.json]]
                 [org.clojure/data.json "0.2.6" :classifier "aot"]]
  :jvm-opts ^:replace ["-Xmx1g" "-server"]
  :plugins [[lein-npm "0.6.1"]]
  :npm {:dependencies [[source-map-support "0.3.2"]]}
  :source-paths ["src" "target/classes"]
  :clean-targets ["out" "release"]
  :target-path "target")

Update lein-npm version to 0.6.1.

Update lein-npm version to 0.6.1.


(ns decktouch.card-data)

(def cards [])

(ns decktouch.card-data)

(defn get-card-list-from-storage []
  "Get the list of cards from localStorage, or [] if it is empty"
  (let [key "card-list"
        list (.getItem js/localStorage key)]
    (do
      (.log js/console key list)
      (if (undefined? list)
        []
        (.parse (js/JSON))))))

(def cards [])

Add fn to load cards from localStorage

Add fn to load cards from localStorage


; Copyright (C) 2008 - 2011 Stefan Marr <mail@stefan-marr.de>
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to
; deal in the Software without restriction, including without limitation the
; rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
; sell copies of the Software, and to permit persons to whom the Software is
; furnished to do so, subject to the following conditions:
;
; The above copyright notice and this permission notice shall be included in
; all copies or substantial portions of the Software.
;
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
; IN THE SOFTWARE.

(ns snake.game-elements)

(defn create-apple
  [x y]
  {:x x
   :y y
   :type :apple})

(defn create-snake
  [x y]
  {:x x
   :y y
   :next nil
   :prev nil
   :type :snake})

; Copyright (C) 2008 - 2011 Stefan Marr <mail@stefan-marr.de>
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to
; deal in the Software without restriction, including without limitation the
; rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
; sell copies of the Software, and to permit persons to whom the Software is
; furnished to do so, subject to the following conditions:
;
; The above copyright notice and this permission notice shall be included in
; all copies or substantial portions of the Software.
;
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
; IN THE SOFTWARE.

(ns snake.game-elements)

(defn create-apple
  [x y]
  {:x x
   :y y
   :type :apple})

(defn create-snake
  ([x y]
    {:x x
     :y y
     :type :snake})
  ([[x y]]    ; for convenience
    (create-snake x y)))

Use the same implementation strategy as in the Erlang version: the snake is a list of coordinates instead of linked list

Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>


(defproject chestnut/lein-template "0.7.1-SNAPSHOT"
  :description "A Leiningen template for a ClojureScript setup with Figwheel, Austin, Om."
  :url "https://github.com/plexus/chestnut"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :eval-in-leiningen true)

(defproject chestnut/lein-template "0.7.0-SNAPSHOT"
  :description "A Leiningen template for a ClojureScript setup with Figwheel, Austin, Om."
  :url "https://github.com/plexus/chestnut"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :eval-in-leiningen true)

Undo temporary change to version (for testing)


(defproject replme "0.1.0-SNAPSHOT"
  :description "repl me"
  :url "replme.clojurecup.com"

  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [http-kit "2.1.16"]
                 [compojure "1.1.9"]
                 [liberator "0.12.2"]
                 [clj-http "1.0.0"]
                 [javax.servlet/servlet-api "2.5"]
                 [org.clojure/tools.logging "0.2.6"]
                 [com.stuartsierra/component "0.2.2"]
                 [org.clojure/tools.nrepl "0.2.5"]
                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                 [org.clojure/clojurescript "0.0-2311"]]

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

  :source-paths ["src"]

  :cljsbuild {
              :builds [{:id "replme"
                        :source-paths ["src"]
                        :compiler {
                                   :output-to "resources/public/replme.js"
                                   :output-dir "resources/public/out"
                                   :optimizations :none
                                   :source-map true}}]})

(defproject replme "0.1.0-SNAPSHOT"
  :description "repl me"
  :url "replme.clojurecup.com"

  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [http-kit "2.1.16"]
                 [compojure "1.1.9"]
                 [liberator "0.12.2"]
                 [clj-http "1.0.0"]
                 [javax.servlet/servlet-api "2.5"]
                 [org.clojure/tools.logging "0.2.6"]
                 [com.stuartsierra/component "0.2.2"]
                 [org.clojure/tools.nrepl "0.2.5"]
                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                 [org.clojure/clojurescript "0.0-2311"]]

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

  :source-paths ["src"]

  :profiles {:uberjar {:main replme.core}}

  :cljsbuild {
              :builds [{:id "replme"
                        :source-paths ["src"]
                        :compiler {
                                   :output-to "resources/public/replme.js"
                                   :output-dir "resources/public/out"
                                   :optimizations :none
                                   :source-map true}}]})

Add main to uberjar profile

Add main to uberjar profile


(defproject com.taoensso/faraday "0.5.2"
  :description "Clojure DynamoDB client"
  :url "https://github.com/ptaoussanis/faraday"
  :license {:name "Eclipse Public License"
            :url  "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure        "1.5.1"]
                 [org.clojure/tools.macro    "0.1.1"]
                 [com.amazonaws/aws-java-sdk "1.4.4.1"]
                 [com.taoensso/nippy         "1.2.1"]
                 [com.taoensso/timbre        "2.0.1"]]
  :profiles {:1.5   {:dependencies [[org.clojure/clojure "1.5.1"]]}
             :dev   {:dependencies []}
             :test  {:dependencies []}
             :bench {:dependencies []}}
  :aliases {"test-all" ["with-profile" "test,1.5" "test"]}
  :plugins [[codox "0.6.4"]]
  :min-lein-version "2.0.0"
  :warn-on-reflection true)

(defproject com.taoensso/faraday "0.5.2"
  :description "Clojure DynamoDB client"
  :url "https://github.com/ptaoussanis/faraday"
  :license {:name "Eclipse Public License"
            :url  "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure        "1.5.1"]
                 [org.clojure/tools.macro    "0.1.1"]
                 [com.amazonaws/aws-java-sdk "1.4.4.1"]
                 [expectations               "1.4.43"]
                 [com.taoensso/nippy         "1.2.1"]
                 [com.taoensso/timbre        "2.0.1"]]
  :profiles {:1.5   {:dependencies [[org.clojure/clojure "1.5.1"]]}
             :dev   {:dependencies []}
             :test  {:dependencies []}
             :bench {:dependencies []}}
  :aliases {"test-all" ["with-profile" "test,1.5" "test"]}
  :plugins [[lein-expectations "0.0.7"]
            [lein-autoexpect   "0.2.5"]
            [codox             "0.6.4"]]
  :min-lein-version "2.0.0"
  :warn-on-reflection true)

Add dependency (Expectations 1.4.43 & plugins)


(defproject reply "0.1.0-SNAPSHOT"
  :description "REPL-y: A fitter, happier, more productive REPL for Clojure."
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [jline "2.6"]
                 [org.thnetos/cd-client "0.3.1" :exclusions [org.clojure/clojure]]
                 [clj-stacktrace "0.2.4"]
                 [clojure-complete "0.2.1" :exclusions [org.clojure/clojure]]
                 [org.clojure/tools.nrepl "0.2.0-beta1"]]
  :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")

(defproject reply "0.1.0-alpha5"
  :description "REPL-y: A fitter, happier, more productive REPL for Clojure."
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [jline "2.6"]
                 [org.thnetos/cd-client "0.3.1" :exclusions [org.clojure/clojure]]
                 [clj-stacktrace "0.2.4"]
                 [clojure-complete "0.2.1" :exclusions [org.clojure/clojure]]
                 [org.clojure/tools.nrepl "0.2.0-beta1"]]
  :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")

Bump version for alpha5 release

Bump version for alpha5 release


(defproject kmg "0.1.0-SNAPSHOT"
  :description "Knowledge Media Guide"
  :url "https://github.com/alexpetrov/kmg"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [com.datomic/datomic-free "0.9.5078"]
                 [datomic-schema-grapher "0.0.1"]
                 [compojure "1.2.2"]
                 [http-kit "2.1.18"]
                 [enlive "1.1.6"]
                 [javax.servlet/servlet-api "2.5"]
                 [environ "1.0.0"]
                 [com.taoensso/timbre "3.3.1"]]
  :plugins [[datomic-schema-grapher "0.0.1"]
            [lein-environ "1.0.0"]]
  :ring {:handler kmg.core/app}
  :main kmg.core
  :aot [kmg.core])

(require 'cemerick.pomegranate.aether)
(cemerick.pomegranate.aether/register-wagon-factory!
 "http" #(org.apache.maven.wagon.providers.http.HttpWagon.))
(defproject kmg "0.1.0-SNAPSHOT"
  :description "Knowledge Media Guide"
  :url "https://github.com/alexpetrov/kmg"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 ;; This version of Datomic free makes me use insecure trick with http instead of https
                 [com.datomic/datomic-free "0.9.5078"]
                 [datomic-schema-grapher "0.0.1"]
                 [compojure "1.2.2"]
                 [http-kit "2.1.18"]
                 [enlive "1.1.6"]
                 [javax.servlet/servlet-api "2.5"]
                 [environ "1.0.0"]
                 [com.taoensso/timbre "3.3.1"]]
  :plugins [[datomic-schema-grapher "0.0.1"]
            [lein-environ "1.0.0"]]
  :ring {:handler kmg.core/app}
  :main kmg.core
  :aot [kmg.core])

Fix installation of datomic free with http instead of https


(ns desdemona.launcher.utils
  (:require
   [clojure.core.async :refer [chan <!!]]))

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

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

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

Change how block-forever! refs core.async


;; 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.scheduled-jobs.garbage
  "Garbage Collector related tasks."
  (:require [suricatta.core :as sc]
            [uxbox.db :as db]
            [uxbox.util.quartz :as qtz]))

;; --- Delete projects

;; TODO: move inline sql into resources/sql directory

(defn clean-deleted-projects
  "Task that cleans the deleted projects."
  {::qtz/repeat? true
   ::qtz/interval (* 1000 3600 24)
   ::qtz/job true}
  []
  (with-open [conn (db/connection)]
    (sc/atomic conn
      (let [sql (str "DELETE FROM projects "
                     " WHERE deleted=true AND "
                     "       (now()-deleted_at)::interval > '10 day'::interval;")]
        (sc/execute conn sql)))))

;; 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.scheduled-jobs.garbage
  "Garbage Collector related tasks."
  (:require [suricatta.core :as sc]
            [uxbox.db :as db]
            [uxbox.util.quartz :as qtz]))

;; --- Delete projects

;; TODO: move inline sql into resources/sql directory

(defn clean-deleted-projects
  "Task that cleans the deleted projects."
  {::qtz/repeat? true
   ::qtz/interval (* 1000 3600 24)
   ::qtz/job true}
  []
  (with-open [conn (db/connection)]
    (sc/atomic conn
      (let [sql (str "DELETE FROM projects "
                     " WHERE deleted_at is not null AND "
                     "       (now()-deleted_at)::interval > '10 day'::interval;")]
        (sc/execute conn sql)))))

Fix wrong query on scheduled_jobs ns.

Fix wrong query on scheduled_jobs ns.


(set-env!
 :source-paths #{"src"}
 :resource-paths #{"src"}
 :dependencies '[[org.clojure/clojure     "1.8.0" :scope "provided"]
                 [boot/core               "2.1.0" :scope "provided"]
                 [junit                   "4.12"  :scope "test"]])

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

(def +version+ "0.4.0")

(bootlaces! +version+)

(task-options!
 pom  {:project     'radicalzephyr/boot-junit
       :version     +version+
       :description "Run some jUnit tests in boot!"
       :url         "https://github.com/radicalzephyr/boot-junit"
       :scm         {:url "https://github.com/radicalzephyr/boot-junit"}
       :license     {"Eclipse Public License"
                     "http://www.eclipse.org/legal/epl-v10.html"}})

(set-env!
 :source-paths #{"src"}
 :resource-paths #{"src"}
 :dependencies '[[org.clojure/clojure     "1.8.0" :scope "provided"]
                 [boot/core               "2.1.0" :scope "provided"]
                 [junit                   "4.12"  :scope "test"]])

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

(def +version+ "0.4.0")

(task-options!
 pom  {:project     'radicalzephyr/boot-junit
       :version     +version+
       :description "Run some jUnit tests in boot!"
       :url         "https://github.com/radicalzephyr/boot-junit"
       :scm         {:url "https://github.com/radicalzephyr/boot-junit"}
       :license     {"Eclipse Public License"
                     "http://www.eclipse.org/legal/epl-v10.html"}})

Remove bootlaces usage without dependency declaration


(ns clojars.tools.upload-repo
  (:require [clojure.java.io :as io]
            [clojars.cloudfiles :as cf])
  (:gen-class))

(defn upload-file [conn path file]
  (if (cf/artifact-exists? conn path)
    (println "==> Remote artifact exists, ignoring:" path)
    (cf/put-file conn path file)))

(defn upload-repo [conn repo]
  (->> (file-seq repo)
    (filter (memfn isFile))
    (run! #(upload-file conn
             (cf/remote-path
               (.getAbsolutePath repo)
               (.getAbsolutePath %))
             %))))

(defn -main [& args]
  (if (not= 4 (count args))
    (println "Usage: repo-path container-name user key")
    (let [[repo container-name username key] args]
      (upload-repo (cf/connect username key container-name) (io/file repo)))))

(ns clojars.tools.upload-repo
  (:require [clojure.java.io :as io]
            [clojars.cloudfiles :as cf])
  (:gen-class))

(defn upload-file [conn path file existing]
  (if (existing path)
    (println "!!> Remote artifact exists, ignoring:" path)
    (do
      (println "==> Uploading:" path)
      (cf/put-file conn path file))))

(defn get-existing [conn]
  (println "Retrieving current artifact list (this will take a while)")
  (into #{} (cf/artifact-seq conn)))

(defn upload-repo [conn repo]
  (let [existing (get-existing conn)]
    (->> (file-seq repo)
      (filter (memfn isFile))
      (run! #(upload-file conn
               (cf/remote-path
                 (.getAbsolutePath repo)
                 (.getAbsolutePath %))
               %
               existing)))))

(defn -main [& args]
  (if (not= 4 (count args))
    (println "Usage: repo-path container-name user key")
    (let [[repo container-name username key] args]
      (upload-repo (cf/connect username key container-name) (io/file repo)))))

Use artifact list to speed up existence checking


{:npm-dev-deps {"shadow-cljs"           "2.8.69"
                "karma"                 "4.4.1"
                "karma-chrome-launcher" "3.1.0"
                "karma-cljs-test"       "0.1.0"
                "karma-junit-reporter"  "1.2.0"}}

{:npm-dev-deps {"shadow-cljs"           "2.8.69"
                "karma"                 "4.4.1"
                "karma-chrome-launcher" "3.1.0"
                "karma-cljs-test"       "0.1.0"
                "karma-junit-reporter"  "2.0.1"}}

Upgrade todomvc example karma-junit-reporter to 2.0.1


(ns com.palletops.bakery.local-storage-atom
  "A component for an atom backed by html5 local storage."
  (:require-macros
   [com.palletops.api-builder.api :refer [defn-api]]
   [schema.macros :refer [protocol]])
  (:require
   [alandipert.storage-atom :refer [local-storage]]
   [schema.core :as schema]))

(defn-api local-storage-atom
  "Return a component that is an atom backed by local storage (if supported).
  `default` is used to initialise the atom if it is not already in
  local storage.  The ILifecycle protocol is not implemented."
  {:sig [[schema/Any schema/Keyword :- (protocol IDeref)]]}
  [default key]
  (let [app-state-atom (atom default)]
    (if js/localStorage
      (local-storage app-state-atom key)
      app-state-atom)))

;; define a value reference type that is serialised as nil
(deftype Filtered [v]
  IDeref
  (-deref [_] v)
  tailrecursion.cljson/EncodeTagged
  (-encode [_] nil))

(defn transient-value
  "Return a value that when deref'd wil return v, and will not be
  stored in local storage."
  [v]
  (Filtered. v))

Add a filtered type to local-storage-atom


(defproject breeze-quiescent "0.1.1-SNAPSHOT"
  :description "A minimal, functional ClojureScript wrapper for ReactJS"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2173" :scope "provided"]
                 [com.facebook/react "0.9.0.2"]]
  :source-paths ["src"]

  ;; development concerns
  :profiles {:dev {:source-paths ["src" "examples/src"]
                   :resource-paths ["examples/resources"]
                   :plugins [[lein-cljsbuild "1.0.1"]]
                   :cljsbuild
                   {:builds
                    [{:source-paths ["src" "examples/src"]
                      :compiler
                      {:output-to "examples/resources/public/main.js"
                       :output-dir "examples/resources/public/build"
                       :optimizations :whitespace
                       :preamble ["react/react.min.js"]
                       :externs ["react/externs/react.js"]
                       :pretty-print true
                       :source-map
                       "examples/resources/public/main.js.map"
                       :closure-warnings {:non-standard-jsdoc :off}}}]}}})

(defproject breeze-quiescent "0.1.1-SNAPSHOT"
  :description "A minimal, functional ClojureScript wrapper for ReactJS"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2173" :scope "provided"]
                 [org.clojars.narma/react "0.10.0"]]
  :source-paths ["src"]

  ;; development concerns
  :profiles {:dev {:source-paths ["src" "examples/src"]
                   :resource-paths ["examples/resources"]
                   :plugins [[lein-cljsbuild "1.0.1"]]
                   :cljsbuild
                   {:builds
                    [{:source-paths ["src" "examples/src"]
                      :compiler
                      {:output-to "examples/resources/public/main.js"
                       :output-dir "examples/resources/public/build"
                       :optimizations :whitespace
                       :preamble ["react/react.min.js"]
                       :externs ["react/externs/react.js"]
                       :pretty-print true
                       :source-map
                       "examples/resources/public/main.js.map"
                       :closure-warnings {:non-standard-jsdoc :off}}}]}}})

Use react 10 extern release for "componentWillMount".


(defproject foreclojure "0.1.3.2"
  :description "4clojure - a website for lisp beginners"
  :dependencies [[org.clojure/clojure "1.2.1"]
                 [org.clojure/clojure-contrib "1.2.0"]
                 [compojure "0.6.2"]
                 [hiccup "0.2.4"]
                 [clojail "0.4.0-SNAPSHOT"]
                 [sandbar "0.4.0-SNAPSHOT"]
                 [org.clojars.christophermaier/congomongo "0.1.4-SNAPSHOT"]
		 [org.jasypt/jasypt "1.7"]
                 [amalloy/utils "0.3.7"]
                 [clj-github "1.0.1"]
                 [ring "0.3.7"]
                 [clj-config "0.1.0"]
                 [incanter/incanter-charts "1.2.1"]
                 [org.apache.commons/commons-email "1.2"]]
  :dev-dependencies [[lein-ring "0.4.0"]
                     [swank-clojure "1.2.1"]]
  :main foreclojure.core
  :ring {:handler foreclojure.core/app})

(defproject foreclojure "0.1.3.2"
  :description "4clojure - a website for lisp beginners"
  :dependencies [[org.clojure/clojure "1.2.1"]
                 [org.clojure/clojure-contrib "1.2.0"]
                 [compojure "0.6.2"]
                 [hiccup "0.2.4"]
                 [clojail "0.4.0-SNAPSHOT"]
                 [sandbar "0.4.0-SNAPSHOT"]
                 [org.clojars.christophermaier/congomongo "0.1.4-SNAPSHOT"]
		 [org.jasypt/jasypt "1.7"]
                 [amalloy/utils "[0.3.7,)"]
                 [clj-github "1.0.1"]
                 [ring "0.3.7"]
                 [clj-config "0.1.0"]
                 [incanter/incanter-charts "1.2.1"]
                 [org.apache.commons/commons-email "1.2"]]
  :dev-dependencies [[lein-ring "0.4.0"]
                     [swank-clojure "1.2.1"]]
  :main foreclojure.core
  :ring {:handler foreclojure.core/app})

Put my dependency version back the way it belongs


(defproject funcool/octet "0.2.0"
  :description "A clojure(script) library for work with binary data."
  :url "https://github.com/funcool/octet"
  :license {:name "BSD (2 Clause)"
            :url "http://opensource.org/licenses/BSD-2-Clause"}

  :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
                 [org.clojure/clojurescript "1.7.145" :scope "provided"]
                 [io.netty/netty-buffer "4.1.0.Beta7"]]

  :source-paths ["src"]
  :test-paths ["test"]

  :jar-exclusions [#"\.cljx|\.swp|\.swo|\.DS_Store|user.clj"]

  :codeina {:sources ["src"]
            :reader :clojurescript
            :exclude [octet.spec.basic
                      octet.spec.string
                      octet.spec.collections]
            :target "doc/dist/latest/api"
            :src-uri "http://github.com/funcool/beicon/blob/master/"
            :src-uri-prefix "#L"}

  :plugins [[funcool/codeina "0.3.0"]])

(defproject funcool/octet "0.2.0"
  :description "A clojure(script) library for work with binary data."
  :url "https://github.com/funcool/octet"
  :license {:name "BSD (2 Clause)"
            :url "http://opensource.org/licenses/BSD-2-Clause"}

  :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
                 [org.clojure/clojurescript "1.7.145" :scope "provided"]
                 [io.netty/netty-buffer "4.1.0.Beta7"]]

  :source-paths ["src"]
  :test-paths ["test"]

  :jar-exclusions [#"\.cljx|\.swp|\.swo|\.DS_Store|user.clj"]

  :codeina {:sources ["src"]
            :reader :clojure
            :exclude [octet.spec.basic
                      octet.spec.string
                      octet.spec.collections]
            :target "doc/dist/latest/api"
            :src-uri "http://github.com/funcool/beicon/blob/master/"
            :src-uri-prefix "#L"}

  :plugins [[funcool/codeina "0.3.0"]])

Build docs as clojure instead clojurescript.


(defproject degasolv/degasolv "1.3.0"
  :description "Dependency tracker with an eye toward building and shipping software."
  :url "http://github.com/djhaskin987/degasolv"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :main degasolv.cli
  :dependencies [
                 [org.clojure/clojure "1.9.0-alpha14"]
                 [version-clj "0.1.2"]
                 [org.clojure/tools.cli "0.3.5"]
                 [me.raynes/fs "1.4.6"]
                 [com.velisco/tagged "0.5.0"]
                 ]
  :plugins [[lein-print "0.1.0"]]
  :test-selectors
  {
   :resolve-basic :resolve-basic
   :resolve-harden :resolve-harden
   :string-to-requirement :string-to-requirement
   :repo-aggregation :repo-aggregation
   :resolve-conflict-strat :resolve-conflict-strat
   }
  :profiles {
             :dev {:dependencies [
                                  [org.clojure/core.match "0.3.0-alpha4"]
                                  [version-clj "0.1.2"
                                   :exclusions [org.clojure/clojure]]
                                  ]}
             :uberjar {:aot [degasolv.cli degasolv.resolver]}
             }
  :target-path "target/%s")

(defproject degasolv/degasolv "1.3.1-SNAPSHOT"
  :description "Dependency tracker with an eye toward building and shipping software."
  :url "http://github.com/djhaskin987/degasolv"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :main degasolv.cli
  :dependencies [
                 [org.clojure/clojure "1.9.0-alpha14"]
                 [version-clj "0.1.2"]
                 [org.clojure/tools.cli "0.3.5"]
                 [me.raynes/fs "1.4.6"]
                 [com.velisco/tagged "0.5.0"]
                 ]
  :plugins [[lein-print "0.1.0"]]
  :test-selectors
  {
   :resolve-basic :resolve-basic
   :resolve-harden :resolve-harden
   :string-to-requirement :string-to-requirement
   :repo-aggregation :repo-aggregation
   :resolve-conflict-strat :resolve-conflict-strat
   }
  :profiles {
             :dev {:dependencies [
                                  [org.clojure/core.match "0.3.0-alpha4"]
                                  [version-clj "0.1.2"
                                   :exclusions [org.clojure/clojure]]
                                  ]}
             :uberjar {:aot [degasolv.cli degasolv.resolver]}
             }
  :target-path "target/%s")

Bump version number to 1.3.1-SNAPSHOT

Bump version number to 1.3.1-SNAPSHOT


(ns multihash.core-test
  (:require
    [clojure.test :refer :all]
    [multihash.core :as multihash]))

(deftest a-test
  (testing "FIXME, I fail."
    (is (= 0 1))))

(ns multihash.core-test
  (:require
    [clojure.test :refer :all]
    [multihash.core :as multihash]))

(deftest app-specific-codes
  (is (false? (multihash/app-code? 0x00)))
  (doseq [code (range 0x01 0x10)]
    (is (true? (multihash/app-code? code))
        (str "Algorithm code " code " is app-specific")))
  (doseq [code (range 0x10 0x100)]
    (is (false? (multihash/app-code? code))
        (str "Algorithm code " code " is not app-specific"))))

(def examples
  "Test case examples."
  {"11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33"
   [0x11 :sha1 20 "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33"]

   "11040beec7b8"
   [0x11 :sha1 4 "0beec7b8"]

   "12202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
   [0x12 :sha2-256 32 "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"]

   "12042c26b46b"
   [0x12 :sha2-256 4 "2c26b46b"]

   "40042c26b46b"
   [0x40 :blake2b 4 "2c26b46b"]})

(deftest example-decoding
  (doseq [[encoded [code algorithm length digest]] examples]
    (let [mhash (multihash/decode encoded)]
      (is (= code (:code mhash)))
      (is (= algorithm (:algorithm mhash)))
      (is (= length (:length mhash)))
      (is (= digest (:digest mhash))))))

(deftest example-encoding
  (doseq [[encoded [code algorithm length digest]] examples]
    (let [mhash (multihash/create algorithm digest)]
      (is (= encoded (multihash/encode mhash))))))

Add initial round of tests.

Add initial round of tests.


(defproject todomvc-re-frame "0.10.5"
  :dependencies [[org.clojure/clojure        "1.10.0"]
                 [org.clojure/clojurescript  "1.10.439"]
                 [reagent "0.8.1"]
                 [re-frame "0.10.5"]
                 [binaryage/devtools "0.9.10"]
                 [secretary "1.2.3"]
                 [day8.re-frame/tracing "0.5.1"]]

  :plugins [[lein-cljsbuild "1.1.7"]
            [lein-figwheel  "0.5.18"]]

  :hooks [leiningen.cljsbuild]

  :profiles {:dev  {:cljsbuild
                    {:builds {:client {:compiler {:asset-path           "js"
                                                  :optimizations        :none
                                                  :source-map           true
                                                  :source-map-timestamp true
                                                  :main                 "todomvc.core"}
                                       :figwheel {:on-jsload "todomvc.core/main"}}}}}

             :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.10.5"
  :dependencies [[org.clojure/clojure        "1.10.0"]
                 [org.clojure/clojurescript  "1.10.439"]
                 [reagent "0.8.1"]
                 [re-frame "0.10.5"]
                 [binaryage/devtools "0.9.10"]
                 [clj-commons/secretary "1.2.4"]
                 [day8.re-frame/tracing "0.5.1"]]

  :plugins [[lein-cljsbuild "1.1.7"]
            [lein-figwheel  "0.5.18"]]

  :hooks [leiningen.cljsbuild]

  :profiles {:dev  {:cljsbuild
                    {:builds {:client {:compiler {:asset-path           "js"
                                                  :optimizations        :none
                                                  :source-map           true
                                                  :source-map-timestamp true
                                                  :main                 "todomvc.core"}
                                       :figwheel {:on-jsload "todomvc.core/main"}}}}}

             :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 secretary dependency in todomvc

Update secretary dependency in todomvc

Fixes #530


(defproject hello-world "0.23.1"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [uncomplicate/neanderthal "0.23.1"]]
  :exclusions [[org.jcuda/jcuda-natives :classifier "apple-x86_64"]
               [org.jcuda/jcublas-natives :classifier "apple-x86_64"]])

(defproject hello-world "0.23.1"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [uncomplicate/neanderthal "0.23.1"]]
  :exclusions [[org.jcuda/jcuda-natives :classifier "apple-x86_64"]
               [org.jcuda/jcublas-natives :classifier "apple-x86_64"]]
  :jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"
                       #_"--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"])

Add JDK 9+ module example.

Add JDK 9+ module example.


(ns discuss.integration
  (:require-macros [cljs.core.async.macros :refer [go]])
  (:require [goog.events :as events]
            [cljs.core.async :refer [put! chan <!]]
            [discuss.lib :as lib]
            [discuss.extensions]))

(defn selected-text []
  (let [selection (str (.getSelection js/window))]
    (when (> (count selection) 0)
      (lib/update-state-item! :user :selection (fn [_] selection))
      (lib/log selection))))

(defn get-selection
  "Return the stored selection of the user."
  []
  (get-in @lib/app-state [:user :selection]))

(defn listen [el type]
  (let [out (chan)]
    (events/listen el type
                   (fn [e] (put! out e)))
    out))

(let [clicks (listen (.getElementById js/document "discuss-text") "click")]
  (go (while true
        (<! clicks)
        (selected-text))))

;; http://www.thesoftwaresimpleton.com/blog/2014/12/30/core-dot-async-dot-mouse-dot-down/

(ns discuss.integration
  (:require-macros [cljs.core.async.macros :refer [go]])
  (:require [goog.events :as events]
            [cljs.core.async :refer [put! chan <!]]
            [discuss.lib :as lib]
            [discuss.extensions]))

(defn get-selection
  "Return the stored selection of the user."
  []
  (get-in @lib/app-state [:user :selection]))

(defn selected-text []
  (let [selection (str (.getSelection js/window))]
    (when (and (> (count selection) 0)
               (not= selection (get-selection)))
      (lib/update-state-item! :user :selection (fn [_] selection))
      (lib/log selection))))

(defn listen [el type]
  (let [out (chan)]
    (events/listen el type
                   (fn [e] (put! out e)))
    out))

(let [clicks (listen (.getElementById js/document "discuss-text") "click")]
  (go (while true
        (<! clicks)
        (selected-text))))

;; http://www.thesoftwaresimpleton.com/blog/2014/12/30/core-dot-async-dot-mouse-dot-down/

Check if selection has changed before changing the atom


{:foreign-libs [{:file "js/fuse/fuse.min.js"
                 :provides ["cljsjs.fuse"]}]
 :externs "js/fuse/fuse.ext.js"}

{:foreign-libs [{:file "js/fuse/fuse.min.js"
                 :provides ["cljsjs.fuse"]}]
 :externs ["js/fuse/fuse.ext.js"]}

Correct expected data structure for externs


(defproject degasolv/degasolv "1.2.1-SNAPSHOT"
  :description "Dependency tracker with an eye toward building and shipping software."
  :url "http://github.com/djhaskin987/degasolv"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :main degasolv.cli
  :dependencies [
                 [org.clojure/clojure "1.9.0-alpha14"]
                 [version-clj "0.1.2"]
                 [org.clojure/tools.cli "0.3.5"]
                 [me.raynes/fs "1.4.6"]
                 [com.velisco/tagged "0.5.0"]
                 ]
  :plugins [[lein-print "0.1.0"]]
  :test-selectors
  {
   :resolve-basic :resolve-basic
   :resolve-harden :resolve-harden
   :string-to-requirement :string-to-requirement
   :repo-aggregation :repo-aggregation
   :resolve-conflict-strat :resolve-conflict-strat
   }
  :profiles {
             :dev {:dependencies [
                                  [org.clojure/core.match "0.3.0-alpha4"]
                                  [version-clj "0.1.2"
                                   :exclusions [org.clojure/clojure]]
                                  ]}
             :uberjar {:aot [degasolv.cli degasolv.resolver]}
             }
  :target-path "target/%s")

(defproject degasolv/degasolv "1.3.0"
  :description "Dependency tracker with an eye toward building and shipping software."
  :url "http://github.com/djhaskin987/degasolv"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :main degasolv.cli
  :dependencies [
                 [org.clojure/clojure "1.9.0-alpha14"]
                 [version-clj "0.1.2"]
                 [org.clojure/tools.cli "0.3.5"]
                 [me.raynes/fs "1.4.6"]
                 [com.velisco/tagged "0.5.0"]
                 ]
  :plugins [[lein-print "0.1.0"]]
  :test-selectors
  {
   :resolve-basic :resolve-basic
   :resolve-harden :resolve-harden
   :string-to-requirement :string-to-requirement
   :repo-aggregation :repo-aggregation
   :resolve-conflict-strat :resolve-conflict-strat
   }
  :profiles {
             :dev {:dependencies [
                                  [org.clojure/core.match "0.3.0-alpha4"]
                                  [version-clj "0.1.2"
                                   :exclusions [org.clojure/clojure]]
                                  ]}
             :uberjar {:aot [degasolv.cli degasolv.resolver]}
             }
  :target-path "target/%s")

Bump version number to 1.3.0

Bump version number to 1.3.0


;; 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.3"
  :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.3-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


(defproject org.onyxplatform/onyx-datomic "0.7.12"
  :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.12"]]
  :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.7.13-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.12"]]
  :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
	li.elmnt/datapump "0.6.0"
	: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.6.0"]
								 [prismatic/schema "0.4.0"]]
	:profiles {:dev {:dependencies [[junit/junit "4.11"]]}}
	:plugins [[lein-junit "1.1.8"]
						[lein-localrepo "0.5.3"]]
	:source-paths ["src/clojure"]
	:java-source-paths ["src/java"]
	:test-paths ["test/clojure"]
	:java-test-paths ["test/java"]
	:junit ["test/java"])

(defproject
  li.elmnt/datapump "0.7.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.6.0"]
                 [prismatic/schema "0.4.0"]]
  :profiles {:dev {:dependencies [[junit/junit "4.11"]
                                  [midje "1.6.3"]]}}
  :plugins [[lein-junit "1.1.8"]
            [lein-localrepo "0.5.3"]
            [lein-midje "3.1.3"]
            [lein-marginalia "0.8.0"]]
  :source-paths ["src/clojure"]
  :java-source-paths ["src/java"]
  :test-paths ["test/clojure"]
  :java-test-paths ["test/java"]
  :junit ["test/java"])

Prepare 0.7.0: add marginalia and midje.

Signed-off-by: Stanislas Nanchen <b54ae7893982d10f03c27dbc889098ce04898c8b@hood.ch>


(defproject clj-chrome-devtools "20190529"
  :description "Clojure API for Chrome DevTools remote"
  :license {:name "MIT License"}
  :url "https://github.com/tatut/clj-chrome-devtools"
  :dependencies [[org.clojure/clojure "1.9.0"]
                 [http-kit "2.3.0"]
                 [cheshire "5.8.1"]
                 [stylefruits/gniazdo "1.1.1"]
                 [org.clojure/core.async "0.4.490"]
                 [com.taoensso/timbre "4.10.0"]]
  :plugins [[lein-codox "0.10.3"]]
  :codox {:output-path "docs/api"
          :metadata {:doc/format :markdown}})

(defproject clj-chrome-devtools "20190530-SNAPSHOT"
  :description "Clojure API for Chrome DevTools remote"
  :license {:name "MIT License"}
  :url "https://github.com/tatut/clj-chrome-devtools"
  :dependencies [[org.clojure/clojure "1.9.0"]
                 [http-kit "2.3.0"]
                 [cheshire "5.8.1"]
                 [stylefruits/gniazdo "1.1.1"]
                 [org.clojure/core.async "0.4.490"]
                 [com.taoensso/timbre "4.10.0"]]
  :plugins [[lein-codox "0.10.3"]]
  :codox {:output-path "docs/api"
          :metadata {:doc/format :markdown}})

Update to snapshot version before release


(defproject onyx-app/lein-template "0.12.0.0-alpha2"
  :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.12.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.


(defproject onyx-app/lein-template "0.8.11.2"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :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}}
  :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.8.11.3-SNAPSHOT"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :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}}
  :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.


(defproject io.aviso/rook "0.1.2"
  :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
  :url "https://github.com/AvisoNovate/rook"
  :license {:name "Apache Sofware Licencse 2.0"
            :url  "http://www.apache.org/licenses/LICENSE-2.0.html"}
  ;; Normally we don't AOT compile; only when tracking down reflection warnings.
  :profiles {:reflection-warnings {:aot         :all
                                   :global-vars {*warn-on-reflection* true}}}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/tools.logging "0.2.6"]
                 [compojure "1.1.6"]
                 [org.clojure/core.memoize "0.5.6"]]
  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}}
  :plugins [[test2junit "1.0.1"]])

(defproject io.aviso/rook "0.1.3-SNAPSHOT"
  :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
  :url "https://github.com/AvisoNovate/rook"
  :license {:name "Apache Sofware Licencse 2.0"
            :url  "http://www.apache.org/licenses/LICENSE-2.0.html"}
  ;; Normally we don't AOT compile; only when tracking down reflection warnings.
  :profiles {:reflection-warnings {:aot         :all
                                   :global-vars {*warn-on-reflection* true}}}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/tools.logging "0.2.6"]
                 [compojure "1.1.6"]
                 [org.clojure/core.memoize "0.5.6"]]
  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}}
  :plugins [[test2junit "1.0.1"]])

Advance version number to 0.1.3-SNAPSHOT


(set-env!
 :source-paths #{"src"}
 :dependencies '[[radicalzephyr/boot-junit "0.1.1" :scope "test"]
                 [jeluard/boot-notify "0.1.2"      :scope "test"]
                 [net.sf.jopt-simple/jopt-simple "4.9"]])

(def +version+ "0.1.0-SNAPSHOT")

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

(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"
      :manifest {"Main-Class" "net.zephyrizing.http_server.HttpServer"}})

;;; This prevents a name collision WARNING between the test task and
;;; clojure.core/test, a function that nobody really uses or cares
;;; about.
(if ((loaded-libs) 'boot.user)
  (ns-unmap 'boot.user 'test))

(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"}
 :dependencies '[[radicalzephyr/boot-junit "0.2.0-SNAPSHOT" :scope "test"]
                 [jeluard/boot-notify "0.1.2"      :scope "test"]
                 [net.sf.jopt-simple/jopt-simple "4.9"]])

(def +version+ "0.1.0-SNAPSHOT")

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

(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"
      :manifest {"Main-Class" "net.zephyrizing.http_server.HttpServer"}})

;;; This prevents a name collision WARNING between the test task and
;;; clojure.core/test, a function that nobody really uses or cares
;;; about.
(if ((loaded-libs) 'boot.user)
  (ns-unmap 'boot.user 'test))

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

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

Update to 0.2.0-SNAPSHOT of boot-junit

Update to 0.2.0-SNAPSHOT of boot-junit


{:dev
 {:aliases {"test-all" ["with-profile" "dev,1.8:dev,1.6:dev,1.5:dev" "test"]}
  :codeina {:sources ["src"]
            :reader :clojure
            :target "doc/dist/latest/api"
            :src-uri "http://github.com/funcool/buddy-core/blob/master/"
            :src-uri-prefix "#L"}
  :plugins [[funcool/codeina "0.3.0"]
            [lein-ancient "0.6.7"]]}
 :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
 :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
 :1.8 {:dependencies [[org.clojure/clojure "1.8.0-beta2"]]}}

{:dev
 {:aliases {"test-all" ["with-profile" "dev,1.8:dev,1.6:dev,1.5:dev" "test"]}
  :codeina {:sources ["src"]
            :reader :clojure
            :target "doc/dist/latest/api"
            :src-uri "http://github.com/funcool/buddy-core/blob/master/"
            :src-uri-prefix "#L"}
  :plugins [[funcool/codeina "0.3.0"]
            [lein-ancient "0.6.7"]]}
 :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
 :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
 :1.8 {:dependencies [[org.clojure/clojure "1.8.0-RC4"]]}}

Update clj compiler to 1.8.0-RC4 in :1.8 profile.


(ns uxbox.util.data
  "A collection of data transformation utils.")

(defn index-by
  "Return a indexed map of the collection
  keyed by the result of executing the getter
  over each element of the collection."
  [coll getter]
  (let [data (transient {})]
    (run! #(assoc! data (getter %) %) coll)
    (persistent! data)))

(def ^:static index-by-id #(index-by % :id))

(defn remove-nil-vals
  "Given a map, return a map removing key-value
  pairs when value is `nil`."
  [data]
  (into {} (remove (comp nil? second) data)))

(ns uxbox.util.data
  "A collection of data transformation utils."
  (:require [cljs.reader :as r]))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data structure manipulation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn index-by
  "Return a indexed map of the collection
  keyed by the result of executing the getter
  over each element of the collection."
  [coll getter]
  (let [data (transient {})]
    (run! #(assoc! data (getter %) %) coll)
    (persistent! data)))

(def ^:static index-by-id #(index-by % :id))

(defn remove-nil-vals
  "Given a map, return a map removing key-value
  pairs when value is `nil`."
  [data]
  (into {} (remove (comp nil? second) data)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Numbers Parsing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn read-string
  [v]
  (r/read-string v))

(defn parse-int
  [v]
  (js/parseInt v 10))

Add helpers for the reader and int parsing.


(defproject spamscope "2.3.0-SNAPSHOT"
  :resource-paths ["_resources"]
  :target-path "_build"
  :min-lein-version "2.0.0"
  :jvm-opts ["-client"]
  :dependencies  [[org.apache.storm/storm-core "1.1.1"]
                  [org.apache.storm/flux-core "1.1.1"]]
  :jar-exclusions     [#"log4j\.properties" #"org\.apache\.storm\.(?!flux)" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
  :uberjar-exclusions [#"log4j\.properties" #"org\.apache\.storm\.(?!flux)" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
  )

(defproject spamscope "2.3.0-SNAPSHOT"
  :resource-paths ["_resources"]
  :target-path "_build"
  :min-lein-version "2.0.0"
  :jvm-opts ["-client"]
  :dependencies  [[org.apache.storm/storm-core "1.2.1"]
                  [org.apache.storm/flux-core "1.2.1"]]
  :jar-exclusions     [#"log4j\.properties" #"org\.apache\.storm\.(?!flux)" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
  :uberjar-exclusions [#"log4j\.properties" #"org\.apache\.storm\.(?!flux)" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
  )

Upgrade Apache Storm to 1.2.1

Upgrade Apache Storm to 1.2.1


(ns isla.talk
  (:use [clojure.pprint])
  (:require [clojure.string :as str])
  (:require [mrc.utils :as utils]))

(defn room-intro [room]
  (str "You are in the " (:name room) ". "
       (:summary room)))

(defn room-already [name] (str "You are already in the " name "."))
(defn room-not-allowed [name] (str "You cannot go into the " name "."))

(ns isla.talk
  (:use [clojure.pprint])
  (:require [clojure.string :as str])
  (:require [mrc.utils :as utils]))

(defn room-intro [room]
(declare list-rooms)
  (str "You are in the " (:name room) ". "
       (:summary room)))

(defn room-already [name] (str "You are already in the " name "."))
(defn room-not-allowed [name] (str "You cannot go into the " name "."))

(defmulti list-rooms (fn [rooms] (count rooms)))
(defmethod list-rooms 0 [rooms] "There is no way out of this room.")
(defmethod list-rooms 1 [rooms] (str "You can see a door to the " (:name (first rooms))))
(defmethod list-rooms :default [rooms]
  (let [all-room-list (reduce (fn [string x]
                                (str string ", the " (:name x)))
                              "" rooms)
        all-but-last-list (rest (butlast (str/split all-room-list #",")))
        final (str "You can see a door to"
                   (str/join "," all-but-last-list)
                   " and the " (:name (last rooms)) ".")]
  final))

Add fn to list rooms with nice commas and ands.


(ns bocko-ios.core
  (:require bocko.core))

(defn ^:export init
  [canvas-view-controller]
  (bocko.core/set-create-canvas
    (fn [color-map raster width height _ _]
      (add-watch raster :monitor
        (fn [_ _ old new]
          (when-not (= old new)
            (doseq [x (range width)]
              (let [old-col (nth old x)
                    new-col (nth new x)]
                (when-not (= old-col new-col)
                  (doseq [y (range height)]
                    (let [old-color (nth old-col y)
                          new-color (nth new-col y)]
                      (when-not (= old-color new-color)
                        (let [[r g b] (new-color color-map)]
                          (.plotXYRedGreenBlue canvas-view-controller x y r g b))))))))))))))

(ns bocko-ios.core
  (:require bocko.core))

(defn run-app
  []
  (comment "Code here will be run when app launches"))

(defn ^:export init
  [canvas-view-controller]
  (bocko.core/set-create-canvas
    (fn [color-map raster width height _ _]
      (add-watch raster :monitor
        (fn [_ _ old new]
          (when-not (= old new)
            (doseq [x (range width)]
              (let [old-col (nth old x)
                    new-col (nth new x)]
                (when-not (= old-col new-col)
                  (doseq [y (range height)]
                    (let [old-color (nth old-col y)
                          new-color (nth new-col y)]
                      (when-not (= old-color new-color)
                        (let [[r g b] (new-color color-map)]
                          (.plotXYRedGreenBlue canvas-view-controller x y r g b)))))))))))))
  (run-app))

Add a run-app entry point

Add a run-app entry point


(defproject scrabble "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [thinktopic/cortex "0.1.0-SNAPSHOT"]]
  :main scrabble.core)

(defproject scrabble "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [thinktopic/cortex "0.1.0-SNAPSHOT"]]
  :main scrabble.core)

Update to newer version of clojure.

[examples/scrabble] Update to newer version of clojure.


(defproject java-s3-tests/java-s3-tests "0.0.1"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [com.reiddraper/clj-aws-s3 "0.4.2"]
                 [clj-http "0.7.1"]
                 [cheshire "5.1.0"]]
  :profiles {:dev {:dependencies [[midje "1.5.1"]]}}
  :min-lein-version "2.0.0"
  :plugins [[lein-midje "3.0.1"]]
  :description "integration tests for Riak CS using the offical Java SDK")

(defproject java-s3-tests/java-s3-tests "0.0.2"
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/tools.logging "0.3.1"]
                 ;; aws-sdk-java deps
                 [com.amazonaws/aws-java-sdk "1.10.8" :exclusions [joda-time]]
                 [joda-time "2.8.1"]
                 [com.fasterxml.jackson.core/jackson-core "2.5.3"]
                 [com.fasterxml.jackson.core/jackson-databind "2.5.3"]
                 ;; user_creation deps
                 [clj-http "2.0.0"]
                 [cheshire "5.1.0"]]
  ;; :jvm-opts ["-verbose:class"]
  :profiles {:dev {:dependencies [[midje "1.7.0"]]}}
  :min-lein-version "2.0.0"
  :plugins [[lein-midje "3.1.3"]]
  :description "integration tests for Riak CS using the offical Java SDK")

Update aws-sdk-java and other library versions


(defproject clj-fst "0.1.0"
  :description "Finite State Transducers (FST) for Clojure"
  :url "https://github.com/structureddynamics/clj-fst"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.apache.lucene/lucene-core "4.10.2"]
                 [org.apache.lucene/lucene-misc "4.10.2"]
                 [lein-marginalia "0.8.0"]]
  :source-paths      ["src/clojure"]
  :java-source-paths ["src/java"]
  :target-path "target/%s"
  :marginalia {:exclude ["utils.clj"]})

(defproject clj-fst "0.1.1"
  :description "Finite State Transducers (FST) for Clojure"
  :url "https://github.com/structureddynamics/clj-fst"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.apache.lucene/lucene-core "4.10.4"]
                 [org.apache.lucene/lucene-misc "4.10.4"]
                 [lein-marginalia "0.8.0"]]
  :source-paths      ["src/clojure"]
  :java-source-paths ["src/java"]
  :target-path "target/%s"
  :marginalia {:exclude ["utils.clj"]})

Update to the latest version of Lucene 4.x


(defproject io.aviso/twixt "0.1.6"
  :description "An extensible asset pipeline for Clojure web applications"
  :url "https://github.com/AvisoNovate/twixt"
  :license {:name "Apache Sofware Licencse 2.0"
            :url  "http://www.apache.org/licenses/LICENSE-2.0.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/tools.logging "0.2.6"]
                 [ring/ring-core "1.2.1"]
                 [org.mozilla/rhino "1.7R4"]
                 [com.github.sommeri/less4j "1.2.1"]
                 [de.neuland-bfi/jade4j "0.4.0"]
                 [io.aviso/pretty "0.1.8"]
                 [hiccup "1.0.4"]]
  :codox {:src-dir-uri               "https://github.com/AvisoNovate/twixt/blob/master/"
          :src-linenum-anchor-prefix "L"}
  :profiles {:dev {:dependencies [[log4j "1.2.17"]
                                  [ring/ring-jetty-adapter "1.2.0"]]}})

(defproject io.aviso/twixt "0.1.7"
  :description "An extensible asset pipeline for Clojure web applications"
  :url "https://github.com/AvisoNovate/twixt"
  :license {:name "Apache Sofware Licencse 2.0"
            :url  "http://www.apache.org/licenses/LICENSE-2.0.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/tools.logging "0.2.6"]
                 [ring/ring-core "1.2.1"]
                 [org.mozilla/rhino "1.7R4"]
                 [com.github.sommeri/less4j "1.2.1"]
                 [de.neuland-bfi/jade4j "0.4.0"]
                 [io.aviso/pretty "0.1.8"]
                 [hiccup "1.0.4"]]
  :codox {:src-dir-uri               "https://github.com/AvisoNovate/twixt/blob/master/"
          :src-linenum-anchor-prefix "L"}
  :profiles {:dev {:dependencies [[log4j "1.2.17"]
                                  [ring/ring-jetty-adapter "1.2.0"]]}})

Advance version number to 0.1.7

Advance version number to 0.1.7


(ns clj-templates.config.main-config
  (:require [integrant.core :as ig]
            [environ.core :refer [env]]))

(def main-config
  {:handler/main        {:db (ig/ref :db/postgres)}
   :server/jetty        {:handler (ig/ref :handler/main)
                         :opts    {:port 3000 :join? false}}
   :db/postgres         {:jdbc-url          (env :database-url)
                         :driver-class-name "org.postgresql.Driver"}
   :logger/timbre       {:appenders {:println {:stream :auto}}}
   :jobs/scheduled-jobs {:hours-between-jobs 1
                         :db                 (ig/ref :db/postgres)
                         :es-client          (ig/ref :search/elastic)}
   :search/elastic      {:hosts           ["http://127.0.0.1:9200"]
                         :default-headers {:content-type "application/json"}}})

(ns clj-templates.config.main-config
  (:require [integrant.core :as ig]
            [environ.core :refer [env]]))

(def main-config
  {:handler/main        {:db (ig/ref :db/postgres)}
   :server/jetty        {:handler (ig/ref :handler/main)
                         :opts    {:port 3000 :join? false}}
   :db/postgres         {:jdbc-url          (env :database-url)
                         :driver-class-name "org.postgresql.Driver"}
   :logger/timbre       {:appenders {:println {:stream :auto}}}
   :jobs/scheduled-jobs {:hours-between-jobs 1
                         :db                 (ig/ref :db/postgres)
                         :es-client          (ig/ref :search/elastic)}
   :search/elastic      {:hosts           [(env :elastic-url)]
                         :default-headers {:content-type "application/json"}}})

Use env for elastic url.

Use env for elastic url.


(defproject ohpauleez/cmma "0.1.0-SNAPSHOT"
  :description "Clojure + Make Managed Applications"
  :url "https://github.com/ohpauleez/cmma"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 ;; Try nrepl 0.2.5 and reply 0.3.5 - :(
                 [org.clojure/tools.nrepl "0.2.3"]
                 [reply "0.3.4" :exclusions [[ring/ring-core]]]
                 [com.cemerick/pomegranate "0.3.0" :exclusions [[org.apache.httpcomponents/httpclient]
                                                                [org.codehaus.plexus/plexus-utils]
                                                                [commons-codec]]]
                 [pedantic "0.2.0"]
                 [org.eclipse.jgit/org.eclipse.jgit.java7 "3.4.1.201406201815-r"]

                 ;; Patch up deps
                 [org.apache.httpcomponents/httpclient "4.1.3"]
                 [org.codehaus.plexus/plexus-utils "3.0"]
                 [commons-codec "1.5"]]
  :global-vars  {*warn-on-reflection* true
                 *assert* true}
  :pedantic? :abort)

(defproject ohpauleez/cmma "0.1.0-SNAPSHOT"
  :description "Clojure + Make Managed Applications"
  :url "https://github.com/ohpauleez/cmma"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/tools.nrepl "0.2.5"]
                 [reply "0.3.5" :exclusions [[ring/ring-core]]]
                 [com.cemerick/pomegranate "0.3.0" :exclusions [[org.apache.httpcomponents/httpclient]
                                                                [org.codehaus.plexus/plexus-utils]
                                                                [commons-codec]]]
                 [pedantic "0.2.0"]
                 [org.eclipse.jgit/org.eclipse.jgit.java7 "3.4.1.201406201815-r"]

                 ;; Patch up deps
                 [org.apache.httpcomponents/httpclient "4.1.3"]
                 [org.codehaus.plexus/plexus-utils "3.0"]
                 [commons-codec "1.5"]]
  :global-vars  {*warn-on-reflection* true
                 *assert* true}
  :pedantic? :abort)

Fix reply and nREPL versions

Fix reply and nREPL versions


(ns time-tracker.core-test
  (:require [clojure.test :refer :all]
            [time-tracker.core :refer :all]))

(deftest a-test
  (testing "FIXME, I fail."
    (is (= 0 1))))

Remove broken test generated by project template


(ns such.random
  "Random numbers and crypographic hashes"
  (:import org.apache.commons.codec.digest.DigestUtils))

(defn guid
  "A random almost-certainly-unique identifier"
  []
  (str (java.util.UUID/randomUUID)))

(def uuid "Synonym for `guid`" guid)

(defn form-hash
  "Returns a SHA-1 hash (encoded as a hex string) from the `prn` representation of the input.
   Use for collision avoidance when the highest security is not needed."
  [form]
  (DigestUtils/sha1Hex (pr-str form)))

(ns such.random
  "Random numbers and crypographic hashes"
  (:import org.apache.commons.codec.digest.DigestUtils))

(defn guid
  "A random almost-certainly-unique identifier"
  []
  (str (java.util.UUID/randomUUID)))

(def uuid "Synonym for `guid`" guid)

(defn form-hash
  "Returns a SHA-1 hash (encoded as a hex string) from the `prn` representation of the input.
   Use for collision avoidance when the highest security is not needed."
  [form]
  ;; Note: this is deprecated in later versions of commons.codec. However,
  ;; we're using an old version for compatibility with Compojure.
  ;; When compojure updates, we can use sha1Hex.
  (DigestUtils/shaHex (pr-str form)))

Revert to older version of commons-codec for compatibility with compojure


(defproject inlein/client "0.1.0-SNAPSHOT"
  :description "Inlein your dependencies."
  :url "https://github.com/hyPiRion/inlein"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies []
  :source-paths []
  :java-source-paths ["src"]
  :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
  :main inlein.client.Main
  :scm {:dir ".."}
  :aliases {"javadoc" ["shell" "javadoc" "-d" "javadoc/inlein-${:version}"
                       "-sourcepath" "src" "inlein.client"]}
  :plugins [[lein-shell "0.5.0"]]
  :uberjar-name "inlein-%s.jar"
  ;; to avoid complaints from Leiningen
  :profiles {:uberjar {:aot :all}
             :dev {:dependencies [[org.clojure/clojure "1.8.0"]]}})

(defproject inlein/client "0.1.0-SNAPSHOT"
  :description "Inlein your dependencies."
  :url "https://github.com/hyPiRion/inlein"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies []
  :source-paths []
  :java-source-paths ["src"]
  :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
  :main inlein.client.Main
  :scm {:dir ".."}
  :aliases {"javadoc" ["shell" "javadoc" "-d" "javadoc/inlein-${:version}"
                       "-sourcepath" "src" "inlein.client"]}
  :plugins [[lein-shell "0.5.0"]]
  :jar-name "inlein-no-deps-%s.jar"
  :uberjar-name "inlein-%s.jar"
  ;; to avoid complaints from Leiningen
  :profiles {:uberjar {:aot :all}
             :dev {:dependencies [[org.clojure/clojure "1.8.0"]]}})

Make it easier to separate between jar and uberjar


(ns formlogic.db
  (:require [yesql.core :refer [defqueries]]))

(def db-spec {:classname "org.postgresql.Driver"
              :subprotocol "postgresql"
              :subname "//localhost:5432/formlogic"
              :user "formlogic"})

(defqueries "sql/get.sql" {:connection db-spec})
(defqueries "sql/insert.sql" {:connection db-spec})

(ns formlogic.db
  (:require [yesql.core :refer [defqueries]]
            [formlogic.config :refer [cget]]))

(def db-spec {:classname "org.postgresql.Driver"
              :subprotocol "postgresql"
              :subname (format "//%s:%d/%s"
                               (cget :db :host)
                               (cget :db :port)
                               (cget :db :database))
              :user (cget :db :user)})

(defqueries "sql/get.sql" {:connection db-spec})
(defqueries "sql/insert.sql" {:connection db-spec})

Use DB connection configuration from config.edn


(defproject todomvc-re-frame "0.10.5"
  :dependencies [[org.clojure/clojure        "1.10.0"]
                 [org.clojure/clojurescript  "1.10.439"]
                 [reagent "0.8.1"]
                 [re-frame "0.10.5"]
                 [binaryage/devtools "0.9.10"]
                 [secretary "1.2.3"]
                 [day8.re-frame/tracing "0.5.1"]

  :plugins [[lein-cljsbuild "1.1.7"]
            [lein-figwheel  "0.5.18"]]

  :hooks [leiningen.cljsbuild]

  :profiles {:dev  {:cljsbuild
                    {:builds {:client {:compiler {:asset-path           "js"
                                                  :optimizations        :none
                                                  :source-map           true
                                                  :source-map-timestamp true
                                                  :main                 "todomvc.core"}
                                       :figwheel {:on-jsload "todomvc.core/main"}}}}}

             :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.10.5"
  :dependencies [[org.clojure/clojure        "1.10.0"]
                 [org.clojure/clojurescript  "1.10.439"]
                 [reagent "0.8.1"]
                 [re-frame "0.10.5"]
                 [binaryage/devtools "0.9.10"]
                 [secretary "1.2.3"]
                 [day8.re-frame/tracing "0.5.1"]]

  :plugins [[lein-cljsbuild "1.1.7"]
            [lein-figwheel  "0.5.18"]]

  :hooks [leiningen.cljsbuild]

  :profiles {:dev  {:cljsbuild
                    {:builds {:client {:compiler {:asset-path           "js"
                                                  :optimizations        :none
                                                  :source-map           true
                                                  :source-map-timestamp true
                                                  :main                 "todomvc.core"}
                                       :figwheel {:on-jsload "todomvc.core/main"}}}}}

             :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"}}}})

Fix missing trailing ] in todomvc :dependencies


(defproject onyx-app/lein-template "0.10.0.0-beta16"
  :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.


(defproject jnanomsg "0.1.0"
  :description "Nanomsg clojure/java wrapper/"
  :url "https://github.com/niwibe/jnanomsg"
  :license {:name "Apache 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0.txt"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
                 [net.java.dev.jna/jna "4.0.0"]]
  :jvm-opts ["-server" "-Xmx2g" "-XX:+UseG1GC"]
  :source-paths ["src/clojure"]
  :java-source-paths ["src/java"]
  :plugins [[lein-javadoc "0.1.1"]]
  :javadoc-opts {:output-dir "docs/_build/javadoc"
                 :package-names ["nanomsg" "nanomsg.jna" "nanomsg.pubsub"
                                 "nanomsg.reqrep" "nanomsg.bus" "nanomsg.pair"]}
  :main nanomsg.benchmark
  :profiles {:uberjar {:aot :all}})

(defproject jnanomsg "0.1.0"
  :description "Nanomsg clojure/java wrapper/"
  :url "https://github.com/niwibe/jnanomsg"
  :license {:name "Apache 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0.txt"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
                 [net.java.dev.jna/jna "4.0.0"]]
  :jvm-opts ["-server" "-Xmx2g" "-XX:+UseG1GC"]
  :source-paths ["src/clojure"]
  :java-source-paths ["src/java"]
  :plugins [[lein-javadoc "0.1.1"]]
  :javadoc-opts {:output-dir "docs/javadoc"
                 :package-names ["nanomsg" "nanomsg.jna" "nanomsg.pubsub" "nanomsg.exceptions"
                                 "nanomsg.reqrep" "nanomsg.bus" "nanomsg.pair"]}
  :main nanomsg.benchmark
  :profiles {:uberjar {:aot :all}})

Add more new nanomsg.exceptions package to javadoc.


(defproject demo "0.2.0-SNAPSHOT"
  :description "Demo of Immutant 2.x libraries"
  :url "http://github.com/immutant/feature-demo"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.immutant/immutant "2.x.incremental.183"]

                 ;; Or bring in the immutant jars piecemeal
                 ;; [org.immutant/caching    "2.x.incremental.183"]
                 ;; [org.immutant/messaging  "2.x.incremental.183"]
                 ;; [org.immutant/scheduling "2.x.incremental.183"]
                 ;; [org.immutant/web        "2.x.incremental.183"]

                 [org.clojure/core.memoize "0.5.6"]
                 [clj-time "0.7.0"]
                 [cheshire "5.3.1"]]
  :plugins [[lein-immutant "2.0.0-SNAPSHOT"]]
  :repositories [["Immutant 2.x incremental builds"
                  "http://downloads.immutant.org/incremental/"]]
  :main demo.core
  :aliases {"msg-client" ["run" "-m" "demo.remote-messaging-client"]}
  :profiles {:uberjar {:aot :all}})

(defproject demo "0.2.0-SNAPSHOT"
  :description "Demo of Immutant 2.x libraries"
  :url "http://github.com/immutant/feature-demo"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.immutant/immutant "2.x.incremental.184"]

                 ;; Or bring in the immutant jars piecemeal
                 ;; [org.immutant/caching    "2.x.incremental.184"]
                 ;; [org.immutant/messaging  "2.x.incremental.184"]
                 ;; [org.immutant/scheduling "2.x.incremental.184"]
                 ;; [org.immutant/web        "2.x.incremental.184"]

                 [ring/ring-core "1.3.0"]
                 [org.clojure/core.memoize "0.5.6"]
                 [clj-time "0.7.0"]
                 [cheshire "5.3.1"]]
  :plugins [[lein-immutant "2.0.0-SNAPSHOT"]]
  :repositories [["Immutant 2.x incremental builds"
                  "http://downloads.immutant.org/incremental/"]]
  :main demo.core
  :aliases {"msg-client" ["run" "-m" "demo.remote-messaging-client"]}
  :profiles {:uberjar {:aot :all}})

Bump version and pull in ring, since it's no longer transitive


(defproject {{app-name}} "0.1.0-SNAPSHOT"
  :description ""
  :url ""
  :license {:name ""
            :url ""}
  :dependencies [[aero "1.0.0-beta2"]
                 [org.clojure/clojure "1.8.0"]
                 [org.clojure/tools.cli "0.3.5"]
                 [org.onyxplatform/onyx "{{onyx-version}}{{onyx-version-post}}"]
                 [org.onyxplatform/lib-onyx "{{onyx-version}}.{{lib-onyx-minor}}"]]
  :source-paths ["src"]

  :profiles {:dev {:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
                   :global-vars {*assert* false}}
             :dependencies [[org.clojure/tools.namespace "0.2.11"]
                            [lein-project-version "0.1.0"]]
             :uberjar {:aot [lib-onyx.media-driver
                             {{app-name}}.core]
                       :uberjar-name "peer.jar"
                       :global-vars {*assert* false}}})

(defproject {{app-name}} "0.1.0-SNAPSHOT"
  :description ""
  :url ""
  :license {:name ""
            :url ""}
  :dependencies [[aero "1.0.0-beta2"]
                 [org.clojure/clojure "1.8.0"]
                 [org.clojure/tools.cli "0.3.5"]
                 [org.onyxplatform/onyx "{{onyx-version}}{{onyx-version-post}}"]
                 [org.onyxplatform/lib-onyx "{{onyx-version}}.{{lib-onyx-minor}}"]]
  :source-paths ["src"]

  :profiles {:dev {:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
                   :global-vars {*assert* true}}
             :dependencies [[org.clojure/tools.namespace "0.2.11"]
                            [lein-project-version "0.1.0"]]
             :uberjar {:aot [lib-onyx.media-driver
                             {{app-name}}.core]
                       :uberjar-name "peer.jar"
                       :global-vars {*assert* false}}})

Enable assertions in development mode

Enable assertions in development mode