Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add some random walk series to the test agent to help test autoscale behavior. | (def start-t (System/currentTimeMillis))
(defsensor math {:poll-interval (seconds 10)}
{:sine (Math/sin (/ (- (System/currentTimeMillis) start-t) (minutes 1)))
:cosine (Math/cos (/ (- (System/currentTimeMillis) start-t) (minutes 1))) })
(defsensor steps-ascending {:poll-interval (seconds 5)}
(+ 2.3
(mod (/ (- (System/currentTimeMillis) start-t) (minutes 4))
3)))
| (def start-t (System/currentTimeMillis))
(defn random-sampler [ ]
(let [current (atom 0.0)]
(fn [ ]
(swap! current #(+ % (/ (+ (Math/random) (Math/random)) 2) -0.5)))))
(def rs-0 (random-sampler))
(def rs-1 (random-sampler))
(def rs-2 (random-sampler))
(defsensor random-unconstrained {:poll-interval (seconds 10)}
(rs-0))
(defsensor random-positive {:poll-interval (seconds 10)}
(+ 0.1 (Math/abs (rs-1))))
(defsensor random-negative {:poll-interval (seconds 10)}
(- -0.1 (Math/abs (rs-2))))
(defsensor math {:poll-interval (seconds 10)}
{:sine (+ 0.3 (Math/sin (/ (- (System/currentTimeMillis) start-t) (minutes 1))))
:cosine (Math/cos (/ (- (System/currentTimeMillis) start-t) (minutes 1))) })
(defsensor steps-ascending {:poll-interval (seconds 5)}
(+ 2.3
(mod (/ (- (System/currentTimeMillis) start-t) (minutes 4))
3)))
|
Disable schedule test as it is hanging the test runner | ;; Copyright © 2016-2017, JUXT LTD.
(ns tick.deprecated.schedule-test
(:require
[clojure.test :refer :all]
[tick.deprecated.timeline :refer [periodic-seq timeline]]
[tick.core :refer [seconds millis]]
[tick.deprecated.clock :refer [clock-ticking-in-seconds just-now]]
[tick.deprecated.schedule :as sched]))
(deftest ^:deprecated schedule-test
(let [a (atom 0)
f (fn [dt] (swap! a inc))
clk (clock-ticking-in-seconds)
now (just-now clk)
timeline (take 10 (timeline (periodic-seq now (millis 10))))]
@(sched/start (sched/schedule f timeline) clk)
(is (= @a 10))))
(deftest ^:deprecated simulate-test
(let [a (atom 0)
f (fn [dt] (swap! a inc))
clk (clock-ticking-in-seconds)
now (just-now clk)
timeline (take 1000 (timeline (periodic-seq now (seconds 1))))]
@(sched/start (sched/simulate f timeline) clk)
(is (= @a 1000))))
| ;; Copyright © 2016-2017, JUXT LTD.
(ns tick.deprecated.schedule-test
(:require
[clojure.test :refer :all]
[tick.deprecated.timeline :refer [periodic-seq timeline]]
[tick.core :refer [seconds millis]]
[tick.deprecated.clock :refer [clock-ticking-in-seconds just-now]]
[tick.deprecated.schedule :as sched]))
#_(deftest ^:deprecated schedule-test
(let [a (atom 0)
f (fn [dt] (swap! a inc))
clk (clock-ticking-in-seconds)
now (just-now clk)
timeline (take 10 (timeline (periodic-seq now (millis 10))))]
@(sched/start (sched/schedule f timeline) clk)
(is (= @a 10))))
#_(deftest ^:deprecated simulate-test
(let [a (atom 0)
f (fn [dt] (swap! a inc))
clk (clock-ticking-in-seconds)
now (just-now clk)
timeline (take 1000 (timeline (periodic-seq now (seconds 1))))]
@(sched/start (sched/simulate f timeline) clk)
(is (= @a 1000))))
|
Fix actual calling upddate methods | (ns subman.core
(:gen-class)
(:require [compojure.handler :as handler]
[overtone.at-at :as at-at]
[org.httpkit.server :as server]
[hiccup.middleware :refer [wrap-base-url]]
[ring.middleware.reload :refer [wrap-reload]]
[subman.routes :as routes]
[subman.filler :as filler]
[subman.const :as const]
[subman.models :as models]))
(def app (-> (handler/site routes/main-routes)
wrap-base-url
wrap-reload))
(defn init-pool []
(let [pool (at-at/mk-pool)]
(at-at/every const/update-period
(fn [] (println "start update")
filler/update-all
models/update-total-count
(println "update finished"))
pool)))
(defn -main [& args]
(try (models/create-index)
(catch Exception e (println e)))
(models/update-total-count)
(future (init-pool))
(let [port (Integer/parseInt
(or (System/getenv "PORT") const/default-port))]
(server/run-server app {:port port})))
| (ns subman.core
(:gen-class)
(:require [compojure.handler :as handler]
[overtone.at-at :as at-at]
[org.httpkit.server :as server]
[hiccup.middleware :refer [wrap-base-url]]
[ring.middleware.reload :refer [wrap-reload]]
[subman.routes :as routes]
[subman.filler :as filler]
[subman.const :as const]
[subman.models :as models]))
(def app (-> (handler/site routes/main-routes)
wrap-base-url
wrap-reload))
(defn init-pool []
(let [pool (at-at/mk-pool)]
(at-at/every const/update-period
(fn [] (println "start update")
(filler/update-all)
(models/update-total-count)
(println "update finished"))
pool)))
(defn -main [& args]
(try (models/create-index)
(catch Exception e (println e)))
(models/update-total-count)
(future (init-pool))
(let [port (Integer/parseInt
(or (System/getenv "PORT") const/default-port))]
(server/run-server app {:port port})))
|
Add new route to get statements from dbas | (ns discuss.config)
(def project "discuss")
(def user "Q2hyaXN0aWFu")
(def api {:host "http://localhost:4284/"
:init "api/"
:base "api/"
:add {:add-start-statement "add/start_statement"
:add-start-premise "add/start_premise"
:add-justify-premise "add/justify_premise"}}) | (ns discuss.config)
(def project "discuss")
(def user "Q2hyaXN0aWFu")
(def api {:host "http://localhost:4284/"
:init "api/"
:base "api/"
:add {:add-start-statement "add/start_statement"
:add-start-premise "add/start_premise"
:add-justify-premise "add/justify_premise"}
:get {:reference-usages "get/reference_information"
:statements "get/statements"}}) |
Update look of post item label | (ns ecregister.posts_ui
(:gen-class)
(:use [seesaw.core])
(:use [seesaw.mig])
(:use [seesaw.font])
(:use [seesaw.border])
)
(defn make-post-widget [{:keys [author title icon]}]
(mig-panel
:items [[(label :border (line-border :color "#ddd" :thickness 1) :size [50 :by 50]) "spany 2"]
[(label :text author :font (font :name "Arial" :style :bold :size 17))
"cell 1 0,pushy,bottom"]
[(label :text title :font (font :name "Arial" :style :italic :size 15)) "cell 1 1,pushy,top"]]
:constraints ["", "[][]", "[][]"]))
(defn build-posts-tab []
(let [form
(mig-panel
:items [[(label "Последний опубликованный пост") "top,center,wrap"]
[(progress-bar :indeterminate? false :value 10) "center,wrap"]
[(make-post-widget {:author "Dima" :title "Как я что-то сделал"}) "center"]
]
:constraints ["fillx,gap 18px"]
)]
form))
| (ns ecregister.posts_ui
(:gen-class)
(:use [seesaw.core])
(:use [seesaw.mig])
(:use [seesaw.font])
(:use [seesaw.border])
)
(defn make-post-widget [{:keys [author title icon]}]
(mig-panel
:items [[(label :border (line-border :color "#ddd" :thickness 1) :size [42 :by 42]) "spany 2"]
[(label :text author :font (font :name "Arial" :style :bold :size 17))
"cell 1 0,pushy,bottom"]
[(label :text title :font (font :name "Arial" :style :italic :size 15)) "cell 1 1,pushy,top"]]
:constraints ["", "[][]", "[][]"]
:border (line-border :color "#ccc" :thickness 1)
:minimum-size [400 :by 0]))
(defn build-posts-tab []
(let [form
(mig-panel
:items [[(label "Последний опубликованный пост") "top,center,wrap"]
[(progress-bar :indeterminate? false :value 10) "center,wrap"]
[(make-post-widget {:author "Dima" :title "Как я что-то сделал"}) "center,wrap"]
[(make-post-widget {:author "Anton" :title "Как я что-то сделал"}) "center,wrap"]
]
:constraints ["fillx,gap 18px"]
)]
form))
|
Add namespace to triangle exercise. | (ns triangle.test (:require [clojure.test :refer :all]))
(load-file "triangle.clj")
(deftest equilateral-1
(is (= :equilateral (triangle 2 2 2))))
(deftest equilateral-2
(is (= :equilateral (triangle 10 10 10))))
(deftest isoceles-1
(is (= :isosceles (triangle 3 4 4))))
(deftest isoceles-2
(is (= :isosceles (triangle 4 3 4))))
(deftest scalene
(is (= :scalene (triangle 3 4 5))))
(deftest invalid-1
(is (= :illogical (triangle 1 1 50))))
(deftest invalid-2
(is (= :illogical (triangle 1 2 1))))
(run-tests)
| (ns triangle.test (:require [clojure.test :refer :all]))
(load-file "triangle.clj")
(deftest equilateral-1
(is (= :equilateral (triangle/type 2 2 2))))
(deftest equilateral-2
(is (= :equilateral (triangle/type 10 10 10))))
(deftest isoceles-1
(is (= :isosceles (triangle/type 3 4 4))))
(deftest isoceles-2
(is (= :isosceles (triangle/type 4 3 4))))
(deftest scalene
(is (= :scalene (triangle/type 3 4 5))))
(deftest invalid-1
(is (= :illogical (triangle/type 1 1 50))))
(deftest invalid-2
(is (= :illogical (triangle/type 1 2 1))))
(run-tests)
|
Add a function to merge DataScript schemas and detect conflicts | (ns workflo.macros.entity.datascript
(:require [datascript.core :as d]
[workflo.macros.entity.schema :as es]))
(defn attr-schema
[attr-opts]
(reduce (fn [opts opt]
(cond-> opts
(= :ref opt)
(assoc :db/valueType :db.type/ref)
(= :many opt)
(assoc :db/cardinality :db.cardinality/many)
(= :unique-value opt)
(assoc :db/unique :db.unique/value)
(= :unique-identity opt)
(assoc :db/unique :db.unique/identity)))
{} attr-opts))
(defn entity-schema
"Returns the DataScript schema for an entity."
[entity]
(reduce (fn [schema [attr-name attr-opts]]
(let [aschema (attr-schema attr-opts)]
(cond-> schema
(not (empty? aschema))
(assoc attr-name aschema))))
{}
(es/entity-schema entity)))
| (ns workflo.macros.entity.datascript
(:require [datascript.core :as d]
[workflo.macros.entity.schema :as es]))
(defn attr-schema
[attr-opts]
(reduce (fn [opts opt]
(cond-> opts
(= :ref opt)
(assoc :db/valueType :db.type/ref)
(= :many opt)
(assoc :db/cardinality :db.cardinality/many)
(= :unique-value opt)
(assoc :db/unique :db.unique/value)
(= :unique-identity opt)
(assoc :db/unique :db.unique/identity)))
{} attr-opts))
(defn entity-schema
"Returns the DataScript schema for an entity."
[entity]
(reduce (fn [schema [attr-name attr-opts]]
(let [aschema (attr-schema attr-opts)]
(cond-> schema
(not (empty? aschema))
(assoc attr-name aschema))))
{}
(es/entity-schema entity)))
(defn merge-attr-schema
"\"Merges\" two schemas for an attribute with the same name
by throwing an exception if they are different and the
first is not nil, and otherwise picking the second."
[[attr-name prev-schema] [_ next-schema]]
(if (nil? prev-schema)
next-schema
(if (= prev-schema next-schema)
next-schema
(let [err-msg (str "Conflicting schemas for attribute \""
attr-name "\": "
(pr-str prev-schema) " != "
(pr-str next-schema))]
(throw #?(:cljs (js/Error. err-msg)
:clj (Exception. err-msg)))))))
(defn merge-schemas
"Merge multiple DataScript schemas so that there are no
conflicting attributes. The default behavior is to throw
an exception if two schemas for the same attribute are
different."
([schemas]
(merge-schemas schemas merge-attr-schema))
([schemas merge-fn]
(reduce (fn [ret [attr-name attr-schema]]
(update ret attr-name
(fn [existing-schema]
(merge-fn [attr-name existing-schema]
[attr-name attr-schema]))))
{} (apply concat schemas))))
|
Return 404 for non existing ships. | (ns viewer.controller.web
(:require [compojure.core :refer [defroutes GET]]
[clojure.data.json :as json]
[clojure.xml :as xml]
[viewer.model.mastery :as mastery]
[viewer.model.ship :as ship]
[viewer.view.mastery :as mastery-view]))
(def xml-filename-pattern #"(\S+) - (\S+).xml")
(defn parse-xml-filename [fn]
(rest (re-find xml-filename-pattern fn)))
(defn xml-response [content]
{:status 200
:headers {"Content-Type" "application/xml"}
:body content})
;;; ["/user/:id", :id #"[0-9]+"]
(defroutes routes
(GET ["/masteries/:typeid", :typeid #"[0-9]+"] [typeid]
(mastery-view/render (ship/ship-info (read-string typeid))
(mastery/all (read-string typeid))))
(GET ["/masteries/:shipname", :shipname #"[a-zA-Z ]+"] [shipname]
(let [ship-info (ship/ship-info shipname)]
(mastery-view/render ship-info
(mastery/all (:typeid ship-info)))))
(GET "/masteries/xml/:filename" [filename]
(let [[ship level] (parse-xml-filename filename)]
(xml-response (with-out-str (xml/emit-element (mastery/as-xml ship level)))))))
| (ns viewer.controller.web
(:require [compojure.core :refer [defroutes GET]]
[clojure.data.json :as json]
[clojure.xml :as xml]
[viewer.model.mastery :as mastery]
[viewer.model.ship :as ship]
[viewer.view.mastery :as mastery-view]))
(def xml-filename-pattern #"(\S+) - (\S+).xml")
(defn parse-xml-filename [fn]
(rest (re-find xml-filename-pattern fn)))
(defn xml-response [filename content]
{:status 200
:headers {"Content-Type" "application/xml"
"Content-Disposition" (format "attachment; filename=\"%s\"" filename)}
:body content})
;;; ["/user/:id", :id #"[0-9]+"]
(defroutes routes
(GET ["/masteries/:typeid", :typeid #"[0-9]+"] [typeid]
(mastery-view/render (ship/ship-info (read-string typeid))
(mastery/all (read-string typeid))))
(GET "/masteries/:shipname" [shipname]
(let [ship-info (ship/ship-info shipname)]
(when ship-info
(mastery-view/render ship-info
(mastery/all (:typeid ship-info))))))
(GET "/masteries/xml/:filename" [filename]
(let [[ship level] (parse-xml-filename filename)]
(xml-response filename (with-out-str (xml/emit-element (mastery/as-xml ship level)))))))
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.10.0-beta4"
: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.9.10.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)
|
Use explicit metadata for lein 1.7.1 | (defproject reply "0.1.0-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojars.trptcolin/jline "2.7-alpha1"]
[org.thnetos/cd-client "0.3.4"]
[clj-stacktrace "0.2.4"]
[clj-http "0.3.4"]
[com.cemerick/drawbridge "0.0.2"]
[clojure-complete "0.2.1"]]
:dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java"
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:main ^:skip-aot reply.main)
| (defproject reply "0.1.0-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojars.trptcolin/jline "2.7-alpha1"]
[org.thnetos/cd-client "0.3.4"]
[clj-stacktrace "0.2.4"]
[clj-http "0.3.4"]
[com.cemerick/drawbridge "0.0.2"]
[clojure-complete "0.2.1"]]
:dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java"
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:main ^{:skip-aot true} reply.main)
|
Update cljs compiler version to 1.8.34 | (defproject funcool/promesa "1.1.0"
:description "A promise library for ClojureScript"
:url "https://github.com/funcool/promesa"
:license {:name "BSD (2 Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.7.228" :scope "provided"]
[funcool/cats "1.2.1" :scope "provided"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojure
:target "doc/dist/latest/api"}
:plugins [[funcool/codeina "0.3.0"]
[lein-ancient "0.6.7" :exclusions [org.clojure/tools.reader]]])
| (defproject funcool/promesa "1.1.0"
:description "A promise library for ClojureScript"
:url "https://github.com/funcool/promesa"
:license {:name "BSD (2 Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.8.34" :scope "provided"]
[funcool/cats "1.2.1" :scope "provided"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojure
:target "doc/dist/latest/api"}
:plugins [[funcool/codeina "0.3.0"]
[lein-ancient "0.6.7" :exclusions [org.clojure/tools.reader]]])
|
Change version information back to snapshot version. | (defproject cli4clj "1.4.0"
;(defproject cli4clj "1.3.3-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[clj-assorted-utils "1.18.2"]
[org.clojure/core.async "0.3.465"]
[jline/jline "2.14.5"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.5" :exclusions [org.clojure/clojure]]]}}
)
| ;(defproject cli4clj "1.4.0"
(defproject cli4clj "1.4.1-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[clj-assorted-utils "1.18.2"]
[org.clojure/core.async "0.3.465"]
[jline/jline "2.14.5"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.5" :exclusions [org.clojure/clojure]]]}}
)
|
Update ring-mock dep to official Ring version | (defproject compojure "1.3.1"
:description "A concise routing library for Ring"
:url "https://github.com/weavejester/compojure"
: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.5"]
[clout "2.1.0"]
[medley "0.5.3"]
[ring/ring-core "1.3.2"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.10"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.1/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring-mock "0.1.5"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha2"]]}})
| (defproject compojure "1.3.1"
:description "A concise routing library for Ring"
:url "https://github.com/weavejester/compojure"
: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.5"]
[clout "2.1.0"]
[medley "0.5.3"]
[ring/ring-core "1.3.2"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.10"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.1/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring/ring-mock "0.2.0"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha2"]]}})
|
Update jetty adapter to its latest version. | (defproject mofficer "1.0-SNAPSHOT"
:description "Mofficer (for Mail Officer) is a system that does one thing: send e-mails."
:url "https://github.com/granpanda/mofficer"
:dependencies [[org.clojure/clojure "1.6.0"]
[ring/ring-jetty-adapter "1.3.0"]
[ring/ring-json "0.3.1"]
[ring-cors "0.1.0"]
[compojure "1.1.8"]
[cheshire "5.3.1"]
[clj-http "0.9.0"]
[clj-time "0.6.0"]
[com.novemberain/langohr "2.9.0"]
[com.draines/postal "1.11.1"]
[mysql/mysql-connector-java "5.1.25"]
[org.clojure/java.jdbc "0.3.4"]]
:plugins [[lein-ring "0.8.11"]]
:ring {:handler mofficer.main/app
:stacktraces? true
:auto-reload true
:auto-refresh? true}
:profiles
{:dev {:plugins [[lein-midje "3.1.3"]]
:dependencies [[javax.servlet/servlet-api "2.5"]
[com.h2database/h2 "1.4.180"]
[ring-mock "0.1.5"]
[midje "1.6.3"]]}}
:main mofficer.main)
| (defproject mofficer "1.0-SNAPSHOT"
:description "Mofficer (for Mail Officer) is a system that does one thing: send e-mails."
:url "https://github.com/granpanda/mofficer"
:dependencies [[org.clojure/clojure "1.6.0"]
[ring/ring-jetty-adapter "1.3.1"]
[ring/ring-json "0.3.1"]
[ring-cors "0.1.0"]
[compojure "1.1.8"]
[cheshire "5.3.1"]
[clj-http "0.9.0"]
[clj-time "0.6.0"]
[com.novemberain/langohr "2.9.0"]
[com.draines/postal "1.11.1"]
[mysql/mysql-connector-java "5.1.25"]
[org.clojure/java.jdbc "0.3.4"]]
:plugins [[lein-ring "0.8.11"]]
:ring {:handler mofficer.main/app
:stacktraces? true
:auto-reload true
:auto-refresh? true}
:profiles
{:dev {:plugins [[lein-midje "3.1.3"]]
:dependencies [[javax.servlet/servlet-api "2.5"]
[com.h2database/h2 "1.4.180"]
[ring-mock "0.1.5"]
[midje "1.6.3"]]}}
:main mofficer.main)
|
Advance version number to 0.1.6 | (defproject io.aviso/twixt "0.1.5"
: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.0"]
[org.mozilla/rhino "1.7R4"]
[com.github.sommeri/less4j "1.2.1"]
[de.neuland/jade4j "0.3.15"]
[io.aviso/pretty "0.1.6"]
[hiccup "1.0.4"]]
:repositories [["jade4j" "https://raw.github.com/neuland/jade4j/master/releases"]]
: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.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.0"]
[org.mozilla/rhino "1.7R4"]
[com.github.sommeri/less4j "1.2.1"]
[de.neuland/jade4j "0.3.15"]
[io.aviso/pretty "0.1.6"]
[hiccup "1.0.4"]]
:repositories [["jade4j" "https://raw.github.com/neuland/jade4j/master/releases"]]
: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"]]}})
|
Add in source paths for jar deploys. Oops | (defproject lean-map "0.3.0"
:description "Lean Hash Array Mapped Trie implementation in ClojureScript"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:clean-targets ^{:protect false} ["resources/out"]
:jvm-opts ^:replace ["-Xms512m" "-Xmx512m" "-server"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]]
:profiles {:test {:dependencies [[collection-check "0.1.7-SNAPSHOT"]]}}
:plugins [[lein-doo "0.1.6-rc.1"]]
:cljsbuild {:builds
[{:id "test"
:source-paths ["src/main" "test"]
:compiler {:output-to "resources/public/js/testable.js"
:main cljs.lean-map.test.runner
:optimizations :none}}
{:id "node-test"
:source-paths ["src/main" "test"]
:compiler {:output-to "resources/public/js/testable.js"
:main cljs.lean-map.test.runner
:output-dir "target"
:target :nodejs
:optimizations :none}}]}) | (defproject lean-map "0.3.0"
:description "Lean Hash Array Mapped Trie implementation in ClojureScript"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:clean-targets ^{:protect false} ["resources/out"]
:source-paths ["src/main"]
:jvm-opts ^:replace ["-Xms512m" "-Xmx512m" "-server"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]]
:profiles {:test {:dependencies [[collection-check "0.1.7-SNAPSHOT"]]}}
:plugins [[lein-doo "0.1.6-rc.1"]]
:cljsbuild {:builds
[{:id "test"
:source-paths ["src/main" "test"]
:compiler {:output-to "resources/public/js/testable.js"
:main cljs.lean-map.test.runner
:optimizations :none}}
{:id "node-test"
:source-paths ["src/main" "test"]
:compiler {:output-to "resources/public/js/testable.js"
:main cljs.lean-map.test.runner
:output-dir "target"
:target :nodejs
:optimizations :none}}]}) |
Add missing require on prod app start. | ;; 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/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.main
(:require
[mount.core :as mount]))
(defn- enable-asserts
[_]
(let [m (System/getProperty "uxbox.enable-asserts")]
(or (nil? m) (= "true" m))))
;; Set value for all new threads bindings.
(alter-var-root #'*assert* enable-asserts)
;; Set value for current thread binding.
(set! *assert* (enable-asserts nil))
;; --- Entry point
(defn -main
[& args]
(require 'uxbox.config
'uxbox.migrations
'uxbox.http
'uxbox.tasks)
(mount/start))
| ;; 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/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.main
(:require
[mount.core :as mount]))
(defn- enable-asserts
[_]
(let [m (System/getProperty "uxbox.enable-asserts")]
(or (nil? m) (= "true" m))))
;; Set value for all new threads bindings.
(alter-var-root #'*assert* enable-asserts)
;; Set value for current thread binding.
(set! *assert* (enable-asserts nil))
;; --- Entry point
(defn -main
[& args]
(require 'uxbox.config
'uxbox.migrations
'uxbox.images
'uxbox.http
'uxbox.tasks)
(mount/start))
|
Use Domina as a source dependency in sample app | (defproject cljs-browser "0.0.1-SNAPSHOT"
:description ""
:dependencies [[org.clojure/clojure "1.4.0-beta4"]
[org.clojure/clojurescript "0.0-993"]
[ring "1.0.0-RC1"]
[compojure "0.6.4"]
[enlive "1.0.0"]
[domina "1.0.0-beta1"]]
:repl-init one.sample.repl
:source-path "src/app/clj"
:extra-classpath-dirs ["src/app/cljs"
"src/app/cljs-macros"
"src/lib/clj"
"src/lib/cljs"
"templates"
"../src"])
| (defproject cljs-browser "0.0.1-SNAPSHOT"
:description ""
:dependencies [[org.clojure/clojure "1.4.0-beta4"]
[org.clojure/clojurescript "0.0-993"]
[ring "1.0.0-RC1"]
[compojure "0.6.4"]
[enlive "1.0.0"]]
:repl-init one.sample.repl
:source-path "src/app/clj"
:extra-classpath-dirs ["src/app/cljs"
"src/app/cljs-macros"
"src/lib/clj"
"src/lib/cljs"
"templates"
"../src"
"../domina/src/cljs"])
|
Add ability to run server on custom port. | (ns quil-site.core
(:require [compojure.core :refer [defroutes GET]]
[compojure.handler :refer [site]]
[compojure.route :refer [files]]
[ring.util.response :as resp]
[ring.middleware.json :as json]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.stacktrace :as stacktrace]
[quil-site.controllers.sketches :as sketches]
[quil-site.controllers.api :as api]
[quil-site.views.about :refer [about-page]]))
(defroutes app
(GET "/" [] (about-page))
sketches/routes
api/routes
(files "/"))
(defn dump-request [handler]
(fn [req]
(clojure.pprint/pprint req)
(handler req)))
(def handler
(-> #'app
; dump-request
site
(json/wrap-json-body {:keywords? true})
json/wrap-json-response
stacktrace/wrap-stacktrace))
(defn run []
(run-jetty handler {:port 8080}))
(comment
(def server (run-jetty #(handler %) {:port 8080 :join? false}))
(.stop server)
)
| (ns quil-site.core
(:require [compojure.core :refer [defroutes GET]]
[compojure.handler :refer [site]]
[compojure.route :refer [files]]
[ring.util.response :as resp]
[ring.middleware.json :as json]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.stacktrace :as stacktrace]
[quil-site.controllers.sketches :as sketches]
[quil-site.controllers.api :as api]
[quil-site.views.about :refer [about-page]]))
(defroutes app
(GET "/" [] (about-page))
sketches/routes
api/routes
(files "/"))
(defn dump-request [handler]
(fn [req]
(clojure.pprint/pprint req)
(handler req)))
(def handler
(-> #'app
; dump-request
site
(json/wrap-json-body {:keywords? true})
json/wrap-json-response
stacktrace/wrap-stacktrace))
(defn run [port]
(run-jetty handler {:port (Integer/parseInt port)}))
(comment
(def server (run-jetty #(handler %) {:port 8080 :join? false}))
(.stop server)
)
|
Update deflogical test for insert multiple facts | (ns libx.deflogical-test
(:require [clojure.test :refer [deftest run-tests is testing]]
[libx.tuplerules :refer [deflogical]]
[clara.rules :refer [defrule]]))
(defn rule-props [expansion]
(second (nth expansion 2)))
(deftest deflogical-test
(testing "Single fact"
(is (=
(rule-props
(macroexpand
'(deflogical
[-1 :foo "bar"] :-
[[?e :baz]]
[[?e :quux]])))
(rule-props
(macroexpand
'(defrule x
[:baz (= ?e (:e this))]
[:quux (= ?e (:e this))]
=>
(libx.util/insert! [-1 :foo "bar"]))))))))
;(testing "Multiple facts"
; (let [output (macroexpand
; '(deflogical
; [[-1 :foo "bar"] [-2 :foo "baz"]]
; [[?e :baz]]
; [[?e :quux]]))
; expected (macroexpand
; '(defrule my-logical
; [:baz (= ?e (:e this))]
; [:quux (= ?e (:e this))]
; =>
; (insert-all! [[-1 :foo "bar"] [-2 :foo "baz"]])))]
; (is (= output expected)))))
(run-tests) | (ns libx.deflogical-test
(:require [clojure.test :refer [deftest run-tests is testing]]
[libx.tuplerules :refer [deflogical]]
[clara.rules :refer [defrule]]))
(defn rule-props [expansion]
(second (nth expansion 2)))
;; Because names for deflogical are generated we skip the part of the
;; expansion that includes the name
(deftest deflogical-test
(testing "Single fact"
(is (=
(rule-props
(macroexpand
'(deflogical
[-1 :foo "bar"] :-
[[?e :baz]]
[[?e :quux]])))
(rule-props
(macroexpand
'(defrule some-generated-name
[:baz (= ?e (:e this))]
[:quux (= ?e (:e this))]
=>
(libx.util/insert! [-1 :foo "bar"])))))))
(testing "Multiple facts"
(is (=
(rule-props
(macroexpand
'(deflogical
[[-1 :foo "bar"] [-2 :foo "baz"]] :-
[[?e :baz]]
[[?e :quux]])))
(rule-props
(macroexpand
'(defrule some-generated-name
[:baz (= ?e (:e this))]
[:quux (= ?e (:e this))]
=>
(libx.util/insert! [[-1 :foo "bar"] [-2 :foo "baz"]]))))))))
(run-tests)
|
Enable rerendering when new code is loaded. | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra]
'[cljs.tagged-literals])
(alter-var-root #'cljs.tagged-literals/*cljs-data-readers*
assoc 'ux/tr (fn [v] `(uxbox.locales/tr ~v)))
(ra/start-figwheel!
{:figwheel-options {:css-dirs ["resources/public/css"]}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel true
:source-paths ["src"]
:compiler {:main 'uxbox.core
:asset-path "js"
:parallel-build false
:optimizations :none
:pretty-print true
:language-in :ecmascript5
:language-out :ecmascript5
:output-to "resources/public/js/main.js"
:output-dir "resources/public/js"
:verbose true}}]})
(ra/cljs-repl)
| (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra]
'[cljs.tagged-literals])
(alter-var-root #'cljs.tagged-literals/*cljs-data-readers*
assoc 'ux/tr (fn [v] `(uxbox.locales/tr ~v)))
(ra/start-figwheel!
{:figwheel-options {:css-dirs ["resources/public/css"]}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel {:on-jsload "uxbox.ui/init"}
:source-paths ["src"]
:compiler {:main 'uxbox.core
:asset-path "js"
:parallel-build false
:optimizations :none
:pretty-print true
:language-in :ecmascript5
:language-out :ecmascript5
:output-to "resources/public/js/main.js"
:output-dir "resources/public/js"
:verbose true}}]})
(ra/cljs-repl)
|
Update to work with latest boot. | (set-env!
:dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"]
[clj.rb "0.3.0"]
[adzerk/bootlaces "0.1.5" :scope "test"]]
:resource-paths #{"src"})
(require '[adzerk.bootlaces :refer :all])
(def +version+ "0.3.0")
(bootlaces! +version+)
(task-options!
pom {:project 'boot-jruby
:version +version+
:description "Boot task to execute JRuby code."
:url "https://github.com/tobias/boot-jruby"
:scm {:url "https://github.com/tobias/boot-jruby"}
:license {:name "Apache Software License - v 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}})
| (set-env!
:dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"]
[clj.rb "0.3.0"]
[adzerk/bootlaces "0.1.5" :scope "test"]]
:resource-paths #{"src"})
(require '[adzerk.bootlaces :refer :all])
(def +version+ "0.3.0")
(bootlaces! +version+)
(task-options!
pom {:project 'boot-jruby
:version +version+
:description "Boot task to execute JRuby code."
:url "https://github.com/tobias/boot-jruby"
:scm {:url "https://github.com/tobias/boot-jruby"}
:license {"Apache Software License - v 2.0"
"http://www.apache.org/licenses/LICENSE-2.0"}})
|
Update yada version to overcome filename too long error. | (defproject haystack "0.1.0-SNAPSHOT"
:description "ecommerce search service in elasticsearch"
:url "http://murphydye.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-http "3.4.1"]
[clojurewerkz/elastisch "3.0.0-beta1"]
[org.clojure/data.csv "0.1.3"]
[bidi "2.0.16"]
[aleph "0.4.1"]
[yada "1.2.0"]
;; these are temporary. eventually will call an ecommerce service for this data
[mysql/mysql-connector-java "5.1.6"]
[org.clojure/java.jdbc "0.3.7"]
[com.murphydye/mishmash "0.1.1-SNAPSHOT"]
]
:main ^:skip-aot haystack.core
;; :jvm-opts ["-Xss6G" "-Xms6g"]
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
| (defproject haystack "0.1.0-SNAPSHOT"
:description "ecommerce search service in elasticsearch"
:url "http://murphydye.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-http "3.4.1"]
[clojurewerkz/elastisch "3.0.0-beta1"]
[org.clojure/data.csv "0.1.3"]
[bidi "2.0.16"]
[aleph "0.4.1"]
[yada "1.2.1"]
;; these are temporary. eventually will call an ecommerce service for this data
[mysql/mysql-connector-java "5.1.6"]
[org.clojure/java.jdbc "0.3.7"]
[com.murphydye/mishmash "0.1.1-SNAPSHOT"]
]
:main ^:skip-aot haystack.core
;; :jvm-opts ["-Xss6G" "-Xms6g"]
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
|
Set next development version (0.4.0-SNAPSHOT) | (defproject buddy/buddy-core "0.3.0"
:description "Security library for Clojure"
:url "https://github.com/funcool/buddy-core"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/algo.monads "0.1.5"]
[commons-codec/commons-codec "1.10"]
[org.bouncycastle/bcprov-jdk15on "1.51"]
[org.bouncycastle/bcpkix-jdk15on "1.51"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"]
:profiles {:speclj {:dependencies [[speclj "3.1.0"]]
:test-paths ["spec"]
:plugins [[speclj "3.1.0"]]}})
| (defproject buddy/buddy-core "0.4.0-SNAPSHOT"
:description "Security library for Clojure"
:url "https://github.com/funcool/buddy-core"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/algo.monads "0.1.5"]
[commons-codec/commons-codec "1.10"]
[org.bouncycastle/bcprov-jdk15on "1.51"]
[org.bouncycastle/bcpkix-jdk15on "1.51"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"]
:profiles {:speclj {:dependencies [[speclj "3.1.0"]]
:test-paths ["spec"]
:plugins [[speclj "3.1.0"]]}})
|
Bring in a shitfuckton of dependencies. In no particular order: | (defproject doctopus "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[markdown-clj "0.9.63"]
[me.raynes/fs "1.4.6"]]
:plugins [[lein-marginalia "0.8.0"]]
:main ^:skip-aot doctopus.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
| (defproject doctopus "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[markdown-clj "0.9.63"]
[me.raynes/fs "1.4.6"]
[http-kit "2.1.16"]
[jarohen/nomad "0.7.0"]
[com.taoensso/timbre "3.4.0"]
[ring/ring-defaults "0.1.4"]
[ring/ring-core "1.3.2"]
[ring/ring-devel "1.3.2"]
[bidi "1.9.4"]]
:plugins [[lein-marginalia "0.8.0"]]
:main ^:skip-aot doctopus.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
|
Allow usage of hotkeys while typing | (ns tabswitcher.views
(:require [reagent.core :as r]
[keybind :as kb]
[re-frame.core :refer [subscribe dispatch]]))
(defn query-input []
[:div#query
[:input {:type "text"
:on-key-up (fn [event]
(dispatch [:filter
(-> event .-target .-value)]))}]])
(defn result-item [idx result selection]
[:li.result-item
{:on-click #(dispatch [:jump-to result])
:class (when (= idx selection) "selected")}
(:title result)])
(defn results-list [results selection]
(into [:ul]
(map-indexed #(result-item %1 %2 selection) results)))
(defn app []
(let [results (subscribe [:results])
selection (subscribe [:selection])]
(r/create-class
{:display-name
"tabswitcher-name"
:reagent-render
(fn []
[:div
[:h3 "Tabswitcher"]
[query-input]
[:p "Found " (count @results) " tabs"]
[results-list @results @selection]])
:component-did-mount
(fn []
(kb/bind! "alt-j" ::next-result #(dispatch [:next-result]))
(kb/bind! "alt-k" ::next-result #(dispatch [:previous-result]))
)})))
| (ns tabswitcher.views
(:require [reagent.core :as r]
[keybind :as kb]
[re-frame.core :refer [subscribe dispatch]]))
(defn query-input []
[:div#query
[:input {:type "text"
:on-key-press (fn [event]
(if (.-altKey event)
(.preventDefault event)
(dispatch [:filter
(-> event .-target .-value)])))}]])
(defn result-item [idx result selection]
[:li.result-item
{:on-click #(dispatch [:jump-to result])
:class (when (= idx selection) "selected")}
(:title result)])
(defn results-list [results selection]
(into [:ul]
(map-indexed #(result-item %1 %2 selection) results)))
(defn app []
(let [results (subscribe [:results])
selection (subscribe [:selection])]
(r/create-class
{:display-name
"tabswitcher-name"
:reagent-render
(fn []
[:div
[:h3 "Tabswitcher"]
[query-input]
[:p "Found " (count @results) " tabs"]
[results-list @results @selection]])
:component-did-mount
(fn []
(kb/bind! "alt-j" ::next-result #(dispatch [:next-result]))
(kb/bind! "alt-k" ::next-result #(dispatch [:previous-result]))
)})))
|
Implement test server ongoing request reporting by reporting every 50 ms. | (ns clj-tutorials.main
(:require [compojure.core :refer :all]
[compojure.handler :as handler]
[org.httpkit.server :refer [run-server]]))
(def ongoing-requests (atom 0))
(defn- pong []
(let [ongoing-reqs (swap! ongoing-requests inc)
start (System/currentTimeMillis)]
(when (= 0 (mod ongoing-reqs 10))
(prn "Ongoing requests " ongoing-reqs))
(Thread/sleep 50)
(swap! ongoing-requests #(- % 1))
"pong"))
(defroutes app-routes
(GET "/ping" [] (pong)))
(defn run []
(run-server (handler/api app-routes) {:port 8080 :join? false :thread 1000}))
| (ns clj-tutorials.main
(:require [compojure.core :refer :all]
[compojure.handler :as handler]
[org.httpkit.server :refer [run-server]])
(:import [java.util.concurrent TimeUnit ScheduledThreadPoolExecutor]))
(def ongoing-requests (atom 0))
(defn- pong []
(let [ongoing-reqs (swap! ongoing-requests inc)
start (System/currentTimeMillis)]
(Thread/sleep (+ 20 (rand-int 80)))
(swap! ongoing-requests dec)
"pong"))
(defroutes app-routes
(GET "/ping" [] (pong)))
(defn print-ongoing-requests []
(let [requests @ongoing-requests]
(when (> requests 0)
(println "Ongoing requests:" requests))))
(defn run [threads]
(let [executor (ScheduledThreadPoolExecutor. 1)
stop-server-fn (run-server (handler/api app-routes) {:port 8080 :join? false :thread threads})]
(.scheduleAtFixedRate executor print-ongoing-requests 0 50 TimeUnit/MILLISECONDS)
(println "Server started at port 8080 with" threads "threads.")
(fn []
(stop-server-fn)
(.shutdownNow executor))))
|
Add descriptions to database tests | (ns comic-reader.database-test
(:require [clojure.test :refer :all]
[com.stuartsierra.component :as component]
[comic-reader.database :as sut]
[datomic.api :as d]))
(deftest database-component-test
(let [db (sut/new-database)]
(is (sut/database? db))
(is (sut/database? (component/start db)))
(is (nil? (:conn (component/start db))))
(let [config {:database-uri "datomic:mem://comics-test"
:norms-dir nil}
db (assoc db :config config)]
(is (nil? (sut/get-conn db)))
(let [started-db (component/start db)]
(is (not (nil? (:conn started-db))))))
(let [config {:database-uri "datomic:mem://comics-test"
:norms-dir "database/test-norms"}
db (-> db
(assoc :config config)
component/start)]
(is (= 1
(count
(d/q '[:find ?e
:in $
:where [?e :db/ident :test.enum/one]]
(d/db (:conn db)))))))))
| (ns comic-reader.database-test
(:require [clojure.test :refer :all]
[com.stuartsierra.component :as component]
[comic-reader.database :as sut]
[datomic.api :as d]))
(deftest test-database-component
(let [db (sut/new-database)]
(testing "constructor and start always returns a database"
(is (sut/database? db))
(is (sut/database? (component/start db))))
(testing "with no config, no connection is started"
(is (nil? (:conn (component/start db)))))
(let [config {:database-uri "datomic:mem://comics-test"
:norms-dir nil}
db (assoc db :config config)]
(testing "connection is nil before start"
(is (nil? (:conn db))))
(testing "connection is non-nil after successful start"
(let [started-db (component/start db)]
(is (not (nil? (:conn started-db)))))))
(testing "norms conformation happens on startup"
(let [config {:database-uri "datomic:mem://comics-test"
:norms-dir "database/test-norms"}
db (-> db
(assoc :config config)
component/start)]
(is (= 1
(count
(d/q '[:find ?e
:in $
:where [?e :db/ident :test.enum/one]]
(d/db (:conn db))))))))))
|
Fix warning in cljs.tet reporter | (ns flare.cljs-test
(:require [flare.report :as report]
[flare.diff :as diff]
[cljs.test :as ct]))
(defn render-diff [m]
(try
(let [[pred & values] (second (:actual m))]
(when (and (= pred '=) (= 2 (count values)))
(when-let [diff (apply diff/diff* values)]
(println "\n" (clojure.string/join "\n" (report/report* diff))))))
(catch js/Error e
(println "*** Oh noes! Flare threw an exception diffing the following values:")
(println values)
(println "*** Exception thrown is:" e))))
(defmethod cljs.test/report [:cljs.test/default :fail] [m]
(ct/inc-report-counter! :fail)
(println "\nFAIL in" (ct/testing-vars-str m))
(when (seq (:testing-contexts (ct/get-current-env)))
(println (ct/testing-contexts-str)))
(when-let [message (:message m)] (println message))
(ct/print-comparison m)
(render-diff m))
| (ns flare.cljs-test
(:require [flare.report :as report]
[flare.diff :as diff]
[cljs.test :as ct]))
(defn render-diff [m]
(let [[pred & values] (second (:actual m))]
(try
(when (and (= pred '=) (= 2 (count values)))
(when-let [diff (apply diff/diff* values)]
(println "\n" (clojure.string/join "\n" (report/report* diff)))))
(catch js/Error e
(println "*** Oh noes! Flare threw an exception diffing the following values:")
(println values)
(println "*** Exception thrown is:" e)))))
(defmethod cljs.test/report [:cljs.test/default :fail] [m]
(ct/inc-report-counter! :fail)
(println "\nFAIL in" (ct/testing-vars-str m))
(when (seq (:testing-contexts (ct/get-current-env)))
(println (ct/testing-contexts-str)))
(when-let [message (:message m)] (println message))
(ct/print-comparison m)
(render-diff m))
|
Change default HTTP_IP to 0.0.0.0 | (ns cfpb.qu.env
(:require [clojure.string :as str]
[clojure.java.io :as io]
[environ.core :as environ]))
(def default-env
{:mongo-host "127.0.0.1"
:mongo-port 27017
:mongo-options {:connect-timeout 2000}
:statsd-port 8125
:http-ip "127.0.0.1"
:http-port 3000
:http-threads 4
:http-queue-size 20480
:log-file nil
:log-level :info
:dev false
:integration false
:api-name "Data API"})
(def ^{:doc "A map of environment variables."}
env
(let [env (merge default-env environ/env)
config-file (:qu-config environ/env)]
(if config-file
(merge env
(binding [*read-eval* false]
(read-string (slurp config-file))))
env)))
| (ns cfpb.qu.env
(:require [clojure.string :as str]
[clojure.java.io :as io]
[environ.core :as environ]))
(def default-env
{:mongo-host "127.0.0.1"
:mongo-port 27017
:mongo-options {:connect-timeout 2000}
:statsd-port 8125
:http-ip "0.0.0.0"
:http-port 3000
:http-threads 4
:http-queue-size 20480
:log-file nil
:log-level :info
:dev false
:integration false
:api-name "Data API"})
(def ^{:doc "A map of environment variables."}
env
(let [env (merge default-env environ/env)
config-file (:qu-config environ/env)]
(if config-file
(merge env
(binding [*read-eval* false]
(read-string (slurp config-file))))
env)))
|
Introduce serialization/serialize-attribute for use in init-model expansion. | (ns clj-record.test.serialization-test
(:require
[clj-record.serialization :as serialization]
[clj-record.callbacks :as callbacks]
[clj-record.callbacks.built-ins :as callb]
[clj-record.test.model.manufacturer :as manufacturer]
[clj-record.test.model.product :as product])
(:use clojure.contrib.test-is
clj-record.test.test-helper))
(deftest serializes-simple-clojure-types
(are (= _1 (serialization/serialize _2))
"\"123\"" "123"
"123" 123))
(deftest serializes-and-deserializes-clojure-types-symmetrically
(are (= _1 (serialization/deserialize (serialization/serialize _1)))
nil
[1 2 3]
{:a "Aee" :b "Bee" :c "See"}
#{1 :b "See"}
'(1 2 [hey now])))
(defdbtest serialized-attributes-support-common-clojure-types
(restoring-ref (manufacturer/model-metadata)
(callbacks/add-callback "manufacturer" :before-save (callb/transform-value :name serialization/serialize))
(callbacks/add-callback "manufacturer" :after-load (callb/transform-value :name serialization/deserialize))
(let [record (manufacturer/create valid-manufacturer)]
(are (=
(do (manufacturer/update (assoc record :name _1)) _1)
((manufacturer/get-record (record :id)) :name))
"some string"
23
[1 2 3]))))
| (ns clj-record.test.serialization-test
(:require
[clj-record.serialization :as serialization]
[clj-record.callbacks :as callbacks]
[clj-record.callbacks.built-ins :as callb]
[clj-record.test.model.manufacturer :as manufacturer]
[clj-record.test.model.product :as product])
(:use clojure.contrib.test-is
clj-record.test.test-helper))
(deftest serializes-simple-clojure-types
(are (= _1 (serialization/serialize _2))
"\"123\"" "123"
"123" 123))
(deftest serializes-and-deserializes-clojure-types-symmetrically
(are (= _1 (serialization/deserialize (serialization/serialize _1)))
nil
[1 2 3]
{:a "Aee" :b "Bee" :c "See"}
#{1 :b "See"}
'(1 2 [hey now])))
(defdbtest serialized-attributes-support-common-clojure-types
(restoring-ref (manufacturer/model-metadata)
(serialization/serialize-attribute "manufacturer" :name)
(let [record (manufacturer/create valid-manufacturer)]
(are (=
(do (manufacturer/update (assoc record :name _1)) _1)
((manufacturer/get-record (record :id)) :name))
"some string"
23
[1 2 3]))))
|
Move upgrade manners to first release. | (defproject incise "0.1.0-SNAPSHOT"
:description "A hopefully simplified static site generator in Clojure."
:url "https://github.com/RyanMcG/incise"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring "1.2.0"]
[hiccup "1.0.2"]
[compojure "1.1.5"]
[http-kit "2.1.10"]
[robert/hooke "1.3.0"]
[me.raynes/cegdown "0.1.0"]
[org.clojure/java.classpath "0.2.0"]
[org.clojure/tools.namespace "0.2.4"]
[org.clojure/tools.cli "0.2.4"]
[clj-time "0.5.1"]
[com.taoensso/timbre "2.6.1"]
[com.ryanmcg/stefon "0.5.0-SNAPSHOT"]
[manners "0.1.0-SNAPSHOT"]]
:profiles {:dev {:dependencies [[speclj "2.5.0"]]}}
:repl-options {:init-ns incise.repl}
:plugins [[speclj "2.5.0"]]
:test-paths ["spec/"]
:main incise.core)
| (defproject incise "0.1.0-SNAPSHOT"
:description "A hopefully simplified static site generator in Clojure."
:url "https://github.com/RyanMcG/incise"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring "1.2.0"]
[hiccup "1.0.2"]
[compojure "1.1.5"]
[http-kit "2.1.10"]
[robert/hooke "1.3.0"]
[me.raynes/cegdown "0.1.0"]
[org.clojure/java.classpath "0.2.0"]
[org.clojure/tools.namespace "0.2.4"]
[org.clojure/tools.cli "0.2.4"]
[clj-time "0.5.1"]
[com.taoensso/timbre "2.6.1"]
[com.ryanmcg/stefon "0.5.0-SNAPSHOT"]
[manners "0.1.0"]]
:profiles {:dev {:dependencies [[speclj "2.5.0"]]}}
:repl-options {:init-ns incise.repl}
:plugins [[speclj "2.5.0"]]
:test-paths ["spec/"]
:main incise.core)
|
Set default clojure version to 1.7.0 | (defproject buddy/buddy-sign "0.6.0"
:description "High level message signing for Clojure"
:url "https://github.com/funcool/buddy-sign"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "provided"]
[com.taoensso/nippy "2.8.0"]
[buddy/buddy-core "0.6.0"]
[cats "0.4.0"]
[clj-time "0.9.0"]
[cheshire "5.5.0"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
| (defproject buddy/buddy-sign "0.6.0"
:description "High level message signing for Clojure"
:url "https://github.com/funcool/buddy-sign"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[com.taoensso/nippy "2.8.0"]
[buddy/buddy-core "0.6.0"]
[cats "0.4.0"]
[clj-time "0.9.0"]
[cheshire "5.5.0"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.10.0.0-beta8"
: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)
|
Exclude some of the stranger dependencies. | (defproject soy-clj "0.2.10-SNAPSHOT"
:description "An idiomatic Clojure wrapper for Google's Closure templating system."
:url "https://github.com/codahale/soy-clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/core.cache "0.6.5"]
[com.google.template/soy "2016-07-21"
:exclusions [args4j]]]
:plugins [[codox "0.9.5"]]
:test-selectors {:default #(not-any? % [:bench])
:bench :bench}
:aliases {"bench" ["test" ":bench"]}
:deploy-repositories [["releases" :clojars]
["snapshots" :clojars]]
:global-vars {*warn-on-reflection* true}
:profiles {:dev [:project/dev :profiles/dev]
:test [:project/test :profiles/test]
:profiles/dev {:dependencies [[org.clojure/clojure "1.8.0"]
[criterium "0.4.4"]]}
:profiles/test {}
:project/dev {:source-paths ["dev"]
:repl-options {:init-ns user}}
:project/test {:dependencies []}})
| (defproject soy-clj "0.2.10-SNAPSHOT"
:description "An idiomatic Clojure wrapper for Google's Closure templating system."
:url "https://github.com/codahale/soy-clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/core.cache "0.6.5"]
[com.google.template/soy "2016-07-21"
:exclusions [args4j
com.google.gwt/gwt-user
com.google.guava/guava-testlib
org.json/json
com.google.code.gson/gson]]]
:plugins [[codox "0.9.5"]]
:test-selectors {:default #(not-any? % [:bench])
:bench :bench}
:aliases {"bench" ["test" ":bench"]}
:deploy-repositories [["releases" :clojars]
["snapshots" :clojars]]
:global-vars {*warn-on-reflection* true}
:profiles {:dev [:project/dev :profiles/dev]
:test [:project/test :profiles/test]
:profiles/dev {:dependencies [[org.clojure/clojure "1.8.0"]
[criterium "0.4.4"]]}
:profiles/test {}
:project/dev {:source-paths ["dev"]
:repl-options {:init-ns user}}
:project/test {:dependencies []}})
|
Add test.check as dev dependency | (defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is causing the spec error"
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[org.clojure/clojurescript "1.9.671" :scope "provided"]
[clansi "1.0.0"]
[fipp "0.6.8"]
[spectrace "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}})
| (defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is causing the spec error"
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[org.clojure/clojurescript "1.9.671" :scope "provided"]
[clansi "1.0.0"]
[fipp "0.6.8"]
[spectrace "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}}
:profiles
{:dev {:dependencies [[org.clojure/test.check "0.10.0-alpha2"]]}})
|
Reformat cljsbuild & fighwheel config and specify more | (defproject tile-game "1.0.0-SNAPSHOT"
:description "A Tile Puzzle Game and Solver"
:min-lein-version "2.0.0"
:main tile-game.core
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.494"]
[reagent "0.6.1"]]
:plugins [[lein-figwheel "0.5.9"]
[lein-cljsbuild "1.1.5"]]
:sources-paths ["src"]
:clean-targets ^{:protect false}
["resources/public/js/out"
"resources/public/js/release"
"resources/public/js/tile-game.js"
:target-path]
:cljsbuild
{ :builds [{:id "dev"
:source-paths ["src"]
:figwheel true
:compiler {:main tile-game.grid
:asset-path "js/out"
:output-to "resources/public/js/tile-game.js"
:output-dir "resources/public/js/out"
:source-map-timestamp true}}
{:id "release"
:source-paths ["src"]
:compiler {:main tile-game.grid
:output-to "resources/public/js/tile-game.js"
:output-dir "resources/public/js/release"
:optimizations :advanced
:source-map "resources/public/js/tile-game.js.map"}}]}
:figwheel { :css-dirs ["resources/public/css"]
:open-file-command "emacsclient" })
| (defproject tile-game "1.0.0-SNAPSHOT"
:description "A Tile Puzzle Game and Solver"
:min-lein-version "2.0.0"
:main tile-game.core
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.494"]
[reagent "0.6.1"]]
:plugins [[lein-figwheel "0.5.9"]
[lein-cljsbuild "1.1.5"]]
:sources-paths ["src"]
:clean-targets ^{:protect false}
["resources/public/js/out"
"resources/public/js/release"
"resources/public/js/tile-game.js"
:target-path]
:cljsbuild {:builds
{"dev"
{:source-paths ["src"]
:figwheel {}
:compiler {:main tile-game.grid
:asset-path "js/out"
:output-to "resources/public/js/tile-game.js"
:output-dir "resources/public/js/out"
:optimizations :none
:source-map-timestamp true}}
"release"
{:source-paths ["src"]
:compiler {:main tile-game.grid
:output-to "resources/public/js/tile-game.js"
:output-dir "resources/public/js/release"
:optimizations :advanced
:source-map "resources/public/js/tile-game.js.map"}}}}
:figwheel {:css-dirs ["resources/public/css"]
:open-file-command "emacsclient"})
|
Remove unused utility functions in editor | (ns editor.helpers.utils
(:require [om-tools.dom :as dom]))
(defn model->json [model]
(.stringify js/JSON (clj->js model) nil 2))
(defn json->model [json]
(let [obj (.parse js/JSON json)]
(js->clj obj :keywordize-keys true)))
(defn non-sanitized-div [content]
(dom/div {:dangerouslySetInnerHTML #js {:__html content}}))
(defn find-first [f coll]
(first (filter f coll))) | (ns editor.helpers.utils)
(defn model->json [model]
(.stringify js/JSON (clj->js model) nil 2))
(defn json->model [json]
(let [obj (.parse js/JSON json)]
(js->clj obj :keywordize-keys true))) |
Deploy to clojars by default. | (defproject com.lemondronor/turboshrimp-h264j "0.2.0"
:description (str "An AR.Drone video deocder for the turboshrimp library "
"that uses h264j.")
:url "https://github.com/wiseman/turboshrimp-h264j"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[com.twilight/h264 "0.0.1"]
[org.clojure/clojure "1.6.0"]]
:profiles {:test
{:dependencies [[com.lemondronor/turboshrimp "0.3.1"]]
:resource-paths ["test-resources"]}})
| (defproject com.lemondronor/turboshrimp-h264j "0.2.1-SNAPSHOT"
:description (str "An AR.Drone video deocder for the turboshrimp library "
"that uses h264j.")
:url "https://github.com/wiseman/turboshrimp-h264j"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:dependencies [[com.twilight/h264 "0.0.1"]
[org.clojure/clojure "1.6.0"]]
:profiles {:test
{:dependencies [[com.lemondronor/turboshrimp "0.3.1"]]
:resource-paths ["test-resources"]}})
|
Update and configure codox 0.9.0. | (defproject simple "0.1.0-SNAPSHOT"
:description "A very simple CI server for individual projects."
:url "https://github.com/fhofherr/simple"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:scm {:name "git"
:url "https://github.com/fhofherr/simple"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/tools.logging "0.3.1"]]
:main ^:skip-aot fhofherr.simple.main
:global-vars {*warn-on-reflection* true}
:target-path "target/%s"
:test-selectors {:unit (complement :integration)
:integration :integration}
:plugins [[codox "0.8.15" :exclusions [[org.clojure/clojure]]]
[lein-cljfmt "0.3.0"]]
:codox {:output-dir "target/doc/api"
:src-dir-uri "https://github.com/fhofherr/simple/blob/master/"
:src-linenum-anchor-prefix "L"
:defaults {:doc/format :markdown}
:exclude [user]}
:profiles {:dev {:source-paths ["dev"]
:resource-paths ["dev-resources" "test-resources"]
:dependencies [[org.clojure/tools.namespace "0.2.11"]]}
:test {:resource-paths ["test-resources"]}
:uberjar {:aot :all}})
| (defproject simple "0.1.0-SNAPSHOT"
:description "A very simple CI server for individual projects."
:url "https://github.com/fhofherr/simple"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:scm {:name "git"
:url "https://github.com/fhofherr/simple"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/tools.logging "0.3.1"]]
:main ^:skip-aot fhofherr.simple.main
:global-vars {*warn-on-reflection* true}
:target-path "target/%s"
:test-selectors {:unit (complement :integration)
:integration :integration}
:plugins [[lein-codox "0.9.0" :exclusions [[org.clojure/clojure]]]
[lein-cljfmt "0.3.0"]]
:codox {:output-path "target/doc"
:source-uri "https://github.com/fhofherr/simple/blob/master/{filepath}#L{line}"
:metadata {:doc/format :markdown}
:doc-paths ["doc"
"README.md"
"CHANGELOG.md"]
:namespaces [#"fhofherr\.simple.*"
#"fhofherr\.clj-io.*"]}
:profiles {:dev {:source-paths ["dev"]
:resource-paths ["dev-resources" "test-resources"]
:dependencies [[org.clojure/tools.namespace "0.2.11"]]}
:test {:resource-paths ["test-resources"]}
:uberjar {:aot :all}})
|
Prepare for next development iteration (0.2.0-SNAPSHOT) | (defproject jungerer "0.1.4"
:description "Clojure network/graph library wrapping JUNG"
:url "https://github.com/totakke/jungerer"
:license {:name "The BSD 3-Clause License"
:url "https://opensource.org/licenses/BSD-3-Clause"}
:dependencies [[org.clojure/clojure "1.7.0"]
[net.sf.jung/jung-algorithms "2.1.1"]
[net.sf.jung/jung-api "2.1.1"]
[net.sf.jung/jung-graph-impl "2.1.1"]
[net.sf.jung/jung-io "2.1.1"]
[net.sf.jung/jung-visualization "2.1.1"]]
:profiles {:dev {:global-vars {*warn-on-reflection* true}
:resource-paths ["dev-resources"]}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0-alpha12"]]
:resource-paths ["dev-resources"]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]
:resource-paths ["dev-resources"]}}
:deploy-repositories [["snapshots" {:url "https://clojars.org/repo/"
:username [:env/clojars_username :gpg]
:password [:env/clojars_password :gpg]}]]
:codox {:source-uri "https://github.com/totakke/jungerer/blob/{version}/{filepath}#L{line}"})
| (defproject jungerer "0.2.0-SNAPSHOT"
:description "Clojure network/graph library wrapping JUNG"
:url "https://github.com/totakke/jungerer"
:license {:name "The BSD 3-Clause License"
:url "https://opensource.org/licenses/BSD-3-Clause"}
:dependencies [[org.clojure/clojure "1.7.0"]
[net.sf.jung/jung-algorithms "2.1.1"]
[net.sf.jung/jung-api "2.1.1"]
[net.sf.jung/jung-graph-impl "2.1.1"]
[net.sf.jung/jung-io "2.1.1"]
[net.sf.jung/jung-visualization "2.1.1"]]
:profiles {:dev {:global-vars {*warn-on-reflection* true}
:resource-paths ["dev-resources"]}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0-alpha12"]]
:resource-paths ["dev-resources"]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]
:resource-paths ["dev-resources"]}}
:deploy-repositories [["snapshots" {:url "https://clojars.org/repo/"
:username [:env/clojars_username :gpg]
:password [:env/clojars_password :gpg]}]]
:codox {:source-uri "https://github.com/totakke/jungerer/blob/{version}/{filepath}#L{line}"})
|
Update Codox plugin to 0.8.11 | (defproject ring "1.4.0-beta1"
:description "A Clojure web applications library."
:url "https://github.com/ring-clojure/ring"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies
[[org.clojure/clojure "1.5.1"]
[ring/ring-core "1.4.0-beta1"]
[ring/ring-devel "1.4.0-beta1"]
[ring/ring-jetty-adapter "1.4.0-beta1"]
[ring/ring-servlet "1.4.0-beta1"]]
:plugins
[[lein-sub "0.2.4"]
[codox "0.8.10"]]
:sub
["ring-core"
"ring-devel"
"ring-jetty-adapter"
"ring-servlet"]
:codox
{:src-dir-uri "http://github.com/ring-clojure/ring/blob/1.3.2/"
:src-linenum-anchor-prefix "L"
:sources ["ring-core/src"
"ring-devel/src"
"ring-jetty-adapter/src"
"ring-servlet/src"]})
| (defproject ring "1.4.0-beta1"
:description "A Clojure web applications library."
:url "https://github.com/ring-clojure/ring"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies
[[org.clojure/clojure "1.5.1"]
[ring/ring-core "1.4.0-beta1"]
[ring/ring-devel "1.4.0-beta1"]
[ring/ring-jetty-adapter "1.4.0-beta1"]
[ring/ring-servlet "1.4.0-beta1"]]
:plugins
[[lein-sub "0.2.4"]
[codox "0.8.11"]]
:sub
["ring-core"
"ring-devel"
"ring-jetty-adapter"
"ring-servlet"]
:codox
{:src-dir-uri "http://github.com/ring-clojure/ring/blob/1.3.2/"
:src-linenum-anchor-prefix "L"
:sources ["ring-core/src"
"ring-devel/src"
"ring-jetty-adapter/src"
"ring-servlet/src"]})
|
Revert back to snapshot version. | (defproject cli4clj "1.2.5"
;(defproject cli4clj "1.2.6-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-assorted-utils "1.15.0"]
[jline/jline "2.14.2"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.2.5"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]]]}}
)
| ;(defproject cli4clj "1.2.5"
(defproject cli4clj "1.2.6-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-assorted-utils "1.15.0"]
[jline/jline "2.14.2"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.2.5"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]]]}}
)
|
Bump version to v1.2.0 . | (defproject mtrx9 "1.1.0"
:description "MTRX9 is a 3-dimensional simple monitoring tool using Clojure and Websockets. The live MTRX9 service is provided by mtrx9.com (http://www.mtrx9.com). If
you're a tweetling, you might like to follow @mtrx9."
:url "http://mtrx9.com"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.5.1"]
[aleph "0.3.0-rc2"]
[compojure "1.1.5"]
[ring/ring-jetty-adapter "1.1.6"]
[hiccup "1.0.3"]]
:plugins [[lein-ring "0.8.5"]]
:profiles
{:dev {:dependencies [[ring-mock "0.1.5"]]}}
:main mtrx9.core
:aot [mtrx9.core])
| (defproject mtrx9 "1.2.0"
:description "MTRX9 is a 3-dimensional simple monitoring tool using Clojure and Websockets. The live MTRX9 service is provided by mtrx9.com (http://www.mtrx9.com). If
you're a tweetling, you might like to follow @mtrx9."
:url "http://mtrx9.com"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.5.1"]
[aleph "0.3.0-rc2"]
[compojure "1.1.5"]
[ring/ring-jetty-adapter "1.1.6"]
[hiccup "1.0.3"]]
:plugins [[lein-ring "0.8.5"]]
:profiles
{:dev {:dependencies [[ring-mock "0.1.5"]]}}
:main mtrx9.core
:aot [mtrx9.core])
|
Update Clojure 1.7 profile to full release | (defproject compojure "1.3.4"
:description "A concise routing library for Ring"
:url "https://github.com/weavejester/compojure"
: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.5"]
[clout "2.1.2"]
[medley "0.6.0"]
[ring/ring-core "1.3.2"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.10"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.4/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring/ring-mock "0.2.0"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-beta2"]]}})
| (defproject compojure "1.3.4"
:description "A concise routing library for Ring"
:url "https://github.com/weavejester/compojure"
: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.5"]
[clout "2.1.2"]
[medley "0.6.0"]
[ring/ring-core "1.3.2"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.10"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.4/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring/ring-mock "0.2.0"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
|
Move deps around (for depending libs in dev mode). | (defn get-prompt
[ns]
(str "\u001B[35m[\u001B[34m"
ns
"\u001B[35m]\u001B[33m λ\u001B[m=> "))
(defproject gov.nasa.earthdata/cmr-sample-data "0.1.0-SNAPSHOT"
:description "Sample Data for the open source NASA Common Metadata Repository (CMR)"
:url "https://github.com/oubiwann/cmr-sample-data"
:license {:name "Apache License 2.0"
:url "https://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [
[cheshire "5.8.0"]
[org.clojure/clojure "1.8.0"]]
:profiles {
:uberjar {:aot :all}
:dev {
:dependencies [
[clojusc/trifl "0.1.0"]
[org.clojure/tools.namespace "0.2.11"]]
:source-paths ["dev-resources/src"]
:repl-options {
:init-ns cmr.sample-data.dev
:prompt ~get-prompt}}})
| (defn get-prompt
[ns]
(str "\u001B[35m[\u001B[34m"
ns
"\u001B[35m]\u001B[33m λ\u001B[m=> "))
(defproject gov.nasa.earthdata/cmr-sample-data "0.1.0-SNAPSHOT"
:description "Sample Data for the open source NASA Common Metadata Repository (CMR)"
:url "https://github.com/oubiwann/cmr-sample-data"
:license {:name "Apache License 2.0"
:url "https://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [
[cheshire "5.8.0"]
[clojusc/trifl "0.1.0"]
[org.clojure/clojure "1.8.0"]]
:profiles {
:uberjar {:aot :all}
:dev {
:dependencies [
[org.clojure/tools.namespace "0.2.11"]]
:source-paths ["dev-resources/src"]
:repl-options {
:init-ns cmr.sample-data.dev
:prompt ~get-prompt}}})
|
Update to snapshot version of io.aviso:pretty | (defproject io.aviso/twixt "0.1.10-SNAPSHOT"
: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"]
[io.aviso/tracker "0.1.0"]
[ring/ring-core "1.2.1"]
[org.mozilla/rhino "1.7R4"]
[com.github.sommeri/less4j "1.4.0"]
[de.neuland-bfi/jade4j "0.4.0"]
[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.10-SNAPSHOT"
: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"]
[io.aviso/pretty "0.1.10-SNAPSHOT"]
[io.aviso/tracker "0.1.0"]
[ring/ring-core "1.2.1"]
[org.mozilla/rhino "1.7R4"]
[com.github.sommeri/less4j "1.4.0"]
[de.neuland-bfi/jade4j "0.4.0"]
[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"]]}})
|
Add private repo for grafter, and bump version to 0.1.0 | (defproject grafter "0.1.0-SNAPSHOT"
:description "RDFization tools"
:url "http://example.com/FIXME"
:license {:name "TODO"
:url "http://example.com/TODO"}
:dependencies [[org.clojure/clojure "1.6.0"]
;;[org.apache.jena/jena-core "2.11.1"]
[org.clojure/algo.monads "0.1.5"]
[clj-time "0.7.0"]
[org.clojure/tools.namespace "0.2.4"]
[clojure-csv/clojure-csv "2.0.1"]
[org.marianoguerra/clj-rhino "0.2.1"]
[org.openrdf.sesame/sesame-runtime "2.7.10"]]
:source-paths ["src"])
| (defproject grafter "0.1.0"
:description "RDFization tools"
:url "http://grafter.org/"
:license {:name "TODO"
:url "http://todo.org/"}
:repositories [["swirrl-private" {:url "s3p://leiningen-private-repo/releases/"
:username :env
:passphrase :env}]]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/algo.monads "0.1.5"]
[clj-time "0.7.0"]
[org.clojure/tools.namespace "0.2.4"]
[clojure-csv/clojure-csv "2.0.1"]
[org.marianoguerra/clj-rhino "0.2.1"]
[org.openrdf.sesame/sesame-runtime "2.7.10"]]
:source-paths ["src"]
:plugins [[com.aphyr/prism "0.1.1"] ;; autotest style support simply run: lein prism
[s3-wagon-private "1.1.2"]])
|
Add h2 and postgresql dependencies. | (defproject funcool/continuo "0.1.0-SNAPSHOT"
:description "A continuous transaction log persistence for Clojure."
:url "https://github.com/funcool/continuo"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.txt"}
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[com.taoensso/nippy "2.9.0"]
[funcool/cats "1.0.0-SNAPSHOT"]
[funcool/cuerdas "0.6.0"]
[funcool/promissum "0.2.0"]
[funcool/suricatta "0.3.1"]
[hikari-cp "1.3.0"]
[com.cognitect/transit-clj "0.8.281"]
[cheshire "5.5.0"]
[com.github.spullara.mustache.java/compiler "0.9.0"]]
:plugins [[lein-ancient "0.6.7"]])
;; :profiles {:dev {:global-vars {*warn-on-reflection* false}}})
| (defproject funcool/continuo "0.1.0-SNAPSHOT"
:description "A continuous transaction log persistence for Clojure."
:url "https://github.com/funcool/continuo"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.txt"}
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[com.taoensso/nippy "2.9.0"]
[funcool/cats "1.0.0-SNAPSHOT"]
[funcool/cuerdas "0.6.0"]
[funcool/promissum "0.2.0"]
[funcool/suricatta "0.4.0-SNAPSHOT"]
[com.h2database/h2 "1.4.188"]
[org.postgresql/postgresql "9.4-1202-jdbc42"]
[hikari-cp "1.3.1"]
[cheshire "5.5.0"]
[com.github.spullara.mustache.java/compiler "0.9.0"]]
:plugins [[lein-ancient "0.6.7"]])
;; :profiles {:dev {:global-vars {*warn-on-reflection* false}}})
|
Use Flense snapshots during development | (defproject mkremins/flense-nw "0.0-SNAPSHOT"
:dependencies
[[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2322"]
[org.clojure/core.async "0.1.338.0-5c5012-alpha"]
[com.facebook/react "0.11.1"]
[om "0.7.1"]
[spellhouse/phalanges "0.1.3"]
[mkremins/flense "0.0-278"]
[mkremins/fs "0.3.0"]]
:plugins
[[lein-cljsbuild "1.0.3"]]
:source-paths ["src"]
:cljsbuild
{:builds
[{:source-paths ["src"]
:compiler {:preamble ["react/react.js"]
:output-to "target/flense.js"
:source-map "target/flense.js.map"
:optimizations :whitespace
:pretty-print true}}]})
| (defproject mkremins/flense-nw "0.0-SNAPSHOT"
:dependencies
[[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2322"]
[org.clojure/core.async "0.1.338.0-5c5012-alpha"]
[com.facebook/react "0.11.1"]
[om "0.7.1"]
[spellhouse/phalanges "0.1.3"]
[mkremins/flense "0.0-SNAPSHOT"]
[mkremins/fs "0.3.0"]]
:plugins
[[lein-cljsbuild "1.0.3"]]
:source-paths ["src"]
:cljsbuild
{:builds
[{:source-paths ["src"]
:compiler {:preamble ["react/react.js"]
:output-to "target/flense.js"
:source-map "target/flense.js.map"
:optimizations :whitespace
:pretty-print true}}]})
|
Update compojure from 1.3.2 to 1.3.3. | (defproject statuses "1.0.0-SNAPSHOT"
:description "Statuses app for innoQ"
:url "https://github.com/innoq/statuses"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo
:comments "A business-friendly OSS license"}
:dependencies [[org.clojure/clojure "1.6.0"]
[ring "1.3.2"]
[compojure "1.3.2"]
[clj-time "0.9.0"]
[org.clojure/data.json "0.2.6"]]
:pedantic? :abort
:plugins [[jonase/eastwood "0.2.0"]]
:profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
:uberjar {:aot [statuses.server]}}
:main statuses.server
:aliases {"lint" "eastwood"}
:eastwood {:exclude-linters [:constant-test]})
| (defproject statuses "1.0.0-SNAPSHOT"
:description "Statuses app for innoQ"
:url "https://github.com/innoq/statuses"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo
:comments "A business-friendly OSS license"}
:dependencies [[org.clojure/clojure "1.6.0"]
[ring "1.3.2"]
[compojure "1.3.3"]
[clj-time "0.9.0"]
[org.clojure/data.json "0.2.6"]]
:pedantic? :abort
:plugins [[jonase/eastwood "0.2.0"]]
:profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
:uberjar {:aot [statuses.server]}}
:main statuses.server
:aliases {"lint" "eastwood"}
:eastwood {:exclude-linters [:constant-test]})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.12.0.0-alpha4"
: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)
|
Update version number to 0.1.2-SNAPSHOT | (defproject puppetlabs/kitchensink "0.1.1"
:description "Clojure utility functions"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
;; Logging
[org.clojure/tools.logging "0.2.6"]
;; Filesystem utilities
[fs "1.1.2"]
;; Configuration file parsing
[org.ini4j/ini4j "0.5.2"]
[org.clojure/tools.cli "0.2.2"]
[digest "1.4.3"]
[clj-time "0.5.1"]
;; SSL
[org.bouncycastle/bcpkix-jdk15on "1.49"]]
:profiles {:dev {:resource-paths ["test-resources"]}}
:deploy-repositories [["snapshots" "http://nexus.delivery.puppetlabs.net/content/repositories/snapshots/"]])
| (defproject puppetlabs/kitchensink "0.1.2-SNAPSHOT"
:description "Clojure utility functions"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
;; Logging
[org.clojure/tools.logging "0.2.6"]
;; Filesystem utilities
[fs "1.1.2"]
;; Configuration file parsing
[org.ini4j/ini4j "0.5.2"]
[org.clojure/tools.cli "0.2.2"]
[digest "1.4.3"]
[clj-time "0.5.1"]
;; SSL
[org.bouncycastle/bcpkix-jdk15on "1.49"]]
:profiles {:dev {:resource-paths ["test-resources"]}}
:deploy-repositories [["snapshots" "http://nexus.delivery.puppetlabs.net/content/repositories/snapshots/"]])
|
Switch back to snapshot version. | (defproject clj-record "1.1.0"
:description "A pseudo-port of ActiveRecord to the Clojure programming language"
:url "http://github.com/duelinmarkers/clj-record"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/java.jdbc "0.0.6"]]
:dev-dependencies [[lein-clojars "0.6.0"]
[swank-clojure/swank-clojure "1.2.1"]
[mysql/mysql-connector-java "5.1.17"]])
(ns leiningen.reset-db
(:require leiningen.compile))
(defn reset-db [project]
(leiningen.compile/eval-in-project project
'(do
(clj-record.test-helper/reset-db))
nil nil (require 'clj-record.test-helper)))
| (defproject clj-record "1.1.1-SNAPSHOT"
:description "A pseudo-port of ActiveRecord to the Clojure programming language"
:url "http://github.com/duelinmarkers/clj-record"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/java.jdbc "0.0.6"]]
:dev-dependencies [[lein-clojars "0.6.0"]
[swank-clojure/swank-clojure "1.2.1"]
[mysql/mysql-connector-java "5.1.17"]])
(ns leiningen.reset-db
(:require leiningen.compile))
(defn reset-db [project]
(leiningen.compile/eval-in-project project
'(do
(clj-record.test-helper/reset-db))
nil nil (require 'clj-record.test-helper)))
|
Switch to Clojure version 1.6.0-RC1. | (defproject viewer "0.1.0-SNAPSHOT"
:description "EVE Online Data Dump Viewer"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/java.jdbc "0.3.2"]
[postgresql "9.1-901.jdbc4"]
[ring/ring-jetty-adapter "1.2.1"]
[compojure "1.1.6"]
[org.clojure/data.json "0.2.4"]
[hiccup "1.0.4"]]
:plugins [[lein-ring "0.8.10"]]
:ring {:handler viewer.core/app})
| (defproject viewer "0.1.0-SNAPSHOT"
:description "EVE Online Data Dump Viewer"
: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-RC1"]
[org.clojure/java.jdbc "0.3.2"]
[postgresql "9.1-901.jdbc4"]
[ring/ring-jetty-adapter "1.2.1"]
[compojure "1.1.6"]
[org.clojure/data.json "0.2.4"]
[hiccup "1.0.4"]]
:plugins [[lein-ring "0.8.10"]]
:ring {:handler viewer.core/app})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.11.0.0"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.11.0.1-SNAPSHOT"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
|
Update dependency org.clojure:data.json to v2 | (defproject strava-activity-graphs "0.1.0-SNAPSHOT"
:description "Generate statistical charts for Strava activities"
:url "https://github.com/nicokosi/strava-activity-graphs"
:license {:name "Creative Commons Attribution 4.0"
:url "https://creativecommons.org/licenses/by/4.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[incanter/incanter-core "1.9.3"]
[incanter/incanter-charts "1.9.3"]
[incanter/incanter-io "1.9.3"]
[org.clojure/data.json "1.0.0"]
[clj-http "3.12.1"]
[slingshot "0.12.2"]]
:plugins [[lein-cljfmt "0.7.0"]]
:main ^:skip-aot strava-activity-graphs.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
| (defproject strava-activity-graphs "0.1.0-SNAPSHOT"
:description "Generate statistical charts for Strava activities"
:url "https://github.com/nicokosi/strava-activity-graphs"
:license {:name "Creative Commons Attribution 4.0"
:url "https://creativecommons.org/licenses/by/4.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[incanter/incanter-core "1.9.3"]
[incanter/incanter-charts "1.9.3"]
[incanter/incanter-io "1.9.3"]
[org.clojure/data.json "2.3.0"]
[clj-http "3.12.1"]
[slingshot "0.12.2"]]
:plugins [[lein-cljfmt "0.7.0"]]
:main ^:skip-aot strava-activity-graphs.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.12.7.0"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.12.7.1-SNAPSHOT"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
|
Update dependency org.onyxplatform/onyx to version 0.11.0-alpha4. | (defproject org.onyxplatform/onyx-peer-http-query "0.11.0.0-SNAPSHOT"
:description "An Onyx health and query HTTP server"
:url "https://github.com/onyx-platform/onyx-peer-http-query"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.11.0-20170913_201413-ge1e4ba6"]
[ring/ring-core "1.6.2"]
[org.clojure/java.jmx "0.3.4"]
[ring-jetty-component "0.3.1"]
[cheshire "5.7.0"]]
: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}}
:profiles {:dev {:dependencies [[clj-http "3.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
| (defproject org.onyxplatform/onyx-peer-http-query "0.11.0.0-SNAPSHOT"
:description "An Onyx health and query HTTP server"
:url "https://github.com/onyx-platform/onyx-peer-http-query"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.11.0-alpha4"]
[ring/ring-core "1.6.2"]
[org.clojure/java.jmx "0.3.4"]
[ring-jetty-component "0.3.1"]
[cheshire "5.7.0"]]
: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}}
:profiles {:dev {:dependencies [[clj-http "3.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-datomic "0.7.3-beta7"
: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.3-20150902_134205-g8bdc527"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]
[lein-set-version "0.4.1"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-datomic "0.7.3-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.3-20150902_134205-g8bdc527"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]
[lein-set-version "0.4.1"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Update dependency org.clojure:data.json to v1 | (defproject strava-activity-graphs "0.1.0-SNAPSHOT"
:description "Generate statistical charts for Strava activities"
:url "https://github.com/nicokosi/strava-activity-graphs"
:license {:name "Creative Commons Attribution 4.0"
:url "https://creativecommons.org/licenses/by/4.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]
[incanter/incanter-core "1.9.3"]
[incanter/incanter-charts "1.9.3"]
[incanter/incanter-io "1.9.3"]
[org.clojure/data.json "0.2.7"]
[clj-http "3.10.2"]
[slingshot "0.12.2"]]
:plugins [[lein-cljfmt "0.6.8"]]
:main ^:skip-aot strava-activity-graphs.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
| (defproject strava-activity-graphs "0.1.0-SNAPSHOT"
:description "Generate statistical charts for Strava activities"
:url "https://github.com/nicokosi/strava-activity-graphs"
:license {:name "Creative Commons Attribution 4.0"
:url "https://creativecommons.org/licenses/by/4.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]
[incanter/incanter-core "1.9.3"]
[incanter/incanter-charts "1.9.3"]
[incanter/incanter-io "1.9.3"]
[org.clojure/data.json "1.0.0"]
[clj-http "3.10.2"]
[slingshot "0.12.2"]]
:plugins [[lein-cljfmt "0.6.8"]]
:main ^:skip-aot strava-activity-graphs.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
|
Rename oph repositories to default names | (defproject oph/clj-parent "0.1.0"
:url "http://example.com/FIXME"
:license {:name "EUPL"
:url "http://www.osor.eu/eupl/"}
:plugins [[lein-modules "0.3.11"]]
:modules {:inherited {
:repositories [["oph-releases" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-release-local"
:sign-releases false
:snapshots false}]
["oph-snapshots" "https://artifactory.oph.ware.fi/artifactory/oph-sade-snapshot-local"]]}})
| (defproject oph/clj-parent "0.1.0"
:url "http://example.com/FIXME"
:license {:name "EUPL"
:url "http://www.osor.eu/eupl/"}
:plugins [[lein-modules "0.3.11"]]
:modules {:inherited {
:repositories [["releases" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-release-local"
:sign-releases false
:snapshots false}]
["snapshots" "https://artifactory.oph.ware.fi/artifactory/oph-sade-snapshot-local"]]}})
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-metrics "0.8.0.1"
:description "Instrument Onyx workflows"
:url "https://github.com/MichaelDrogalis/onyx"
: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"]
[interval-metrics "1.0.0"]
[stylefruits/gniazdo "0.4.0"]]
:java-opts ^:replace ["-server" "-Xmx3g"]
:global-vars {*warn-on-reflection* true
*assert* false
*unchecked-math* :warn-on-boxed}
:profiles {:dev {:dependencies [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.0.1"]
[riemann-clojure-client "0.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
| (defproject org.onyxplatform/onyx-metrics "0.8.0.2-SNAPSHOT"
:description "Instrument Onyx workflows"
:url "https://github.com/MichaelDrogalis/onyx"
: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"]
[interval-metrics "1.0.0"]
[stylefruits/gniazdo "0.4.0"]]
:java-opts ^:replace ["-server" "-Xmx3g"]
:global-vars {*warn-on-reflection* true
*assert* false
*unchecked-math* :warn-on-boxed}
:profiles {:dev {:dependencies [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.0.1"]
[riemann-clojure-client "0.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
|
Put links to source in the generated docs. | (defproject org.flatland/useful "0.11.1"
:description "A collection of generally-useful Clojure utility functions"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:url "https://github.com/flatland/useful"
:dependencies [[org.clojure/clojure "1.5.0"]
[org.clojure/tools.macro "0.1.1"]
[org.clojure/tools.reader "0.7.2"]]
:aliases {"testall" ["with-profile" "dev,default:dev,1.3,default:dev,1.4,default" "test"]}
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}}
:plugins [[codox "0.8.0"]])
| (defproject org.flatland/useful "0.11.1"
:description "A collection of generally-useful Clojure utility functions"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:url "https://github.com/flatland/useful"
:dependencies [[org.clojure/clojure "1.5.0"]
[org.clojure/tools.macro "0.1.1"]
[org.clojure/tools.reader "0.7.2"]]
:aliases {"testall" ["with-profile" "dev,default:dev,1.3,default:dev,1.4,default" "test"]}
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}}
:plugins [[codox "0.8.0"]]
:codox {:src-dir-uri "http://github.com/flatland/useful/blob/develop/"
:src-linenum-anchor-prefix "L"})
|
Update plugins and remove unused ones | {:user
{:plugins
[[lein-midje "3.1.3"]
[com.palletops/pallet-lein "0.6.0-beta.9"]
[lein-marginalia "0.7.1"]
[lein-difftest "2.0.0"]
[cider/cider-nrepl "0.6.0"]
[lein-ancient "0.6.7"]
]
:dependencies
[[alembic "0.2.0"]]
}
}
| {:user
{:plugins
[[lein-midje "3.2"]
[lein-marginalia "0.8.0"]
[lein-ancient "0.6.8"]]}}
|
Add support for yet another mysql adapter. Fixes a problem with soundcloud | (ns circle.backend.build.inference.gems-map)
(def gem-package-map
;; this is a map of rubygems to the ubuntu packages necessary for this gem to install. Incomplete.
{"memcached" #{"libmemcached-dev" "libsasl2-dev"}
"cdamian-geoip_city" #{"libgeoip-dev"}
"capybara-webkit" #{"libqtwebkit-dev"}
"pdfkit "#{"wkhtmltopdf"}})
(def blacklisted-gems
;; gems that should be removed from the user's gemfile when running
#{"rb-fsevent" "growl_notify" "autotest-fsevent"})
(def database-yml-gems
;; if using any of these gems, they'll need a database.yml. We will
;; generate a database.yml for them.
["activerecord" "dm-rails"])
(def gem-adapter-map
{"pg" "postgresql"
"do_postgres" "postgresql"
"sqlite3" "sqlite3"
"mysql" "mysql"
"mysql2" "mysql2"
"do_mysql" "mysql"}) | (ns circle.backend.build.inference.gems-map)
(def gem-package-map
;; this is a map of rubygems to the ubuntu packages necessary for this gem to install. Incomplete.
{"memcached" #{"libmemcached-dev" "libsasl2-dev"}
"cdamian-geoip_city" #{"libgeoip-dev"}
"capybara-webkit" #{"libqtwebkit-dev"}
"pdfkit "#{"wkhtmltopdf"}})
(def blacklisted-gems
;; gems that should be removed from the user's gemfile when running
#{"rb-fsevent" "growl_notify" "autotest-fsevent"})
(def database-yml-gems
;; if using any of these gems, they'll need a database.yml. We will
;; generate a database.yml for them.
["activerecord" "dm-rails"])
(def gem-adapter-map
{"pg" "postgresql"
"do_postgres" "postgresql"
"sqlite3" "sqlite3"
"mysql" "mysql"
"mysql2" "mysql2"
"do_mysql" "mysql"
"jberkel-mysql-ruby" "mysql"}) |
Add rsp type that properly implements catacumba protocols. | ;; 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.frontend.core)
(defmulti -handler
(comp (juxt :type :dest) second vector))
| ;; 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.frontend.core
(:require [catacumba.impl.handlers :as cih]
[catacumba.serializers :as csz])
(:import ratpack.handling.Context
ratpack.http.Response
ratpack.http.MutableHeaders))
(deftype Rsp [data]
cih/ISend
(-send [_ ctx]
(let [^Response response (.getResponse ^Context ctx)
^MutableHeaders headers (.getHeaders response)]
(.set headers "content-type" "application/transit+json")
(cih/-send (csz/encode data :transit+json) ctx))))
(defn rsp
"A shortcut for create a response instance."
[data]
(Rsp. data))
|
Add dedupe on state persistence stream. | (ns uxbox.core
(:require [beicon.core :as rx]
[cats.labs.lens :as l]
[uxbox.state :as st]
[uxbox.router :as rt]
[uxbox.rstore :as rs]
[uxbox.ui :as ui]
[uxbox.data.load :as dl]))
(enable-console-print!)
(defn main
"Initialize the storage subsystem."
[]
(let [lens (l/select-keys [:pages-by-id
:shapes-by-id
:colors-by-id
:projects-by-id])
stream (->> (l/focus-atom lens st/state)
(rx/from-atom)
(rx/debounce 1000)
(rx/tap #(println "[save]")))]
(rx/on-value stream #(dl/persist-state %))))
(defonce +setup+
(do
(println "bootstrap")
(st/init)
(rt/init)
(ui/init)
(rs/emit! (dl/load-data))
(main)))
| (ns uxbox.core
(:require [beicon.core :as rx]
[cats.labs.lens :as l]
[uxbox.state :as st]
[uxbox.router :as rt]
[uxbox.rstore :as rs]
[uxbox.ui :as ui]
[uxbox.data.load :as dl]))
(enable-console-print!)
(defn main
"Initialize the storage subsystem."
[]
(let [lens (l/select-keys [:pages-by-id
:shapes-by-id
:colors-by-id
:projects-by-id])
stream (->> (l/focus-atom lens st/state)
(rx/from-atom)
(rx/dedupe)
(rx/debounce 1000)
(rx/tap #(println "[save]")))]
(rx/on-value stream #(dl/persist-state %))))
(defonce +setup+
(do
(println "bootstrap")
(st/init)
(rt/init)
(ui/init)
(rs/emit! (dl/load-data))
(main)))
|
Change format of infrastructure data, update if already registered. | (ns pz-discover.util
(:require [clojure.tools.logging :as log]
[zookeeper :as zk]
[pz-discover.models.services :as sm]))
(defn setup-zk-env! [client chroot]
(let [names-node (format "%s/%s" chroot "names")
types-node (format "%s/%s" chroot "types")]
(when-not (zk/exists client chroot)
(zk/create client chroot :persistent? true))
(when-not (zk/exists client names-node)
(zk/create client names-node :persistent? true))
(when-not (zk/exists client types-node)
(zk/create client types-node :persistent? true))))
(defn register-kafka! [client kafka-config]
(let [kafka-data {:type "infrastructure"
:brokers (get-in kafka-config [:producer "bootstrap.servers"])}]
(sm/register-by-name client "kafka" kafka-data)))
(defn register-zookeeper! [client zookeeper-config]
(let [zk-data (assoc zookeeper-config :type "infrastructure")]
(sm/register-by-name client "zookeeper" zk-data)))
| (ns pz-discover.util
(:require [clojure.tools.logging :as log]
[zookeeper :as zk]
[pz-discover.models.services :as sm]))
(defn setup-zk-env! [client chroot]
(let [names-node (format "%s/%s" chroot "names")
types-node (format "%s/%s" chroot "types")]
(when-not (zk/exists client chroot)
(zk/create client chroot :persistent? true))
(when-not (zk/exists client names-node)
(zk/create client names-node :persistent? true))
(when-not (zk/exists client types-node)
(zk/create client types-node :persistent? true))))
(defn register-kafka! [client kafka-config]
(let [kafka-data {:type "infrastructure"
:host (get-in kafka-config [:producer "bootstrap.servers"])}]
(when-not (sm/register-by-name client "kafka" kafka-data)
(sm/update-by-name client "kafka" kafka-data))))
(defn register-zookeeper! [client zookeeper-config]
(let [zk-normalized {:host (format "%s:%s%s"
(:host zookeeper-config)
(:port zookeeper-config)
(:chroot zookeeper-config))}
zk-data (assoc zk-normalized :type "infrastructure")]
(when-not (sm/register-by-name client "zookeeper" zk-data)
(sm/update-by-name client "zookeeper" zk-data))))
|
Remove references to old widget | (ns frontend.intercom
(:require [frontend.utils :as utils :include-macros true]))
(defn intercom-jquery []
(aget js/window "intercomJQuery"))
(defn intercom-v1-new-message [jq message]
(.click (jq "#IntercomTab"))
(when-not (.is (jq "#IntercomNewMessageContainer") ":visible")
(.click (jq "[href=IntercomNewMessageContainer]")))
(when-not (.is (jq "#newMessageBody") ":visible")
(throw "didn't find intercom v1 widget"))
(.focus (jq "#newMessageBody"))
(when message
(.text (jq "#newMessageBody") (str message "\n\n"))))
(defn intercom-v2-new-message []
(js/Intercom "show"))
(defn raise-dialog [ch & [message]]
(try
(let [jq (intercom-jquery)]
(intercom-v1-new-message jq message))
(catch :default e
(try
(intercom-v2-new-message)
(catch :default e
(utils/notify-error ch "Uh-oh, our Help system isn't available. Please email us instead, at sayhi@circleci.com")
(utils/merror e)))))
(utils/notify-error ch "Uh-oh, our Help system isn't available. Please email us instead, at sayhi@circleci.com"))
(defn user-link []
(let [path (.. js/window -location -pathname)
re (js/RegExp. "/gh/([^/]+/[^/]+)")]
(when-let [match (.match path re)]
(str "https://www.intercom.io/apps/vnk4oztr/users"
"?utf8=%E2%9C%93"
"&filters%5B0%5D%5Battr%5D=custom_data.pr-followed"
"&filters%5B0%5D%5Bcomparison%5D=contains&filters%5B0%5D%5Bvalue%5D="
(second path)))))
| (ns frontend.intercom
(:require [frontend.utils :as utils :include-macros true]))
(defn raise-dialog [ch & [message]]
(try
(js/Intercom "show")
(catch :default e
(utils/notify-error ch "Uh-oh, our Help system isn't available. Please email us instead, at sayhi@circleci.com")
(utils/merror e))))
(defn user-link []
(let [path (.. js/window -location -pathname)
re (js/RegExp. "/gh/([^/]+/[^/]+)")]
(when-let [match (.match path re)]
(str "https://www.intercom.io/apps/vnk4oztr/users"
"?utf8=%E2%9C%93"
"&filters%5B0%5D%5Battr%5D=custom_data.pr-followed"
"&filters%5B0%5D%5Bcomparison%5D=contains&filters%5B0%5D%5Bvalue%5D="
(second path)))))
|
Add quickie test runner to plugins. | {:user {:dependencies [[clj-stacktrace "0.2.5"]
[org.clojure/tools.trace "0.7.6"]
[org.clojure/tools.namespace "0.2.4"]
[redl "0.1.0"]
[speclj-tmux "1.0.0"]
[spyscope "0.1.3"]
[slamhound "1.3.3"]]
:plugins [[lein-difftest "1.3.7"]
[lein-exec "0.3.0"]
[org.bodil/lein-noderepl "0.1.10"]
[lein-clojars "0.9.1"]
[lein-pprint "1.1.1"]
[lein-ring "0.8.0"]
[lein-cljsbuild "0.3.2"]
[lein-deps-tree "0.1.2"]
[lein-marginalia "0.7.1"]]
:repl-options {:timeout 120000}
:injections [(require '[redl core complete])
(require 'spyscope.core)
(require 'clojure.tools.namespace)
(let [orig (ns-resolve (doto 'clojure.stacktrace require)
'print-cause-trace)
new (ns-resolve (doto 'clj-stacktrace.repl require)
'pst)]
(alter-var-root orig (constantly @new)))]
:vimclojure-opts {:repl true}}}
| {:user {:dependencies [[clj-stacktrace "0.2.5"]
[org.clojure/tools.trace "0.7.6"]
[org.clojure/tools.namespace "0.2.4"]
[redl "0.1.0"]
[speclj-tmux "1.0.0"]
[spyscope "0.1.3"]
[slamhound "1.3.3"]]
:plugins [[lein-difftest "1.3.7"]
[lein-exec "0.3.0"]
[org.bodil/lein-noderepl "0.1.10"]
[quickie "0.2.1"]
[lein-clojars "0.9.1"]
[lein-pprint "1.1.1"]
[lein-ring "0.8.0"]
[lein-cljsbuild "0.3.2"]
[lein-deps-tree "0.1.2"]
[lein-marginalia "0.7.1"]]
:repl-options {:timeout 120000}
:injections [(require '[redl core complete])
(require 'spyscope.core)
(require 'clojure.tools.namespace)
(let [orig (ns-resolve (doto 'clojure.stacktrace require)
'print-cause-trace)
new (ns-resolve (doto 'clj-stacktrace.repl require)
'pst)]
(alter-var-root orig (constantly @new)))]
:vimclojure-opts {:repl true}}}
|
Move JVM debug only to dev profile | (defproject domain "0.1.0-SNAPSHOT"
:description "CV + RTB"
:url "http://example.com/OMGLOL"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[ring/ring-jetty-adapter "1.4.0"]
[ring/ring-defaults "0.1.5"]
[ring/ring-json "0.4.0"]
[compojure "1.4.0"]
[clj-http "2.0.0"]
[org.clojure/core.async "0.2.374"]
[org.clojure/data.json "0.2.6"]
[ring-cors "0.1.7"]]
:plugins [[lein-ring "0.9.7"]]
:ring {:handler domain.core/app
:nrepl {:start? true
:port 3001}}
:jvm-opts ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"]
:aot [domain.core])
| (defproject domain "0.1.0-SNAPSHOT"
:description "CV + RTB"
:url "http://example.com/OMGLOL"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[ring/ring-jetty-adapter "1.4.0"]
[ring/ring-defaults "0.1.5"]
[ring/ring-json "0.4.0"]
[compojure "1.4.0"]
[clj-http "2.0.0"]
[org.clojure/core.async "0.2.374"]
[org.clojure/data.json "0.2.6"]
[ring-cors "0.1.7"]]
:plugins [[lein-ring "0.9.7"]]
:ring {:handler domain.core/app
:nrepl {:start? true :port 3001}}
:profiles {:dev {:jvm-opts ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"]}}
:aot [domain.core])
|
Add a timeout when loading markers. | (ns wlmmap.map
(:require [mrhyde.extend-js]
[blade :refer [L]]
[cljs.core.async :refer [chan <! >!]]
[shoreleave.remotes.http-rpc :refer [remote-callback]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(blade/bootstrap)
(def mymap (-> L .-mapbox (.map "map" "examples.map-uci7ul8p")
(.setView [45 3.215] 5)))
(def markers (L/MarkerClusterGroup.))
(let [ch (chan)]
(go (while true
(let [a (<! ch)]
(let [lat (first (first a))
lng (last (first a))
title (last a)
icon ((get-in L [:mapbox :marker :icon])
{:marker-symbol "post" :marker-color "0044FF"})
marker (-> L (.marker (L/LatLng. lat lng) {:icon icon :title title}))]
(.bindPopup marker title)
(.addLayer markers marker))
(.addLayer mymap markers))))
(remote-callback
:get-markers []
#(doseq [a %] (go (>! ch a)))))
;; FIXME: get language
;; (js/alert (.-language js/navigator))
| (ns wlmmap.map
(:require [mrhyde.extend-js]
[blade :refer [L]]
[cljs.core.async :refer [chan <! >! timeout]]
[shoreleave.remotes.http-rpc :refer [remote-callback]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(blade/bootstrap)
(def mymap (-> L .-mapbox (.map "map" "examples.map-uci7ul8p")
(.setView [45 3.215] 5)))
(def markers (L/MarkerClusterGroup.))
(let [ch (chan)]
(go (while true
(let [a (<! ch)]
(let [lat (first (first a))
lng (last (first a))
title (last a)
icon ((get-in L [:mapbox :marker :icon])
{:marker-symbol "" :marker-color "0044FF"})
marker (-> L (.marker (L/LatLng. lat lng)
{:icon icon}))]
(.bindPopup marker title)
(.addLayer markers marker)))))
(remote-callback :get-markers []
#(go (doseq [a %]
(<! (timeout 1))
(>! ch a)))))
(.addLayer mymap markers)
;; FIXME: get language
;; (js/alert (.-language js/navigator))
|
Fix inconsistent textarea font-size on Firefox | (ns braid.ui.styles.body)
(def body
[:body
{:margin 0
:padding 0
:font-family "\"Open Sans\", Helvetica, Arial, sans-serif"
:font-size "12px"
:background "#eee"}
[:textarea :input
{:font-family "inherit"}]])
| (ns braid.ui.styles.body)
(def body
[:body
{:margin 0
:padding 0
:font-family "\"Open Sans\", Helvetica, Arial, sans-serif"
:font-size "12px"
:background "#eee"}
[:textarea :input
{:font-family "inherit"
:font-size "1em"}]])
|
Add concise system record class. | (ns pfrt.core)
(defprotocol Lifecycle
(init [_ system] "Initialize method")
(start [_ system] "Start service")
(stop [_ system] "Stop service"))
| (ns pfrt.core
(:require [swiss.arrows :refer [-<>]]))
(defprotocol IComponentLifecycle
(init [_ system] "Initialize method")
(start [_ system] "Start service")
(stop [_ system] "Stop service"))
(defprotocol ISystemLifecycle
(init [_] "Initialize method")
(start [_] "Start service")
(stop [_] "Stop service"))
(defrecord System [components]
ISystemLifecycle
(init [this]
(-<> this (reduce #(init %1 %2) <> components)))
(start [this]
(-<> this (reduce #(start %1 %2) <> components)))
(stop [this]
(-<> this (reduce #(stop %1 %2) <> components))))
|
Use cover image in serials list | (ns teach-by-friends.shared.components.row
(:require [teach-by-friends.shared.ui :as ui]
[clojure.string :refer [capitalize]]))
(defn row [data press-handler]
(let [data-to-clj (js->clj data :keywordize-keys true)]
[ui/touchable-opacity {:style {:border-bottom-width 1
:border-color "rgba(0,0,0,.1)"
:padding-top 20
:padding-bottom 20
:padding-left 30}
:on-press (partial press-handler data-to-clj)}
[ui/text {:style {:font-size 30 :color "white"}} (capitalize (:title data-to-clj))]]))
| (ns teach-by-friends.shared.components.row
(:require [teach-by-friends.shared.ui :as ui]
[clojure.string :refer [capitalize]]))
(defn row [data press-handler]
(let [data-to-clj (js->clj data :keywordize-keys true)]
[ui/touchable-opacity {:style {:position "relative"
:height 100}
:on-press (partial press-handler data-to-clj)}
[ui/image {:source {:uri (:cover data-to-clj)}
:resize-mode "cover"
:style {:width (ui/get-device-width)
:height 100}}]
[ui/linear-gradient {:colors ["rgba(0,0,0,0.6)" "rgba(0,0,0,0)"]
:start [0.0 0.5] :end [1.0 0.5]
:style {:width (ui/get-device-width)
:height 100
:position "absolute"
:top 0}}]
[ui/text {:style {:position "absolute"
:font-size 14
:color "white"
:left 16
:bottom 10}}
(capitalize (:title data-to-clj))]]))
|
Add core.matrix and vectorz-clj, and switch to boot-alt-test. | ; vi: ft=clojure
(set-env!
:source-paths #{"src", "test"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[org.clojure/data.csv "0.1.3"]
[incanter "1.9.0"]
[adzerk/boot-test "1.2.0" :scope "test"]])
(require '[adzerk.boot-test :refer [test]])
(task-options!
aot {:all true}
pom {:project 'tf-idf
:version "0.0.0"}
jar {:main 'analyze-data.core})
(deftask build []
(comp (aot) (pom) (uber) (jar) (target)))
| ; vi: ft=clojure
(set-env!
:source-paths #{"src", "test"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[org.clojure/data.csv "0.1.3"]
[metosin/boot-alt-test "0.3.1" :scope "test"]
[net.mikera/core.matrix "0.58.0"]
[net.mikera/vectorz-clj "0.46.0"]])
(require '[metosin.boot-alt-test :refer [alt-test]])
(task-options!
aot {:all true}
pom {:project 'tf-idf
:version "0.0.0"}
jar {:main 'analyze-data.core})
(deftask build []
(comp (aot) (pom) (uber) (jar) (target)))
|
Update namespace name in :require. | (ns kixi.hecuba.weather
(:require [kixi.hecuba.weather.metofficeapi :as ma]))
| (ns kixi.hecuba.weather
(:require [kixi.hecuba.weather.metoffice-api :as ma]))
|
Make it clear that handler receives atom instead of value | (ns ashiba.controller
(:require [cljs.core.async :refer [put!]]))
(defprotocol IController
(params [this route])
(start [this params db])
(stop [this params db])
(execute [this command-name] [this command-name args])
(handler [this app-db in-chan out-chan])
(send-command [this command-name] [this command-name args])
(is-running? [this]))
(extend-type default
IController
(params [_ route] route)
(start [_ params db] db)
(stop [_ params db] db)
(handler [_ _ _ _])
(execute
([this command-name]
(execute this command-name nil))
([this command-name args]
(put! (:in-chan this) [command-name args])))
(send-command
([this command-name]
(send-command this command-name nil))
([this command-name args]
(let [out-chan (:out-chan this)]
(put! out-chan [command-name args])
this)))
(is-running? [this]
(= this ((:running this)))))
| (ns ashiba.controller
(:require [cljs.core.async :refer [put!]]))
(defprotocol IController
(params [this route])
(start [this params db])
(stop [this params db])
(execute [this command-name] [this command-name args])
(handler [this app-db-atom in-chan out-chan])
(send-command [this command-name] [this command-name args])
(is-running? [this]))
(extend-type default
IController
(params [_ route] route)
(start [_ params db] db)
(stop [_ params db] db)
(handler [_ _ _ _])
(execute
([this command-name]
(execute this command-name nil))
([this command-name args]
(put! (:in-chan this) [command-name args])))
(send-command
([this command-name]
(send-command this command-name nil))
([this command-name args]
(let [out-chan (:out-chan this)]
(put! out-chan [command-name args])
this)))
(is-running? [this]
(= this ((:running this)))))
|
Fix leiningen boilerplate test failure | (ns enduro-session.core-test
(:require [clojure.test :refer :all]
[enduro-session.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| (ns enduro-session.core-test
(:require [clojure.test :refer :all]
[enduro-session.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 1 1))))
|
Update open to be backwards compatible for urls | (ns lt.objs.platform
(:require [lt.object :as object]
[lt.util.dom :as dom])
(:require-macros [lt.macros :refer [behavior]]))
(def atom-shell true)
(def clipboard (js/require "clipboard"))
(def shell (js/require "shell"))
(defn get-data-path []
(.getDataPath (.require (js/require "remote") "app")))
(defn normalize [plat]
(condp = plat
"win32" :windows
"linux" :linux
"darwin" :mac))
(defn open [path]
(.openItem shell path))
(defn open-url [path]
(.openExternal shell path))
(defn show-item [path]
(.showItemInFolder shell path))
(defn copy
"Copies given text to platform's clipboard"
[text]
(.writeText clipboard text))
(defn paste
"Returns text of last copy to platform's clipboard"
[]
(.readText clipboard))
(def platform (normalize (.-platform js/process)))
(defn mac? []
(= platform :mac))
(defn win? []
(= platform :windows))
(defn linux? []
(= platform :linux))
| (ns lt.objs.platform
(:require [lt.object :as object]
[lt.util.dom :as dom])
(:require-macros [lt.macros :refer [behavior]]))
(def atom-shell true)
(def fs (js/require "fs"))
(def clipboard (js/require "clipboard"))
(def shell (js/require "shell"))
(defn get-data-path []
(.getDataPath (.require (js/require "remote") "app")))
(defn normalize [plat]
(condp = plat
"win32" :windows
"linux" :linux
"darwin" :mac))
(defn open-url [path]
(.openExternal shell path))
(defn open
"If the given path exists, open it with the desktop's default manner.
Otherwise, open it as an external protocol e.g. a url."
[path]
(if (.existsSync fs path)
(.openItem shell path)
(open-url path)))
(defn show-item [path]
(.showItemInFolder shell path))
(defn copy
"Copies given text to platform's clipboard"
[text]
(.writeText clipboard text))
(defn paste
"Returns text of last copy to platform's clipboard"
[]
(.readText clipboard))
(def platform (normalize (.-platform js/process)))
(defn mac? []
(= platform :mac))
(defn win? []
(= platform :windows))
(defn linux? []
(= platform :linux))
|
Test for coll? on input values |
{
:name "mailp2",
:path "",
:func (fn [recipient subject intro result-maps]
(cond
(pg/eoi? result-maps) (pg/done)
(every? map? result-maps)
(let [base (->> result-maps first :value second fs/dirname)
msgs (for [retmap result-maps]
(let [name (retmap :name)
[bams csv] (retmap :value)
bams (map fs/basename bams)
csv (fs/basename csv)
exit (retmap :exit)
err (retmap :err)]
(if (= exit :success)
[exit csv]
[exit err [bams csv]])))
overall (reduce (fn[R x]
(cond (= x R :success) R
(= x R :fail) R
:else :mixed))
(map first msgs))
msg (->> msgs
(cons (str "Base '" base "'"))
(cons (str "Overall " overall))
(cons intro)
(map str) (str/join "\n"))]
(pg/send-msg [recipient] subject msg))
:else
(let [msg (->> result-maps (cons intro) (map str) (str/join "\n"))]
(pg/send-msg [recipient] subject msg))))
:description "Mailer function node for phase2/gen-feature-counts. recipient is user account that requested the associated job this node is final pt of DAG, subject is type of job, msg is job finish details."
}
|
{
:name "mailp2",
:path "",
:func (fn [recipient subject intro result-maps]
(cond
(pg/eoi? result-maps) (pg/done)
(every? map? result-maps)
(let [base (->> result-maps first :value second fs/dirname)
msgs (for [retmap result-maps]
(let [name (retmap :name)
[bams csv] (retmap :value)
bams (if (coll? bams)
(map fs/basename bams)
(fs/basename bams))
csv (if (coll? bams)
(map fs/basename csv)
(fs/basename csv))
exit (retmap :exit)
err (retmap :err)]
(if (= exit :success)
[exit csv]
[exit err [bams csv]])))
overall (reduce (fn[R x]
(cond (= x R :success) R
(= x R :fail) R
:else :mixed))
(map first msgs))
msg (->> msgs
(cons (str "Base '" base "'"))
(cons (str "Overall " overall))
(cons intro)
(map str) (str/join "\n"))]
(pg/send-msg [recipient] subject msg))
:else
(let [msg (->> result-maps (cons intro) (map str) (str/join "\n"))]
(pg/send-msg [recipient] subject msg))))
:description "Mailer function node for phase2/gen-feature-counts. recipient is user account that requested the associated job this node is final pt of DAG, subject is type of job, msg is job finish details."
}
|
Switch back to using Derby in tests. | (ns clj-record.test.model.config)
(comment
(def db {:classname "org.apache.derby.jdbc.EmbeddedDriver"
:subprotocol "derby"
:subname "/tmp/clj-record.test.db"
:create true})
)
(def db {:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:subname "//localhost:5433/coffeemug"
:user "enter-user-name-here"
:password ""}) | (ns clj-record.test.model.config)
(def db {:classname "org.apache.derby.jdbc.EmbeddedDriver"
:subprotocol "derby"
:subname "/tmp/clj-record.test.db"
:create true})
(comment
(def db {:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:subname "//localhost:5433/coffeemug"
:user "enter-user-name-here"
:password ""})
)
|
Enable honeysql handlers in web API. | (ns cavm.query.expression
(:require [clojure.edn :as edn])
(:refer-clojure :exclude [eval]))
(def eval)
(defn lambdafn [node scope]
(let [[_ argnames body] node]
(fn [& args]
(eval body (cons (zipmap argnames args) scope)))))
(defn iffn [node scope]
(let [[_ test then else] node]
(cond
(eval test scope) (eval then scope)
:else (eval else scope))))
(def specials
{'fn lambdafn
'quote (fn [n s] (second n))
'if iffn })
(def specialfns (set (vals specials)))
(defn fn-node [node scope]
(let [func (eval (first node) scope)]
(cond
(contains? specialfns func) (func node scope)
:else (apply func (map #(eval % scope) (rest node))))))
(defn eval [node scope]
(cond
(symbol? node) ((first (filter #(contains? % node) scope)) node)
(list? node) (fn-node node scope)
(instance? Number node) (double node)
:else node))
(defn expression [exp & globals]
(eval (edn/read-string exp) (cons specials globals)))
| (ns cavm.query.expression
(:require [clojure.edn :as edn])
(:require [honeysql.types :as hsqltypes])
(:refer-clojure :exclude [eval]))
(def eval)
(defn lambdafn [node scope]
(let [[_ argnames body] node]
(fn [& args]
(eval body (cons (zipmap argnames args) scope)))))
(defn iffn [node scope]
(let [[_ test then else] node]
(cond
(eval test scope) (eval then scope)
:else (eval else scope))))
(def specials
{'fn lambdafn
'quote (fn [n s] (second n))
'if iffn })
(def specialfns (set (vals specials)))
(defn fn-node [node scope]
(let [func (eval (first node) scope)]
(cond
(contains? specialfns func) (func node scope)
:else (apply func (map #(eval % scope) (rest node))))))
(defn eval [node scope]
(cond
(symbol? node) ((first (filter #(contains? % node) scope)) node)
(list? node) (fn-node node scope)
(instance? Number node) (double node)
:else node))
(defn expression [exp & globals]
(eval (edn/read-string {:readers {'sql/call hsqltypes/read-sql-call}} exp) (cons specials globals)))
|
Test for unmount, init and destroy | (ns immutant.web-test
(:require [clojure.test :refer :all]
[immutant.web :refer :all]
[testing.web :refer [get-body hello handler]]
[testing.hello.service :as pedestal]))
(def url "http://localhost:8080/")
(deftest run-should-var-quote
(run hello)
(is (= "hello" (get-body url)))
(with-redefs [hello (handler "howdy")]
(is (= "howdy" (get-body url)))))
(deftest mount-unquoted-handler
(mount (server) hello)
(is (= "hello") (get-body url))
(with-redefs [hello (handler "hi")]
(is (= "hello" (get-body url)))))
(deftest mount-quoted-handler
(mount (server) #'hello)
(is (= "hello") (get-body url))
(with-redefs [hello (handler "hi")]
(is (= "hi" (get-body url)))))
(deftest mount-pedestal-service
(mount-servlet (server) pedestal/servlet)
(is (= "Hello World!" (get-body url))))
| (ns immutant.web-test
(:require [clojure.test :refer :all]
[immutant.web :refer :all]
[testing.web :refer [get-body hello handler]]
[testing.hello.service :as pedestal])
(import clojure.lang.ExceptionInfo))
(def url "http://localhost:8080/")
(deftest run-should-var-quote
(run hello)
(is (= "hello" (get-body url)))
(with-redefs [hello (handler "howdy")]
(is (= "howdy" (get-body url)))))
(deftest mount-unquoted-handler
(mount (server) hello)
(is (= "hello") (get-body url))
(with-redefs [hello (handler "hi")]
(is (= "hello" (get-body url)))))
(deftest mount-quoted-handler
(mount (server) #'hello)
(is (= "hello") (get-body url))
(with-redefs [hello (handler "hi")]
(is (= "hi" (get-body url)))))
(deftest mount-pedestal-service
(mount-servlet (server) pedestal/servlet)
(is (= "Hello World!" (get-body url))))
(deftest unmount-yields-404
(run hello)
(is (= "hello" (get-body url)))
(unmount)
(let [result (is (thrown? ExceptionInfo (get-body url)))]
(is (= 404 (-> result ex-data :object :status)))))
(deftest mount-should-call-init
(let [p (promise)]
(run hello :init #(deliver p 'init))
(is (= 'init @p))))
(deftest unmount-should-call-destroy
(let [p (promise)]
(run hello :destroy #(deliver p 'destroy))
(is (not (realized? p)))
(unmount)
(is (= 'destroy @p))))
|
Add support for :get-tests metadata on Vars | (ns lazytest.testable)
(defprotocol Testable
(get-tests [this]
"Returns a seq of RunnableTest objects. Processes the :focus metadata flag.
Default implementation recurses on all Vars in a namespace, unless
that namespace has :get-tests metadata."))
(defn focused?
"True if x has :focus metadata set to true."
[x]
(boolean (:focused (meta x))))
(defn filter-focused
"If any items in sequence s are focused, return them; else return s."
[s]
(or (seq (filter focused? s)) s))
(extend-protocol Testable
clojure.lang.Namespace
(get-tests [this-ns]
(if-let [f (:get-tests (meta this-ns))]
(do (assert (fn? f)) (f))
(filter-focused
(mapcat get-tests (vals (ns-interns this-ns))))))
clojure.lang.Var
(get-tests [this-var]
(when (bound? this-var)
(let [value (var-get this-var)]
(when (extends? Testable (type value))
(filter-focused
(get-tests value)))))))
| (ns lazytest.testable)
(defprotocol Testable
(get-tests [this]
"Returns a seq of RunnableTest objects. Processes the :focus metadata flag.
Default implementation recurses on all Vars in a namespace, unless
that namespace has :get-tests metadata."))
(defn focused?
"True if x has :focus metadata set to true."
[x]
(boolean (:focused (meta x))))
(defn filter-focused
"If any items in sequence s are focused, return them; else return s."
[s]
(or (seq (filter focused? s)) s))
(extend-protocol Testable
clojure.lang.Namespace
(get-tests [this-ns]
(if-let [f (:get-tests (meta this-ns))]
(do (assert (fn? f)) (f))
(filter-focused
(mapcat get-tests (vals (ns-interns this-ns))))))
clojure.lang.Var
(get-tests [this-var]
(if-let [f (:get-tests (meta this-var))]
(do (assert (fn? f)) (f))
(when (bound? this-var)
(let [value (var-get this-var)]
(when (extends? Testable (type value))
(filter-focused
(get-tests value))))))))
|
Use exception instead of string | (ns tenor.entities)
(defrecord Note [note-value pitch-letter octave])
(defn make-note [notation]
(let [notation-re #"^(1|2|4|8|16)([A-G])([#b]?)([1-9])$"
components (re-matches notation-re notation)]
(if components
(->Note
(Integer. (nth components 1))
(str (nth components 2) (nth components 3))
(Integer. (nth components 4)))
"Invalid notation")))
(defn time-signature [beat-count & [sig]]
(cond
(> beat-count 3)
(let [beats (rand-nth [2 3 4])
sig (concat (or sig '()) (range 1 (inc beats)))]
(time-signature (- beat-count beats) sig))
(and (<= beat-count 3) (> beat-count 0))
(let [sig (concat (or sig '()) (range 1 (inc beat-count)))]
(time-signature 0 sig))
:else sig))
| (ns tenor.entities)
(defrecord Note [note-value pitch-letter octave])
(defn make-note [notation]
(let [notation-re #"^(1|2|4|8|16)([A-G])([#b]?)([1-9])$"
components (re-matches notation-re notation)]
(if components
(->Note
(Integer. (nth components 1))
(str (nth components 2) (nth components 3))
(Integer. (nth components 4)))
(throw (Exception. "Invalid notation")))))
(defn time-signature [beat-count & [sig]]
(cond
(> beat-count 3)
(let [beats (rand-nth [2 3 4])
sig (concat (or sig '()) (range 1 (inc beats)))]
(time-signature (- beat-count beats) sig))
(and (<= beat-count 3) (> beat-count 0))
(let [sig (concat (or sig '()) (range 1 (inc beat-count)))]
(time-signature 0 sig))
:else sig))
|
Use -> to simply main function...again | (ns whitman.core
(:require [whitman.config :as config])
(:gen-class))
(defn exit [code msg]
(binding [*out* *err*]
(do (println msg)
(System/exit code))))
(defn -main [& args]
(if (< (count args) 1)
(exit 1 "No configuration file specified")
(let [cfg (-> (nth args 0)
config/read-config)
user-agent (get cfg "user-agent")]
(println cfg))))
| (ns whitman.core
(:require [whitman.config :as config])
(:gen-class))
(defn exit [code msg]
(binding [*out* *err*]
(do (println msg)
(System/exit code))))
(defn -main [& args]
(if (< (count args) 1)
(exit 1 "No configuration file specified")
(-> (nth args 0)
config/read-config
println)))
|
Add partial testing to the hazelcast mesh | (ns puppetlabs.cthun.meshing.hazelcast-test
(require [clojure.test :refer :all]
[puppetlabs.cthun.meshing.hazelcast :refer :all]))
| (ns puppetlabs.cthun.meshing.hazelcast-test
(require [clojure.test :refer :all]
[puppetlabs.cthun.meshing.hazelcast :refer :all]))
(deftest broker-for-endpoint-test
(with-redefs [flatten-location-map (fn [_] [{:broker "bill" :endpoint "cth://localhost/agent"}
{:broker "ted" :endpoint "cth://localhost/agent"}
{:broker "bill" :endpoint "cth://localhost/controller"}])]
(testing "it finds the controller"
(is (= "bill" (broker-for-endpoint nil "cth://localhost/controller"))))
(testing "it finds the agent"
(is (= "bill" (broker-for-endpoint nil "cth://localhost/agent"))))
(testing "it won't find something absent"
(is (not (broker-for-endpoint nil "cth://localhost/no-suchagent"))))))
|
Rename reader variable to reader | (ns hu.ssh.github-changelog.dependencies.bundler
(:require
[clojure.string :refer [split-lines]]
[clojure.java.io :refer [reader]]))
(defn- get-specs [reader]
(->> (doall (line-seq reader))
(drop-while #(not= % " specs:"))
(drop 1)
(take-while seq)))
(defn- parse-spec [spec]
{:name (second spec) :version (nth spec 2)})
(defn- parse-specs [specs]
(->> (map #(re-matches #"^\s{4}(\S+) \((.*)\)$" %) specs)
(remove empty?)
(map parse-spec)))
(defn parse [file]
(with-open [rdr (reader file)]
(parse-specs (get-specs rdr))))
| (ns hu.ssh.github-changelog.dependencies.bundler
(:require
[clojure.string :refer [split-lines]]
[clojure.java.io :as io]))
(defn- get-specs [reader]
(->> (doall (line-seq reader))
(drop-while #(not= % " specs:"))
(drop 1)
(take-while seq)))
(defn- parse-spec [spec]
{:name (second spec) :version (nth spec 2)})
(defn- parse-specs [specs]
(->> (map #(re-matches #"^\s{4}(\S+) \((.*)\)$" %) specs)
(remove empty?)
(map parse-spec)))
(defn parse [file]
(with-open [reader (io/reader file)]
(parse-specs (get-specs reader))))
|
Load schema.core early, to ensure that class EnumSchema exists | (ns user
(:use
clojure.repl
io.aviso.repl
speclj.config))
(install-pretty-exceptions)
(alter-var-root #'default-config assoc :color true :reporters ["documentation"])
| (ns user
(:use
clojure.repl
io.aviso.repl
speclj.config)
(:require
;; If not present, then test suite fails loading schema-validation with a ClassNotFound on EnumSchema
;; Leaky abstractions ...
schema.core))
(install-pretty-exceptions)
(alter-var-root #'default-config assoc :color true :reporters ["documentation"])
|
Call handler with one worker | (ns cljs-workers.core
(:require [cljs.core.async :refer [chan]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn supported?
[]
(-> js/Worker
undefined?
not))
(defn create-one
[script]
(js/Worker. script))
(defn create-pool
([]
(pool 5))
([count]
(pool count "js/compiled/workers.js"))
([count script]
(let [workers (chan count)]
(go
(dotimes [_ count]
(>! workers (create-one script))))
workers)))
(defn- do-request!
[worker {:keys [handler arguments transfer] :as request}]
(let [message
(-> {:handler handler, :arguments arguments}
clj->js)
transfer
(->> transfer
(select-keys arguments)
vals)]
(if (seq transfer)
(.postMessage worker message (clj->js transfer))
(.postMessage worker message))))
(defn- handle-response!
[event]
(-> (.-data event)
(js->clj :keywordize-keys true)))
| (ns cljs-workers.core
(:require [cljs.core.async :refer [chan]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn supported?
[]
(-> js/Worker
undefined?
not))
(defn create-one
[script]
(js/Worker. script))
(defn create-pool
([]
(pool 5))
([count]
(pool count "js/compiled/workers.js"))
([count script]
(let [workers (chan count)]
(go
(dotimes [_ count]
(>! workers (create-one script))))
workers)))
(defn- do-request!
[worker {:keys [handler arguments transfer] :as request}]
(let [message
(-> {:handler handler, :arguments arguments}
clj->js)
transfer
(->> transfer
(select-keys arguments)
vals)]
(if (seq transfer)
(.postMessage worker message (clj->js transfer))
(.postMessage worker message))))
(defn- handle-response!
[event]
(-> (.-data event)
(js->clj :keywordize-keys true)))
(defn do-with-worker!
([worker request]
(do-with-worker! worker request nil))
([worker {:keys [handler arguments transfer] :as request} fun]
(when fun
(->> (comp fun handle-response!)
(aset worker "onmessage")))
(try
(do-request! worker request)
(catch js/Object e
(when fun
(fun {:state :error, :error e}))))))
|
Update to field to be sequence rather than comma delimitted. | (ns open-company.lib.email
(:require [amazonica.aws.sqs :as sqs]
[taoensso.timbre :as timbre]
[schema.core :as schema]
[open-company.config :as c]))
(def EmailTrigger
{:to schema/Str
:subject schema/Str
:note schema/Str
:reply-to (schema/maybe schema/Str)
:company-slug schema/Str
:snapshot {schema/Keyword schema/Any}})
(defn ctx->trigger [post-data {company :company user :user su :stakeholder-update}]
{:pre [
(string? (:to post-data))
(string? (:subject post-data))
(string? (:note post-data))
(map? company)
(map? user)
(map? su)]}
{:to (:to post-data)
:subject (:subject post-data)
:note (:note post-data)
:reply-to (:email user)
:company-slug (:slug company)
:snapshot su})
(defn send-trigger! [trigger]
(timbre/info "Request to send msg to " c/aws-sqs-email-queue "\n" (dissoc trigger :snapshot))
(schema/validate EmailTrigger trigger)
(timbre/info "Sending")
(sqs/send-message
{:access-key c/aws-access-key-id
:secret-key c/aws-secret-access-key}
c/aws-sqs-email-queue
trigger)) | (ns open-company.lib.email
(:require [amazonica.aws.sqs :as sqs]
[taoensso.timbre :as timbre]
[schema.core :as schema]
[open-company.config :as c]))
(def EmailTrigger
{:to [schema/Str]
:subject schema/Str
:note schema/Str
:reply-to (schema/maybe schema/Str)
:company-slug schema/Str
:snapshot {schema/Keyword schema/Any}})
(defn ctx->trigger [post-data {company :company user :user su :stakeholder-update}]
{:pre [
(sequential? (:to post-data))
(string? (:subject post-data))
(string? (:note post-data))
(map? company)
(map? user)
(map? su)]}
{:to (:to post-data)
:subject (:subject post-data)
:note (:note post-data)
:reply-to (:email user)
:company-slug (:slug company)
:snapshot su})
(defn send-trigger! [trigger]
(timbre/info "Request to send msg to " c/aws-sqs-email-queue "\n" (dissoc trigger :snapshot))
(schema/validate EmailTrigger trigger)
(timbre/info "Sending")
(sqs/send-message
{:access-key c/aws-access-key-id
:secret-key c/aws-secret-access-key}
c/aws-sqs-email-queue
trigger)) |
Change response content type to application/json | (ns obb-rules-api.reply
(:require [compojure.handler :as handler]
[clojure.data.json :as json]
[obb-rules.result :as result]
[obb-rules-api.parser :as parser]
[compojure.route :as route]))
(defn- make-response
"Builds a response"
[status-code obj]
{:status status-code
:headers {"Content-Type" "text/json; charset=utf-8"}
:body (parser/dump obj)})
(defn ok
"Returns HTTP 200 response"
[obj]
(make-response 200 obj))
(defn exception
"Returns an exception"
[exception]
(make-response 500 {:exception (.getMessage exception)}))
(defn not-found
"Returns HTTP 404 response"
[]
(make-response 404 {:error "Resource not found"}))
(defn precondition-failed
"Returns HTTP 412 response"
[error-description]
(make-response 412 {:error error-description}))
(defn result
"Returns based on the given result"
[result]
(if (result/succeeded? result)
(ok result)
(make-response 412 result)))
| (ns obb-rules-api.reply
(:require [compojure.handler :as handler]
[clojure.data.json :as json]
[obb-rules.result :as result]
[obb-rules-api.parser :as parser]
[compojure.route :as route]))
(defn- make-response
"Builds a response"
[status-code obj]
{:status status-code
:headers {"Content-Type" "application/json; charset=utf-8"}
:body (parser/dump obj)})
(defn ok
"Returns HTTP 200 response"
[obj]
(make-response 200 obj))
(defn exception
"Returns an exception"
[exception]
(make-response 500 {:exception (.getMessage exception)}))
(defn not-found
"Returns HTTP 404 response"
[]
(make-response 404 {:error "Resource not found"}))
(defn precondition-failed
"Returns HTTP 412 response"
[error-description]
(make-response 412 {:error error-description}))
(defn result
"Returns based on the given result"
[result]
(if (result/succeeded? result)
(ok result)
(make-response 412 result)))
|
Remove the cosine-2 test series and replace with a sawtooth series for identiying sign issues. | (def start-t (System/currentTimeMillis))
(defsensor sine {:poll-interval (seconds 10)}
(Math/sin (/ (- (System/currentTimeMillis) start-t) 60000.0)))
(defsensor cosine {:poll-interval (seconds 10)}
(Math/cos (/ (- (System/currentTimeMillis) start-t) 60000.0)))
(defsensor cosine-2 {:poll-interval (seconds 5)}
(Math/cos (/ (- (System/currentTimeMillis) start-t) 30000.0)))
| (def start-t (System/currentTimeMillis))
(defsensor sine {:poll-interval (seconds 10)}
(Math/sin (/ (- (System/currentTimeMillis) start-t) (minutes 1))))
(defsensor cosine {:poll-interval (seconds 10)}
(Math/cos (/ (- (System/currentTimeMillis) start-t) (minutes 1))))
(defsensor steps-ascending {:poll-interval (seconds 5)}
(mod (/ (- (System/currentTimeMillis) start-t) (minutes 2))
3))
|
Add name attribute to metadata categories | (ns cglossa.models.core
(:require [datomic.api :as d]
[datomic-schema.schema :refer [part schema fields]]))
(def db-uri "datomic:free://localhost:4334/glossa")
(defn dbparts []
[(part "glossa")])
(defn dbschema []
[(schema corpus
(fields
[name :string]
[short-name :string :unique-identity]
[metadata-categories :ref :many]))
(schema metadata-category
(fields
[short-nane :string]
[widget-type :enum [:list :range]]
[values :ref :many "One or more text-values, bool-values or numeric-values"]
[text-value :string]
[bool-value :boolean]
[numeric-value :long]))
(schema search
(fields
[corpus :ref :one]
[queries :string :many]))])
(defn current-db []
(d/db (d/connect db-uri)))
(defn find-by
"Finds the first entity with the given value for the given Datomic attribute
(e.g. :person/name) in the given (or by default the current) database."
([attr value]
(find-by attr value (current-db)))
([attr value db]
(let [ids (d/q '[:find ?e :in $ ?a ?v :where [?e ?a ?v]] db attr value)]
(d/entity db (ffirst ids)))))
| (ns cglossa.models.core
(:require [datomic.api :as d]
[datomic-schema.schema :refer [part schema fields]]))
(def db-uri "datomic:free://localhost:4334/glossa")
(defn dbparts []
[(part "glossa")])
(defn dbschema []
[(schema corpus
(fields
[name :string]
[short-name :string :unique-identity]
[metadata-categories :ref :many]))
(schema metadata-category
(fields
[short-nane :string]
[name :string]
[widget-type :enum [:list :range]]
[values :ref :many "One or more text-values, bool-values or numeric-values"]
[text-value :string]
[bool-value :boolean]
[numeric-value :long]))
(schema search
(fields
[corpus :ref :one]
[queries :string :many]))])
(defn current-db []
(d/db (d/connect db-uri)))
(defn find-by
"Finds the first entity with the given value for the given Datomic attribute
(e.g. :person/name) in the given (or by default the current) database."
([attr value]
(find-by attr value (current-db)))
([attr value db]
(let [ids (d/q '[:find ?e :in $ ?a ?v :where [?e ?a ?v]] db attr value)]
(d/entity db (ffirst ids)))))
|
Add lein-ancient plugin and set "provided" scope for clojure. | (defproject buddy/buddy-hashers "0.4.2"
:description "A collection of secure password hashers for Clojure"
:url "https://github.com/funcool/buddy-hashers"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.6.0"]
[buddy/buddy-core "0.5.0"]
[clojurewerkz/scrypt "1.2.0"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
| (defproject buddy/buddy-hashers "0.4.2"
:description "A collection of secure password hashers for Clojure"
:url "https://github.com/funcool/buddy-hashers"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "provided"]
[buddy/buddy-core "0.5.0"]
[clojurewerkz/scrypt "1.2.0"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"]
:profiles {:dev {:plugins [[lein-ancient "0.6.7"]]}})
|
Fix api port number after removing mobile server | (ns braid.base.conf
(:require
[braid.base.conf-extra :refer [ports-config]]
[braid.core.hooks :as hooks]
[mount.core :as mount :refer [defstate]]))
(defonce config-vars
(hooks/register! (atom []) [keyword?]))
(defstate config
:start
(merge ;; temp defaults
;; TODO don't special case these here
;; ports should come from config
{:db-url "datomic:mem://braid"
:api-domain (str "localhost:" (:port (mount/args)))
:site-url (str "http://localhost:" (:port (mount/args)))
:hmac-secret "secret"}
@ports-config ; overrides api-domain & site url when port is automatically found
(select-keys (mount/args) @config-vars)))
| (ns braid.base.conf
(:require
[braid.base.conf-extra :refer [ports-config]]
[braid.core.hooks :as hooks]
[mount.core :as mount :refer [defstate]]))
(defonce config-vars
(hooks/register! (atom []) [keyword?]))
(defstate config
:start
(merge ;; temp defaults
;; TODO don't special case these here
;; ports should come from config
{:db-url "datomic:mem://braid"
:api-domain (str "localhost:" (inc (:port (mount/args))))
:site-url (str "http://localhost:" (:port (mount/args)))
:hmac-secret "secret"}
@ports-config ; overrides api-domain & site url when port is automatically found
(select-keys (mount/args) @config-vars)))
|
Use the 0.1.0 release of boot-junit | (set-env!
:source-paths #{"src/main/java" "src/test/java"}
:dependencies '[[radicalzephyr/boot-junit "0.1.0-SNAPSHOT" :scope "test"]])
(def +version+ "0.1.0")
(require '[radicalzephyr.boot-junit :refer [junit]])
(task-options!
pom {:project 'http-server
:version +version+
:description "A Java HTTP server."
:url "https://github.com/RadicalZephyr/http-server"
:scm {:url "https://github.com/RadicalZephyr/http-server.git"}
:licens {"MIT" "http://opensource.org/licenses/MIT"}}
jar {:file "server.jar"}
junit {:packages '#{net.zephyrizing.http_server}})
(deftask test
"Compile and run my jUnit tests."
[]
(comp (javac)
(junit)))
(deftask build
"Build my http server."
[]
(comp (javac)
(pom)
(jar)))
| (set-env!
:source-paths #{"src/main/java" "src/test/java"}
:dependencies '[[radicalzephyr/boot-junit "0.1.0" :scope "test"]])
(def +version+ "0.1.0")
(require '[radicalzephyr.boot-junit :refer [junit]])
(task-options!
pom {:project 'http-server
:version +version+
:description "A Java HTTP server."
:url "https://github.com/RadicalZephyr/http-server"
:scm {:url "https://github.com/RadicalZephyr/http-server.git"}
:licens {"MIT" "http://opensource.org/licenses/MIT"}}
jar {:file "server.jar"}
junit {:packages '#{net.zephyrizing.http_server}})
(deftask test
"Compile and run my jUnit tests."
[]
(comp (javac)
(junit)))
(deftask build
"Build my http server."
[]
(comp (javac)
(pom)
(jar)))
|
Remove controller ns from namespace list | (set-env!
:source-paths #{"src" "src-java"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/test.check "0.9.0" :scope "test"]
; project deps
[org.clojure/clojure "1.9.0-alpha7"]
[leiningen "2.6.1" :exclusions [leiningen.search]]
[ring "1.4.0"]
[clojail "1.0.6"]])
(task-options!
pom {:project 'nightcode
:version "2.0.0-SNAPSHOT"}
aot {:namespace '#{net.sekao.nightcode.core
net.sekao.nightcode.controller
net.sekao.nightcode.lein}}
jar {:main 'net.sekao.nightcode.core
:manifest {"Description" "An IDE for Clojure and ClojureScript"
"Url" "https://github.com/oakes/Nightcode"}})
(deftask run []
(comp
(javac)
(aot)
(with-pre-wrap fileset
(require '[net.sekao.nightcode.core :refer [dev-main]])
((resolve 'dev-main))
fileset)))
(deftask run-repl []
(comp
(javac)
(aot)
(repl :init-ns 'net.sekao.nightcode.core)))
(deftask build []
(comp (javac) (aot) (pom) (uber) (jar) (target)))
| (set-env!
:source-paths #{"src" "src-java"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/test.check "0.9.0" :scope "test"]
; project deps
[org.clojure/clojure "1.9.0-alpha7"]
[leiningen "2.6.1" :exclusions [leiningen.search]]
[ring "1.4.0"]
[clojail "1.0.6"]])
(task-options!
pom {:project 'nightcode
:version "2.0.0-SNAPSHOT"}
aot {:namespace '#{net.sekao.nightcode.core
net.sekao.nightcode.lein}}
jar {:main 'net.sekao.nightcode.core
:manifest {"Description" "An IDE for Clojure and ClojureScript"
"Url" "https://github.com/oakes/Nightcode"}})
(deftask run []
(comp
(javac)
(aot)
(with-pre-wrap fileset
(require '[net.sekao.nightcode.core :refer [dev-main]])
((resolve 'dev-main))
fileset)))
(deftask run-repl []
(comp
(javac)
(aot)
(repl :init-ns 'net.sekao.nightcode.core)))
(deftask build []
(comp (javac) (aot) (pom) (uber) (jar) (target)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.