Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Fix day 2 commenting-out to make docstring accurate
(ns advent-of-code-day-2.core (:require [clojure.string :as string] [clojure.math.combinatorics :as combo]) (:gen-class)) (defn parse-dimensions [dimensions-string] (map #(Integer/parseInt %) (string/split dimensions-string #"x"))) ;(defn calc-face-areas [dimensions] ; ;; this version doesn’t work – ; ;; combo/combinations “helpfully” throws out duplicate combinations, ; ;; so input [1 1 10] results in two face areas instead of three ; (map (partial apply *) (combo/combinations dimensions 2))) (defn calc-face-areas [[l h w]] [(* l h) (* l w) (* h w)]) (defn wrapping-area [dimensions] (let [face-areas (calc-face-areas dimensions) smallest-face-area (apply min face-areas) surface-area (* 2 (apply + face-areas))] (+ surface-area smallest-face-area))) (defn ribbon-length [dimensions] (let [present-length (* 2 (apply + (take 2 (sort dimensions)))) bow-length (apply * dimensions)] (+ present-length bow-length))) (defn -main "Print total wrapping paper needed given present dimensions." [& args] (->> (slurp *in*) (string/split-lines) (map parse-dimensions) #_(map wrapping-area) (map ribbon-length) (reduce +) (println)))
(ns advent-of-code-day-2.core (:require [clojure.string :as string] [clojure.math.combinatorics :as combo]) (:gen-class)) (defn parse-dimensions [dimensions-string] (map #(Integer/parseInt %) (string/split dimensions-string #"x"))) ;(defn calc-face-areas [dimensions] ; ;; this version doesn’t work – ; ;; combo/combinations “helpfully” throws out duplicate combinations, ; ;; so input [1 1 10] results in two face areas instead of three ; (map (partial apply *) (combo/combinations dimensions 2))) (defn calc-face-areas [[l h w]] [(* l h) (* l w) (* h w)]) (defn wrapping-area [dimensions] (let [face-areas (calc-face-areas dimensions) smallest-face-area (apply min face-areas) surface-area (* 2 (apply + face-areas))] (+ surface-area smallest-face-area))) (defn ribbon-length [dimensions] (let [present-length (* 2 (apply + (take 2 (sort dimensions)))) bow-length (apply * dimensions)] (+ present-length bow-length))) (defn -main "Print total wrapping paper needed given present dimensions." [& args] (->> (slurp *in*) (string/split-lines) (map parse-dimensions) (map wrapping-area) #_(map ribbon-length) (reduce +) (println)))
Fix for lein gorilla not working with my setup
;;;; This file is part of gorilla-repl. Copyright (C) 2014-, Jony Hudson. ;;;; ;;;; gorilla-repl is licenced to you under the MIT licence. See the file LICENCE.txt for full details. (defproject gorilla-repl "0.3.3-SNAPSHOT" :description "A rich REPL for Clojure in the notebook style." :url "https://github.com/JonyEpsilon/gorilla-repl" :license {:name "MIT"} :dependencies [[org.clojure/clojure "1.6.0"] [http-kit "2.1.16"] [ring/ring-json "0.2.0"] [cheshire "5.0.2"] [compojure "1.1.6"] [org.slf4j/slf4j-api "1.7.5"] [ch.qos.logback/logback-classic "1.0.13"] [clojure-complete "0.2.3"] [gorilla-renderable "1.0.0"] [org.clojure/data.codec "0.1.0"] [grimradical/clj-semver "0.2.0" :exclusions [org.clojure/clojure]]] :main ^:skip-aot gorilla-repl.core :target-path "target/%s" :profiles {:uberjar {:aot :all}})
;;;; This file is part of gorilla-repl. Copyright (C) 2014-, Jony Hudson. ;;;; ;;;; gorilla-repl is licenced to you under the MIT licence. See the file LICENCE.txt for full details. (defproject gorilla-repl "0.3.3-SNAPSHOT" :description "A rich REPL for Clojure in the notebook style." :url "https://github.com/JonyEpsilon/gorilla-repl" :license {:name "MIT"} :dependencies [[org.clojure/clojure "1.6.0"] [http-kit "2.1.16"] [ring/ring-json "0.3.1"] [cheshire "5.0.2"] [compojure "1.1.8"] [org.slf4j/slf4j-api "1.7.5"] [ch.qos.logback/logback-classic "1.0.13"] [clojure-complete "0.2.3"] [gorilla-renderable "1.0.0"] [org.clojure/data.codec "0.1.0"] [javax.servlet/servlet-api "2.5"] [grimradical/clj-semver "0.2.0" :exclusions [org.clojure/clojure]]] :main ^:skip-aot gorilla-repl.core :target-path "target/%s" :profiles {:uberjar {:aot :all}})
Revert back to snapshot version.
(defproject cli4clj "1.2.4" ;(defproject cli4clj "1.2.4-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.2" :exclusions [org.clojure/clojure]]]}} )
;(defproject cli4clj "1.2.4" (defproject cli4clj "1.2.5-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.2" :exclusions [org.clojure/clojure]]]}} )
Prepare for next release cycle.
(defproject org.onyxplatform/onyx-metrics "0.8.0.8" :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"] [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.9-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"] [riemann-clojure-client "0.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 onyx-app/lein-template "0.13.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.13.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)
Set default clojure version to 1.7.0
(defproject buddy/buddy-core "0.6.0" :description "Cryptographic Api for Clojure." :url "https://github.com/funcool/buddy-core" :license {:name "Apache 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :dependencies [[org.clojure/clojure "1.6.0"] [commons-codec/commons-codec "1.10"] [org.bouncycastle/bcprov-jdk15on "1.52"] [slingshot "0.12.2"] [org.bouncycastle/bcpkix-jdk15on "1.52"]] :source-paths ["src"] :test-paths ["test"] :jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"] :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"] :profiles {:dev {:codeina {:sources ["src"] :exclude [buddy.core.sign.impl] :language :clojure :output-dir "doc/dist/latest/api" :src-dir-uri "http://github.com/funcool/buddy-core/blob/master/" :src-linenum-anchor-prefix "L"} :plugins [[funcool/codeina "0.1.0-SNAPSHOT" :exclusions [org.clojure/clojure]]]}})
(defproject buddy/buddy-core "0.6.0" :description "Cryptographic Api for Clojure." :url "https://github.com/funcool/buddy-core" :license {:name "Apache 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"] [commons-codec/commons-codec "1.10"] [org.bouncycastle/bcprov-jdk15on "1.52"] [slingshot "0.12.2"] [org.bouncycastle/bcpkix-jdk15on "1.52"]] :source-paths ["src"] :test-paths ["test"] :jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"] :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"] :profiles {:dev {:codeina {:sources ["src"] :exclude [buddy.core.sign.impl] :language :clojure :output-dir "doc/dist/latest/api" :src-dir-uri "http://github.com/funcool/buddy-core/blob/master/" :src-linenum-anchor-prefix "L"} :plugins [[funcool/codeina "0.1.0-SNAPSHOT" :exclusions [org.clojure/clojure]]]}})
Fix drop table to use plurals.
(ns clj-record.test.main (:require [clojure.contrib.sql :as sql] [clojure.contrib.test-is :as test-is] clj-record.config)) (defn drop-tables [] (try (sql/drop-table :manufacturer) (sql/drop-table :product) (catch Exception e))) (defn create-tables [] (sql/create-table :manufacturers [:id "INT" "GENERATED ALWAYS AS IDENTITY CONSTRAINT manufacturer_pk PRIMARY KEY"] [:name "VARCHAR(32)" "NOT NULL"] [:founded "VARCHAR(4)"] [:grade :real]) (sql/create-table :products [:id "INT" "GENERATED ALWAYS AS IDENTITY CONSTRAINT product_pk PRIMARY KEY"] [:name "VARCHAR(32)" "NOT NULL"] [:price "INT"] [:manufacturer_id "INT" "NOT NULL"])) (sql/with-connection clj-record.config/db (sql/transaction (drop-tables) (create-tables))) (println "Setup complete.") (load "core-test") (load "associations-test") (load "validation-test") (test-is/run-all-tests)
(ns clj-record.test.main (:require [clojure.contrib.sql :as sql] [clojure.contrib.test-is :as test-is] clj-record.config)) (defn drop-tables [] (try (sql/drop-table :manufacturers) (sql/drop-table :products) (catch Exception e))) (defn create-tables [] (sql/create-table :manufacturers [:id "INT" "GENERATED ALWAYS AS IDENTITY CONSTRAINT manufacturer_pk PRIMARY KEY"] [:name "VARCHAR(32)" "NOT NULL"] [:founded "VARCHAR(4)"] [:grade :real]) (sql/create-table :products [:id "INT" "GENERATED ALWAYS AS IDENTITY CONSTRAINT product_pk PRIMARY KEY"] [:name "VARCHAR(32)" "NOT NULL"] [:price "INT"] [:manufacturer_id "INT" "NOT NULL"])) (sql/with-connection clj-record.config/db (sql/transaction (drop-tables) (create-tables))) (println "Setup complete.") (load "core-test") (load "associations-test") (load "validation-test") (test-is/run-all-tests)
Use bootlaces for pushing to Clojars
(def project 'hangul-utils) (def version "0.1.0-SNAPSHOT") (set-env! :resource-paths #{"resources" "src"} :source-paths #{"test"} :dependencies '[[org.clojure/clojure "RELEASE"] [adzerk/boot-test "RELEASE" :scope "test"]]) (task-options! pom {:project project :version version :description "For splitting and Korean unicode characters (syllables, jaeum, moeum) in Clojure" :url "http://github.com/sooheon/hangul-utils" :scm {:url "https://github.com/sooheon/hangul-utils"} :license {"Eclipse Public License" "http://www.eclipse.org/legal/epl-v10.html"}}) (deftask build "Build and install the project locally." [] (comp (pom) (jar) (install))) (require '[adzerk.boot-test :refer [test]])
(def project 'hangul-utils) (def version "0.1.0-SNAPSHOT") (set-env! :resource-paths #{"resources" "src"} :source-paths #{"test"} :dependencies '[[org.clojure/clojure "RELEASE"] [adzerk/boot-test "RELEASE" :scope "test"] [adzerk/bootlaces "0.1.13"]]) (task-options! pom {:project project :version version :description "For splitting and Korean unicode characters (syllables, jaeum, moeum) in Clojure" :url "http://github.com/sooheon/hangul-utils" :scm {:url "https://github.com/sooheon/hangul-utils"} :license {"Eclipse Public License" "http://www.eclipse.org/legal/epl-v10.html"}}) (deftask build "Build and install the project locally." [] (comp (pom) (jar) (install))) (require '[adzerk.boot-test :refer [test]] '[adzerk.bootlaces :refer :all])
Update db-name to match new default
{:wrap-reload false :db-host "localhost" :db-name "mydb" :db-user nil :db-pwd nil :jetty-port 8080 :host "smtp.googlemail.com" :user "team@4clojure.com" :problem-submission true :advanced-user-count 50 :pass "" :repo-url "https://github.com/4clojure/4clojure" :hosts {;; :static "static.4clojure.com" ;; :dynamic "www.4clojure.com" :redirects ["4clojure.com"]} :golfing-active true :heartbeat nil ; set to, eg, [1 :hour] for periodic heap information on stdout ;; this list is just for bootstrapping - the real DB is authoritative :contributors ["amalloy" "dbyrne" "raynes" "cmeier" "devn" "0x89" "citizen428" "daviddavis" "clinteger" "amcnamara"]}
{:wrap-reload false :db-host "localhost" :db-name "4clojure" :db-user nil :db-pwd nil :jetty-port 8080 :host "smtp.googlemail.com" :user "team@4clojure.com" :problem-submission true :advanced-user-count 50 :pass "" :repo-url "https://github.com/4clojure/4clojure" :hosts {;; :static "static.4clojure.com" ;; :dynamic "www.4clojure.com" :redirects ["4clojure.com"]} :golfing-active true :heartbeat nil ; set to, eg, [1 :hour] for periodic heap information on stdout ;; this list is just for bootstrapping - the real DB is authoritative :contributors ["amalloy" "dbyrne" "raynes" "cmeier" "devn" "0x89" "citizen428" "daviddavis" "clinteger" "amcnamara"]}
Set default log level to warn
(ns yetibot.core.logging (:require [schema.core :as s] [yetibot.core.config :refer [get-config]] [yetibot.core.util :refer [with-fresh-db]] [yetibot.core.db.log :as log] [taoensso.timbre.appenders.3rd-party.rolling :refer [rolling-appender]] [taoensso.timbre.appenders.core :refer [println-appender]] [taoensso.timbre :as timbre :refer [trace debug info warn error fatal spy with-log-level]])) (def config-schema String) (defn log-level [] (let [v (get-config config-schema [:log :level])] (if (:error v) ;; default config level :warn (keyword (:value v))))) (defn rolling-appender-enabled? "Rolling appender is enabled by default. Disable it by setting enabled=false" [] (let [v (get-config String [:log :rolling :enabled])] (if-let [enabled (:value v)] (not= enabled "false") true))) (defn start [] (timbre/set-config! {:level (log-level) :appenders ;; stdout {:println (println-appender {:stream :auto}) ;; rolling log files :rolling-appender (rolling-appender {:enabled? (rolling-appender-enabled?) :path "/var/log/yetibot/yetibot.log" :pattern :daily})}}))
(ns yetibot.core.logging (:require [schema.core :as s] [yetibot.core.config :refer [get-config]] [yetibot.core.util :refer [with-fresh-db]] [yetibot.core.db.log :as log] [taoensso.timbre.appenders.3rd-party.rolling :refer [rolling-appender]] [taoensso.timbre.appenders.core :refer [println-appender]] [taoensso.timbre :as timbre :refer [trace debug info warn error fatal spy with-log-level]])) (def config-schema String) (defn log-level [] (let [v (get-config config-schema [:log :level])] (if (:error v) ;; default config level :info (keyword (:value v))))) (defn rolling-appender-enabled? "Rolling appender is enabled by default. Disable it by setting enabled=false" [] (let [v (get-config String [:log :rolling :enabled])] (if-let [enabled (:value v)] (not= enabled "false") true))) (defn start [] (timbre/set-config! {:level (log-level) :appenders ;; stdout {:println (println-appender {:stream :auto}) ;; rolling log files :rolling-appender (rolling-appender {:enabled? (rolling-appender-enabled?) :path "/var/log/yetibot/yetibot.log" :pattern :daily})}}))
Advance version number to 0.1.8
(defproject io.aviso/twixt "0.1.7" :description "An extensible asset pipeline for Clojure web applications" :url "https://github.com/AvisoNovate/twixt" :license {:name "Apache Sofware Licencse 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [ring/ring-core "1.2.1"] [org.mozilla/rhino "1.7R4"] [com.github.sommeri/less4j "1.2.1"] [de.neuland-bfi/jade4j "0.4.0"] [io.aviso/pretty "0.1.8"] [hiccup "1.0.4"]] :codox {:src-dir-uri "https://github.com/AvisoNovate/twixt/blob/master/" :src-linenum-anchor-prefix "L"} :profiles {:dev {:dependencies [[log4j "1.2.17"] [ring/ring-jetty-adapter "1.2.0"]]}})
(defproject io.aviso/twixt "0.1.8" :description "An extensible asset pipeline for Clojure web applications" :url "https://github.com/AvisoNovate/twixt" :license {:name "Apache Sofware Licencse 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [ring/ring-core "1.2.1"] [org.mozilla/rhino "1.7R4"] [com.github.sommeri/less4j "1.2.1"] [de.neuland-bfi/jade4j "0.4.0"] [io.aviso/pretty "0.1.8"] [hiccup "1.0.4"]] :codox {:src-dir-uri "https://github.com/AvisoNovate/twixt/blob/master/" :src-linenum-anchor-prefix "L"} :profiles {:dev {:dependencies [[log4j "1.2.17"] [ring/ring-jetty-adapter "1.2.0"]]}})
Increase heap size, add GC tuning flags
(defproject mars-ogler "1.0.1-SNAPSHOT" :description "Holy cow, it's Mars!" :url "http://github.com/aperiodic/mars-ogler" :license {:name "GNU Affero GPL" :url "http://www.gnu.org/licenses/agpl"} :dependencies [[org.clojure/clojure "1.4.0"] [org.clojure/tools.cli "0.2.2"] [cheshire "5.2.0"] [clj-http "0.6.3"] [clj-time "0.4.4"] [compojure "1.1.3"] [enlive "1.0.1"] [hiccup "1.0.0"] [ring/ring-core "1.1.6"] [ring/ring-jetty-adapter "1.1.6"]] :plugins [[lein-ring "0.7.1"]] :main mars-ogler.main :uberjar-name "mars-ogler.jar" :jvm-opts ["-Xmx576m"] :ring {:handler mars-ogler.routes/ogler-handler :init mars-ogler.images/setup!})
(defproject mars-ogler "1.0.1-SNAPSHOT" :description "Holy cow, it's Mars!" :url "http://github.com/aperiodic/mars-ogler" :license {:name "GNU Affero GPL" :url "http://www.gnu.org/licenses/agpl"} :dependencies [[org.clojure/clojure "1.4.0"] [org.clojure/tools.cli "0.2.2"] [cheshire "5.2.0"] [clj-http "0.6.3"] [clj-time "0.4.4"] [compojure "1.1.3"] [enlive "1.0.1"] [hiccup "1.0.0"] [ring/ring-core "1.1.6"] [ring/ring-jetty-adapter "1.1.6"]] :plugins [[lein-ring "0.7.1"]] :main mars-ogler.main :uberjar-name "mars-ogler.jar" :jvm-opts ["-Xmx850m" "-XX:+UseConcMarkSweepGC" "-XX:+CMSIncrementalMode" "-XX:+UseCompressedOops"] :ring {:handler mars-ogler.routes/ogler-handler :init mars-ogler.images/setup!})
Update app name for Heroku
(defproject try-clojure "0.1.0-SNAPSHOT" :min-lein-version "2.0.0" :description "Try Clojure" :url "http://try-clojure.herokuapp.com" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [ring "1.1.8"] [compojure "1.1.5"] [de.ubercode.clostache/clostache "1.3.1"]] :main try-clojure.core)
(defproject try-clojure "0.1.0-SNAPSHOT" :min-lein-version "2.0.0" :description "Try Clojure" :url "http://try-clojurescript.herokuapp.com" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [ring "1.1.8"] [compojure "1.1.5"] [de.ubercode.clostache/clostache "1.3.1"]] :main try-clojure.core)
Add java sources to tests
(defproject introspect "1.0.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"} :test-paths ["test/clj"] :source-paths ["src/clj"] :java-source-paths ["src/java"] :aot [introspect.core] :manifest {"Premain-class" "introspect.Premain" "Agent-class" "introspect.Premain" "Can-Redefine-Classes" "true" "Can-Retransform-Classes" "true"} :jvm-opts ["-noverify"] :profiles {:test {:dependencies [[org.clojure/tools.nrepl "0.2.7"]] :jvm-opts ["-noverify" ~(str "-javaagent:" (System/getProperty "user.dir") "/target/introspect-1.0.0-SNAPSHOT-standalone.jar=introspect.helpers.simple-functions")] }} :dependencies [[org.clojure/clojure "1.6.0"] [net.bytebuddy/byte-buddy-agent "0.5.3"] [net.bytebuddy/byte-buddy "0.5.3"]] )
(defproject introspect "1.0.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"} :test-paths ["test/clj" "test/java"] :source-paths ["src/clj"] :java-source-paths ["src/java" "test/java"] :aot [introspect.core] :manifest {"Premain-class" "introspect.Premain" "Agent-class" "introspect.Premain" "Can-Redefine-Classes" "true" "Can-Retransform-Classes" "true"} :jvm-opts ["-noverify"] :profiles {:test {:dependencies [[org.clojure/tools.nrepl "0.2.7"]] :jvm-opts ["-noverify" ~(str "-javaagent:" (System/getProperty "user.dir") "/target/introspect-1.0.0-SNAPSHOT-standalone.jar=introspect.helpers.simple-functions")] }} :dependencies [[org.clojure/clojure "1.6.0"] [net.bytebuddy/byte-buddy-agent "0.5.3"] [net.bytebuddy/byte-buddy "0.5.3"]] )
Update codeina dependency to 0.3.0.
(defproject buddy/buddy-core "0.6.0" :description "Cryptographic Api for Clojure." :url "https://github.com/funcool/buddy-core" :license {:name "Apache 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"] [commons-codec/commons-codec "1.10"] [org.bouncycastle/bcprov-jdk15on "1.52"] [org.bouncycastle/bcpkix-jdk15on "1.52"]] :source-paths ["src"] :test-paths ["test"] :jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"] :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"] :profiles {:dev {:codeina {:sources ["src"] :exclude [buddy.core.sign.impl] :reader :clojure :target "doc/dist/latest/api" :src-uri "http://github.com/funcool/buddy-core/blob/master/" :src-uri-prefix "#L"} :plugins [[funcool/codeina "0.2.0" :exclusions [org.clojure/clojure]] [lein-ancient "0.6.7"]]}})
(defproject buddy/buddy-core "0.6.0" :description "Cryptographic Api for Clojure." :url "https://github.com/funcool/buddy-core" :license {:name "Apache 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"] [commons-codec/commons-codec "1.10"] [org.bouncycastle/bcprov-jdk15on "1.52"] [org.bouncycastle/bcpkix-jdk15on "1.52"]] :source-paths ["src"] :test-paths ["test"] :jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"] :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"] :profiles {:dev {:codeina {:sources ["src"] :exclude [buddy.core.sign.impl] :reader :clojure :target "doc/dist/latest/api" :src-uri "http://github.com/funcool/buddy-core/blob/master/" :src-uri-prefix "#L"} :plugins [[funcool/codeina "0.3.0" :exclusions [org.clojure/clojure]] [lein-ancient "0.6.7"]]}})
Add env hooking for slack connection.
(ns slack-invite.core (:require [bidi.bidi :as b] [bidi.ring :refer (make-handler)] [clj-slack.core :as slack])) (defn showForm [request] {:status 200 :headers {"Content-Type" "text/html"} :body "<h1>Hello world!</h1>"}) (defn handleForm [request] ) (def routes ["/" {:get showForm :post handleForm}]) (def handler (make-handler routes))
(ns slack-invite.core (:require [bidi.bidi :as b] [bidi.ring :refer (make-handler)] [environ.core :refer [env]] [clj-slack.core :as slack])) (def slack-connection {:api-url (env :api-url) :token (env :api-token)}) (defn showForm [request] {:status 200 :headers {"Content-Type" "text/html"} :body "<h1>Hello world!</h1>"}) (defn handleForm [request] ) (def routes ["/" {:get showForm :post handleForm}]) (def handler (make-handler routes))
Remove unused resources dir form resource-paths.
(defproject rivulet "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojurescript "0.0-1885"] [enfocus "2.0.0-beta1"]] :source-paths ["src/clj"] :resource-paths ["src/js" "src/rb" "target/resources"] :plugins [[lein-cljsbuild "0.3.2"] [lein-vertx "0.1.0-SNAPSHOT"]] :profiles {:provided {:dependencies [[io.vertx/clojure-api "0.3.0-SNAPSHOT"]]}} :cljsbuild {:crossovers [rivulet.config] :builds [{:source-paths ["src/cljs"] :compiler {:output-to "resources/client.js"} :crossover-path "target/crossover-cljs"}]} :vertx {:main-fn rivulet.init/init})
(defproject rivulet "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojurescript "0.0-1885"] [enfocus "2.0.0-beta1"]] :source-paths ["src/clj"] :resource-paths ["src/js" "src/rb"] :plugins [[lein-cljsbuild "0.3.2"] [lein-vertx "0.1.0-SNAPSHOT"]] :profiles {:provided {:dependencies [[io.vertx/clojure-api "0.3.0-SNAPSHOT"]]}} :cljsbuild {:crossovers [rivulet.config] :builds [{:source-paths ["src/cljs"] :compiler {:output-to "resources/client.js"} :crossover-path "target/crossover-cljs"}]} :vertx {:main-fn rivulet.init/init})
Prepare for next release cycle.
(defproject onyx-app/lein-template "0.9.10.0-beta3" :description "Onyx Leiningen application template" :url "https://github.com/onyx-platform/onyx-template" :license {:name "MIT License" :url "http://choosealicense.com/licenses/mit/#"} :repositories {"snapshots" {:url "https://clojars.org/repo" :username :env :password :env :sign-releases false} "releases" {:url "https://clojars.org/repo" :username :env :password :env :sign-releases false}} :plugins [[lein-set-version "0.4.1"]] :profiles {:dev {:plugins [[lein-set-version "0.4.1"] [lein-update-dependency "0.1.2"] [lein-pprint "1.1.1"]]}} :eval-in-leiningen true)
(defproject onyx-app/lein-template "0.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)
Update Codox plugin to 0.9.4
(defproject compojure "1.4.0" :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.7.0"] [org.clojure/tools.macro "0.1.5"] [clout "2.1.2"] [medley "0.7.1"] [ring/ring-core "1.4.0"] [ring/ring-codec "1.0.0"]] :plugins [[lein-codox "0.9.3"]] :codox {:output-path "codox" :metadata {:doc/format :markdown} :source-uri "http://github.com/weavejester/compojure/blob/{version}/{filepath}#L{line}"} :profiles {:dev {:jvm-opts ^:replace [] :dependencies [[ring/ring-mock "0.3.0"] [criterium "0.4.3"] [javax.servlet/servlet-api "2.5"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})
(defproject compojure "1.4.0" :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.7.0"] [org.clojure/tools.macro "0.1.5"] [clout "2.1.2"] [medley "0.7.1"] [ring/ring-core "1.4.0"] [ring/ring-codec "1.0.0"]] :plugins [[lein-codox "0.9.4"]] :codox {:output-path "codox" :metadata {:doc/format :markdown} :source-uri "http://github.com/weavejester/compojure/blob/{version}/{filepath}#L{line}"} :profiles {:dev {:jvm-opts ^:replace [] :dependencies [[ring/ring-mock "0.3.0"] [criterium "0.4.3"] [javax.servlet/servlet-api "2.5"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})
Use ahead-of-time compilation for deployment
(defproject moves-server "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"} :plugins [[lein-ring "0.8.11"] [lein-environ "1.0.0"]] :ring {:handler moves-server.core/app} :dependencies [[org.clojure/clojure "1.6.0"] [ring/ring-core "1.3.2"] [clj-http "1.1.2"] [environ "1.0.0"] [ring/ring-jetty-adapter "1.3.2"]])
(defproject moves-server "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"} :profiles {:uberjar {:aot :all}} :plugins [[lein-ring "0.8.11"] [lein-environ "1.0.0"]] :ring {:handler moves-server.core/app} :dependencies [[org.clojure/clojure "1.6.0"] [ring/ring-core "1.3.2"] [clj-http "1.1.2"] [environ "1.0.0"] [ring/ring-jetty-adapter "1.3.2"]])
Prepare for 0.2.0 instead of 0.1.1
(defproject reiddraper/simple-check "0.1.1-SNAPSHOT" :description "A QuickCheck inspired property-based testing library." :url "http://github.com/reiddraper/simple-check" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.0"]] :plugins [[codox "0.6.4"]])
(defproject reiddraper/simple-check "0.2.0-SNAPSHOT" :description "A QuickCheck inspired property-based testing library." :url "http://github.com/reiddraper/simple-check" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.0"]] :plugins [[codox "0.6.4"]])
Upgrade to Midje 1.9.1 nd lein-midje 3.2.1
(defproject com.nomistech/clojure-the-language "0.1.0-SNAPSHOT" :dependencies [[cheshire "5.4.0"] [com.climate/claypoole "1.1.4"] [com.taoensso/timbre "4.8.0"] [org.clojure/clojure "1.9.0"] [org.clojure/core.async "0.3.442"] [org.clojure/core.match "0.3.0-alpha4"] [prismatic/schema "1.0.5"] [slingshot "0.12.2"]] :repl-options {:init-ns user} :profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.11"] [midje "1.7.0"]] :source-paths ["dev"] :plugins [[lein-midje "3.1.3"]]}})
(defproject com.nomistech/clojure-the-language "0.1.0-SNAPSHOT" :dependencies [[cheshire "5.4.0"] [com.climate/claypoole "1.1.4"] [com.taoensso/timbre "4.8.0"] [org.clojure/clojure "1.9.0"] [org.clojure/core.async "0.3.442"] [org.clojure/core.match "0.3.0-alpha4"] [prismatic/schema "1.0.5"] [slingshot "0.12.2"]] :repl-options {:init-ns user} :profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.11"] [midje "1.9.1"]] :source-paths ["dev"] :plugins [[lein-midje "3.2.1"]]}})
Update dependency org.onyxplatform/onyx to version 0.7.3-20150828_152050-gd122e3e.
(defproject org.onyxplatform/onyx-sql "0.7.3-SNAPSHOT" :description "Onyx plugin for JDBC-backed SQL databases" :url "https://github.com/MichaelDrogalis/onyx-sql" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/java.jdbc "0.3.3"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.7.3-20150827_202930-g49ef67c"] [java-jdbc/dsl "0.1.3"] [com.mchange/c3p0 "0.9.2.1"] [honeysql "0.5.1"]] :profiles {:dev {:dependencies [[midje "1.7.0"] [environ "1.0.0"] [mysql/mysql-connector-java "5.1.25"]] :plugins [[lein-midje "3.1.3"]]} :circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject org.onyxplatform/onyx-sql "0.7.3-SNAPSHOT" :description "Onyx plugin for JDBC-backed SQL databases" :url "https://github.com/MichaelDrogalis/onyx-sql" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/java.jdbc "0.3.3"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.7.3-20150828_152050-gd122e3e"] [java-jdbc/dsl "0.1.3"] [com.mchange/c3p0 "0.9.2.1"] [honeysql "0.5.1"]] :profiles {:dev {:dependencies [[midje "1.7.0"] [environ "1.0.0"] [mysql/mysql-connector-java "5.1.25"]] :plugins [[lein-midje "3.1.3"]]} :circle-ci {:jvm-opts ["-Xmx4g"]}})
Add swank to deps, so we can use it on heroku
(defproject circleci "0.1.0-SNAPSHOT" :description "FIXME: write this!" :dependencies [[org.clojure/clojure "1.2.1"] [noir "1.1.0"] [enlive "1.0.0"]] :main circleci.server)
(defproject circleci "0.1.0-SNAPSHOT" :description "FIXME: write this!" :dependencies [[org.clojure/clojure "1.2.1"] [noir "1.1.0"] [enlive "1.0.0"] [swank-clojure "1.3.2"]] :main circleci.server)
Prepare for next release cycle.
(defproject org.onyxplatform/onyx-datomic "0.10.0.0-alpha4" :description "Onyx plugin for Datomic" :url "https://github.com/onyx-platform/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.8.0"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.10.0-alpha4"]] :test-selectors {:default (complement :ci) :ci :ci :all (constantly true)} :profiles {:dev {:dependencies [[com.datomic/datomic-free "0.9.5544"] [aero "0.2.0"]] :plugins [[lein-set-version "0.4.1"] [lein-update-dependency "0.1.2"] [lein-pprint "1.1.1"]] :resource-paths ["test-resources/"]} :circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject org.onyxplatform/onyx-datomic "0.10.0.0-SNAPSHOT" :description "Onyx plugin for Datomic" :url "https://github.com/onyx-platform/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.8.0"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.10.0-alpha4"]] :test-selectors {:default (complement :ci) :ci :ci :all (constantly true)} :profiles {:dev {:dependencies [[com.datomic/datomic-free "0.9.5544"] [aero "0.2.0"]] :plugins [[lein-set-version "0.4.1"] [lein-update-dependency "0.1.2"] [lein-pprint "1.1.1"]] :resource-paths ["test-resources/"]} :circle-ci {:jvm-opts ["-Xmx4g"]}})
Make javax.servlet/servlet-api a runtime dependency
(defproject padawan "0.1.0" :description "Multiplayer Clojure web REPL for teaching and learning" :url "http://github.com/mkremins/padawan" :license {:name "MIT License" :url "http://opensource.org/licenses/MIT" :distribution :repo} :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/data.json "0.2.4"] [compojure "1.1.6"] [http-kit "2.1.18"] [ring/ring-core "1.2.2"]] :profiles {:dev {:dependencies [[javax.servlet/servlet-api "2.5"]]}} :main padawan.core)
(defproject padawan "0.1.0" :description "Multiplayer Clojure web REPL for teaching and learning" :url "http://github.com/mkremins/padawan" :license {:name "MIT License" :url "http://opensource.org/licenses/MIT" :distribution :repo} :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/data.json "0.2.4"] [compojure "1.1.6"] [http-kit "2.1.18"] [javax.servlet/servlet-api "2.5"] [ring/ring-core "1.2.2"]] :main padawan.core)
Add in javadoc alias, constrain deploy branches.
(defproject com.hypirion/io "0.3.0-SNAPSHOT" :description "I/O classes in Java for those with specific needs." :url "https://github.com/hyPiRion/com.hypirion.io" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :source-paths [] :java-source-paths ["src"])
(defproject com.hypirion/io "0.3.0-SNAPSHOT" :description "I/O classes in Java for those with specific needs." :url "https://github.com/hyPiRion/com.hypirion.io" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :source-paths [] :java-source-paths ["src"] :deploy-branches ["stable"] :profiles {:dev {:plugins [[lein-shell "0.2.0"]] :aliases {"javadoc" ["shell" "javadoc" "-d" "0.3.0-SNAPSHOT" "-sourcepath" "src/" "com.hypirion.io"]}}})
Prepare for next release cycle.
(defproject onyx-app/lein-template "0.11.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.11.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 data source key used in simple text widget
(ns dashboard-clj.widgets.simple-text (:require [reagent.core :as r :refer [atom]] [dashboard-clj.widgets.core :as widget-common])) (defmethod widget-common/widget :simple-text [{:keys [text data] :as w}] [:div {:class "simple-text-widget"} [:span {:class "title"} (:title w)] [:div {:class "data"} [:span (get-in @data [:value]) (:text w)]] ])
(ns dashboard-clj.widgets.simple-text (:require [reagent.core :as r :refer [atom]] [dashboard-clj.widgets.core :as widget-common])) (defmethod widget-common/widget :simple-text [{:keys [text data] :as w}] [:div {:class "simple-text-widget"} [:span {:class "title"} (:title w)] [:div {:class "data"} [:span (get-in @data [:data]) (:text w)]] ])
Fix issue where expt followed by division could result in error.
(ns warreq.kea.calc.math (:require [clojure.math.numeric-tower :refer [expt]] [neko.notify :refer [toast]] [warreq.kea.calc.util :as u]) (:import java.math.BigDecimal)) (defn rpn "Evaluate an expression composed in Reverse Polish Notation and return the result. `rpn` may optionally take a stack-based representation of an expression as a secondary parameter." ([e] (rpn e '())) ([e s] (if (empty? e) s (if (number? (first e)) (recur (rest e) (conj s (first e))) (recur (rest e) (conj (drop 2 s) (reduce (first e) (reverse (take 2 s))))))))) (defn floating-division [x y] (if (not= ^BigDecimal y BigDecimal/ZERO) (.divide ^BigDecimal x ^BigDecimal y 2 java.math.RoundingMode/HALF_EVEN) (do (u/vibrate! 500) (toast "Cannot divide by 0.")))) (defn op-alias [op] (case op "^" expt "÷" floating-division "×" * "+" + "-" -))
(ns warreq.kea.calc.math (:require [clojure.math.numeric-tower :refer [expt]] [neko.notify :refer [toast]] [warreq.kea.calc.util :as u]) (:import java.math.BigDecimal)) (defn rpn "Evaluate an expression composed in Reverse Polish Notation and return the result. `rpn` may optionally take a stack-based representation of an expression as a secondary parameter." ([e] (rpn e '())) ([e s] (if (empty? e) s (if (number? (first e)) (recur (rest e) (conj s (first e))) (recur (rest e) (conj (drop 2 s) (reduce (first e) (reverse (take 2 s))))))))) (defn floating-division [x y] (let [x (bigdec x) y (bigdec y)] (if (not= y BigDecimal/ZERO) (.divide x y 2 java.math.RoundingMode/HALF_EVEN) (do (u/vibrate! 500) (toast "Cannot divide by 0."))))) (defn op-alias [op] (case op "^" expt "÷" floating-division "×" * "+" + "-" -))
Update clojure 1.9 to 1.9.0
(defproject jungerer "0.4.2-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"} :min-lein-version "2.7.0" :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}} :1.9 {:dependencies [[org.clojure/clojure "1.9.0-alpha12"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}} :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.4.2-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"} :min-lein-version "2.7.0" :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}} :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}} :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}"})
Add ant-nodeps as a dependency to pull in symlink task
;; The only requirement of the project.clj file is that it includes a ;; defproject form. It can have other code in it as well, including ;; loading other task definitions. (defproject leiningen "1.5.0-SNAPSHOT" :description "A build tool designed not to set your hair on fire." :url "https://github.com/technomancy/leiningen" :license {:name "Eclipse Public License"} :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [org.apache.ant/ant "1.7.1"] [jline "0.9.94"] [robert/hooke "1.1.0"] [org.apache.maven/maven-ant-tasks "2.0.10" :exclusions [ant]]] :disable-implicit-clean true :eval-in-leiningen true)
;; The only requirement of the project.clj file is that it includes a ;; defproject form. It can have other code in it as well, including ;; loading other task definitions. (defproject leiningen "1.5.0-SNAPSHOT" :description "A build tool designed not to set your hair on fire." :url "https://github.com/technomancy/leiningen" :license {:name "Eclipse Public License"} :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [org.apache.ant/ant "1.7.1"] [org.apache.ant/ant-nodeps "1.7.1"] [jline "0.9.94"] [robert/hooke "1.1.0"] [org.apache.maven/maven-ant-tasks "2.0.10" :exclusions [ant]]] :disable-implicit-clean true :eval-in-leiningen true)
Move deps to Clojure 1.3.0 final
(defproject overtone "0.3.0" :description "An audio/musical experiment." :url "http://project-overtone.org" :autodoc {:load-except-list [#"/test/" #"/classes/" #"/devices/"] :namespaces-to-document ["overtone.core" "overtone.gui" "overtone.music" "overtone.studio"] :trim-prefix "overtone.",} :dependencies [[org.clojure/clojure "1.3.0-RC0"] [org.clojure/core.incubator "0.1.0"] [overtone/scsynth-jna "0.1.2-SNAPSHOT"] [overtone/at-at "0.2.0"] [overtone/osc-clj "0.7.0"] [overtone/byte-spec "0.3.0"] [overtone/midi-clj "0.2.0"]] :dev-dependencies [[marginalia "0.2.0"]] :jvm-opts ["-Xms256m" "-Xmx1g" "-XX:+UseConcMarkSweepGC"])
(defproject overtone "0.3.0" :description "An audio/musical experiment." :url "http://project-overtone.org" :autodoc {:load-except-list [#"/test/" #"/classes/" #"/devices/"] :namespaces-to-document ["overtone.core" "overtone.gui" "overtone.music" "overtone.studio"] :trim-prefix "overtone.",} :dependencies [[org.clojure/clojure "1.3.0"] [org.clojure/core.incubator "0.1.0"] [overtone/scsynth-jna "0.1.2-SNAPSHOT"] [overtone/at-at "0.2.1"] [overtone/osc-clj "0.7.1"] [overtone/byte-spec "0.3.1"] [overtone/midi-clj "0.2.1"]] :dev-dependencies [[marginalia "0.2.0"]] :jvm-opts ["-Xms256m" "-Xmx1g" "-XX:+UseConcMarkSweepGC"])
Upgrade curator dependancy to 2.4.3
(defproject eureka "0.1.4-SNAPSHOT" :description "A Clojure library that wraps the Curator service discovery/registration API." :dependencies [[cheshire "5.2.0"] [environ "0.4.0"] [org.apache.curator/curator-x-discovery "2.3.0"] [org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [zookeeper-clj "0.9.3"]] :profiles {:dev {:dependencies [[zookem "0.1.0-SNAPSHOT"] [midje "1.5.1"]] :plugins [[lein-midje "3.0.1"] [lein-release "1.0.5"]]}} :lein-release {:deploy-via :clojars :clojars-url "clojars@clojars.brislabs.com:"})
(defproject eureka "0.1.4-SNAPSHOT" :description "A Clojure library that wraps the Curator service discovery/registration API." :dependencies [[cheshire "5.2.0"] [environ "0.4.0"] [org.apache.curator/curator-x-discovery "2.4.2"] [org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [zookeeper-clj "0.9.3"]] :profiles {:dev {:dependencies [[zookem "0.1.0-SNAPSHOT"] [midje "1.5.1"]] :plugins [[lein-midje "3.0.1"] [lein-release "1.0.5"]]}} :lein-release {:deploy-via :clojars :clojars-url "clojars@clojars.brislabs.com:"})
Advance version number to 0.1.6 before move to GitHub
(defproject io.aviso/rook "0.1.5-SNAPSHOT" :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps" :url "https://github.com/AvisoNovate/rook" :license {:name "Apache Sofware Licencse 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0.html"} ;; Normally we don't AOT compile; only when tracking down reflection warnings. :profiles {:reflection-warnings {:aot :all :global-vars {*warn-on-reflection* true}} :dev {:dependencies [[ring-mock "0.1.5"]]}} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [compojure "1.1.6"]] :plugins [[test2junit "1.0.1"]])
(defproject io.aviso/rook "0.1.6-SNAPSHOT" :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps" :url "https://github.com/AvisoNovate/rook" :license {:name "Apache Sofware Licencse 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0.html"} ;; Normally we don't AOT compile; only when tracking down reflection warnings. :profiles {:reflection-warnings {:aot :all :global-vars {*warn-on-reflection* true}} :dev {:dependencies [[ring-mock "0.1.5"]]}} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [compojure "1.1.6"]] :plugins [[test2junit "1.0.1"]])
Declare need for lein 2.0, for the sake of Heroku.
;;; Copyright (c) 2013 David Goldfarb. All rights reserved. ;;; Contact info: deg@degel.com ;;; ;;; The use and distribution terms for this software are covered by the Eclipse ;;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can ;;; be found in the file epl-v10.html at the root of this distribution. ;;; By using this software in any fashion, you are agreeing to be bound by the ;;; terms of this license. ;;; ;;; You must not remove this notice, or any other, from this software. (defproject my-muxx-sites "0.1.0-SNAPSHOT" :description "Deployment project to wrap my web apps into a single site." :url "https://github.com/deg/my-muxx-sites" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [;; Clojure itself [org.clojure/clojure "1.5.1"] ;; Degel's Clojure utility library [degel-clojure-utils "0.1.6"] ;; Our apps [receipts "0.1.0-SNAPSHOT"]] :profiles {:dev { :plugins [[lein-marginalia "0.7.1"]]}} :main degel.deploy.deployment)
;;; Copyright (c) 2013 David Goldfarb. All rights reserved. ;;; Contact info: deg@degel.com ;;; ;;; The use and distribution terms for this software are covered by the Eclipse ;;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can ;;; be found in the file epl-v10.html at the root of this distribution. ;;; By using this software in any fashion, you are agreeing to be bound by the ;;; terms of this license. ;;; ;;; You must not remove this notice, or any other, from this software. (defproject my-muxx-sites "0.1.0-SNAPSHOT" :description "Deployment project to wrap my web apps into a single site." :url "https://github.com/deg/my-muxx-sites" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [;; Clojure itself [org.clojure/clojure "1.5.1"] ;; Degel's Clojure utility library [degel-clojure-utils "0.1.6"] ;; Our apps [receipts "0.1.0-SNAPSHOT"]] :profiles {:dev { :plugins [[lein-marginalia "0.7.1"]]}} :min-lein-version "2.0.0" :main degel.deploy.deployment)
Update Kalium and Clojure to latest stable version
(defproject caesium "0.3.0" :description "libsodium for clojure" :url "https://github.com/lvh/caesium" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [org.abstractj.kalium/kalium "0.3.0" :scope "compile"]] :main ^:skip-aot caesium.core :target-path "target/%s" :profiles {:uberjar {:aot :all}} :global-vars {*warn-on-reflection* true})
(defproject caesium "0.3.0" :description "libsodium for clojure" :url "https://github.com/lvh/caesium" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.abstractj.kalium/kalium "0.4.0" :scope "compile"]] :main ^:skip-aot caesium.core :target-path "target/%s" :profiles {:uberjar {:aot :all}} :global-vars {*warn-on-reflection* true})
Use a different topic so we don't collide with the 'real' tests.
(ns messaging.init (:require [immutant.messaging :as msg])) (msg/start "/topic/gravy") (let [p (promise) l (msg/listen "/topic/gravy" (fn [v] (deliver p v)))] (try (msg/publish "/topic/gravy" :success) (let [delivery (deref p 1000 :fail)] (if-not (= :success delivery) (throw (Exception. (str "Should have received :success, but got " delivery))))) (finally (msg/unlisten l))))
(ns messaging.init (:require [immutant.messaging :as msg])) (msg/start "/topic/gravy") (msg/start "topic.biscuit") (let [p (promise) l (msg/listen "topic.biscuit" (fn [v] (deliver p v)))] (try (msg/publish "topic.biscuit" :success) (let [delivery (deref p 1000 :fail)] (if-not (= :success delivery) (throw (Exception. (str "Should have received :success, but got " delivery))))) (finally (msg/unlisten l))))
Add a note about moving figwheel configuration
(ns comic-reader.main (:require [figwheel.client :as fw] [comic-reader.session :as session] [comic-reader.pages.sites :as sites] [comic-reader.pages.comics :as comics] [comic-reader.pages.reader :as reader] [reagent.core :as reagent :refer [atom]] [secretary.core :as secretary :include-macros true :refer [defroute]])) (enable-console-print!) (fw/start { ;; configure a websocket url if you are using your own server :websocket-url "ws://localhost:3449/figwheel-ws" ;; optional callback :on-jsload (fn [] (print "reloaded")) ;; The heads up display is enabled by default ;; to disable it: ;; :heads-up-display false ;; when the compiler emits warnings figwheel ;; blocks the loading of files. ;; To disable this behavior: ;; :load-warninged-code true ;; if figwheel is watching more than one build ;; it can be helpful to specify a build id for ;; the client to focus on :build-id "dev"})
(ns comic-reader.main (:require [figwheel.client :as fw] [comic-reader.session :as session] [comic-reader.pages.sites :as sites] [comic-reader.pages.comics :as comics] [comic-reader.pages.reader :as reader] [reagent.core :as reagent :refer [atom]] [secretary.core :as secretary :include-macros true :refer [defroute]])) (enable-console-print!) ;; TODO: Put figwheel setups into some kind of dev namespace (fw/start { ;; configure a websocket url if you are using your own server :websocket-url "ws://localhost:3449/figwheel-ws" ;; optional callback :on-jsload (fn [] (print "reloaded")) ;; The heads up display is enabled by default ;; to disable it: ;; :heads-up-display false ;; when the compiler emits warnings figwheel ;; blocks the loading of files. ;; To disable this behavior: ;; :load-warninged-code true ;; if figwheel is watching more than one build ;; it can be helpful to specify a build id for ;; the client to focus on :build-id "dev"})
Add factorial and days_in_month tests
(ns luaclj.core-test (:require [clojure.test :refer :all] [luaclj.library :refer :all] [luaclj.core :refer :all])) (comment (parse-lua (slurp "resources/test/basic.lua")) (parse-lua (slurp "resources/test/function.lua")) ) (deftest a-test (testing "Lua test scripts" (is (= ((create-lua-fn (slurp "resources/test/basic.lua"))) 11)) (is (= ((create-lua-fn (slurp "resources/test/basic1.lua"))) "local_var_modified")) (is (= ((create-lua-fn (slurp "resources/test/break.lua"))) 3)) (is (= ((create-lua-fn (slurp "resources/test/for.lua"))) 5060)) (is (= ((create-lua-fn (slurp "resources/test/function1.lua"))) 26)) (is (= ((create-lua-fn (slurp "resources/test/function2.lua"))) 5)) (is (= ((create-lua-fn (slurp "resources/test/function3.lua"))) 34)) ))
(ns luaclj.core-test (:require [clojure.test :refer :all] [luaclj.library :refer :all] [luaclj.core :refer :all])) (comment (parse-lua (slurp "resources/test/basic.lua")) (parse-lua (slurp "resources/test/function.lua")) ) (deftest a-test (testing "Lua test scripts" (is (= ((create-lua-fn (slurp "resources/test/basic.lua"))) 11)) (is (= ((create-lua-fn (slurp "resources/test/basic1.lua"))) "local_var_modified")) (is (= ((create-lua-fn (slurp "resources/test/break.lua"))) 3)) (is (= ((create-lua-fn (slurp "resources/test/for.lua"))) 5060)) (is (= ((create-lua-fn (slurp "resources/test/function1.lua"))) 26)) (is (= ((create-lua-fn (slurp "resources/test/function2.lua"))) 5)) (is (= ((create-lua-fn (slurp "resources/test/function3.lua"))) 34)) (is (= ((create-lua-fn (slurp "resources/test/factorial.lua"))) 120)) (is (= ((create-lua-fn (slurp "resources/test/days_in_month.lua"))) 31)) ))
Make sure `lein run` works
(ns jcf.integration-test (:require [clojure.java.io :as io] [clojure.java.shell :refer [sh]] [clojure.string :as str] [clojure.test :refer :all] [leiningen.new.jcf-static :refer :all] [leiningen.new.templates :refer [*dir*]] [me.raynes.fs :refer [temp-dir]])) (defn generate-project [test-fn] (let [app-name "example" sandbox ^java.io.File (temp-dir "jcf-")] (binding [*dir* (str sandbox "/" app-name)] (println (format "Generating project in %s..." *dir*)) (jcf-static app-name) (try (test-fn) (finally (when (.isDirectory sandbox) (println (format "Deleting project in %s..." *dir*)) (.delete sandbox))))))) (use-fixtures :once generate-project) (deftest test-lein-test (let [_ (println "Running lein test. This'll take a couple of seconds...") {:keys [exit out err]} (sh "lein" "test" :dir *dir*)] (is (zero? exit) (format "lein test failed with status %d.\nOut:\n%s\n\nErr:\n%s\n\n" exit out err))))
(ns jcf.integration-test (:require [clojure.java.io :as io] [clojure.java.shell :refer [sh]] [clojure.string :as str] [clojure.test :refer :all] [leiningen.new.jcf-static :refer :all] [leiningen.new.templates :refer [*dir*]] [me.raynes.fs :refer [temp-dir]])) (defn generate-project [test-fn] (let [app-name "example" sandbox ^java.io.File (temp-dir "jcf-")] (binding [*dir* (str sandbox "/" app-name)] (println (format "Generating project in %s..." *dir*)) (jcf-static app-name) (try (test-fn) (finally (when (.isDirectory sandbox) (println (format "Deleting project in %s..." *dir*)) (.delete sandbox))))))) (use-fixtures :once generate-project) (deftest test-lein-test (let [_ (println "Running lein test. This'll take a couple of seconds...") {:keys [exit out err]} (sh "lein" "test" :dir *dir*)] (is (zero? exit) (format "lein test failed with status %d.\nOut:\n%s\n\nErr:\n%s\n\n" exit out err)))) (deftest test-lein-run (let [_ (println "Running lein run. This'll take a couple of seconds...") {:keys [exit out err]} (sh "lein" "run" :dir *dir*)] (is (zero? exit) (format "lein run failed with status %d.\nOut:\n%s\n\nErr:\n%s\n\n" exit out err))))
Use rand-nth instead of first and shuffle in robot-name/generate-name
(ns robot-name) (def ^:private letters (map char (range 65 91))) (defn- generate-name [] (format "%s%03d" (apply str (repeatedly 2 #(first (shuffle letters)))) (rand-int 1000))) (defn robot [] (atom {:name (generate-name)})) (defn robot-name [robot] (:name @robot)) (defn reset-name [robot] (swap! robot assoc :name (generate-name)))
(ns robot-name) (def ^:private letters (map char (range 65 91))) (defn- generate-name [] (format "%s%03d" (apply str (repeatedly 2 #(rand-nth letters))) (rand-int 1000))) (defn robot [] (atom {:name (generate-name)})) (defn robot-name [robot] (:name @robot)) (defn reset-name [robot] (swap! robot assoc :name (generate-name)))
Update dependencies to latest versions
(defproject hello "compojure" :description "JSON/Database tests" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.5.1"] [compojure "1.1.5"] [ring/ring-json "0.2.0"] [korma "0.3.0-RC5"] [log4j "1.2.15" :exclusions [javax.mail/mail javax.jms/jms com.sun.jdmk/jmxtools com.sun.jmx/jmxri]] [mysql/mysql-connector-java "5.1.6"] [org.clojure/java.jdbc "0.3.0-alpha1"] [c3p0/c3p0 "0.9.1.2"] [hiccup "1.0.3"] [enlive "1.1.1"] ] :plugins [[lein-ring "0.8.2"]] :ring {:handler hello.handler/app} :profiles {:dev {:dependencies [[ring-mock "0.1.3"]]}})
(defproject hello "compojure" :description "JSON/Database tests" :url "http://localhost:3000/" :dependencies [[org.clojure/clojure "1.5.1"] [compojure "1.1.6"] [ring/ring-json "0.2.0"] [korma "0.3.0-RC6"] [log4j "1.2.15" :exclusions [javax.mail/mail javax.jms/jms com.sun.jdmk/jmxtools com.sun.jmx/jmxri]] [mysql/mysql-connector-java "5.1.6"] [org.clojure/java.jdbc "0.3.0-alpha1"] [c3p0/c3p0 "0.9.1.2"] [hiccup "1.0.4"] ] :plugins [[lein-ring "0.8.10"]] :ring {:handler hello.handler/app} :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}})
Upgrade Clojure and ClojureScript dependencies
(defproject cats "0.5.0-SNAPSHOT" :description "Category Theory abstractions for Clojure" :url "https://github.com/funcool/cats" :license {:name "BSD (2 Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} :dependencies [] :deploy-repositories {"releases" :clojars "snapshots" :clojars} :source-paths ["src"] :test-paths ["test"] :cljsbuild {:test-commands {"test" ["node" "output/tests.js"]} :builds [{:id "test" :source-paths ["src" "test"] :notify-command ["node" "output/tests.js"] :compiler {:output-to "output/tests.js" :output-dir "output" :source-map true :static-fns true :cache-analysis false :main cats.runner :optimizations :none :target :nodejs :pretty-print true}}]} :jar-exclusions [#"\.swp|\.swo"] :profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.10"] [org.clojure/clojure "1.7.0-RC1"] [org.clojure/clojurescript "0.0-3297"]] :codeina {:sources ["src"] :output-dir "doc/codeina"} :plugins [[funcool/codeina "0.1.0-SNAPSHOT" :exclusions [org.clojure/clojure]] [lein-cljsbuild "1.0.6"]]}})
(defproject cats "0.5.0-SNAPSHOT" :description "Category Theory abstractions for Clojure" :url "https://github.com/funcool/cats" :license {:name "BSD (2 Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} :dependencies [] :deploy-repositories {"releases" :clojars "snapshots" :clojars} :source-paths ["src"] :test-paths ["test"] :cljsbuild {:test-commands {"test" ["node" "output/tests.js"]} :builds [{:id "test" :source-paths ["src" "test"] :notify-command ["node" "output/tests.js"] :compiler {:output-to "output/tests.js" :output-dir "output" :source-map true :static-fns true :cache-analysis false :main cats.runner :optimizations :none :target :nodejs :pretty-print true}}]} :jar-exclusions [#"\.swp|\.swo"] :profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.10"] [org.clojure/clojure "1.7.0-RC2"] [org.clojure/clojurescript "0.0-3308"]] :codeina {:sources ["src"] :output-dir "doc/codeina"} :plugins [[funcool/codeina "0.1.0-SNAPSHOT" :exclusions [org.clojure/clojure]] [lein-cljsbuild "1.0.6"]]}})
Enable running via ring for dev
(defproject clj-gamification "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [http-kit "2.1.4"] [compojure "1.1.5"] [hiccup "1.0.3"] [hiccup-bootstrap "0.1.2"] [org.clojure/data.json "0.2.2"]] ;:plugins [[lein-ring "0.8.5"]] ;:ring {:handler clj-gamification.handler/app, :auto-refresh? true, :nrepl {:start? true #_(:port 7000)}} :main clj-gamification.handler :profiles {:dev {:source-paths ["dev"], :dependencies [[ring-mock "0.1.5"]]}, :production {:misc "configuration", ; app-specific stuff :mirrors {"central" "http://s3pository.herokuapp.com/clojure"}}} :min-lein-version "2.0.0") ;; ring-serve has old hiccup
(defproject clj-gamification "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.2.6"] [http-kit "2.1.4"] [compojure "1.1.5"] [hiccup "1.0.3"] [hiccup-bootstrap "0.1.2"] [org.clojure/data.json "0.2.2"]] ;:plugins [[lein-ring "0.8.5"]] :ring {:handler clj-gamification.handler/app, :auto-refresh? true, :port 5000, :nrepl {:start? true, :port 4555}} :main clj-gamification.handler :profiles {:dev {:source-paths ["dev"], :dependencies [[ring-mock "0.1.5"]]}, :production {:misc "configuration", ; app-specific stuff :mirrors {"central" "http://s3pository.herokuapp.com/clojure"}}} :min-lein-version "2.0.0") ;; ring-serve has old hiccup
Prepare for next development iteration (0.1.4-SNAPSHOT)
(defproject jungerer "0.1.3" :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.8.0"] [net.sf.jung/jung-algorithms "2.1"] [net.sf.jung/jung-api "2.1"] [net.sf.jung/jung-graph-impl "2.1"] [net.sf.jung/jung-io "2.1"] [net.sf.jung/jung-visualization "2.1"]] :profiles {:dev {:global-vars {*warn-on-reflection* true} :resource-paths ["dev-resources"]} :1.7 {:dependencies [[org.clojure/clojure "1.7.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.1.4-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.8.0"] [net.sf.jung/jung-algorithms "2.1"] [net.sf.jung/jung-api "2.1"] [net.sf.jung/jung-graph-impl "2.1"] [net.sf.jung/jung-io "2.1"] [net.sf.jung/jung-visualization "2.1"]] :profiles {:dev {:global-vars {*warn-on-reflection* true} :resource-paths ["dev-resources"]} :1.7 {:dependencies [[org.clojure/clojure "1.7.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}"})
Change version number to 0.1.9-SNAPSHOT
(defproject io.aviso/twixt "0.1.9" :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.2.4"] [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.9-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.2.4"] [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"]]}})
Prepare for next release cycle.
(defproject onyx-app/lein-template "0.8.2.1" :description "Onyx Leiningen application template" :url "https://github.com/onyx-platform/onyx-template" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :repositories {"snapshots" {:url "https://clojars.org/repo" :username :env :password :env :sign-releases false} "releases" {:url "https://clojars.org/repo" :username :env :password :env :sign-releases false}} :plugins [[lein-set-version "0.4.1"]] :profiles {:dev {:plugins [[lein-set-version "0.4.1"] [lein-update-dependency "0.1.2"] [lein-pprint "1.1.1"]]}} :eval-in-leiningen true)
(defproject onyx-app/lein-template "0.8.2.2-SNAPSHOT" :description "Onyx Leiningen application template" :url "https://github.com/onyx-platform/onyx-template" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :repositories {"snapshots" {:url "https://clojars.org/repo" :username :env :password :env :sign-releases false} "releases" {:url "https://clojars.org/repo" :username :env :password :env :sign-releases false}} :plugins [[lein-set-version "0.4.1"]] :profiles {:dev {:plugins [[lein-set-version "0.4.1"] [lein-update-dependency "0.1.2"] [lein-pprint "1.1.1"]]}} :eval-in-leiningen true)
Modify to use release version `clj-sub-command`
(defproject cljam "0.1.0-SNAPSHOT" :description "A DNA Sequence Alignment/Map (SAM) library for Clojure" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :repositories [["clojars classic" "http://clojars.org/repo/"]] :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojure-contrib "1.2.0"] [org.utgenome.thirdparty/picard "1.86p"] [clj-sub-command "0.1.0-SNAPSHOT"]] :profiles {:dev {:dependencies [[midje "1.5.1"]]}} :main cljam.core)
(defproject cljam "0.1.0-SNAPSHOT" :description "A DNA Sequence Alignment/Map (SAM) library for Clojure" :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/clojure-contrib "1.2.0"] [org.utgenome.thirdparty/picard "1.86p"] [clj-sub-command "0.1.0"]] :profiles {:dev {:dependencies [[midje "1.5.1"]]}} :main cljam.core)
Prepare for next release cycle.
(defproject org.onyxplatform/onyx-peer-http-query "0.10.0.0-beta2" :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"] [ring/ring-core "1.5.1"] [org.clojure/java.jmx "0.3.3"] [ring-jetty-component "0.3.1"] [cheshire "5.7.0"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.10.0-beta2"]] :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.10.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"] [ring/ring-core "1.5.1"] [org.clojure/java.jmx "0.3.3"] [ring-jetty-component "0.3.1"] [cheshire "5.7.0"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.10.0-beta2"]] :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"]]}})
Update Ring dependency to 1.6.0-beta4
(defproject compojure "1.5.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.7.0"] [org.clojure/tools.macro "0.1.5"] [clout "2.1.2"] [medley "0.8.2"] [ring/ring-core "1.5.0"] [ring/ring-codec "1.0.1"]] :plugins [[lein-codox "0.9.5"]] :codox {:output-path "codox" :metadata {:doc/format :markdown} :source-uri "http://github.com/weavejester/compojure/blob/{version}/{filepath}#L{line}"} :aliases {"test-all" ["with-profile" "default:+1.8" "test"]} :profiles {:dev {:jvm-opts ^:replace [] :dependencies [[ring/ring-mock "0.3.0"] [criterium "0.4.3"] [javax.servlet/servlet-api "2.5"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})
(defproject compojure "1.5.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.7.0"] [org.clojure/tools.macro "0.1.5"] [clout "2.1.2"] [medley "0.8.2"] [ring/ring-core "1.6.0-beta4"] [ring/ring-codec "1.0.1"]] :plugins [[lein-codox "0.9.5"]] :codox {:output-path "codox" :metadata {:doc/format :markdown} :source-uri "http://github.com/weavejester/compojure/blob/{version}/{filepath}#L{line}"} :aliases {"test-all" ["with-profile" "default:+1.8" "test"]} :profiles {:dev {:jvm-opts ^:replace [] :dependencies [[ring/ring-mock "0.3.0"] [criterium "0.4.3"] [javax.servlet/servlet-api "2.5"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})
Update to latest Jade4J Jade4J now available from Maven Central
(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"]]}})
(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-bfi/jade4j "0.4.0"] [io.aviso/pretty "0.1.6"] [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"]]}})
Bump to 0.3.0-SNAPSHOT for forward development.
(defproject me.frmr.tools/dstt "0.2.0" :description "Damn Simple Test Tool, a simple and rudamentary load testing library." :url "https://github.com/farmdawgnation/dstt" :license {:name "Apache License 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :dependencies [[org.clojure/clojure "1.7.0"] [clj-http "2.0.0"] [org.clojure/tools.cli "0.3.3"] [org.clojure/data.json "0.2.6"]] :main frmr.dstt :aot [frmr.dstt] :scm {:url "git@github.com:farmdawgnation/dstt.git"} :pom-addition [:developers [:developer [:name "Matt Farmer"] [:url "http://farmdawgnation.com"] [:email "matt@frmr.me"] [:timezone "-5"]]])
(defproject me.frmr.tools/dstt "0.3.0-SNAPSHOT" :description "Damn Simple Test Tool, a simple and rudamentary load testing library." :url "https://github.com/farmdawgnation/dstt" :license {:name "Apache License 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :dependencies [[org.clojure/clojure "1.7.0"] [clj-http "2.0.0"] [org.clojure/tools.cli "0.3.3"] [org.clojure/data.json "0.2.6"]] :main frmr.dstt :aot [frmr.dstt] :scm {:url "git@github.com:farmdawgnation/dstt.git"} :pom-addition [:developers [:developer [:name "Matt Farmer"] [:url "http://farmdawgnation.com"] [:email "matt@frmr.me"] [:timezone "-5"]]])
Add Clojure 1.8 profile for testing
(defproject prismatic/fnhouse "0.2.2-SNAPSHOT" :description "Transform lightly-annotated functions into a full-fledged web service" :license {:name "Eclipse Public License - v 1.0" :url "http://www.eclipse.org/legal/epl-v10.html" :distribution :repo} :url "https://github.com/Prismatic/fnhouse" :dependencies [[prismatic/plumbing "0.4.3" :exclusions [prismatic/schema]] [prismatic/schema "1.0.1"]] :profiles {:dev {:dependencies [[org.clojure/clojure "1.6.0"]] :global-vars {*warn-on-reflection* true}} :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}} :aliases {"all" ["with-profile" "dev:dev,1.5:dev,1.7"]} :lein-release {:deploy-via :shell :shell ["lein" "deploy" "clojars"]})
(defproject prismatic/fnhouse "0.2.2-SNAPSHOT" :description "Transform lightly-annotated functions into a full-fledged web service" :license {:name "Eclipse Public License - v 1.0" :url "http://www.eclipse.org/legal/epl-v10.html" :distribution :repo} :url "https://github.com/Prismatic/fnhouse" :dependencies [[prismatic/plumbing "0.4.3" :exclusions [prismatic/schema]] [prismatic/schema "1.0.1"]] :profiles {:dev {:dependencies [[org.clojure/clojure "1.6.0"]] :global-vars {*warn-on-reflection* true}} :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0-RC1"]]}} :aliases {"all" ["with-profile" "dev:dev,1.5:dev,1.7:dev,1.8"]} :lein-release {:deploy-via :shell :shell ["lein" "deploy" "clojars"]})
Fix lein version in dep dependencies and use `:inline-dep`
(defproject thomasa/mranderson "0.5.2-SNAPSHOT" :description "Dependency inlining and shadowing tool." :url "https://github.com/benedekfazekas/mranderson" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :eval-in :leiningen :plugins [[thomasa/mranderson "0.5.1"]] :java-source-paths ["java-src"] :javac-options ["-target" "1.6" "-source" "1.6"] :filespecs [{:type :bytes :path "mranderson/project.clj" :bytes ~(slurp "project.clj")}] :dependencies [^:source-dep [com.cemerick/pomegranate "0.4.0"] ^:source-dep [org.clojure/tools.namespace "0.3.0-alpha3"] ^:source-dep [me.raynes/fs "1.4.6"] ^:source-dep [rewrite-clj "0.6.1"] ^:source-dep [parallel "0.10"] [com.googlecode.jarjar/jarjar "1.3"]] :mranderson {:project-prefix "mranderson.inlined"} :profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"] [leiningen-core "2.8.3"]]}})
(defproject thomasa/mranderson "0.5.2-SNAPSHOT" :description "Dependency inlining and shadowing tool." :url "https://github.com/benedekfazekas/mranderson" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :eval-in :leiningen :plugins [[thomasa/mranderson "0.5.1"]] :java-source-paths ["java-src"] :javac-options ["-target" "1.6" "-source" "1.6"] :filespecs [{:type :bytes :path "mranderson/project.clj" :bytes ~(slurp "project.clj")}] :dependencies [^:inline-dep [com.cemerick/pomegranate "0.4.0"] ^:inline-dep [org.clojure/tools.namespace "0.3.0-alpha3"] ^:inline-dep [me.raynes/fs "1.4.6"] ^:inline-dep [rewrite-clj "0.6.1"] ^:inline-dep [parallel "0.10"] [com.googlecode.jarjar/jarjar "1.3"]] :mranderson {:project-prefix "mranderson.inlined"} :profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"] [leiningen-core "2.9.1"]]}})
Update clojurescript, core.async and remove figwheel config.
(defproject tetris "0.1.0-SNAPSHOT" :description "Tetris implementation in ClojureScript." :url "http://tetris.temochka.com/" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-2202"] [org.clojure/core.async "0.1.338.0-5c5012-alpha"]] :plugins [[lein-cljsbuild "1.0.3"] [com.cemerick/austin "0.1.5"]] :figwheel {:http-server-root "public" :port 3449 :css-dirs ["resources/public/css"]} :cljsbuild {:builds [{:id "dev" :source-paths ["src"] :compiler {:output-to "resources/public/tetris.js" :output-dir "resources/public/out" :optimizations :none :source-map true}} {:id "prod" :source-paths ["src"] :compiler {:output-to "resources/public/tetris.min.js" :output-dir "resources/public/out.prod" :optimizations :advanced}}]})
(defproject tetris "0.1.0-SNAPSHOT" :description "Tetris implementation in ClojureScript." :url "http://tetris.temochka.com/" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/clojurescript "0.0-2342"] [org.clojure/core.async "0.1.346.0-17112a-alpha"]] :plugins [[lein-cljsbuild "1.0.3"] [com.cemerick/austin "0.1.5"]] :cljsbuild {:builds [{:id "dev" :source-paths ["src"] :compiler {:output-to "resources/public/tetris.js" :output-dir "resources/public/out" :optimizations :none :source-map true}} {:id "prod" :source-paths ["src"] :compiler {:output-to "resources/public/tetris.min.js" :output-dir "resources/public/out.prod" :optimizations :advanced}}]})
Update Medley dependency to latest version 0.3.0
(defproject io.aviso/rook "0.1.10-SNAPSHOT" :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps" :url "https://github.com/AvisoNovate/rook" :license {:name "Apache Sofware License 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0.html"} :profiles {:dev {:dependencies [[ring-mock "0.1.5"] [io.aviso/pretty "0.1.11"] [clj-http "0.9.1"] [speclj "3.0.2"] [log4j "1.2.17"]]}} :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/core.async "0.1.278.0-76b25b-alpha"] [org.clojure/tools.logging "0.2.6"] [ring "1.3.0"] [medley "0.2.1"] [ring-middleware-format "0.3.2"] [prismatic/schema "0.2.3"] [compojure "1.1.6"]] :plugins [[speclj "3.0.2"]] :test-paths ["spec"] :codox {:src-dir-uri "https://github.com/AvisoNovate/rook/blob/master/" :src-linenum-anchor-prefix "L" :defaults {:doc/format :markdown}})
(defproject io.aviso/rook "0.1.10-SNAPSHOT" :description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps" :url "https://github.com/AvisoNovate/rook" :license {:name "Apache Sofware License 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0.html"} :profiles {:dev {:dependencies [[ring-mock "0.1.5"] [io.aviso/pretty "0.1.11"] [clj-http "0.9.1"] [speclj "3.0.2"] [log4j "1.2.17"]]}} :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/core.async "0.1.278.0-76b25b-alpha"] [org.clojure/tools.logging "0.2.6"] [ring "1.3.0"] [medley "0.3.0"] [ring-middleware-format "0.3.2"] [prismatic/schema "0.2.3"] [compojure "1.1.6"]] :plugins [[speclj "3.0.2"]] :test-paths ["spec"] :codox {:src-dir-uri "https://github.com/AvisoNovate/rook/blob/master/" :src-linenum-anchor-prefix "L" :defaults {:doc/format :markdown}})
Test against multiple Clojure versions.
(defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] :plugins [[lein-protobuf "0.2.0-beta2"]] :profiles {:dev {:dependencies [[gloss "0.2.1"] [io "0.2.0-beta2"]]}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"])
(defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] :plugins [[lein-protobuf "0.2.0-beta3"]] :aliases {"testall" ["with-profile" "dev,default:dev,1.3,default:dev,1.5,default" "test"]} :profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} :1.5 {:dependencies [[org.clojure/clojure "1.5.0-master-SNAPSHOT"]]} :dev {:dependencies [[gloss "0.2.1"] [io "0.2.0-beta2"]]}} :repositories {"sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots" :snapshots true :releases {:checksum :fail :update :always}}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"])
Update dependency org.onyxplatform/onyx to version 0.7.3-20150828_160954-g51b5cf8.
(defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT" :description "Onyx plugin for Kafka" :url "https://github.com/MichaelDrogalis/onyx-kafka" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.7.3-20150828_152050-gd122e3e"] [clj-kafka "0.3.2" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]] [com.stuartsierra/component "0.2.3"] [cheshire "5.5.0"] [zookeeper-clj "0.9.3" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]] :profiles {:dev {:dependencies [[midje "1.7.0"]] :plugins [[lein-midje "3.1.3"]]} :circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT" :description "Onyx plugin for Kafka" :url "https://github.com/MichaelDrogalis/onyx-kafka" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] ^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.7.3-20150828_160954-g51b5cf8"] [clj-kafka "0.3.2" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]] [com.stuartsierra/component "0.2.3"] [cheshire "5.5.0"] [zookeeper-clj "0.9.3" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]] :profiles {:dev {:dependencies [[midje "1.7.0"]] :plugins [[lein-midje "3.1.3"]]} :circle-ci {:jvm-opts ["-Xmx4g"]}})
Update to be inline with Precipice
(defproject net.uncontended/beehive "0.6.0-SNAPSHOT" :description "Beehive is a Clojure facade for the Precipice library." :url "https://github.com/tbrooks8/Beehive" :license {:name "Apache License, Version 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :signing {:gpg-key "tim@uncontended.net"} :java-source-paths ["src/beehive/java"] :profiles {:dev {:dependencies [[org.clojure/core.async "0.1.346.0-17112a-alpha"] [clj-http "1.0.1"] [criterium "0.4.3"]]}} :dependencies [[org.clojure/clojure "1.6.0"] [net.bytebuddy/byte-buddy "1.2.2"] [net.uncontended/precipice-core "0.7.0-SNAPSHOT"] [net.uncontended/precipice-threadpool "0.7.0-SNAPSHOT"]])
(defproject net.uncontended/beehive "0.7.0-SNAPSHOT" :description "Beehive is a Clojure facade for the Precipice library." :url "https://github.com/tbrooks8/Beehive" :license {:name "Apache License, Version 2.0" :url "http://www.apache.org/licenses/LICENSE-2.0"} :signing {:gpg-key "tim@uncontended.net"} :java-source-paths ["src/beehive/java"] :profiles {:dev {:dependencies [[org.clojure/core.async "0.1.346.0-17112a-alpha"] [clj-http "1.0.1"] [criterium "0.4.3"]]}} :dependencies [[org.clojure/clojure "1.6.0"] [net.bytebuddy/byte-buddy "1.2.2"] [net.uncontended/precipice-core "0.7.0-SNAPSHOT"] [net.uncontended/precipice-threadpool "0.7.0-SNAPSHOT"]])
Use re-seq to fix splitting up words in camel->kebab converter
(ns app-macros.util.string (:require [clojure.string :as str])) (defn camel->kebab "Converts from camel case (e.g. Foo or FooBar) to kebab case (e.g. foo or foo-bar)." [s] (str/lower-case (str/replace s #"(.+)([A-Z])" "$1-$2")))
(ns app-macros.util.string (:require [clojure.string :as str])) (defn camel->kebab "Converts from camel case (e.g. Foo or FooBar) to kebab case (e.g. foo or foo-bar)." [s] (->> s (re-seq #"[A-Z][a-z0-9_-]*") (str/join "-") (str/lower-case)))
Fix broadcast of new users
(ns braid.server.events (:require [braid.server.db :as db] [braid.server.db.group :as group] [braid.server.db.thread :as thread] [braid.server.db.user :as user] [braid.server.sync-helpers :as sync-helpers])) (defn user-join-group! [user-id group-id] (db/run-txns! (group/user-join-group-txn user-id group-id)) (sync-helpers/broadcast-group-change group-id [:braid.client/new-user (user/user-by-id user-id)])) (defn register-user! [email group-id] (let [[user] (db/run-txns! (user/create-user-txn {:id (db/uuid) :email email}))] (user-join-group! (user :id) group-id) (user :id)))
(ns braid.server.events (:require [braid.server.db :as db] [braid.server.db.group :as group] [braid.server.db.thread :as thread] [braid.server.db.user :as user] [braid.server.sync-helpers :as sync-helpers])) (defn user-join-group! [user-id group-id] (db/run-txns! (group/user-join-group-txn user-id group-id)) (sync-helpers/broadcast-group-change group-id [:braid.client/new-user [(user/user-by-id user-id) group-id]])) (defn register-user! [email group-id] (let [[user] (db/run-txns! (user/create-user-txn {:id (db/uuid) :email email}))] (user-join-group! (user :id) group-id) (user :id)))
Load protocol specs as needed from resources
(ns clj-chrome-devtools.protocol-definitions "Loads CDP protocol definition JSON files for consumption by def macros." (:require [cheshire.core :as cheshire])) (defn- load-json [json-file] (as-> json-file it (str "resources/devtools-protocol/json/" it) (slurp it) (cheshire/parse-string it true))) (def browser-protocol-json (load-json "browser_protocol.json")) (def js-protocol-json (load-json "js_protocol.json")) (defn all-domains [] (concat (:domains browser-protocol-json) (:domains js-protocol-json))) (defn commands-for-domain [domain] (->> (all-domains) (filter #(= (:domain %) domain)) first :commands)) (defn domains [] (into #{} (map :domain) (all-domains)))
(ns clj-chrome-devtools.protocol-definitions "Loads CDP protocol definition JSON files for consumption by def macros." (:require [cheshire.core :as cheshire] [clojure.java.io :as io])) (defn- load-json [json-file] (as-> json-file it (str "devtools-protocol/json/" it) (io/resource it) (slurp it) (cheshire/parse-string it true))) (def protocol-files ["browser_protocol.json" "js_protocol.json"]) (defn all-domains [] (mapcat (comp :domains load-json) protocol-files)) (defn commands-for-domain [domain] (->> (all-domains) (filter #(= (:domain %) domain)) first :commands)) (defn domains [] (into #{} (map :domain) (all-domains)))
Tidy using statements in unit tests
(ns {{name}}.web_unit (:use [{{name}}.web]) (:use [clojure.test]) (:use midje.sweet)) (defn request [method resource] (routes {:request-method method :uri resource } )) (deftest ^:unit tests (fact "Ping returns a pong" (:body (request :get "/1.x/ping")) => "pong" ) )
(ns {{name}}.web_unit (:use [{{name}}.web] [clojure.test] [midje.sweet])) (defn request [method resource] (routes {:request-method method :uri resource } )) (deftest ^:unit tests (fact "Ping returns a pong" (:body (request :get "/1.x/ping")) => "pong" ) )
Use a macro for generating proc-fns and print the resulting output.
;;; ;;; Copyright 2015 Ruediger Gad ;;; ;;; This software is released under the terms of the Eclipse Public License ;;; (EPL) 1.0. You can find a copy of the EPL at: ;;; http://opensource.org/licenses/eclipse-1.0.php ;;; (ns ^{:author "Ruediger Gad", :doc "Helper that are primarily used during experiments"} dsbdp.experiment-helper (:require [dsbdp.byte-array-conversion :refer :all])) (defn create-proc-fns [fn-1 fn-n n] (loop [fns [fn-1]] (if (< (count fns) n) (recur (conj fns fn-n)) fns)))
;;; ;;; Copyright 2015 Ruediger Gad ;;; ;;; This software is released under the terms of the Eclipse Public License ;;; (EPL) 1.0. You can find a copy of the EPL at: ;;; http://opensource.org/licenses/eclipse-1.0.php ;;; (ns ^{:author "Ruediger Gad", :doc "Helper that are primarily used during experiments"} dsbdp.experiment-helper (:require [dsbdp.byte-array-conversion :refer :all])) (defmacro create-proc-fns [fn-1 fn-n n] (loop [fns [fn-1]] (if (< (count fns) n) (recur (conj fns fn-n)) (do (println "proc-fns:" fns) fns))))
Allow addition of defrecords to Isla env.
(ns isla.library (:use [clojure.pprint]) (:require [clojure.string :as str]) (:require [isla.utils :as utils])) (defn get-initial-env [] { :ret nil :ctx { "write" (fn [env str] (utils/output str) ;; print out str) ;; add to context } })
(ns isla.library (:use [clojure.pprint]) (:require [clojure.string :as str]) (:require [isla.user :as user]) (:require [isla.utils :as utils])) (defn get-initial-env [& args] (def extra-types (first args)) { :ret nil :ctx { "write" (fn [env str] (utils/output str) ;; print out str) ;; add to context } :types (if (nil? extra-types) user/types (merge extra-types user/types)) })
Revert to starting swank conditionally, when the CIRCLE_SWANK env variable is set
(ns circle.init (:require circle.env) ;; env needs to be loaded before any circle source files containing tests (:require circle.swank) (:require circle.db) (:require circle.repl) (:require circle.logging) (:require circle.util.chdir) (:require fs)) (defn maybe-change-dir "Change the current working directory to backend/. Although changing it to the project root makes more conceptual sense, there are lots of entrypoints to the clojure code (for example, tests, swank, etc) which are hard to get a hook on, but making sure there is a hook into the Rails code is easy. It makes more code to write this in JRuby, but it's written now, so why change it.cl" [] (when (= (-> (fs/cwd) fs/normpath fs/split last) "CircleCI") (circle.util.chdir/chdir "backend") (println "Changing current working directory to" (fs/abspath (fs/cwd))))) (def init* (delay (try (circle.logging/init) (circle.swank/init) (circle.db/init) (circle.repl/init) (println (java.util.Date.)) true (catch Exception e (println "caught exception on startup:") (.printStackTrace e) (println "exiting") (System/exit 1))))) (defn init "Start everything up. idempotent." [] @init*) (defn -main [] (init))
(ns circle.init (:require circle.env) ;; env needs to be loaded before any circle source files containing tests (:require circle.swank) (:require circle.db) (:require circle.repl) (:require circle.logging) (:require circle.util.chdir) (:require fs)) (defn maybe-change-dir "Change the current working directory to backend/. Although changing it to the project root makes more conceptual sense, there are lots of entrypoints to the clojure code (for example, tests, swank, etc) which are hard to get a hook on, but making sure there is a hook into the Rails code is easy. It makes more code to write this in JRuby, but it's written now, so why change it.cl" [] (when (= (-> (fs/cwd) fs/normpath fs/split last) "CircleCI") (circle.util.chdir/chdir "backend") (println "Changing current working directory to" (fs/abspath (fs/cwd))))) (def init* (delay (try (circle.logging/init) (when (System/getenv "CIRCLE_SWANK") (circle.swank/init)) (circle.db/init) (circle.repl/init) (println (java.util.Date.)) true (catch Exception e (println "caught exception on startup:") (.printStackTrace e) (println "exiting") (System/exit 1))))) (defn init "Start everything up. idempotent." [] @init*) (defn -main [] (init))
Revert "Use apply str instead of join"
(ns github-changelog.util (:require [clojure.string :refer [ends-with?]])) (defn str-map [f & sqs] (apply str (apply map f sqs))) (defn extract-params [query-string] (into {} (for [[_ k v] (re-seq #"([^&=]+)=([^&]+)" query-string)] [(keyword k) v]))) (defn strip-trailing ([s] (strip-trailing s "/")) ([s end] (if (ends-with? s end) (recur (apply str (drop-last s)) end) s)))
(ns github-changelog.util (:require [clojure.string :refer [join ends-with?]])) (defn str-map [f & sqs] (join (apply map f sqs))) (defn extract-params [query-string] (into {} (for [[_ k v] (re-seq #"([^&=]+)=([^&]+)" query-string)] [(keyword k) v]))) (defn strip-trailing ([s] (strip-trailing s "/")) ([s end] (if (ends-with? s end) (recur (join (drop-last s)) end) s)))
Load user.clj if present on classpath
;- ; Copyright 2011 (c) Meikel Brandmeyer. ; All rights reserved. ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; ; The above copyright notice and this permission notice shall be included in ; all copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ; THE SOFTWARE. (ns vimclojure.core) (defn init-server [] ; Check for doc macro. 1.2 in c.core, 1.3 in c.repl (when-not (ns-resolve 'clojure.core 'doc) (binding [*ns* *ns*] (in-ns 'user) (refer-clojure) (use 'clojure.repl))))
;- ; Copyright 2011 (c) Meikel Brandmeyer. ; All rights reserved. ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; ; The above copyright notice and this permission notice shall be included in ; all copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ; THE SOFTWARE. (ns vimclojure.core) (defn init-server [] (binding [*ns* *ns*] (in-ns 'user) (refer-clojure) ; Check for doc macro. 1.2 in c.core, 1.3 in c.repl (when-not (ns-resolve 'clojure.core 'doc) (use 'clojure.repl)) (when (io/resource "user.clj") (load "user"))))
Add some logging to startup.
(ns kixi.event.producer (:require [clj-kafka.core :as kafka] [clj-kafka.producer :as p] [kixi.event.zookeeper :as zk] [clojure.tools.logging :as log] [com.stuartsierra.component :as component] [clojure.tools.logging :as log]) (:import [kafka.admin AdminUtils])) (defrecord EventProducer [] component/Lifecycle (start [this] (log/info "Starting EventProducer") (assoc this :instance (p/producer {"metadata.broker.list" (zk/broker-list (:zookeeper this)) "serializer.class" "kafka.serializer.DefaultEncoder" "partitioner.class" "kafka.producer.DefaultPartitioner" "max.message.size" (:max-message-size this) "compression.codec" "1"}))) (stop [this] (log/info "Stopping EventProducer") (when-let [i (:instance this)] (.close i)) (dissoc this :instance))) (defn new-producer ([] (->EventProducer)) ([& {:as opts}] (map->EventProducer opts)))
(ns kixi.event.producer (:require [clj-kafka.core :as kafka] [clj-kafka.producer :as p] [kixi.event.zookeeper :as zk] [clojure.tools.logging :as log] [com.stuartsierra.component :as component] [clojure.tools.logging :as log]) (:import [kafka.admin AdminUtils])) (defrecord EventProducer [] component/Lifecycle (start [{:keys [zookeeper max-message-size]}] (log/info "Starting EventProducer") (log/info " Zookeeper is: " zookeeper) (log/info " Max message size is: " max-message-size) (assoc this :instance (p/producer {"metadata.broker.list" (zk/broker-list zookeeper) "serializer.class" "kafka.serializer.DefaultEncoder" "partitioner.class" "kafka.producer.DefaultPartitioner" "max.message.size" (str max-message-size) "compression.codec" "1"}))) (stop [this] (log/info "Stopping EventProducer") (when-let [i (:instance this)] (.close i)) (dissoc this :instance))) (defn new-producer ([] (->EventProducer)) ([& {:as opts}] (map->EventProducer opts)))
Add unless macro examples (7.1.2)
(ns clojure-walkthrough.cjia.ch07-xx) ; 7.1: Macro basic ; 7.1.1: Textual substitution (def a-ref (ref 0)) (dosync (ref-set a-ref 1)) ; 1 ;; You could implement this using the macros like ; (syn-set a-ref 1) (defmacro sync-set [r v] (list 'dosync (list 'ref-set r v))) (sync-set a-ref 1) ;; 1
(ns clojure-walkthrough.cjia.ch07-xx) ; 7.1: Macro basic ; 7.1.1: Textual substitution (def a-ref (ref 0)) (dosync (ref-set a-ref 1)) ; 1 ;; You could implement this using the macros like ; (syn-set a-ref 1) (defmacro sync-set [r v] (list 'dosync (list 'ref-set r v))) (sync-set a-ref 1) ;; 1 ;; 7.1.2: the unless example ; we want to write the reverse of (if test then else) (defn exhibits-oddity? [x] (if (odd? x) (str x " is very odd!"))) (exhibits-oddity? 3) ; "3 is very odd!" (exhibits-oddity? 2) ; nil ; we want to be able to implement unless like in ruby ;; (defn exhibits-oddity? [x] ;; (unless (odd? x) ;; (str x "is very odd!"))) ; this will not work as we don't have `unless` in Clojure ; but we can implement this using macros (defn unless [test then] (if (not test) then)) (exhibits-oddity? 10) ; nil? (unless (exhibits-oddity? 10) (println "it is really odd!")) (defn exhibits-oddity? [x] (unless (even? x) (println "Rather odd"))) (exhibits-oddity? 11) ;; REPL: "Rather odd!" and return nil (exhibits-oddity? 10) ;; nil ;; The unless macro (defmacro unless [test then] (list 'if (list 'not test) then)) (defn exhibits-oddity? [x] (unless (even? x) (println "Very odd, indeed!"))) (exhibits-oddity? 10) ; nil (exhibits-oddity? 11) ; REPL: "Very odd, indeed!" then return (macroexpand '(unless (even? x) (println "Very odd, indeed!"))) ;; (if (not (even? x)) (println "Very odd, indeed!")) ;; Other useful functions are ; `macroexpand-1`, `macroexpand-all` from `clojure.walk`
Add Schema to dev def. Perf profile
(defproject metosin/spec-tools "0.1.0-SNAPSHOT" :description "Common utilities for clojure.spec" :url "https://github.com/metosin/spec-tools" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html" :distribution :repo :comments "same as Clojure"} :dependencies [[org.clojure/clojure "1.9.0-alpha10"]] :plugins [[funcool/codeina "0.4.0"]] :codeina {:target "doc" :src-uri "http://github.com/metosin/spec-tools/blob/master/" :src-uri-prefix "#L"} :profiles {:dev {:plugins [[jonase/eastwood "0.2.3"]] :dependencies [[criterium "0.4.4"] [org.clojure/test.check "0.9.0"] [org.clojure/clojurescript "1.9.227"]]}} :aliases {"all" ["with-profile" "dev"] "test-clj" ["all" "do" ["test"] ["check"]]})
(defproject metosin/spec-tools "0.1.0-SNAPSHOT" :description "Common utilities for clojure.spec" :url "https://github.com/metosin/spec-tools" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html" :distribution :repo :comments "same as Clojure"} :dependencies [[org.clojure/clojure "1.9.0-alpha10"]] :plugins [[funcool/codeina "0.4.0"]] :codeina {:target "doc" :src-uri "http://github.com/metosin/spec-tools/blob/master/" :src-uri-prefix "#L"} :profiles {:dev {:plugins [[jonase/eastwood "0.2.3"]] :dependencies [[criterium "0.4.4"] [prismatic/schema "1.1.3"] [org.clojure/test.check "0.9.0"] [org.clojure/clojurescript "1.9.227"]]} :perf {:jvm-opts ^:replace ["-server"]}} :aliases {"all" ["with-profile" "dev"] "perf" ["with-profile" "default,dev,perf"] "test-clj" ["all" "do" ["test"] ["check"]]})
Add Clojure 1.5 profile and repositories.
(defproject stencil "0.3.0" :description "Mustache in Clojure" :dependencies [[org.clojure/clojure "1.3.0"] [scout "0.1.0"] [quoin "0.1.0"] [slingshot "0.8.0"] [org.clojure/core.cache "0.6.1"]] :profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"]]} :clj1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]} :clj1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} :clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}} :extra-files-to-clean ["test/spec"])
(defproject stencil "0.3.0" :description "Mustache in Clojure" :dependencies [[org.clojure/clojure "1.3.0"] [scout "0.1.0"] [quoin "0.1.0"] [slingshot "0.8.0"] [org.clojure/core.cache "0.6.1"]] :profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"]]} :clj1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]} :clj1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} :clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]} :clj1.5 {:dependencies [[org.clojure/clojure "1.5.0-master-SNAPSHOT"]]}} :aliases {"all" ["with-profile" "dev:dev,clj1.4:dev,clj1.5"]} :repositories {"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases" :snapshots false :releases {:checksum :fail :update :always}} "sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots" :snapshots true :releases {:checksum :fail :update :always}}})
Upgrade clj-auth to 2.0.1, fixes basic auth for user
(defproject cider-ci_storage "2.0.0" :description "Cider-CI Storage" :license {:name "GNU AFFERO GENERAL PUBLIC LICENSE Version 3" :url "http://www.gnu.org/licenses/agpl-3.0.html"} :dependencies [ [cider-ci/clj-auth "2.0.0"] [cider-ci/clj-utils "2.0.0"] [me.raynes/fs "1.4.6"] [org.clojure/tools.nrepl "0.2.6"] ] ;:pedantic? :warn :source-paths [ "src"] :profiles { :dev { :resource-paths ["resources_dev"] } :production { :resource-paths [ "/etc/cider-ci_storage" ] }} :aot [cider-ci.storage.main] :main cider-ci.storage.main :repositories [["tmp" {:url "http://maven-repo-tmp.drtom.ch" :snapshots false}]] )
(defproject cider-ci_storage "2.0.1" :description "Cider-CI Storage" :license {:name "GNU AFFERO GENERAL PUBLIC LICENSE Version 3" :url "http://www.gnu.org/licenses/agpl-3.0.html"} :dependencies [ [cider-ci/clj-auth "2.0.1"] [cider-ci/clj-utils "2.0.0"] [me.raynes/fs "1.4.6"] [org.clojure/tools.nrepl "0.2.6"] ] ;:pedantic? :warn :source-paths [ "src"] :profiles { :dev { :resource-paths ["resources_dev"] } :production { :resource-paths [ "/etc/cider-ci_storage" ] }} :aot [cider-ci.storage.main] :main cider-ci.storage.main :repositories [["tmp" {:url "http://maven-repo-tmp.drtom.ch" :snapshots false}]] )
Prepare for next release cycle.
(defproject org.onyxplatform/onyx-metrics "0.8.1.0-alpha9" :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 [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.8.1-alpha9"] [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 [[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.1.0-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 [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}} [org.onyxplatform/onyx "0.8.1-alpha9"] [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 [[riemann-clojure-client "0.4.1"]] :plugins [[lein-set-version "0.4.1"] [lein-update-dependency "0.1.2"] [lein-pprint "1.1.1"]]}})
Add login operation to API
(ns madouc.handlers.api (:require [ring.util.http-response :as http-resp] [compojure.api.sweet :refer :all] [madouc.db :as db])) (defapi handler-old (context "/api" [] (GET "/status" [] (http-resp/ok {:api-status "ok"})))) (def handler (api {:swagger {:ui "/api-docs/" :spec "/api/swagger.json" :data {:info {:title "Madouc API" :description "API for the Madouc service" :version "0.1.3"}}}} (context "/api" [] (GET "/status" [] (http-resp/ok {:api-status "ok"})))))
(ns madouc.handlers.api (:require [ring.util.http-response :as http-resp] [compojure.api.sweet :refer :all] [schema.core :as s] [madouc.db :as db] [madouc.controllers :refer :all])) (defapi handler-old (context "/api" [] (GET "/status" [] (http-resp/ok {:api-status "ok"})))) (s/defschema LoginReq {:username String :password String}) (s/defschema Token {:token String}) (s/defschema APIError {:error String}) (def handler (api {:swagger {:ui "/api-docs/" :spec "/api/swagger.json" :data {:info {:title "Madouc API" :description "API for the Madouc service" :version "0.1.3"}}}} (context "/api" [] (GET "/status" [] (http-resp/ok {:api-status "ok"})) (POST "/login" [] :responses {401 {:schema APIError :description "Unauthorized"}} :return Token :body [req LoginReq] (login-controller req)))))
Update Ring-Codec dependency to 1.1.3
(defproject ring/ring-core "1.9.0" :description "Ring core libraries." :url "https://github.com/ring-clojure/ring" :scm {:dir ".."} :license {:name "The MIT License" :url "http://opensource.org/licenses/MIT"} :dependencies [[org.clojure/clojure "1.7.0"] [ring/ring-codec "1.1.2"] [commons-io "2.6"] [commons-fileupload "1.4"] [crypto-random "1.2.0"] [crypto-equality "1.0.0"]] :aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]} :profiles {:provided {:dependencies [[javax.servlet/servlet-api "2.5"]]} :dev {:dependencies [[clj-time "0.15.2"] [javax.servlet/servlet-api "2.5"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} :1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]}})
(defproject ring/ring-core "1.9.0" :description "Ring core libraries." :url "https://github.com/ring-clojure/ring" :scm {:dir ".."} :license {:name "The MIT License" :url "http://opensource.org/licenses/MIT"} :dependencies [[org.clojure/clojure "1.7.0"] [ring/ring-codec "1.1.3"] [commons-io "2.6"] [commons-fileupload "1.4"] [crypto-random "1.2.0"] [crypto-equality "1.0.0"]] :aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]} :profiles {:provided {:dependencies [[javax.servlet/servlet-api "2.5"]]} :dev {:dependencies [[clj-time "0.15.2"] [javax.servlet/servlet-api "2.5"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} :1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]}})
Handle web requests asynchronously using Aleph and core.async
(ns clstreams.webapi (:require [bidi.ring :as bidi] [clstreams.webapi.component :refer [new-aleph]] [ring.middleware.json :refer [wrap-json-body wrap-json-response]] [ring.util.response :refer [response]]) (:import org.apache.kafka.streams.state.QueryableStoreTypes)) (defn make-word-count-handler [{{kstreams :kstreams} :pipeline}] (fn [{:keys [route-params]}] (let [store (.store kstreams "Counts" (QueryableStoreTypes/keyValueStore))] (->> (:word route-params) (.get store) str response)) )) (defn make-main-handler [component] (bidi/make-handler [["/word-count/" :word] (make-word-count-handler component)])) (defn make-app [component] (-> (make-main-handler component) wrap-json-body wrap-json-response)) (defn web-test [] (new-aleph make-app {:host "0.0.0.0" :port 8080}))
(ns clstreams.webapi (:require [bidi.ring :as bidi] [clojure.core.async :refer [<! go timeout]] [clstreams.webapi.component :refer [new-aleph]] [manifold.stream :as stream] [ring.middleware.json :refer [wrap-json-body wrap-json-response]] [ring.util.response :refer [response]]) (:import org.apache.kafka.streams.state.QueryableStoreTypes)) (defn make-word-count-handler [{{kstreams :kstreams} :pipeline}] (fn [{:keys [route-params]}] (let [store (.store kstreams "Counts" (QueryableStoreTypes/keyValueStore))] (->> (:word route-params) (.get store) str response)) )) (defn make-main-handler [component] (bidi/make-handler [["/word-count/" :word] (make-word-count-handler component)])) (defn make-async-handler [component] (fn [request] (let [handler (make-main-handler component)] (-> (go (<! (timeout 900)) (handler request)) stream/->source stream/take!)))) (defn make-app [component] (-> (make-async-handler component) wrap-json-body wrap-json-response)) (defn web-test [] (new-aleph make-app {:host "0.0.0.0" :port 8080}))
Add proper roles for tab elements
(ns my-money.components.tab-bar (:require [clojure.string :as string] [my-money.app.controller.events :as ec])) (defn tab [e! active-value value type] [:label.btn.btn-primary (when (= value active-value) {:class "active"}) (string/capitalize value) [:input {:type "radio" :value value :id value :name type :on-click #(e! (ec/->SelectType value))}]]) (defn tab-bar [e! active-value] ;; TODO: Make this generic [:div.btn-group.btn-group-toggle [tab e! active-value "all" "type"] [tab e! active-value "expenses" "type"] [tab e! active-value "incomes" "type"]])
(ns my-money.components.tab-bar (:require [clojure.string :as string] [my-money.app.controller.events :as ec])) (defn tab [e! active-value value type] [:label.btn.btn-primary {:role "tab" :class [(when (= value active-value) "active")]} (string/capitalize value) [:input {:type "radio" :value value :id value :name type :on-click #(e! (ec/->SelectType value))}]]) (defn tab-bar [e! active-value] ;; TODO: Make this generic [:div.btn-group.btn-group-toggle {:role "tablist"} [tab e! active-value "all" "type"] [tab e! active-value "expenses" "type"] [tab e! active-value "incomes" "type"]])
Fix error from remote read when key not found
(ns chatom.parser (:require [om.next.server :as om]) (:refer-clojure :exclude [read])) (defn dispatch [_ k _] k) (defmulti read dispatch) (defmulti mutate dispatch) (defmethod read :default [{:keys [db query]} key params] (println "default read called") {:value "not-found"}) (defmethod mutate :default [{:keys [db query]} key params] (println "default mutate called") {:action #(do "foo!")}) (def parser (om/parser {:read read :mutate mutate}))
(ns chatom.parser (:require [om.next.server :as om]) (:refer-clojure :exclude [read])) (defn dispatch [_ k _] k) (defmulti read dispatch) (defmulti mutate dispatch) (defmethod read :default [{:keys [db query]} key params] (println "default read called") {}) (defmethod mutate :default [{:keys [db query]} key params] (println "default mutate called") {:action #(do "foo!")}) (def parser (om/parser {:read read :mutate mutate}))
Move sequence realization to with-open
(ns hu.ssh.github-changelog.dependencies.bundler (:require [clojure.string :refer [split-lines]] [clojure.java.io :as io])) (defn- get-specs [reader] (->> (line-seq reader) (drop-while #(not= % " specs:")) (drop 1) (take-while seq) doall)) (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))))
(ns hu.ssh.github-changelog.dependencies.bundler (:require [clojure.string :refer [split-lines]] [clojure.java.io :as io])) (defn- get-specs [reader] (->> (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)] (doall (parse-specs (get-specs reader)))))
Add a 'render fn for deftemplate --> strings.
(ns aspire.templates (:require [net.cgrand.enlive-html :as en] [hiccup.core :as hc])) (en/deftemplate index "public/index.html" [user-display-name] [:script] nil [:body] (en/append {:tag "script" :attrs {:type "text/javascript" :src "js/aspire.js"}}))
(ns aspire.templates (:require [net.cgrand.enlive-html :as en] [hiccup.core :as hc])) (defn render [template] (reduce str template)) (en/deftemplate index "public/index.html" [user-display-name] [:script] nil [:body] (en/append {:tag "script" :attrs {:type "text/javascript" :src "js/aspire.js"}}))
Add reflections as a dependency
(set-env! :source-paths #{"src"} :dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"] [boot/core "2.0.0-rc12" :scope "provided"] [junit "4.12" :scope "provided"]]) (require '[radicalzephyr.boot-junit :refer [junit]]) (def +version+ "0.1.0") (task-options! pom {:project 'radicalzephyr/boot-junit :version +version+ :description "Run some jUnit tests in boot!" :url "https://github.com/radicalzephyr/boot-junit" :scm {:url "https://github.com/radicalzephyr/boot-junit"} :license {"Eclipse Public License" "http://www.eclipse.org/legal/epl-v10.html"}} junit {:packages '#{radicalzephyr.boot_junit.test}})
(set-env! :source-paths #{"src"} :dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"] [boot/core "2.1.0" :scope "provided"] [junit "4.12" :scope "provided"] [org.reflections/reflections "0.9.10" :scope "provided"]]) (require '[radicalzephyr.boot-junit :refer [junit]]) (def +version+ "0.1.0") (task-options! pom {:project 'radicalzephyr/boot-junit :version +version+ :description "Run some jUnit tests in boot!" :url "https://github.com/radicalzephyr/boot-junit" :scm {:url "https://github.com/radicalzephyr/boot-junit"} :license {"Eclipse Public License" "http://www.eclipse.org/legal/epl-v10.html"}} junit {:packages '#{radicalzephyr.boot_junit.test}})
Extend repo fn with 2-arity version
(ns hu.ssh.github-changelog (:require [environ.core :refer [env]] [tentacles.core :as core] [tentacles.repos :as repos] [tentacles.pulls :as pulls] [clj-semver.core :as semver])) (defn repo "Gets the repository from its name" [name] (vector "pro" name)) (defn parse-semver "Checks for semantic versions with or without v predicate" [tag] (let [version (:name tag) parse #(try (semver/parse %) (catch java.lang.AssertionError _e nil))] (if (= \v (first version)) (parse (apply str (rest version))) (parse version)))) (defn changelog "Fetches the changelog" [user repo] (let [tags (map #(assoc % :version (parse-semver %)) (repos/tags user repo)) pulls (pulls/pulls user repo {:state "closed"}) commits (repos/commits user repo)] (println (first tags)))) (core/with-defaults {:oauth-token (env :github-token) :all_pages true} (changelog "raszi" "node-tmp"))
(ns hu.ssh.github-changelog (:require [environ.core :refer [env]] [tentacles.core :as core] [tentacles.repos :as repos] [tentacles.pulls :as pulls] [clj-semver.core :as semver])) (defn repo "Gets the repository from its name" ([name] (repo "pro" name)) ([org repo] [org repo])) (defn parse-semver "Checks for semantic versions with or without v predicate" [tag] (let [version (:name tag) parse #(try (semver/parse %) (catch java.lang.AssertionError _e nil))] (if (= \v (first version)) (parse (apply str (rest version))) (parse version)))) (defn changelog "Fetches the changelog" [user repo] (let [tags (map #(assoc % :version (parse-semver %)) (repos/tags user repo)) pulls (pulls/pulls user repo {:state "closed"}) commits (repos/commits user repo)] (println (first tags)))) (core/with-defaults {:oauth-token (env :github-token) :all_pages true} (changelog "raszi" "node-tmp"))
Add create-buffer and create-buffer-source to audio-utils.web-audio
(ns audio-utils.web-audio) (defn audio-context [] (or (new js/window.AudioContext) (new js/window.webkitAudioContext)))
(ns audio-utils.web-audio) (defn audio-context [] (or (new js/window.AudioContext) (new js/window.webkitAudioContext))) (defn create-buffer [ctx n-channels size sample-rate] (.createBuffer ctx n-channels size sample-rate)) (defn create-buffer-source ([ctx] (.createBufferSource ctx)) ([ctx n-channels sample-rate data] (let [buf (create-buffer ctx n-channels (count (cond-> data (> n-channels 1) first)) sample-rate) src (create-buffer-source ctx)] (doseq [channel (range 0 n-channels) :let [channel-data (.getChannelData buf channel) input-data (cond-> data (> n-channels 1) (get channel))]] (doseq [[i x] (map-indexed vector input-data)] (aset channel-data i x))) (set! (.-buffer src) buf) src)))
Add github link to footer
; @title default title ; @format html5 [:head [:meta {:charset (:charset site)}] [:meta {:name "viewport" :content "width=device-width, initiali-scale=1.0, user-scalable=yes"}] [:title (if (= (:title site) "home") (:site-title site) (str (:site-title site) " - " (:title site)))] [:link {:rel "shortcut icon" :href "/favicon.ico"}] [:link {:href "/atom.xml" :rel "alternate" :title (:title site) :type "application/atom+xml"}] (css [(:css site ())]) #_(css {:media "only screen and (max-device-width:480px)"} (:device-css site))] ; /head [:body (container contents (footer (link (str "@" (:twitter site)) (str "http://twitter.com/" (:twitter site))) "&nbsp; 2013")) ; /container (js ["/js/prettify.js" "/js/lang-clj.js" (:js site ())])] ; /body
; @title default title ; @format html5 [:head [:meta {:charset (:charset site)}] [:meta {:name "viewport" :content "width=device-width, initiali-scale=1.0, user-scalable=yes"}] [:title (if (= (:title site) "home") (:site-title site) (str (:site-title site) " - " (:title site)))] [:link {:rel "shortcut icon" :href "/favicon.ico"}] [:link {:href "/atom.xml" :rel "alternate" :title (:title site) :type "application/atom+xml"}] (css [(:css site ())]) #_(css {:media "only screen and (max-device-width:480px)"} (:device-css site))] ; /head [:body (container contents [:div.text-center (footer (link "Github/Pance " "https://github.com/Pance") (link (str "@" (:twitter site)) (str "http://twitter.com/" (:twitter site))) "&nbsp; 2014")]) ; /container (js ["/js/prettify.js" "/js/lang-clj.js" (:js site ())])] ; /body
Add a test to see if things are URIs
(ns icecap.handlers.http-test (:require [clojure.core.async :as a] [manifold.deferred :as d] [icecap.handlers.core :refer [execute]] [icecap.schema :refer [check-plan]] [icecap.handlers.http] [aleph.http :as h] [clojure.test :refer :all])) (def url "http://www.example.com") (def step {:type :http :url url}) (deftest schema-tests (testing "valid steps" (are [s] (nil? (check-plan s)) step)) (testing "invalid steps" (are [s expected] (= (check-plan (merge {:type :http} s)) expected) {} '{:url missing-required-key} {:uri url} '{:uri disallowed-key :url missing-required-key}))) (def fake-response {}) (defn fake-request [_] (d/success-deferred fake-response)) (deftest execute-tests (with-redefs [h/request fake-request] (is (let [ch (execute step) [result] (a/<!! (a/into [] ch))] (= result fake-response)))))
(ns icecap.handlers.http-test (:require [clojure.core.async :as a] [manifold.deferred :as d] [icecap.handlers.core :refer [execute]] [icecap.schema :refer [check-plan]] [icecap.handlers.http] [aleph.http :as h] [clojure.test :refer :all])) (def url "http://www.example.com") (def step {:type :http :url url}) (deftest schema-tests (testing "valid steps" (are [s] (nil? (check-plan s)) step)) (testing "invalid steps" (are [s expected] (= (check-plan (merge {:type :http} s)) expected) {} '{:url missing-required-key} {:uri url} '{:uri disallowed-key :url missing-required-key} {:url 1} '{:url (throws? (URI 1))}))) (def fake-response {}) (defn fake-request [_] (d/success-deferred fake-response)) (deftest execute-tests (with-redefs [h/request fake-request] (is (let [ch (execute step) [result] (a/<!! (a/into [] ch))] (= result fake-response)))))
Test should not chekcs collection order
(ns carambar.cache-test (:require [midje.sweet :refer :all] [carambar.cache :refer :all])) (fact (add-entry {:name "/path/test.jar" :values []}) => (contains {:name "/path/test.jar" :values []})) ;; need to run mvn clean install before... (def jarfile-with-two-classes "/home/nchapon/opt/m2_repo/org/carambar/simple/1.0-SNAPSHOT/simple-1.0-SNAPSHOT.jar") (def slf4j "/home/nchapon/opt/m2_repo/org/slf4j/slf4j-api/1.7.8/slf4j-api-1.7.8.jar") (fact (:values (parse jarfile-with-two-classes)) => ["org.carambar.App" "org.carambar.MyClass"]) (fact (filename->javaclass "a/b/c/MyClass.class") => "a.b.c.MyClass")
(ns carambar.cache-test (:require [midje.sweet :refer :all] [carambar.cache :refer :all])) (fact (add-entry {:name "/path/test.jar" :values []}) => (contains {:name "/path/test.jar" :values []})) ;; need to run mvn clean install before... (def jarfile-with-two-classes "/home/nchapon/opt/m2_repo/org/carambar/simple/1.0-SNAPSHOT/simple-1.0-SNAPSHOT.jar") (def slf4j "/home/nchapon/opt/m2_repo/org/slf4j/slf4j-api/1.7.8/slf4j-api-1.7.8.jar") (fact (:values (parse jarfile-with-two-classes)) => (contains ["org.carambar.App" "org.carambar.MyClass"] :in-any-order)) (fact (filename->javaclass "a/b/c/MyClass.class") => "a.b.c.MyClass")
Make migrations non verbose on tests.
(ns uxbox.tests.helpers (:require [clojure.test :as t] [mount.core :as mount] [suricatta.core :as sc] [uxbox.persistence :as up] [uxbox.config :as ucfg])) (def +config+ (ucfg/read-test-config)) (def +ds+ (up/create-datasource (:database +config+))) (defn database-reset [next] (with-open [conn (sc/context +ds+)] (sc/execute conn "drop schema if exists public cascade;") (sc/execute conn "create schema public;")) (mount/start-with {#'uxbox.config/config +config+}) (next))
(ns uxbox.tests.helpers (:require [clojure.test :as t] [mount.core :as mount] [suricatta.core :as sc] [uxbox.migrations :as umg] [uxbox.persistence :as up] [uxbox.config :as ucfg])) (def +config+ (ucfg/read-test-config)) (def +ds+ (up/create-datasource (:database +config+))) (defn migrate [& args] (umg/migrate {:verbose false})) (defn database-reset [next] (with-open [conn (sc/context +ds+)] (sc/execute conn "drop schema if exists public cascade;") (sc/execute conn "create schema public;")) (with-redefs [uxbox.migrations/migrate migrate] (mount/start-with {#'uxbox.config/config +config+})) (next))
Change spec for node children.
(ns evermind.domain.core (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen])) (s/def ::node (s/keys :req-un [] :opt-un [::parent ::children])) (s/def ::parent ::node) (s/def ::children (s/* ::node)) (defn create-node ([] {})) (s/fdef create-node :args (s/cat) :ret ::node) (defn create-mindmap ([] (create-node))) (s/fdef create-mindmap :args (s/cat) :ret ::node) (defn add-child ([parent child] (assoc parent :children (conj (:children parent) child)))) ;; ([node child pos])) (s/fdef add-child :args (s/cat :parent ::node :child ::node) :ret ::node :fn (fn [arg] (some #(= % (-> arg :args :child)) (-> arg :ret :children)))) (defn remove-child ([node child])) (defn filter-children ([node pred]))
(ns evermind.domain.core (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen])) (s/def ::node (s/keys :req-un [] :opt-un [::parent ::children])) (s/def ::parent ::node) (s/def ::children (s/coll-of ::node :kind set?)) (defn create-node ([] {})) (s/fdef create-node :args (s/cat) :ret ::node) (defn create-mindmap ([] (create-node))) (s/fdef create-mindmap :args (s/cat) :ret ::node) (defn add-child ([parent child] (assoc parent :children (conj (:children parent) child)))) ;; ([node child pos])) (s/fdef add-child :args (s/cat :parent ::node :child ::node) :ret ::node :fn #(contains? (-> % :ret :children) (-> % :args :child))) (defn remove-child ([node child])) (defn filter-children ([node pred]))
Allow non ILifecycle components in defsystem
(ns com.palletops.leaven "A component composition library." (:require [com.palletops.leaven.protocols :as protocols :refer [ILifecycle IStatus]])) (defn start "Start a component." [component] (if (satisfies? ILifecycle component) (protocols/start component) component)) (defn stop "Stop a component." [component] (if (satisfies? ILifecycle component) (protocols/stop component) component)) (defn status "Ask a component for its status." [component] (if (satisfies? IStatus component) (protocols/status component))) #+clj (defmacro defsystem "Macro to build a system defrecord out of `components`, a sequence of keywords that specify the sub-components. The record will implement ILifecycle and IStatus by calling the protocol methods on each of the components." [record-name components] (letfn [(start-subcomp [k] `(update-in [~k] protocols/start)) (stop-subcomp [k] `(update-in [~k] protocols/stop)) (status-subcomp [k] `(update-in [~k] status))] `(defrecord ~record-name [~@(map (comp symbol name) components)] ILifecycle (~'start [component#] (-> component# ~@(map start-subcomp components))) (~'stop [component#] (-> component# ~@(map stop-subcomp (reverse components)))) IStatus (~'status [component#] (-> component# ~@(map status-subcomp components))))))
(ns com.palletops.leaven "A component composition library." (:require [com.palletops.leaven.protocols :as protocols :refer [ILifecycle IStatus]])) (defn start "Start a component." [component] (if (satisfies? ILifecycle component) (protocols/start component) component)) (defn stop "Stop a component." [component] (if (satisfies? ILifecycle component) (protocols/stop component) component)) (defn status "Ask a component for its status." [component] (if (satisfies? IStatus component) (protocols/status component))) #+clj (defmacro defsystem "Macro to build a system defrecord out of `components`, a sequence of keywords that specify the sub-components. The record will implement ILifecycle and IStatus by calling the protocol methods on each of the components." [record-name components] (letfn [(start-subcomp [k] `(update-in [~k] start)) (stop-subcomp [k] `(update-in [~k] stop)) (status-subcomp [k] `(update-in [~k] status))] `(defrecord ~record-name [~@(map (comp symbol name) components)] ILifecycle (~'start [component#] (-> component# ~@(map start-subcomp components))) (~'stop [component#] (-> component# ~@(map stop-subcomp (reverse components)))) IStatus (~'status [component#] (-> component# ~@(map status-subcomp components))))))
Make parent dir(s) when writing to a handle
(ns grimoire.api.fs.write "Filesystem datastore implementation of the Grimoire API." (:refer-clojure :exclude [isa?]) (:require [grimoire.things :refer :all] [grimoire.api :as api] [grimoire.api.fs :refer :all])) ;; Interacting with the datastore - writing ;;-------------------------------------------------------------------- (defmethod api/write-meta :filesystem [config thing data] (let [thing (ensure-thing thing) _ (assert thing) handle (thing->meta-handle config thing) _ (assert handle)] (spit handle (pr-str data)) nil)) (defmethod api/write-notes :filesystem [config thing data] {:pre [(string? data) thing config (-> config :datastore :notes)]} (let [thing (ensure-thing thing) _ (assert thing) handle (thing->notes-handle config thing) _ (assert thing)] (spit handle data))) ;; FIXME: add write-example (defmethod api/write-related :filesystem [config thing related-things] (let [thing (ensure-thing thing) _ (assert thing) _ (assert (isa? :def thing)) handle (thing->related-handle config thing) _ (assert thing)] (doseq [thing related-things] (spit handle (str (thing->path thing) \newline) :append true))))
(ns grimoire.api.fs.write "Filesystem datastore implementation of the Grimoire API." (:refer-clojure :exclude [isa?]) (:require [grimoire.things :refer :all] [grimoire.api :as api] [grimoire.api.fs :refer :all])) ;; Interacting with the datastore - writing ;;-------------------------------------------------------------------- (defmethod api/write-meta :filesystem [config thing data] (let [thing (ensure-thing thing) _ (assert thing) handle (thing->meta-handle config thing) _ (assert handle)] (.mkdirs (.getParentFile handle)) (spit handle (pr-str data)) nil)) (defmethod api/write-notes :filesystem [config thing data] {:pre [(string? data) thing config (-> config :datastore :notes)]} (let [thing (ensure-thing thing) _ (assert thing) handle (thing->notes-handle config thing) _ (assert thing)] (.mkdirs (.getParentFile handle)) (spit handle data))) ;; FIXME: add write-example (defmethod api/write-related :filesystem [config thing related-things] (let [thing (ensure-thing thing) _ (assert thing) _ (assert (isa? :def thing)) handle (thing->related-handle config thing) _ (assert thing)] (.mkdirs (.getParentFile handle)) (doseq [thing related-things] (spit handle (str (thing->path thing) \newline) :append true))))
Hide modal by ESC pressing.
(ns hatnik.web.client.form (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true] [hatnik.web.client.form-components :as widget] [hatnik.web.client.app-state :as state]) (:use [jayq.core :only [$]])) (om/root widget/action-form-header state/app-state {:target (. js/document (getElementById "iActionFormHeader"))}) (om/root widget/action-form-body state/app-state {:target (. js/document (getElementById "iActionFormBody"))}) (om/root widget/action-form-footer state/app-state {:target (. js/document (getElementById "iActionFormFooter"))})
(ns hatnik.web.client.form (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true] [hatnik.web.client.form-components :as widget] [hatnik.web.client.app-state :as state]) (:use [jayq.core :only [$]])) (om/root widget/action-form-header state/app-state {:target (. js/document (getElementById "iActionFormHeader"))}) (om/root widget/action-form-body state/app-state {:target (. js/document (getElementById "iActionFormBody"))}) (om/root widget/action-form-footer state/app-state {:target (. js/document (getElementById "iActionFormFooter"))}) ;; Keyboard actions ;; Hidden modal by ESC (.keydown ($ js/document) (fn [e] (when (= 27 (.-keyCode e)) (.modal ($ :#iModal) "hide") (.modal ($ :#iModalProject) "hide") (.modal ($ :#iModalProjectMenu) "hide"))))
Allow tools.nrepl to be a transitive dep of wildfly lib
;; Copyright 2014-2015 Red Hat, Inc, and individual contributors. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; http://www.apache.org/licenses/LICENSE-2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ;; distributed under the License is distributed on an "AS IS" BASIS, ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;; See the License for the specific language governing permissions and ;; limitations under the License. (defproject org.immutant/wildfly "2.0.0-SNAPSHOT" :description "Utility functions only useful within a WildFly container." :pedantic? false :plugins [[lein-modules "0.3.11"]] :dependencies [[org.immutant/core _] [org.clojure/tools.nrepl "_"] [org.projectodd.wunderboss/wunderboss-wildfly _]])
;; Copyright 2014-2015 Red Hat, Inc, and individual contributors. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; http://www.apache.org/licenses/LICENSE-2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ;; distributed under the License is distributed on an "AS IS" BASIS, ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;; See the License for the specific language governing permissions and ;; limitations under the License. (defproject org.immutant/wildfly "2.0.0-SNAPSHOT" :description "Utility functions only useful within a WildFly container." :pedantic? false :plugins [[lein-modules "0.3.11"]] :dependencies [[org.immutant/core _] [org.clojure/tools.nrepl "_"] [org.projectodd.wunderboss/wunderboss-wildfly _]] :profiles {:base {:dependencies []}})
Exit if all config vars not found
(ns clojuredocs.main (:require [ring.adapter.jetty :as jetty] [aleph.http :as ah] [clojuredocs.env :as env] [clojuredocs.entry :as entry] [somnium.congomongo :as mon])) (mon/set-connection! (mon/make-connection (env/str :mongo-url))) (mon/add-index! :examples [:ns :name :library-url]) (mon/add-index! :vars [:ns :name :library-url]) (defn start-http-server [entry-point opts] (ah/start-http-server (ah/wrap-ring-handler (fn [r] (let [resp (entry-point r)] (if (:status resp) resp (assoc resp :status 200))))) opts)) (defn -main [] (let [port (env/int :port 8080)] (start-http-server (var entry/routes) {:port port :join? false}) (println (format "Server running on port %d" port))))
(ns clojuredocs.main (:require [ring.adapter.jetty :as jetty] [aleph.http :as ah] [somnium.congomongo :as mon] [clojuredocs.env :as env] [clojuredocs.entry :as entry] [clojuredocs.config :as config])) (mon/set-connection! (mon/make-connection (env/str :mongo-url))) (mon/add-index! :examples [:ns :name :library-url]) (mon/add-index! :vars [:ns :name :library-url]) (defn start-http-server [entry-point opts] (ah/start-http-server (ah/wrap-ring-handler (fn [r] (let [resp (entry-point r)] (if (:status resp) resp (assoc resp :status 200))))) opts)) (defn valid-env-or-exit [] (let [res (->> [(env/int :port) "Port missing" (:client-id config/gh-creds) "GH client ID missing" (:client-secret config/gh-creds) "GH client secret missing" config/base-url "base url missing"] (partition 2) (map #(when (nil? (first %)) (println " !" (second %)) true)) (reduce #(or %1 %2)))] (when res (println) (println " ! Missing required config vars, exiting.") (println) #_(System/exit 1)))) (defn -main [] (valid-env-or-exit) (let [port (env/int :port 8080)] (start-http-server (var entry/routes) {:port port :join? false}) (println (format "Server running on port %d" port))))
Bump major version due to move to shadow-cljs
(defproject re-frame/lein-template "0.3.24-SNAPSHOT" :description "Leiningen template for a Reagent web app that implements the re-frame pattern." :url "https://github.com/Day8/re-frame-template" :license {:name "MIT"} :deploy-repositories [["clojars" {:sign-releases false :url "https://clojars.org/repo" :username :env/CLOJARS_USERNAME :password :env/CLOJARS_PASSWORD}]] :release-tasks [["vcs" "assert-committed"] ["change" "version" "leiningen.release/bump-version" "release"] ["vcs" "commit"] ["vcs" "tag" "v" "--no-sign"] ["deploy" "clojars"] ["change" "version" "leiningen.release/bump-version"] ["vcs" "commit"] ["vcs" "push"]] :scm {:name "git" :url "https://github.com/Day8/re-frame-template"} :eval-in-leiningen true)
(defproject re-frame/lein-template "1.0.0-SNAPSHOT" :description "Leiningen template for a Reagent web app that implements the re-frame pattern." :url "https://github.com/Day8/re-frame-template" :license {:name "MIT"} :deploy-repositories [["clojars" {:sign-releases false :url "https://clojars.org/repo" :username :env/CLOJARS_USERNAME :password :env/CLOJARS_PASSWORD}]] :release-tasks [["vcs" "assert-committed"] ["change" "version" "leiningen.release/bump-version" "release"] ["vcs" "commit"] ["vcs" "tag" "v" "--no-sign"] ["deploy" "clojars"] ["change" "version" "leiningen.release/bump-version"] ["vcs" "commit"] ["vcs" "push"]] :scm {:name "git" :url "https://github.com/Day8/re-frame-template"} :eval-in-leiningen true)
Prepare for next release cycle.
(defproject onyx-app/lein-template "0.9.10.0-beta7" :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)
Prepare for next release cycle.
(defproject onyx-app/lein-template "0.10.0.0-beta7" :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)
Use correct version of http-kit
(defproject clj-tutorials "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"] [org.clojure/core.async "0.1.346.0-17112a-alpha"] [http-kit "2.1.19"] [ring/ring-core "1.3.1"] [javax.servlet/servlet-api "2.5"] [compojure "1.2.1"] [clj-gatling "0.3.0"]])
(defproject clj-tutorials "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"] [org.clojure/core.async "0.1.346.0-17112a-alpha"] [http-kit "2.1.16"] [ring/ring-core "1.3.1"] [javax.servlet/servlet-api "2.5"] [compojure "1.2.1"] [clj-gatling "0.3.0"]])
Prepare for next release cycle.
(defproject onyx-app/lein-template "0.12.0.0-beta2" :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)