Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.11.0.0-alpha1"
: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 dependency org.onyxplatform/onyx to version 0.7.3-20150828_160954-g51b5cf8. | (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"]}})
| (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_160954-g51b5cf8"]
[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"]}})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.12.2.0"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.12.2.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)
|
Fix status on search request | (ns subman.routes
(:use [compojure.core :only [defroutes GET]])
(:require [compojure.route :as route]
[subman.models :as models]
[subman.api :as api]
[subman.views :as views]))
(defroutes main-routes
(GET "/" [] (views/index-page))
(GET "/api/search/" {params :params} (api/search params))
(route/resources "/")
(route/not-found (views/index-page)))
| (ns subman.routes
(:use [compojure.core :only [defroutes GET]])
(:require [compojure.route :as route]
[subman.models :as models]
[subman.api :as api]
[subman.views :as views]))
(defroutes main-routes
(GET "/" [] (views/index-page))
(GET "/search/*" [] (views/index-page))
(GET "/api/search/" {params :params} (api/search params))
(route/resources "/"))
|
Add task to automatically recompile source. | ;; create the main project namespace
(ns modern-cljs.core)
;; enable cljs to print to the JavaScript console of the browser
(enable-console-print!)
;; print a friendly greeting to the console
(println "Hello, Modern ClojureScript World!")
| ;; create the main project namespace
(ns modern-cljs.core)
;; enable cljs to print to the JavaScript console of the browser
(enable-console-print!)
;; print a friendly greeting to the console
(println "Hello, New, Modern ClojureScript World!")
|
Update Codox plugin to 0.8.13 | (defproject compojure "1.3.4"
:description "A concise routing library for Ring"
:url "https://github.com/weavejester/compojure"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.macro "0.1.5"]
[clout "2.1.2"]
[medley "0.6.0"]
[ring/ring-core "1.4.0"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.12"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.4/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring/ring-mock "0.2.0"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
| (defproject compojure "1.3.4"
:description "A concise routing library for Ring"
:url "https://github.com/weavejester/compojure"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.macro "0.1.5"]
[clout "2.1.2"]
[medley "0.6.0"]
[ring/ring-core "1.4.0"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.13"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.4/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring/ring-mock "0.2.0"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
|
Use the correct 1.4 beta version | (defproject clj-http "0.3.3-SNAPSHOT"
:description "A Clojure HTTP library wrapping the Apache HttpComponents client."
:url "https://github.com/dakrone/clj-http/"
:repositories {"sona" "http://oss.sonatype.org/content/repositories/snapshots"}
:warn-on-reflection false
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.apache.httpcomponents/httpclient "4.1.2"]
[org.apache.httpcomponents/httpmime "4.1.2"]
[commons-codec "1.5"]
[commons-io "2.1"]
[slingshot "0.10.2"]
[cheshire "2.2.2"]]
:profiles {:dev {:dependencies [[ring/ring-jetty-adapter "1.0.2"]
[ring/ring-devel "1.0.2"]]}
:1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0-beta1"]]}}
:aliases {"all" ["with-profile" "dev,1.2:dev:dev,1.4"]}
:test-selectors {:default #(not (:integration %))
:integration :integration
:all (constantly true)}
:checksum-deps true)
| (defproject clj-http "0.3.3-SNAPSHOT"
:description "A Clojure HTTP library wrapping the Apache HttpComponents client."
:url "https://github.com/dakrone/clj-http/"
:repositories {"sona" "http://oss.sonatype.org/content/repositories/snapshots"}
:warn-on-reflection false
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.apache.httpcomponents/httpclient "4.1.2"]
[org.apache.httpcomponents/httpmime "4.1.2"]
[commons-codec "1.5"]
[commons-io "2.1"]
[slingshot "0.10.2"]
[cheshire "2.2.2"]]
:profiles {:dev {:dependencies [[ring/ring-jetty-adapter "1.0.2"]
[ring/ring-devel "1.0.2"]]}
:1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0-beta3"]]}}
:aliases {"all" ["with-profile" "dev,1.2:dev:dev,1.4"]}
:test-selectors {:default #(not (:integration %))
:integration :integration
:all (constantly true)}
:checksum-deps true)
|
Use a more reasonable refresh delay. | (ns shale.periodic
(:require [shale.sessions :as sessions])
(:use overtone.at-at))
(def thread-pool (mk-pool))
(defn schedule! []
(every 10 #(sessions/refresh-sessions nil) thread-pool :fixed-delay true))
(defn stop! []
(stop-and-reset-pool! thread-pool))
| (ns shale.periodic
(:require [shale.sessions :as sessions])
(:use overtone.at-at))
(def thread-pool (mk-pool))
(defn schedule! []
(every 200 #(sessions/refresh-sessions nil) thread-pool :fixed-delay true))
(defn stop! []
(stop-and-reset-pool! thread-pool))
|
Simplify generate-name function for robot-name | (ns robot-name)
(def ^:private random (java.util.Random.))
(def ^:private letters (map char (range 65 91)))
(defn- generate-name []
(str (apply str (take 2 (shuffle letters)))
(+ 100 (.nextInt random 899))))
(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 #(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)))
|
Update to latest tools.reader for TRDR-33 (syntax-quote) | (defproject planck "0.1.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.189"]
[tailrecursion/cljson "1.0.7"]
[com.cognitect/transit-clj "0.8.275"]
[com.cognitect/transit-cljs "0.8.220"]
[malabarba/lazy-map "1.1"]]
:clean-targets ["out" "target"])
| (defproject planck "0.1.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.189"]
[org.clojure/tools.reader "1.0.0-alpha3"]
[tailrecursion/cljson "1.0.7"]
[com.cognitect/transit-clj "0.8.275"]
[com.cognitect/transit-cljs "0.8.220"]
[malabarba/lazy-map "1.1"]]
:clean-targets ["out" "target"])
|
Allow read-eval for Java interop. | ;;;
;;; Copyright 2017, 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 "Java Interop for using the DSL from within Java."}
dsbdp.DslHelper
(:require [dsbdp.data-processing-dsl :refer :all])
(:gen-class
:methods [^:static [generateProcessingFn [Object] clojure.lang.IFn]]))
(defn -generateProcessingFn [dsl-expression]
(if (string? dsl-expression)
(create-proc-fn (binding [*read-eval* false] (read-string dsl-expression)))
(create-proc-fn dsl-expression)))
| ;;;
;;; Copyright 2017, 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 "Java Interop for using the DSL from within Java."}
dsbdp.DslHelper
(:require [dsbdp.data-processing-dsl :refer :all])
(:gen-class
:methods [^:static [generateProcessingFn [Object] clojure.lang.IFn]]))
(defn -generateProcessingFn [dsl-expression]
(if (string? dsl-expression)
(create-proc-fn (binding [*read-eval* true] (read-string dsl-expression)))
(create-proc-fn dsl-expression)))
|
Move clj-containment-matchers to dev dependency and take latest version of it into use | (defproject clj-gatling "0.4.2"
:description ""
:url "http://github.com/mhjort/clj-gatling"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clj-containment-matchers "0.9.1"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[clojure-csv/clojure-csv "2.0.1"]
[http-kit "2.1.16"]
[clj-time "0.8.0"]
[io.gatling/gatling-charts "2.0.3"]
[io.gatling.highcharts/gatling-charts-highcharts "2.0.3"]]
:repositories { "excilys" "http://repository.excilys.com/content/groups/public" })
| (defproject clj-gatling "0.4.2"
:description ""
:url "http://github.com/mhjort/clj-gatling"
: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"]
[clojure-csv/clojure-csv "2.0.1"]
[http-kit "2.1.16"]
[clj-time "0.8.0"]
[io.gatling/gatling-charts "2.0.3"]
[io.gatling.highcharts/gatling-charts-highcharts "2.0.3"]]
:repositories { "excilys" "http://repository.excilys.com/content/groups/public" }
:profiles {:dev {:dependencies [[clj-containment-matchers "0.9.3"]] }})
|
Update clojurescript compiler version to 1.7.145 | (defproject funcool/beicon "0.1.0-SNAPSHOT"
:description "A rxjs idiomatic wrapper for ClojureScript"
:url "https://github.com/funcool/beicon"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[org.clojure/clojurescript "1.7.48" :scope "provided"]
[funcool/cats "1.0.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojurescript
:target "doc/dist/latest/api"
:src-uri "http://github.com/funcool/beicon/blob/master/"
:src-uri-prefix "#L"}
:plugins [[funcool/codeina "0.3.0"]
[lein-externs "0.1.3"]])
| (defproject funcool/beicon "0.1.0-SNAPSHOT"
:description "A rxjs idiomatic wrapper for ClojureScript"
:url "https://github.com/funcool/beicon"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[org.clojure/clojurescript "1.7.145" :scope "provided"]
[funcool/cats "1.0.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojurescript
:target "doc/dist/latest/api"
:src-uri "http://github.com/funcool/beicon/blob/master/"
:src-uri-prefix "#L"}
:plugins [[funcool/codeina "0.3.0"]
[lein-externs "0.1.3"]])
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.12.0.0-alpha1"
: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)
|
Fix missing Histograms.json subscriber bug. | (ns clj.medusa.alert
(:require [amazonica.aws.simpleemail :as ses]
[amazonica.core :as aws]
[clojure.string :as string]
[clj.medusa.config :as config]
[clj.medusa.db :as db]
[clj.medusa.config :as config]))
(defn send-email [subject body destinations]
(when-not (:dry-run @config/state)
(ses/send-email :destination {:to-addresses destinations}
:source "telemetry-alerts@mozilla.com"
:message {:subject subject
:body {:html (str "<a href=\"" body "\">" body "</a>")}})))
(defn notify-subscribers [{:keys [metric_id date emails]}]
(let [{:keys [hostname]} @config/state
foreign_subscribers (when (seq? emails) (string/split emails #","))
{metric_name :name,
detector_id :detector_id
metric_id :id} (db/get-metric metric_id)
{detector_name :name} (db/get-detector detector_id)
subscribers (db/get-subscribers-for-metric metric_id)]
(send-email (str "Alert for " metric_name " (" detector_name ") on the " date)
(str "http://" hostname "/index.html#/detectors/" detector_id "/"
"metrics/" metric_id "/alerts/?from=" date "&to=" date)
(concat subscribers foreign_subscribers ["dev-telemetry-alerts@lists.mozilla.org"]))))
| (ns clj.medusa.alert
(:require [amazonica.aws.simpleemail :as ses]
[amazonica.core :as aws]
[clojure.string :as string]
[clj.medusa.config :as config]
[clj.medusa.db :as db]
[clj.medusa.config :as config]))
(defn send-email [subject body destinations]
(when-not (:dry-run @config/state)
(ses/send-email :destination {:to-addresses destinations}
:source "telemetry-alerts@mozilla.com"
:message {:subject subject
:body {:html (str "<a href=\"" body "\">" body "</a>")}})))
(defn notify-subscribers [{:keys [metric_id date emails]}]
(let [{:keys [hostname]} @config/state
foreign_subscribers (when emails (string/split emails #","))
{metric_name :name,
detector_id :detector_id
metric_id :id} (db/get-metric metric_id)
{detector_name :name} (db/get-detector detector_id)
subscribers (db/get-subscribers-for-metric metric_id)]
(send-email (str "Alert for " metric_name " (" detector_name ") on the " date)
(str "http://" hostname "/index.html#/detectors/" detector_id "/"
"metrics/" metric_id "/alerts/?from=" date "&to=" date)
(concat subscribers foreign_subscribers ["dev-telemetry-alerts@lists.mozilla.org"]))))
|
Revert back to snapshot version. | (defproject cli4clj "1.6.3"
;(defproject cli4clj "1.6.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.9.0"]
[clj-assorted-utils "1.18.2"]
[org.clojure/core.async "0.4.474"]
[jline/jline "2.14.6"]]
; :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
:aot :all
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.7" :exclusions [org.clojure/clojure]]]}}
)
| ;(defproject cli4clj "1.6.3"
(defproject cli4clj "1.6.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.9.0"]
[clj-assorted-utils "1.18.2"]
[org.clojure/core.async "0.4.474"]
[jline/jline "2.14.6"]]
: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
:aot :all
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.9" :exclusions [org.clojure/clojure]]]}}
)
|
Upgrade clojurescript and beicon dependencies | (defproject funcool/potok "2.1.0"
:description "Reactive streams based state management toolkit for ClojureScript"
:url "https://github.com/funcool/potok"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.495" :scope "provided"]
[funcool/beicon "3.2.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:plugins [[lein-ancient "0.6.10"]])
| (defproject funcool/potok "2.1.0"
:description "Reactive streams based state management toolkit for ClojureScript"
:url "https://github.com/funcool/potok"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.854" :scope "provided"]
[funcool/beicon "4.0.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:plugins [[lein-ancient "0.6.10"]])
|
Prepare for next development iteration | (defproject measure "0.1.2"
:description "Say things about your application with authority, using Coda Hale's Metrics."
:url "https://github.com/KeepSafe/measure"
:scm {:name "git"
:url "https://github.com/KeepSafe/measure"}
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.codahale.metrics/metrics-core "3.0.1"]
[com.codahale.metrics/metrics-graphite "3.0.1"]]
:profiles {:dev {:plugins [[com.jakemccrary/lein-test-refresh "0.3.4"]
[lein-marginalia "0.7.1"]]}}
:repositories {"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases"
:snapshots false
:releases {:checksum :fail :update :always}}}
:signing {:gpg-key "ben@getkeepsafe.com"}
:deploy-repositories [["clojars" {:creds :gpg}]]
:pom-addition [:developers [:developer
[:name "Ben Bader"]
[:url "http://getkeepsafe.com"]
[:email "ben@getkeepsafe.com"]
[:timezone "America/Los Angeles"]]]
)
| (defproject measure "0.1.3-SNAPSHOT"
:description "Say things about your application with authority, using Coda Hale's Metrics."
:url "https://github.com/KeepSafe/measure"
:scm {:name "git"
:url "https://github.com/KeepSafe/measure"}
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.codahale.metrics/metrics-core "3.0.1"]
[com.codahale.metrics/metrics-graphite "3.0.1"]]
:profiles {:dev {:plugins [[com.jakemccrary/lein-test-refresh "0.3.4"]
[lein-marginalia "0.7.1"]]}}
:repositories {"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases"
:snapshots false
:releases {:checksum :fail :update :always}}}
:signing {:gpg-key "ben@getkeepsafe.com"}
:deploy-repositories [["clojars" {:creds :gpg}]]
:pom-addition [:developers [:developer
[:name "Ben Bader"]
[:url "http://getkeepsafe.com"]
[:email "ben@getkeepsafe.com"]
[:timezone "America/Los Angeles"]]]
)
|
Fix broken reference to icon. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
;; Copyright (c) 2016-2019 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.view.ui.viewer.sitemap
(:require
[lentes.core :as l]
[rumext.alpha :as mf]
[uxbox.builtins.icons :as i]
[uxbox.view.data.viewer :as dv]
[uxbox.view.store :as st]))
(mf/defc sitemap
[{:keys [project pages selected] :as props}]
(let [project-name (:name project)
on-click #(st/emit! (dv/select-page %))]
[:div.view-sitemap
[:span.sitemap-title project-name]
[:ul.sitemap-list
(for [page pages]
(let [selected? (= (:id page) selected)
page-id (:id page)]
[:li {:class (when selected? "selected")
:on-click (partial on-click page-id)
:id (str "page-" page-id)
:key page-id}
[:div.page-icon i/page]
[:span (:name page)]]))]]))
| ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
;; Copyright (c) 2016-2019 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.view.ui.viewer.sitemap
(:require
[lentes.core :as l]
[rumext.alpha :as mf]
[uxbox.builtins.icons :as i]
[uxbox.view.data.viewer :as dv]
[uxbox.view.store :as st]))
(mf/defc sitemap
[{:keys [project pages selected] :as props}]
(let [project-name (:name project)
on-click #(st/emit! (dv/select-page %))]
[:div.view-sitemap
[:span.sitemap-title project-name]
[:ul.sitemap-list
(for [page pages]
(let [selected? (= (:id page) selected)
page-id (:id page)]
[:li {:class (when selected? "selected")
:on-click (partial on-click page-id)
:id (str "page-" page-id)
:key page-id}
[:div.page-icon i/file-html]
[:span (:name page)]]))]]))
|
Use webol 0.1.3: includes FOR/NEXT loops and SAVE/LOAD. | ;;; 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.1"
: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.14"]
;; Degel's website multiplexer
[muxx "0.1.1"]
;; Our apps
[deg-scraps "0.1.1"]
[webol "0.1.2"]]
:profiles {:dev
{ :plugins [[lein-marginalia "0.7.1"]]}}
:min-lein-version "2.0.0"
: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.1"
: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.14"]
;; Degel's website multiplexer
[muxx "0.1.1"]
;; Our apps
[deg-scraps "0.1.1"]
[webol "0.1.3"]]
:profiles {:dev
{ :plugins [[lein-marginalia "0.7.1"]]}}
:min-lein-version "2.0.0"
:main degel.deploy.deployment)
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.10.0-beta6"
: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)
|
Revert back to snapshot version. | (defproject cli4clj "0.1.0"
;(defproject cli4clj "0.1.0-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.7.0"]]
:main cli4clj.example)
| ;(defproject cli4clj "0.1.0"
(defproject cli4clj "0.2.0-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.7.0"]]
:main cli4clj.example)
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.9.2"
: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.9.3-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 older cljsbuild once again. | (defproject beatha "0.0.1-SNAPSHOT"
:description "Cellular automata experiments."
:url "http://github.com/gsnewmark/beatha"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:min-lein-version "2.3.4"
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2156"]
[org.clojure/core.async "0.1.278.0-76b25b-alpha"]
[om "0.5.0"]
[com.facebook/react "0.9.0"]
[org.webjars/bootstrap "3.1.1"]]
:plugins [[lein-cljsbuild "1.0.3-SNAPSHOT"]]
:hooks [leiningen.cljsbuild]
:cljsbuild
{:builds {:beatha
{:source-paths ["src/cljs"]
:compiler
{:output-to "dev-resources/public/js/beatha.js"
:optimizations :advanced
:pretty-print false}}}})
| (defproject beatha "0.0.1-SNAPSHOT"
:description "Cellular automata experiments."
:url "http://github.com/gsnewmark/beatha"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:min-lein-version "2.3.4"
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2156"]
[org.clojure/core.async "0.1.278.0-76b25b-alpha"]
[om "0.5.0"]
[com.facebook/react "0.9.0"]
[org.webjars/bootstrap "3.1.1"]]
:plugins [[lein-cljsbuild "1.0.2"]]
:hooks [leiningen.cljsbuild]
:cljsbuild
{:builds {:beatha
{:source-paths ["src/cljs"]
:compiler
{:output-to "dev-resources/public/js/beatha.js"
:optimizations :advanced
:pretty-print false}}}})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.13.0.0-alpha1"
: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.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)
|
Change version. Latest Snapshot now always 0.0.0-SNAPSHOT. | (defproject ezglib "0.1.4-SNAPSHOT"
:description "An easy game library for ClojureScript."
:url "https://github.com/bakpakin/ezglib"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm {:name "git"
:url "https://github.com/bakpakin/ezglib"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2268"]]
:plugins [[lein-cljsbuild "1.0.3"]]
:hooks [leiningen.cljsbuild]
:source-paths ["src"]
:cljsbuild {
:builds {
:src {
:jar true
:source-paths ["src"]
:incremental? true}
:examples {
:incremental? true
:source-paths ["src" "examples/src"]
:compiler {:output-to "examples/js/cljs.js"
:output-dir "examples/js"
:optimizations :none
:pretty-print true
:source-map "examples/js/cljs.js.map"}}}})
| (defproject ezglib "0.0.0-SNAPSHOT"
:description "An easy game library for ClojureScript."
:url "https://github.com/bakpakin/ezglib"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm {:name "git"
:url "https://github.com/bakpakin/ezglib"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2268"]]
:plugins [[lein-cljsbuild "1.0.3"]]
:hooks [leiningen.cljsbuild]
:source-paths ["src"]
:cljsbuild {
:builds {
:src {
:jar true
:source-paths ["src"]
:incremental? true}
:examples {
:incremental? true
:source-paths ["src" "examples/src"]
:compiler {:output-to "examples/js/cljs.js"
:output-dir "examples/js"
:optimizations :none
:pretty-print true
:source-map "examples/js/cljs.js.map"}}}})
|
Add lein-daemon as a plugin. | (defproject govuk/blinken "0.1.0-SNAPSHOT"
:description "Dashboard to integrate multiple alert systems"
:url "https://github.com/alphagov/blinken"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.5.1"]
[docopt "0.6.1"]
[http-kit "2.1.16"]
[cheshire "5.2.0"]
[hiccup "1.0.4"]
[clj-yaml "0.4.0"]
[compojure "1.1.6"]
[lein-daemon "0.5.4"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]]
:main govuk.blinken)
| (defproject govuk/blinken "0.1.0-SNAPSHOT"
:description "Dashboard to integrate multiple alert systems"
:url "https://github.com/alphagov/blinken"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.5.1"]
[docopt "0.6.1"]
[http-kit "2.1.16"]
[cheshire "5.2.0"]
[hiccup "1.0.4"]
[clj-yaml "0.4.0"]
[compojure "1.1.6"]
[lein-daemon "0.5.4"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]]
:plugins [[lein-daemon "0.5.4"]]
:main govuk.blinken)
|
Fix bug where selecting a cell when editing messes up the state | (ns reabledit.util)
(defn set-selected!
[state row col]
(swap! state assoc :selected [row col]))
(defn enable-edit!
[columns data state]
(if-not (:disable-edit (nth columns (second (:selected @state))))
(let [row-data (nth data (first (:selected @state)))]
(swap! state assoc :edit {:initial row-data
:updated row-data}))))
(defn disable-edit!
[state element-id]
(swap! state dissoc :edit)
;; Dirty as fudge, but what can you do with Reagent?
(.focus (.getElementById js/document element-id)))
(defn move-cursor-to-end!
[e]
(let [el (.-target e)
length (count (.-value el))]
(set! (.-selectionStart el) length)
(set! (.-selectionEnd el) length)))
| (ns reabledit.util)
(defn set-selected!
[state row col]
(swap! state dissoc :edit)
(swap! state assoc :selected [row col]))
(defn enable-edit!
[columns data state]
(if-not (:disable-edit (nth columns (second (:selected @state))))
(let [row-data (nth data (first (:selected @state)))]
(swap! state assoc :edit {:initial row-data
:updated row-data}))))
(defn disable-edit!
[state element-id]
(swap! state dissoc :edit)
;; Dirty as fudge, but what can you do with Reagent?
(.focus (.getElementById js/document element-id)))
(defn move-cursor-to-end!
[e]
(let [el (.-target e)
length (count (.-value el))]
(set! (.-selectionStart el) length)
(set! (.-selectionEnd el) length)))
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-datomic "0.10.0.0-alpha7"
: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-alpha7"]]
: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-alpha7"]]
: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"]}})
|
Use Fipp as pretty printer | (defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is violating spec conformance."
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [;; clj stuff
[org.clojure/clojure "1.9.0-alpha17"]
[org.clojure/spec.alpha "0.1.123"]
[spectrace "0.1.0-SNAPSHOT"]
[rewrite-clj "0.5.1"]
[clansi "1.0.0"]
;; cljs stuff
[org.clojure/clojurescript "1.9.562" :scope "provided"]
[rewrite-cljs "0.4.1"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}})
| (defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is violating spec conformance."
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [;; clj stuff
[org.clojure/clojure "1.9.0-alpha17"]
[org.clojure/spec.alpha "0.1.123"]
[fipp "0.6.8"]
[spectrace "0.1.0-SNAPSHOT"]
[rewrite-clj "0.5.1"]
[clansi "1.0.0"]
;; cljs stuff
[org.clojure/clojurescript "1.9.562" :scope "provided"]
[rewrite-cljs "0.4.1"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}})
|
Use our patched Clojure explicitly in Containium. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
(defproject containium "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Mozilla Public License 2.0"
:url "http://mozilla.org/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.5.1"]
[boxure "0.1.0-SNAPSHOT"]
[org.clojure/tools.nrepl "0.2.3"]
[jline "2.11"]
[ring "1.2.0"]
[http-kit "2.1.10"]
[org.apache.httpcomponents/httpclient "4.2.3"]
[org.apache.cassandra/cassandra-all "1.2.8"]
[org.elasticsearch/elasticsearch "0.90.3"]
[org.scala-lang/scala-library "2.9.2"]
[kafka/core-kafka_2.9.2 "0.7.2"]]
:main containium.core)
| ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
(defproject containium "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Mozilla Public License 2.0"
:url "http://mozilla.org/MPL/2.0/"}
:dependencies [[boxure/clojure "1.5.1"]
[boxure "0.1.0-SNAPSHOT"]
[org.clojure/tools.nrepl "0.2.3"]
[jline "2.11"]
[ring "1.2.0"]
[http-kit "2.1.10"]
[org.apache.httpcomponents/httpclient "4.2.3"]
[org.apache.cassandra/cassandra-all "1.2.8"]
[org.elasticsearch/elasticsearch "0.90.3"]
[org.scala-lang/scala-library "2.9.2"]
[kafka/core-kafka_2.9.2 "0.7.2"]]
:exclusions [org.clojure/clojure]
:main containium.core)
|
Add contrib back in as per mailing list discussions. | ;; 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.4.0-SNAPSHOT"
:description "A build tool designed not to set your hair on fire."
:url "http://github.com/technomancy/leiningen"
:license {:name "Eclipse Public License"}
:dependencies [[org.clojure/clojure "1.3.0-master-SNAPSHOT"]
[ant/ant "1.6.5"]
[jline "0.9.94"]
[robert/hooke "1.0.2"]
[org.apache.maven/maven-ant-tasks "2.0.10"]]
:disable-implicit-clean 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.4.0-SNAPSHOT"
:description "A build tool designed not to set your hair on fire."
:url "http://github.com/technomancy/leiningen"
:license {:name "Eclipse Public License"}
:dependencies [[org.clojure/clojure "1.3.0-master-SNAPSHOT"]
[org.clojure.contrib/standalone "1.3.0-SNAPSHOT"]
[ant/ant "1.6.5"]
[jline "0.9.94"]
[robert/hooke "1.0.2"]
[org.apache.maven/maven-ant-tasks "2.0.10"]]
:disable-implicit-clean true)
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-peer-http-query "0.10.0.0-alpha5"
: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"]]
: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"]
[org.onyxplatform/onyx-metrics "0.10.0.0-alpha1"]
[org.onyxplatform/onyx "0.10.0-alpha5"]]
: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"]]
: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"]
[org.onyxplatform/onyx-metrics "0.10.0.0-alpha1"]
[org.onyxplatform/onyx "0.10.0-alpha5"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
|
Set real version of lein-protobuf. | (defproject protobuf "0.6.0-beta19"
:description "Clojure-protobuf provides a clojure interface to Google's protocol buffers."
: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.1.0-alpha1"]]
:profiles {:dev {:dependencies [[gloss "0.2.1"]
[io "0.2.0-beta2"]]}}
:hooks [leiningen.protobuf]
;; Bug in the current 1.x branch of Leiningen causes
;; jar to implicitly clean no matter what, wiping stuff.
;; This prevents that.
:disable-implicit-clean true
:checksum-deps true
:java-source-paths ["src"])
| (defproject protobuf "0.6.0-beta19"
:description "Clojure-protobuf provides a clojure interface to Google's protocol buffers."
: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.1.0"]]
:profiles {:dev {:dependencies [[gloss "0.2.1"]
[io "0.2.0-beta2"]]}}
:hooks [leiningen.protobuf]
;; Bug in the current 1.x branch of Leiningen causes
;; jar to implicitly clean no matter what, wiping stuff.
;; This prevents that.
:disable-implicit-clean true
:checksum-deps true
:java-source-paths ["src"])
|
Prepare for the next round | (defproject reply "0.1.0-alpha1"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojars.trptcolin/jline "2.6-alpha1"]
[org.thnetos/cd-client "0.3.1" :exclusions [org.clojure/clojure]]
[clj-stacktrace "0.2.4"]
[clojure-complete "0.1.4" :exclusions [org.clojure/clojure]]
[org.clojure/tools.nrepl "0.0.5"]]
:dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]
:repositories {
"sonatype" {:url "http://oss.sonatype.org/content/repositories/snapshots" } }
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java")
| (defproject reply "0.1.0-alpha2-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojars.trptcolin/jline "2.6-alpha1"]
[org.thnetos/cd-client "0.3.1" :exclusions [org.clojure/clojure]]
[clj-stacktrace "0.2.4"]
[clojure-complete "0.1.4" :exclusions [org.clojure/clojure]]
[org.clojure/tools.nrepl "0.0.5"]]
:dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]
:repositories {
"sonatype" {:url "http://oss.sonatype.org/content/repositories/snapshots" } }
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java")
|
Move Clojure version from 1.6 to 1.7 | (defproject kixi.hecuba.weather "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/data.csv "0.1.2"]
[clj-http "2.0.0"]
[clj-time "0.10.0"]])
| (defproject kixi.hecuba.weather "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.7.0"]
[org.clojure/data.csv "0.1.2"]
[clj-http "2.0.0"]
[clj-time "0.10.0"]])
|
Change Catalyst dependency to use new groupId. | (defproject trinity "0.1.0-SNAPSHOT"
:description "A sweet little Clojure API for Atomix"
:url "http://github.com/atomix/trinity"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[io.atomix/atomix "0.1.0-SNAPSHOT"]
[io.atomix/atomix-atomic "0.1.0-SNAPSHOT"]
[io.atomix/atomix-collections "0.1.0-SNAPSHOT"]
[io.atomix/atomix-coordination "0.1.0-SNAPSHOT"]
[io.atomix/catalyst-netty "1.0.0-SNAPSHOT"]]
:repositories [["sonatype-nexus-snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:plugins [[codox "0.8.13"]]
:codox {:output-dir "target/docs/docs"
:defaults {:doc/format :markdown}
:src-dir-uri "http://github.com/atomix/trinity/blob/master/"
:src-linenum-anchor-prefix "L"})
| (defproject trinity "0.1.0-SNAPSHOT"
:description "A sweet little Clojure API for Atomix"
:url "http://github.com/atomix/trinity"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[io.atomix/atomix "0.1.0-SNAPSHOT"]
[io.atomix/atomix-atomic "0.1.0-SNAPSHOT"]
[io.atomix/atomix-collections "0.1.0-SNAPSHOT"]
[io.atomix/atomix-coordination "0.1.0-SNAPSHOT"]
[io.atomix.catalyst/catalyst-netty "1.0.0-SNAPSHOT"]]
:repositories [["sonatype-nexus-snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:plugins [[codox "0.8.13"]]
:codox {:output-dir "target/docs/docs"
:defaults {:doc/format :markdown}
:src-dir-uri "http://github.com/atomix/trinity/blob/master/"
:src-linenum-anchor-prefix "L"})
|
Update fork version and url. | (defproject clucy "0.4.0"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/weavejester/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}}
:codox {:src-dir-uri "http://github/weavejester/clucy/blob/master"
:src-linenum-anchor-prefix "L"})
| (defproject org.clojars.kostafey/clucy "0.5.3"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/kostafey/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
|
Change version number for 0.1.0 release. | (defproject stencil "0.1.0-SNAPSHOT"
:description "Mustache in Clojure"
:dependencies [[clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:dev-dependencies [[swank-clj "0.1.6-SNAPSHOT"]
[org.clojure/clojure-contrib "1.2.0"]]
:tasks [cake.tasks.swank-clj stencil.cake.tasks]) | (defproject stencil "0.1.0"
:description "Mustache in Clojure"
:dependencies [[clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:dev-dependencies [[swank-clj "0.1.6-SNAPSHOT"]
[org.clojure/clojure-contrib "1.2.0"]]
:tasks [cake.tasks.swank-clj stencil.cake.tasks]) |
Change version back to snapshot | ;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License. You may obtain a copy of the License at
;;
;; http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership. Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied. See the License for the specific language governing permissions
;; and limitations under the License.
(defproject com.climate/claypoole
"1.1.0"
:description "Claypoole: Threadpool tools for Clojure."
:url "http://github.com/TheClimateCorporation/claypoole/"
:license {:name "Apache License Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo}
:min-lein-version "2.0.0"
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:pedantic? :warn
:profiles {:dev {:dependencies [[org.clojure/clojure "1.7.0"]]}}
:plugins [[jonase/eastwood "0.2.1"]
[lein-ancient "0.6.7"]])
| ;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License. You may obtain a copy of the License at
;;
;; http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership. Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied. See the License for the specific language governing permissions
;; and limitations under the License.
(defproject com.climate/claypoole
"1.1.0-SNAPSHOT"
:description "Claypoole: Threadpool tools for Clojure."
:url "http://github.com/TheClimateCorporation/claypoole/"
:license {:name "Apache License Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo}
:min-lein-version "2.0.0"
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:pedantic? :warn
:profiles {:dev {:dependencies [[org.clojure/clojure "1.7.0"]]}}
:plugins [[jonase/eastwood "0.2.1"]
[lein-ancient "0.6.7"]])
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.0.9"
: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.9.0.10-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)
|
Update data.json from 0.2.5 to 0.2.6. | (defproject statuses "1.0.0-SNAPSHOT"
:description "Statuses app for innoQ"
:url "https://github.com/innoq/statuses"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo
:comments "A business-friendly OSS license"}
:dependencies [[org.clojure/clojure "1.6.0"]
[ring "1.3.2"]
[compojure "1.3.2"]
[clj-time "0.9.0"]
[org.clojure/data.json "0.2.5"]]
:pedantic? :abort
:plugins [[jonase/eastwood "0.2.0"]]
:profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
:uberjar {:aot [statuses.server]}}
:main statuses.server
:aliases {"lint" "eastwood"}
:eastwood {:exclude-linters [:constant-test]})
| (defproject statuses "1.0.0-SNAPSHOT"
:description "Statuses app for innoQ"
:url "https://github.com/innoq/statuses"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"
:distribution :repo
:comments "A business-friendly OSS license"}
:dependencies [[org.clojure/clojure "1.6.0"]
[ring "1.3.2"]
[compojure "1.3.2"]
[clj-time "0.9.0"]
[org.clojure/data.json "0.2.6"]]
:pedantic? :abort
:plugins [[jonase/eastwood "0.2.0"]]
:profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
:uberjar {:aot [statuses.server]}}
:main statuses.server
:aliases {"lint" "eastwood"}
:eastwood {:exclude-linters [:constant-test]})
|
Upgrade lein-repack and set scm. | (defproject fixturex/fixturex "0.3.0"
:description "A library of helpful test fixture macros and functions."
:url "http://www.ryanmcg.com/fixturex/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:repack [{:type :clojure
:levels 1
:path "src"}]
:profiles {:dev {:dependencies [[incise "0.5.0"]
[com.ryanmcg/incise-codox "0.1.0"]
[com.ryanmcg/incise-vm-layout "0.5.0"]]
:plugins [[lein-repack "0.2.7"]]
:aliases {"incise" ^:pass-through-help ["run" "-m" "incise.core"]}}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha4"]]}})
| (defproject fixturex/fixturex "0.3.0"
:description "A library of helpful test fixture macros and functions."
:url "http://www.ryanmcg.com/fixturex/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:repack [{:type :clojure
:levels 1
:path "src"}]
:scm {:name "git"
:url "https://github.com/RyanMcG/fixturex"}
:profiles {:dev {:dependencies [[incise "0.5.0"]
[com.ryanmcg/incise-codox "0.1.0"]
[com.ryanmcg/incise-vm-layout "0.5.0"]]
:plugins [[lein-repack "0.2.10"]]
:aliases {"incise" ^:pass-through-help ["run" "-m" "incise.core"]}}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha4"]]}})
|
Remove clojure as a dependency | (defproject wall-follower "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"}
:uberjar-name "ev3main.jar"
:main wall_follower.Main
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:aliases {"run-ev3" ["do" "uberjar,"
"shell" "scp" "target/ev3main.jar" "root@10.0.1.1:,"
"shell" "ssh" "root@10.0.1.1" "/bin/jrun -jar /home/root/ev3main.jar"]
"shutdown-ev3" ["shell" "ssh" "root@10.0.1.1" "halt"]}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojars.earthlingzephyr/lejos-ev3 "0.5.0-SNAPSHOT"]]
:plugins [[lein-shell "0.3.0"]])
| (defproject wall-follower "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"}
:uberjar-name "ev3main.jar"
:main wall_follower.Main
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:aliases {"run-ev3" ["do" "uberjar,"
"shell" "scp" "target/ev3main.jar" "root@10.0.1.1:,"
"shell" "ssh" "root@10.0.1.1" "/bin/jrun -jar /home/root/ev3main.jar"]
"shutdown-ev3" ["shell" "ssh" "root@10.0.1.1" "halt"]}
:dependencies [[org.clojars.earthlingzephyr/lejos-ev3 "0.5.0-SNAPSHOT"]]
:plugins [[lein-shell "0.3.0"]])
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-bookkeeper "0.8.1.0-0.8.1"
:description "Onyx plugin for BookKeeper"
:url "https://github.com/onyx-platform/onyx-bookkeeper"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-bookkeeper "0.8.1.1-SNAPSHOT"
:description "Onyx plugin for BookKeeper"
:url "https://github.com/onyx-platform/onyx-bookkeeper"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Increment to next development version. | (defproject org.toomuchcode/clara-rules "0.1.1"
:description "Clara Rules Engine"
:url "http://rbrush.github.io/clara-rules/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.codehaus.jsr166-mirror/jsr166y "1.7.0"]]
:plugins [[codox "0.6.4"]
[lein-javadoc "0.1.1"]]
:codox {:exclude [clara.other-ruleset clara.sample-ruleset clara.test-java
clara.test-rules clara.rules.memory clara.test-accumulators
clara.rules.testfacts clara.rules.java clara.rules.engine]}
:javadoc-opts {:package-names ["clara.rules"]}
:source-paths ["src/main/clojure"]
:test-paths ["src/test/clojure"]
:java-source-paths ["src/main/java"])
| (defproject org.toomuchcode/clara-rules "0.1.2-SNAPSHOT"
:description "Clara Rules Engine"
:url "http://rbrush.github.io/clara-rules/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.codehaus.jsr166-mirror/jsr166y "1.7.0"]]
:plugins [[codox "0.6.4"]
[lein-javadoc "0.1.1"]]
:codox {:exclude [clara.other-ruleset clara.sample-ruleset clara.test-java
clara.test-rules clara.rules.memory clara.test-accumulators
clara.rules.testfacts clara.rules.java clara.rules.engine]}
:javadoc-opts {:package-names ["clara.rules"]}
:source-paths ["src/main/clojure"]
:test-paths ["src/test/clojure"]
:java-source-paths ["src/main/java"])
|
Add lein-daemon as a dependency. | (defproject govuk/blinken "0.1.0-SNAPSHOT"
:description "Dashboard to integrate multiple alert systems"
:url "https://github.com/alphagov/blinken"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.5.1"]
[docopt "0.6.1"]
[http-kit "2.1.16"]
[cheshire "5.2.0"]
[hiccup "1.0.4"]
[clj-yaml "0.4.0"]
[compojure "1.1.6"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]]
:main govuk.blinken)
| (defproject govuk/blinken "0.1.0-SNAPSHOT"
:description "Dashboard to integrate multiple alert systems"
:url "https://github.com/alphagov/blinken"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.5.1"]
[docopt "0.6.1"]
[http-kit "2.1.16"]
[cheshire "5.2.0"]
[hiccup "1.0.4"]
[clj-yaml "0.4.0"]
[compojure "1.1.6"]
[lein-daemon "0.5.4"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]]
:main govuk.blinken)
|
Remove rlwrap from alpine tools-deps images | (ns docker-clojure.dockerfile.tools-deps)
(defn install-deps [{:keys [distro]}]
(case distro
"alpine"
["RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \\"
" apk add --update --no-cache bash curl rlwrap@testing"]
"debian"
["RUN apt-get update && apt-get install -y rlwrap"]
nil))
(defn contents [{:keys [build-tool-version] :as variant}]
(-> [(format "ENV CLOJURE_VERSION=%s" build-tool-version)
""
"WORKDIR /tmp"
""]
(concat (install-deps variant))
(concat
[""
"RUN wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh \\"
" && chmod +x linux-install-$CLOJURE_VERSION.sh \\"
" && ./linux-install-$CLOJURE_VERSION.sh"
""
"RUN clojure -e \"(clojure-version)\""
""
"# Docker bug makes rlwrap crash w/o short sleep first"
"# Bug: https://github.com/moby/moby/issues/28009"
"CMD sleep 1; clj"])
(->> (remove nil?))))
| (ns docker-clojure.dockerfile.tools-deps)
(defn install-deps [{:keys [distro]}]
(case distro
"alpine"
["RUN apk add --update --no-cache bash curl"]
"debian"
["RUN apt-get update && apt-get install -y rlwrap"]
nil))
(defn contents [{:keys [build-tool-version] :as variant}]
(-> [(format "ENV CLOJURE_VERSION=%s" build-tool-version)
""
"WORKDIR /tmp"
""]
(concat (install-deps variant))
(concat
[""
"RUN wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh \\"
" && chmod +x linux-install-$CLOJURE_VERSION.sh \\"
" && ./linux-install-$CLOJURE_VERSION.sh"
""
"RUN clojure -e \"(clojure-version)\""
""
"# Docker bug makes rlwrap crash w/o short sleep first"
"# Bug: https://github.com/moby/moby/issues/28009"
"CMD sleep 1; clj"])
(->> (remove nil?))))
|
Add two additional test series for ranges, these for y ranges that do not include 0. | (def start-t (System/currentTimeMillis))
(defn random-sampler [ ]
(let [current (atom 0.0)]
(fn [ ]
(swap! current #(+ % (/ (+ (Math/random) (Math/random)) 2) -0.5)))))
(def rs-0 (random-sampler))
(def rs-1 (random-sampler))
(def rs-2 (random-sampler))
(defsensor random-unconstrained {:poll-interval (seconds 10)}
(rs-0))
(defsensor random-positive {:poll-interval (seconds 10)}
(+ 0.1 (Math/abs (rs-1))))
(defsensor random-negative {:poll-interval (seconds 10)}
(- -0.1 (Math/abs (rs-2))))
(defsensor math {:poll-interval (seconds 10)}
{:sine (+ 0.3 (Math/sin (/ (- (System/currentTimeMillis) start-t) (minutes 1))))
:cosine (Math/cos (/ (- (System/currentTimeMillis) start-t) (minutes 1))) })
(defsensor steps-ascending {:poll-interval (seconds 5)}
(+ 2.3
(mod (/ (- (System/currentTimeMillis) start-t) (minutes 4))
3)))
| (def start-t (System/currentTimeMillis))
(defn random-sampler [ ]
(let [current (atom 0.0)]
(fn [ ]
(swap! current #(+ % (/ (+ (Math/random) (Math/random)) 2) -0.5)))))
(defsensor* random-unconstrained {:poll-interval (seconds 10)}
(let [rs (random-sampler)]
(fn [] (rs))))
(defsensor* random-positive {:poll-interval (seconds 10)}
(let [rs (random-sampler)]
(fn [] (+ 0.1 (Math/abs (rs))))))
(defsensor* random-negative {:poll-interval (seconds 10)}
(let [rs (random-sampler)]
(fn [] (- -0.1 (Math/abs (rs))))))
(defsensor* random-very-positive {:poll-interval (seconds 10)}
(let [rs (random-sampler)]
(fn [] (+ 10 (Math/abs (rs))))))
(defsensor* random-very-negative {:poll-interval (seconds 10)}
(let [rs (random-sampler)]
(fn [] (- -10 (Math/abs (rs))))))
(defsensor math {:poll-interval (seconds 10)}
{:sine (+ 0.3 (Math/sin (/ (- (System/currentTimeMillis) start-t) (minutes 1))))
:cosine (Math/cos (/ (- (System/currentTimeMillis) start-t) (minutes 1))) })
(defsensor steps-ascending {:poll-interval (seconds 5)}
(+ 2.3
(mod (/ (- (System/currentTimeMillis) start-t) (minutes 4))
3)))
|
Add command to start midje autotest | (ns user
(:require [ruuvi.system]
[clojure.edn :as edn]
[clojure.tools.logging :refer [info error] :as log]
[com.stuartsierra.component :as component]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]
))
(def system nil)
(defn init
"Constructs the current development system."
[]
(alter-var-root
#'system
(constantly (ruuvi.system/create-system "dev/config.edn"))))
(defn start
"Starts the current development system."
[]
(try
(alter-var-root #'system component/start)
(catch Exception e (error e "Failed to start system")
(throw e))))
(defn stop
"Shuts down and destroys the current development system."
[]
(try
(alter-var-root #'system
(fn [s] (when s (component/stop s))))
(catch Exception e (error e "Failed to stop system")
(throw e))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset []
(stop)
(info "Resetting...")
(refresh :after 'user/go)
(info "Reset complete")
:reset-complete)
| (ns user
(:require [ruuvi.system]
[clojure.edn :as edn]
[clojure.tools.logging :refer [info error] :as log]
[com.stuartsierra.component :as component]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]
[midje.repl :as midje]
))
(def system nil)
(defn init
"Constructs the current development system."
[& [config-file]]
(alter-var-root
#'system
(constantly (ruuvi.system/create-system (or config-file "dev/config.edn") ))))
(defn start
"Starts the current development system."
[]
(try
(alter-var-root #'system component/start)
(catch Exception e (error e "Failed to start system")
(throw e))))
(defn stop
"Shuts down and destroys the current development system."
[]
(try
(alter-var-root #'system
(fn [s] (when s (component/stop s))))
(catch Exception e (error e "Failed to stop system")
(throw e))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset
"Stop any running components, reload all files and restart components."
[]
(stop)
(info "Resetting...")
(refresh :after 'user/go)
(info "Reset complete")
:reset-complete)
(defn start-autotest
"Start auto testing for test/ruuvi. When a file is changed, dependant midje tests are executed."
[]
(midje/autotest :dirs "test/ruuvi")
)
|
Change ES endpoint to point to aliased docker hostname | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[pathfinder.system :as sys]
[midje.repl :refer (autotest)]))
;;; this file will be loaded by the repl automatically on start up
;;; lifecycle
(def system
"Entry point in to the current system state."
nil)
(defn init
"Constructs the current development system."
[]
(alter-var-root #'system
(constantly (sys/system {:jetty {:port 9400
:join? false}
:elasticsearch {:endpoint "http://localhost:9200"}}))))
(defn start
"Starts the current development system."
[]
(alter-var-root #'system sys/start))
(defn stop
"Shuts down and destroys the current development system."
[]
(alter-var-root #'system
(fn [s] (when s (sys/stop s)))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset []
(stop)
(refresh :after 'user/go))
;;; utilities
| (ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[pathfinder.system :as sys]
[midje.repl :refer (autotest)]))
;;; this file will be loaded by the repl automatically on start up
;;; lifecycle
(def system
"Entry point in to the current system state."
nil)
(defn init
"Constructs the current development system."
[]
(alter-var-root #'system
(constantly (sys/system {:jetty {:port 9400
:join? false}
:elasticsearch {:endpoint "http://docker:9200"}}))))
(defn start
"Starts the current development system."
[]
(alter-var-root #'system sys/start))
(defn stop
"Shuts down and destroys the current development system."
[]
(alter-var-root #'system
(fn [s] (when s (sys/stop s)))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset []
(stop)
(refresh :after 'user/go))
;;; utilities
|
Use mutual recursion to make the sym/sexpr dance clearer. | (ns kolmogorov-music.kolmogorov
(:require [clojure.repl :as repl]))
(defn in-ns? [sym ns]
(contains? (ns-interns ns) sym))
(defn sexpr [sym]
(-> sym repl/source-fn read-string))
(defn definition [sym]
(-> sym sexpr last))
(defn complexity-sym [sym ns]
(if (in-ns? sym ns)
(->> (definition sym)
flatten
(map #(-> % (complexity-sym ns) inc))
(apply +))
0))
(defn complexity-sexpr [sexpr ns]
(if (seq? sexpr)
(->> sexpr
(map #(-> % (complexity-fn ns) inc))
(apply +))
(complexity-fn sexpr ns)))
(defmacro complexity [sexpr]
(complexity-sexpr sexpr *ns*))
(complexity (+ 4 4))
| (ns kolmogorov-music.kolmogorov
(:require [clojure.repl :as repl]))
(defn in-ns? [sym ns]
(contains? (ns-interns ns) sym))
(defn sexpr [sym]
(-> sym repl/source-fn read-string))
(defn definition [sym]
(-> sym sexpr last))
(declare complexity-sexpr)
(defn complexity-sym [sym ns]
(if (in-ns? sym ns)
(->> (definition sym)
flatten
(complexity-sexpr ns))
0))
(defn complexity-sexpr [ns sexpr]
(->> sexpr
(map #(complexity-sym % ns))
(reduce + (count sexpr))))
(defmacro complexity [expr]
(if (seq? expr)
(complexity-sexpr *ns* expr)
(complexity-sym expr *ns*)))
|
Make improvements to user model | (ns swanson.models.db
(:require [clojure.java.jdbc :as sql]))
(def db {:subprotocol "postgresql"
:subname "//localhost/swanson"
:user "admin"
:password "admin"})
(defn create-users-table []
(sql/with-connection db
(sql/create-table
:users
[:id "varchar(32) PRIMARY KEY"]
[:username "varchar(100)"]
[:pass "varchar(100)"])))
(defn get-user "first query" [id]
(sql/with-connection db
(sql/with-query-results
res ["SELECT * FROM users WHERE id = ?"] (first res))))
| (ns swanson.models.db
(:require [clojure.java.jdbc :as sql]))
(def db {:subprotocol "postgresql"
:subname "//localhost/swanson"
:user "admin"
:password "admin"})
(defn create-users-table []
(sql/with-connection db
(sql/create-table
:users
[:id "serial primary key"]
[:fname "varchar(100) NOT NULL"]
[:lname "varchar(100) NOT NULL"]
[:email "varchar(100) NOT NULL"]
[:encrypted_password "varchar(100)"])))
(defn get-user
[id]
(sql/with-connection
db
(sql/with-query-results
res ["SELECT * FROM users WHERE id = ?" id] (first res))))
(defn make-user
[fname lname email encrypted-pass]
(sql/with-connection
db
(sql/insert-values
:users
[:fname :lname :email :encrypted_password]
[fname lname email encrypted-pass])))
|
Add space between keyword and curly | (defproject ring-example "0.1.0-SNAPSHOT"
:description "Reitit Ring App with Swagger"
:dependencies [[org.clojure/clojure "1.10.0"]
[ring/ring-jetty-adapter "1.7.1"]
[metosin/reitit "0.3.9"]]
:repl-options {:init-ns example.server}
:profiles{:dev {:dependencies [[ring/ring-mock "0.3.2"]]}})
| (defproject ring-example "0.1.0-SNAPSHOT"
:description "Reitit Ring App with Swagger"
:dependencies [[org.clojure/clojure "1.10.0"]
[ring/ring-jetty-adapter "1.7.1"]
[metosin/reitit "0.3.9"]]
:repl-options {:init-ns example.server}
:profiles {:dev {:dependencies [[ring/ring-mock "0.3.2"]]}})
|
Fix for private var use | (ns script.bootstrap.build
(:require
[cljs.source-map :as sm]
[cognitect.transit :as transit]
[planck.core :refer [slurp spit]]
[planck.repl :refer [strip-source-map]]))
(defn cljs->transit-json
[x]
(let [wtr (transit/writer :json)]
(transit/write wtr x)))
(let [file (first *command-line-args*)
sm-json (slurp file)
decoded (sm/decode (.parse js/JSON sm-json))
stripped (^:private-var-access-nowarn strip-source-map decoded)
transit-json (cljs->transit-json stripped)]
(spit file transit-json))
| (ns script.bootstrap.build
(:require
[cljs.source-map :as sm]
[cognitect.transit :as transit]
[planck.core :refer [slurp spit]]
[planck.repl :refer [strip-source-map]]))
(defn cljs->transit-json
[x]
(let [wtr (transit/writer :json)]
(transit/write wtr x)))
(let [file (first *command-line-args*)
sm-json (slurp file)
decoded (sm/decode (.parse js/JSON sm-json))
stripped (#'strip-source-map decoded)
transit-json (cljs->transit-json stripped)]
(spit file transit-json))
|
Update test app to latest clojure release. | ;; Copyright 2014 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 basic "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-beta2"]
;; we can't depend on this, or we'll get the version
;; from .m2, not the version we're building
;;[org.projectodd.wunderboss/wunderboss-clojure "0.1.0-SNAPSHOT"]
])
| ;; Copyright 2014 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 basic "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"]
;; we can't depend on this, or we'll get the version
;; from .m2, not the version we're building
;;[org.projectodd.wunderboss/wunderboss-clojure "0.1.0-SNAPSHOT"]
])
|
Use monkey-robot.com:27017 as MongoDB test URL | (ns whitman.db-test
(:require [clojure.test :refer :all]
[whitman.db :as db]))
(deftest test-db-url-with-default
(let [cfg {"database" "test"}]
(is (= (db/db-url cfg) "mongodb://localhost:27017/test"))))
(deftest test-db-url-when-specified
(let [cfg {"connection" "whitman.monkey-robot.com:27017"
"database" "test"}]
(is (= (db/db-url cfg) "mongodb://whitman.monkey-robot.com:27017/test"))))
(deftest test-db-with-default
(let [cfg {"database" "test"}]
(-> cfg
db/db
nil?
not
is)))
(deftest test-db-when-specified
(let [cfg {"connection" "whitman.monkey-robot.com:27017"
"database" "test"}]
(-> cfg
db/db
nil?
not
is)))
| (ns whitman.db-test
(:require [clojure.test :refer :all]
[whitman.db :as db]))
(deftest test-db-url-with-default
(let [cfg {"database" "test"}]
(is (= (db/db-url cfg) "mongodb://localhost:27017/test"))))
(deftest test-db-url-when-specified
(let [cfg {"connection" "monkey-robot.com:27017"
"database" "test"}]
(is (= (db/db-url cfg) "mongodb://monkey-robot.com:27017/test"))))
(deftest test-db-with-default
(let [cfg {"database" "test"}]
(-> cfg
db/db
nil?
not
is)))
(deftest test-db-when-specified
(let [cfg {"connection" "monkey-robot.com:27017"
"database" "test"}]
(-> cfg
db/db
nil?
not
is)))
|
Clear console pane when resetting it | (ns nightcode.repl
(:require [nightcode.editors :as editors]
[nightcode.lein :as lein]
[nightcode.sandbox :as sandbox]
[nightcode.shortcuts :as shortcuts]
[nightcode.ui :as ui]
[nightcode.utils :as utils]
[seesaw.core :as s]))
(defn run-repl!
"Starts a REPL process."
[process in-out]
(lein/stop-process! process)
(->> (if (sandbox/get-dir)
(clojure.main/repl)
(lein/start-process-indirectly! process nil "clojure.main"))
(lein/start-thread! in-out)))
(defn create-pane
"Returns the pane with the REPL."
[console]
(let [process (atom nil)
run! (fn [& _]
(s/request-focus! (-> console .getViewport .getView))
(run-repl! process (ui/get-io! console)))
pane (s/config! console :id :repl-console)]
(utils/set-accessible-name! (.getTextArea pane) :repl-console)
; start the repl
(run!)
; create a shortcut to restart the repl
(when-not (sandbox/get-dir)
(shortcuts/create-hints! pane)
(shortcuts/create-mappings! pane {:repl-console run!}))
; return the repl pane
pane))
| (ns nightcode.repl
(:require [nightcode.editors :as editors]
[nightcode.lein :as lein]
[nightcode.sandbox :as sandbox]
[nightcode.shortcuts :as shortcuts]
[nightcode.ui :as ui]
[nightcode.utils :as utils]
[seesaw.core :as s]))
(defn run-repl!
"Starts a REPL process."
[process in-out]
(lein/stop-process! process)
(->> (if (sandbox/get-dir)
(clojure.main/repl)
(lein/start-process-indirectly! process nil "clojure.main"))
(lein/start-thread! in-out)))
(defn create-pane
"Returns the pane with the REPL."
[console]
(let [process (atom nil)
run! (fn [& _]
(.setText (.getTextArea console) "")
(run-repl! process (ui/get-io! console))
(s/request-focus! (-> console .getViewport .getView)))
pane (s/config! console :id :repl-console)]
(utils/set-accessible-name! (.getTextArea pane) :repl-console)
; start the repl
(run!)
; create a shortcut to restart the repl
(when-not (sandbox/get-dir)
(shortcuts/create-hints! pane)
(shortcuts/create-mappings! pane {:repl-console run!}))
; return the repl pane
pane))
|
Add a docs config prefix | (ns doctopus.configuration
(:require [nomad :refer [defconfig]]
[clojure.java.io :as io]))
(defconfig server-config (io/resource "configuration.edn"))
| (ns doctopus.configuration
(:require [nomad :refer [defconfig]]
[clojure.java.io :as io]))
(defconfig server-config (io/resource "configuration.edn"))
(def docs-uri-prefix "/docs")
|
Add dynamic var for setting verbosity | (ns less4clj.util)
;;
;; Debugging
;; from boot.util
;;
; Hack to detect boot verbosity
(defn- get-verbosity []
(try
(require 'boot.util)
; Deref var and atom
@@(resolve 'boot.util/*verbosity*)
(catch Exception _
1)))
(defn- print*
[verbosity args]
(when (>= (get-verbosity) verbosity)
(binding [*out* *err*]
(apply printf args) (flush))))
(defn dbug [& more] (print* 2 more))
(defn info [& more] (print* 1 more))
(defn warn [& more] (print* 1 more))
(defn fail [& more] (print* 1 more))
| (ns less4clj.util)
;;
;; Debugging
;; from boot.util
;;
(def ^:dynamic *verbosity* 1)
; Hack to detect boot verbosity
(defn- get-verbosity []
(try
(require 'boot.util)
; Deref var and atom
@@(resolve 'boot.util/*verbosity*)
(catch Exception _
*verbosity*)))
(defn- print*
[verbosity args]
(when (>= (get-verbosity) verbosity)
(binding [*out* *err*]
(apply printf args) (flush))))
(defn dbug [& more] (print* 2 more))
(defn info [& more] (print* 1 more))
(defn warn [& more] (print* 1 more))
(defn fail [& more] (print* 1 more))
|
Upgrade todomvc example karma to 4.4.1 | {:npm-dev-deps {"shadow-cljs" "2.8.69"
"karma" "4.3.0"
"karma-chrome-launcher" "3.1.0"
"karma-cljs-test" "0.1.0"
"karma-junit-reporter" "1.2.0"}}
| {:npm-dev-deps {"shadow-cljs" "2.8.69"
"karma" "4.4.1"
"karma-chrome-launcher" "3.1.0"
"karma-cljs-test" "0.1.0"
"karma-junit-reporter" "1.2.0"}}
|
Update tests to test list-things rather than list-rooms. | (ns isla.test.talk
(:use [isla.talk])
(:use [clojure.test])
(:use [clojure.pprint]))
;; list-rooms
(deftest test-0-rooms
(is (re-find #"no way out of this room"
(list-rooms []))))
(deftest test-1-room
(is (re-find #"see a door to the palace"
(list-rooms [{:name "palace"}]))))
(deftest test-2-rooms
(is (re-find #"see a door to the palace and the garden"
(list-rooms [{:name "palace"} {:name "garden"}]))))
(deftest test-3-rooms
(is (re-find #"see a door to the palace, the garden and the bedroom."
(list-rooms [{:name "palace"} {:name "garden"} {:name "bedroom"}])))) | (ns isla.test.talk
(:use [isla.talk])
(:use [clojure.test])
(:use [clojure.pprint]))
;; list-things
(def list-rooms-texts ["no way out of this room"
"you can see a door to" "you can see doors to" "the"])
(deftest test-0-rooms
(is (re-find #"no way out of this room"
(apply list-things (cons [] list-rooms-texts)))))
(deftest test-1-room
(is (re-find #"see a door to the palace"
(apply list-things (cons [{:name "palace"}] list-rooms-texts)))))
(deftest test-1-room
(is (re-find #"see a door to the palace and the garden"
(apply list-things (cons [{:name "palace"} {:name "garden"}]
list-rooms-texts)))))
(deftest test-1-room
(is (re-find #"see doors to the palace, the garden and the bedroom"
(apply list-things (cons [{:name "palace"} {:name "garden"} {:name "bedroom"}]
list-rooms-texts)))))
;; player
(deftest test-player-description
(is (re-find #"you look like a girl You are carrying a flower."
(player-description {:summary "you look like a girl"
:items #{{:name "flower"}}}))))
|
Revert back to unmodified Om | (defproject clik-clak-joe "0.1.0-SNAPSHOT"
:description "React Native tic-tac-toe in ClojureScript"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3153"]
[org.omcljs/om "0.9.0-SNAPSHOT"]
[org.omcljs/ambly "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.0.5"]]
:source-paths ["src"]
:clean-targets ["js" "out"]
:cljsbuild {:builds {:dev
{:source-paths ["src"]
:compiler {:output-dir "out"
:output-to "out/main.js"
:optimizations :none
#_:foreign-libs #_[{:provides ["reactnative"]
:file "http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle"}]}}
:rel
{:source-paths ["src"]
:compiler {:output-to "out/main.js"
:optimizations :advanced
:externs ["externs.js"]
:pretty-print false
:pseudo-names false}}}})
| (defproject clik-clak-joe "0.1.0-SNAPSHOT"
:description "React Native tic-tac-toe in ClojureScript"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3153"]
[org.omcljs/om "0.8.8"]
[org.omcljs/ambly "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.0.5"]]
:source-paths ["src"]
:clean-targets ["js" "out"]
:cljsbuild {:builds {:dev
{:source-paths ["src"]
:compiler {:output-dir "out"
:output-to "out/main.js"
:optimizations :none
#_:foreign-libs #_[{:provides ["reactnative"]
:file "http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle"}]}}
:rel
{:source-paths ["src"]
:compiler {:output-to "out/main.js"
:optimizations :advanced
:externs ["externs.js"]
:pretty-print false
:pseudo-names false}}}})
|
Implement injections in terms of a profile. | (ns leiningen.difftest
(:require [leiningen.test :as test]))
(defn difftest [project & args]
(apply test/test (-> project
(update-in [:injections] conj
'((ns-resolve (doto 'difftest.core
require) 'activate)))
(update-in [:dependencies] into {'difftest "1.3.8"}))
args)) | (ns leiningen.difftest
(:require [leiningen.test :as test]
[leiningen.core.project :as project]))
(def profile
{:injections ['((ns-resolve (doto 'difftest.core require) 'activate))]
:dependencies [['difftest "1.3.8"]]})
(defn difftest
"Run tests with improved failure output."
[project & args]
(apply test/test (project/merge-profiles project [profile]) args)) |
Add test module to Containium. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;;; Development settings.
{:config {:cassandra {:config-file "cassandra.yaml"}
:kafka {:port "9090"
:broker-id "1"
:log-dir "target/kafka-log"
:zk-connect "localhost:2181"}
:http-kit {:port 8080}}
:modules []
:resolve-dependencies true}
| ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;;; Development settings.
{:config {:cassandra {:config-file "cassandra.yaml"}
:kafka {:port "9090"
:broker-id "1"
:log-dir "target/kafka-log"
:zk-connect "localhost:2181"}
:http-kit {:port 8080}}
:modules ["dev-resources/test-module/target/test-module-0.1.jar"]
:resolve-dependencies true}
|
Add some tools to make it easier to experiment | (ns user
(:use io.aviso.repl
clojure.pprint)
(:require [clojure.tools.logging :as l]))
(install-pretty-exceptions)
(defmacro other-thread
[& body]
`(.start (Thread. (bound-fn [] ~@body))))
| (ns user
(:use io.aviso.repl
io.aviso.logging
io.aviso.tracker
clojure.pprint)
(:require [clojure.tools.logging :as l]))
(install-pretty-exceptions)
(io.aviso.logging/install-pretty-logging)
(io.aviso.logging/install-uncaught-exception-handler)
(defmacro other-thread
[& body]
`(.start (Thread. (bound-fn []
(checkpoint
~@body)))))
(defn demo-1
[]
(track "on main thread" (other-thread (throw (RuntimeException. "hello")))))
(defn demo-2
[]
(track "outer" (track "middle - a" (other-thread (try
(track "inner - a" (throw (ex-info "blowed up - a" {})))
(catch Throwable _))))
(track "middle - b" (other-thread (try
(track "inner - b" (throw (ex-info "blowed up - b" {})))
(catch Throwable _)))))) |
Disable reloading start-app task with c.t.n | (ns backend.boot
{:boot/export-tasks true}
(:require [boot.core :refer :all]
[reloaded.repl :refer [go]]
[backend.main :refer :all]))
(deftask start-app
[p port PORT int "Port"]
(let [x (atom nil)]
(with-pre-wrap fileset
(swap! x (fn [x]
(if x
x
(do (setup-app! {:port port})
(go)))))
fileset)))
| (ns backend.boot
{:boot/export-tasks true}
(:require [boot.core :refer :all]
[reloaded.repl :refer [go]]
[backend.main :refer :all]
[clojure.tools.namespace.repl :refer [disable-reload!]]))
(disable-reload!)
(deftask start-app
[p port PORT int "Port"]
(let [x (atom nil)]
(with-pre-wrap fileset
(swap! x (fn [x]
(if x
x
(do (setup-app! {:port port})
(go)))))
fileset)))
|
Add the tests to source-paths | (set-env!
:source-paths #{"src/main/java"}
:test-paths #{"src/test/java"}
:dependencies '[[junit "4.12" :scope "test"]])
(def +version+ "0.1.0")
(task-options!
pom {:project 'http-server
:version +version+
:description "A Java HTTP server."
:url "https://github.com/RadicalZephyr/http-server"
:scm {:url "https://github.com/RadicalZephyr/http-server.git"}
:licens {"MIT" "http://opensource.org/licenses/MIT"}})
(require 'clojure.set)
(deftask junit
"Run the jUnit test runner."
[]
(set-env! :source-paths #(clojure.set/union % (get-env :test-paths)))
(with-pre-wrap fileset
fileset))
(deftask test
"Compile and run my jUnit tests."
[]
(comp (javac)
(junit)))
(deftask build
"Build my http server."
[]
(comp (javac)
(pom)
(jar)))
| (set-env!
:source-paths #{"src/main/java" "src/test/java"}
:dependencies '[[junit "4.12" :scope "test"]])
(def +version+ "0.1.0")
(task-options!
pom {:project 'http-server
:version +version+
:description "A Java HTTP server."
:url "https://github.com/RadicalZephyr/http-server"
:scm {:url "https://github.com/RadicalZephyr/http-server.git"}
:licens {"MIT" "http://opensource.org/licenses/MIT"}})
(require 'clojure.set)
(deftask junit
"Run the jUnit test runner."
[]
(with-pre-wrap fileset
fileset))
(deftask test
"Compile and run my jUnit tests."
[]
(comp (javac)
(junit)))
(deftask build
"Build my http server."
[]
(comp (javac)
(pom)
(jar)))
|
Remove lein default failing test. | (ns aspire.core-test
(:require [clojure.test :refer :all]
[aspire.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
(deftest pass-test
(testing "I pass"
(is (= 1 1))))
| (ns aspire.core-test
(:require [clojure.test :refer :all]
[aspire.core :refer :all]))
(deftest pass-test
(testing "I pass"
(is (= 1 1))))
|
Fix typo in :repl-options :init. | (defproject {{raw-name}} "0.1.0-SNAPSHOT"
:description "FIXME: Write a description."
:url "FIXME: Add a URL."
:scm {:name "git"
:url "FIXME: Add a URL."}
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:main {{namespace}}.site
:source-paths ["src/main/clj"
"src/main/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2850"]
[aviary "0.1.6"]
[enlive "1.1.5"]
[garden "1.2.5"]]
:profiles {:dev {:source-paths ["src/dev/clj"
"src/dev/cljs"]
:dependencies [[weasel "0.5.0"]
[com.cemerick/piggieback "0.1.5"]]
:repl-options {:init ({{namespace}}.dev/start-dev)
:init-ns {{namespace}}.dev
:nrepl-middleware
[cemerick.piggieback/wrap-cljs-repl]}}}
:aliases {"ship" ["run" ":ship"]
"export" ["run" ":export"]})
| (defproject {{raw-name}} "0.1.0-SNAPSHOT"
:description "FIXME: Write a description."
:url "FIXME: Add a URL."
:scm {:name "git"
:url "FIXME: Add a URL."}
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:main {{namespace}}.site
:source-paths ["src/main/clj"
"src/main/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2850"]
[aviary "0.1.6"]
[enlive "1.1.5"]
[garden "1.2.5"]]
:profiles {:dev {:source-paths ["src/dev/clj"
"src/dev/cljs"]
:dependencies [[weasel "0.5.0"]
[com.cemerick/piggieback "0.1.5"]]
:repl-options {:init ({{namespace}}.dev/start)
:init-ns {{namespace}}.dev
:nrepl-middleware
[cemerick.piggieback/wrap-cljs-repl]}}}
:aliases {"ship" ["run" ":ship"]
"export" ["run" ":export"]})
|
Add support for platform based conditional | ;; Licensed to the Apache Software Foundation (ASF) under one
;; or more contributor license agreements. See the NOTICE file
;; distributed with this work for additional information
;; regarding copyright ownership. The ASF licenses this file
;; to you 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.
(ns chaintool.build.core
(:require [chaintool.build.golang :as golang])
(:refer-clojure :exclude [compile]))
(defn compile [params]
;; generate golang output (shim, protobufs, etc)
;; FIXME: we need to switch on the Platform type
(golang/compile params))
| ;; Licensed to the Apache Software Foundation (ASF) under one
;; or more contributor license agreements. See the NOTICE file
;; distributed with this work for additional information
;; regarding copyright ownership. The ASF licenses this file
;; to you 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.
(ns chaintool.build.core
(:require [chaintool.build.golang :as golang]
[chaintool.util :as util])
(:refer-clojure :exclude [compile]))
(def handlers
{"org.hyperledger.chaincode.golang" golang/compile})
(defn compile [{:keys [config] :as params}]
;; generate platform output (shim, protobufs, etc)
(let [platform (->> config :Platform :Name)]
(if-let [handler (handlers platform)]
(handler params)
(util/abort -1 (str "Unknown platform type: \"" platform "\"")))))
|
Move xorp to use 'primary_interface' | interfaces {
restore-original-config-on-shutdown: false
interface eth0 {
description: "Internal pNodes interface"
disable: false
default-system-config
}
}
protocols {
igmp {
disable: false
interface eth0 {
vif eth0 {
disable: false
version: 3
}
}
traceoptions {
flag all {
disable: false
}
}
}
}
| interfaces {
restore-original-config-on-shutdown: false
interface {{ hostvars[inventory_hostname][primary_interface]['device'] }} {
description: "Internal pNodes interface"
disable: false
default-system-config
}
}
protocols {
igmp {
disable: false
interface {{ hostvars[inventory_hostname][primary_interface]['device'] }} {
vif {{ hostvars[inventory_hostname][primary_interface]['device'] }} {
disable: false
version: 3
}
}
traceoptions {
flag all {
disable: false
}
}
}
}
|
Handle title array with three items as a special case | (ns metrics.core
(:import [com.codahale.metrics MetricRegistry Metric]))
(def ^{:tag "MetricRegistry" :doc "Default registry used by public API functions when no explicit registry argument is given"}
default-registry
(MetricRegistry.))
(defn ^MetricRegistry new-registry
[]
(MetricRegistry.))
(defn ^String metric-name
[title]
(if (string? title)
(MetricRegistry/name "default"
^"[Ljava.lang.String;" (into-array String ["default" ^String title]))
(MetricRegistry/name
^String (first title)
^"[Ljava.lang.String;" (into-array String
[(second title)
(last title)]))))
(defn add-metric
"Add a metric with the given title."
([title ^Metric metric]
(add-metric default-registry title metric))
([^MetricRegistry reg title ^Metric metric]
(.register reg (metric-name title) metric)))
(defn remove-metric
"Remove the metric with the given title."
([title]
(remove-metric default-registry title))
([^MetricRegistry reg title]
(.remove reg (metric-name title))))
(defn replace-metric
"Replace a metric with the given title."
([title ^Metric metric]
(replace-metric default-registry title metric))
([^MetricRegistry reg title ^Metric metric]
(remove-metric reg (metric-name title))
(add-metric reg (metric-name title) metric)))
| (ns metrics.core
(:import [com.codahale.metrics MetricRegistry Metric]))
(def ^{:tag "MetricRegistry" :doc "Default registry used by public API functions when no explicit registry argument is given"}
default-registry
(MetricRegistry.))
(defn ^MetricRegistry new-registry
[]
(MetricRegistry.))
(defn ^String metric-name
[title]
(if (string? title)
(MetricRegistry/name "default"
^"[Ljava.lang.String;" (into-array String ["default" ^String title]))
(MetricRegistry/name
^String (first title)
^"[Ljava.lang.String;" (into-array String
(if (= 3 (count title))
[(second title) (last title)]
(rest title))))))
(defn add-metric
"Add a metric with the given title."
([title ^Metric metric]
(add-metric default-registry title metric))
([^MetricRegistry reg title ^Metric metric]
(.register reg (metric-name title) metric)))
(defn remove-metric
"Remove the metric with the given title."
([title]
(remove-metric default-registry title))
([^MetricRegistry reg title]
(.remove reg (metric-name title))))
(defn replace-metric
"Replace a metric with the given title."
([title ^Metric metric]
(replace-metric default-registry title metric))
([^MetricRegistry reg title ^Metric metric]
(remove-metric reg (metric-name title))
(add-metric reg (metric-name title) metric)))
|
Fix the tests after making (build) fn more strict | (ns circle.backend.build.test-run-build
(:use midje.sweet)
(:use [circle.backend.build.test-utils :only (minimal-build)])
(:use [circle.backend.action :only (defaction)])
(:use [circle.backend.build :only (build successful?)])
(:use [circle.backend.build.run :only (run-build)])
(:use [circle.util.predicates :only (ref?)]))
(circle.db/init)
(defaction successful-action [act-name]
{:name act-name}
(fn [build]
nil))
(defn successful-build []
(build {:project-name "succesful build"
:build-num 1
:vcs-url "git@github.com:foo/bar.git"
:vcs-revision "f00b4r"
:actions [(successful-action "1")
(successful-action "2")
(successful-action "3")]}))
(fact "successful build is successful"
(let [build (run-build (successful-build))]
build => ref?
@build => map?
(-> @build :action-results) => seq
(-> @build :action-results (count)) => 3
(for [res (-> @build :action-results)]
(> (-> res :stop-time) (-> res :start-time)) => true)
(successful? build) => truthy)) | (ns circle.backend.build.test-run-build
(:use midje.sweet)
(:use [circle.backend.build.test-utils :only (minimal-build)])
(:use [circle.backend.action :only (defaction)])
(:use [circle.backend.build :only (build successful?)])
(:use [circle.backend.build.run :only (run-build)])
(:use [circle.util.predicates :only (ref?)]))
(circle.db/init)
(defaction successful-action [act-name]
{:name act-name}
(fn [build]
nil))
(defn successful-build []
(minimal-build :project-name "succesful build"
:actions [(successful-action "1")
(successful-action "2")
(successful-action "3")]))
(fact "successful build is successful"
(let [build (run-build (successful-build))]
build => ref?
@build => map?
(-> @build :action-results) => seq
(-> @build :action-results (count)) => 3
(for [res (-> @build :action-results)]
(> (-> res :stop-time) (-> res :start-time)) => true)
(successful? build) => truthy)) |
Change go-try macro to return nil when exception is thrown (and sent to the channel) | (ns io.aviso.rook.utils
"Kitchen-sink of useful standalone utilities."
(:import
(java.util UUID))
(:use
[clojure.core.async :only [go >!]])
(:require
[clojure.pprint :as pprint]))
(defn new-uuid
"Generates a new UUID string, via UUIDrandomUUID."
[]
(-> (UUID/randomUUID) .toString))
(defn response
"Construct Ring response for success or other status."
([body] (response 200 body))
([status body] {:status status :body body}))
(defn pretty-print
"Pretty-prints the supplied object to a returned string."
[object]
(pprint/write object
:stream nil
:pretty true))
(defmacro try-go
"Wraps the body in a go block and a try block. The try block will
catch any throwable and put it into the exception channel. This allow a failure
to be communicated out of an asynchronous process and back to some originator
that can report it, or attempt recovery."
[exception-ch & body]
`(let [ch# ~exception-ch]
(go
(try
~@body
(catch Throwable t#
(>! ch# t#)
;; Re-throw the exception; that's the only way to get out of the go block
;; without returning a value.
(throw t#)))))) | (ns io.aviso.rook.utils
"Kitchen-sink of useful standalone utilities."
(:import
(java.util UUID))
(:use
[clojure.core.async :only [go >!]])
(:require
[clojure.pprint :as pprint]))
(defn new-uuid
"Generates a new UUID string, via UUIDrandomUUID."
[]
(-> (UUID/randomUUID) .toString))
(defn response
"Construct Ring response for success or other status."
([body] (response 200 body))
([status body] {:status status :body body}))
(defn pretty-print
"Pretty-prints the supplied object to a returned string."
[object]
(pprint/write object
:stream nil
:pretty true))
(defmacro try-go
"Wraps the body in a go block and a try block. The try block will
catch any throwable and put it into the exception channel. This allow a failure
to be communicated out of an asynchronous process and back to some originator
that can report it, or attempt recovery."
[exception-ch & body]
`(let [ch# ~exception-ch]
(go
(try
~@body
(catch Throwable t#
;; The exception is routed to the exception channel.
;; The go block returns nil (that's problematic according to the
;; docs), but re-throwing the exeption results in an ugly
;; exception trace on the console.
(>! ch# t#)))))) |
Add helper function for normalize db returing record attributes. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.services.core)
(def +hierarchy+
(as-> (make-hierarchy) $
(derive $ :auth/login :command)))
(defmulti -novelty
(fn [conn data] (:type data))
:hierarchy #'+hierarchy+)
(defmulti -query
(fn [conn data] (:type data))
:hierarchy #'+hierarchy+)
(defmethod -novelty :default
[data]
(throw (ex-info "Not implemented" {})))
(defmethod -query :default
[data]
(throw (ex-info "Not implemented" {})))
| ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.services.core
(:require [clojure.walk :as walk]
[cuerdas.core :as str]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Main Api
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def +hierarchy+
(as-> (make-hierarchy) $
(derive $ :auth/login :command)))
(defmulti -novelty
(fn [conn data] (:type data))
:hierarchy #'+hierarchy+)
(defmulti -query
(fn [conn data] (:type data))
:hierarchy #'+hierarchy+)
(defmethod -novelty :default
[data]
(throw (ex-info "Not implemented" {})))
(defmethod -query :default
[data]
(throw (ex-info "Not implemented" {})))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Common Helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn normalize-attrs
"Recursively transforms all map keys from strings to keywords."
[m]
(letfn [(tf [[k v]]
(let [ks (-> (name k)
(str/replace "_" "-"))]
[(keyword ks) v]))
(walker [x]
(if (map? x)
(into {} (map tf) x)
x))]
(walk/postwalk walker m)))
|
Test with better print fun | (ns cljs-workers.test
(:require [cljs-workers.core :as main]
[cljs-workers.worker :as worker]))
(defn app
[]
(let [worker-pool (main/create-pool 2 "js/worker/worker.js")]
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10}} #(.debug js/console %))
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:d]} :transfer [:d]} #(.debug js/console %))
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:d]} :transfer [:c]} #(.debug js/console %))
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:c]} :transfer [:d]} #(.debug js/console %))))
(defn worker
[]
(worker/register
:mirror
(fn [arguments]
arguments))
(worker/bootstrap))
(if (and (main/supported?) (main/main?))
(app)
(worker))
| (ns cljs-workers.test
(:require [cljs-workers.core :as main]
[cljs-workers.worker :as worker]))
(defn app
[]
(let [worker-pool (main/create-pool 2 "js/worker/worker.js")
print-result #(.debug js/console (str (:state %)) %)]
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10}} print-result)
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:d]} :transfer [:d]} print-result)
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:d]} :transfer [:c]} print-result)
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:c]} :transfer [:d]} print-result)))
(defn worker
[]
(worker/register
:mirror
(fn [arguments]
arguments))
(worker/bootstrap))
(if (and (main/supported?) (main/main?))
(app)
(worker))
|
Handle case in both upper or lower cases. The input key now can be a char or a string | (ns bogo-clojure.core
(:gen-class)
(:require [clojure.string :as string]
[bogo-clojure.bg-word :refer :all]
[bogo-clojure.bg-telex :refer :all]))
(defn get-action
;; Action is a function taking in current string, make transform,
;; return the new string
[key typemode]
(if (contains? typemode key)
(get typemode key)
:addchar))
(defn process-key
([astring key]
(process-key astring key TELEX))
([astring key typemode]
(let [[first-word last-word] (grammar-split-word astring)
action (get-action key typemode)]
(str first-word
(if (fn? action)
(action last-word)
(str last-word key))))))
(defn process-sequence
([sequence]
(process-sequence sequence TELEX))
([sequence typemode]
(reduce (fn [word key] (process-key word (str key) typemode))
""
sequence)))
| (ns bogo-clojure.core
(:gen-class)
(:require [clojure.string :as string]
[bogo-clojure.bg-word :refer :all]
[bogo-clojure.bg-telex :refer :all]))
(defn get-action
;; Action is a function taking in current string, make transform,
;; return the new string
[key typemode]
(if (contains? typemode key)
(get typemode key)
:addchar))
(defn process-key*
[key old-string new-string]
(if (and (= (inc (count old-string)) (count new-string))
(= (string/lower-case key) (str (last new-string))))
(str (subs new-string 0 (count old-string)) key)
new-string))
(defn process-key
([astring key]
(process-key astring key TELEX))
([astring key typemode]
(let [[first-word last-word] (grammar-split-word astring)
strkey (str key)
lkey (string/lower-case strkey)
action (get-action lkey typemode)]
(process-key* strkey
astring
(str first-word
(if (fn? action)
(action last-word)
(str last-word strkey)))))))
(defn process-sequence
([sequence]
(process-sequence sequence TELEX))
([sequence typemode]
(reduce (fn [word key] (process-key word key typemode))
""
sequence)))
|
Add unit tests for collection deletion | (ns fcms.unit.resources.collection.collection-delete
(:require [midje.sweet :refer :all]
[fcms.lib.resources :refer :all]
[fcms.lib.check :refer (about-now?)]
[fcms.resources.collection :refer :all]
[fcms.resources.common :as common]))
;; ----- Tests -----
(with-state-changes [(before :facts (do
(delete-collection c)
(create-collection c {:custom foo})))
(after :facts (delete-collection c))]
(facts "about collection deletion failures"
(fact "when the specified collection doesn't exist"
(doseq [coll-slug (conj bad-strings "not-here")]
(delete-collection coll-slug) => :bad-collection)))
(facts "about deleting collections"
(fact "the collection can no longer be retrieved"
(delete-collection c)
(get-collection c) => nil)
(fact "the collection is no longer listed"
(delete-collection c)
(all-collections) => []))) | |
Switch repositories from local to clojars.org | (defproject dotenv "0.1.0"
:description "dotenv: Load environment variables from .env file into the JVM System Properties"
:url "https://github.com/primedia/clj-dotenv"
:dependencies [ [org.clojure/clojure "1.5.1"]
;;[org.clojars.jackmorrill/dotenv "0.1.0"]
[local/dotenv.core "0.1.0"]
;;[org.clojars.jackmorrill/environs "0.1.0"]
[local/environs.core "0.1.0"]
]
:repositories {"project" "file:repo"})
| (defproject dotenv "0.1.0"
:description "dotenv: Load environment variables from .env file into the JVM System Properties"
:url "https://github.com/primedia/clj-dotenv"
:dependencies [ [org.clojure/clojure "1.5.1"]
[org.clojars.jackmorrill/dotenv "0.1.0"]
;;[local/dotenv.core "0.1.0"]
[org.clojars.jackmorrill/environs "0.1.0"]
;;[local/environs.core "0.1.0"]
]
:repositories {"project" "file:repo"})
|
Add Leiningen to dev dependencies | (defproject jcf/lein-template "0.1.1-SNAPSHOT"
:description "FIXME: write description"
:url "https://github.com/jcf/lein-template"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:eval-in-leiningen true
:profiles {:dev {:dependencies [[me.raynes/fs "1.4.6"]]}})
| (defproject jcf/lein-template "0.1.1-SNAPSHOT"
:description "FIXME: write description"
:url "https://github.com/jcf/lein-template"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:eval-in-leiningen true
:profiles {:dev {:dependencies [[leiningen "2.5.1"]
[me.raynes/fs "1.4.6"]]}})
|
Add a producer and a printer to the count-words example | (ns clstreams.examples.count-words.system
(:require [clstreams.examples.count-words.pipelines :as pipelines]
[clstreams.examples.count-words.webapi :as webapi]
[com.stuartsierra.component :as component]))
(defn count-words-system []
(component/system-map
:pipeline (pipelines/count-words)
:webapi (component/using
(webapi/web-test)
[:pipeline])))
| (ns clstreams.examples.count-words.system
(:require [clstreams.examples.count-words.pipelines :as pipelines]
[clstreams.examples.count-words.webapi :as webapi]
[clstreams.kstreams.component :refer [producer-send!]]
[clstreams.kstreams.helpers :as helpers]
[com.stuartsierra.component :as component])
(:import org.apache.kafka.common.serialization.Serdes))
(defn count-words-system []
(component/system-map
:producer (helpers/new-manual-producer "streams-file-input")
:pipeline (pipelines/count-words)
:printer (helpers/new-print-topic "streams-wordcount-output"
{:key-serde (Serdes/String)
:value-serde (Serdes/Long)})
:webapi (component/using
(webapi/web-test)
[:pipeline])))
(defn produce-words [system & lines]
(apply producer-send! (:producer system) (for [line lines] ["" line])))
|
Return the given date at midnight | (ns karmanaut.utils
(:gen-class)
(:require [clojure.java.io :as io])
(:import [java.util Calendar
Date
GregorianCalendar
TimeZone]))
(defn env [key default]
(get (System/getenv) key default))
(defn version []
(if (.exists (io/as-file "project.clj"))
(-> "project.clj" slurp read-string (nth 2))
(-> (eval 'karmanaut.utils) .getPackage .getImplementationVersion)))
(defn utcnow []
(Date.))
(defn utcnow-midnight []
(let [tz (TimeZone/getTimeZone "UTC")
c (GregorianCalendar. tz)]
(doto c
(.set Calendar/HOUR_OF_DAY 0)
(.set Calendar/MINUTE 0)
(.set Calendar/SECOND 0)
(.set Calendar/MILLISECOND 0))
(.getTime c)))
(defn long-to-date
"Reddit timestamps are the number of seconds since the
Unix epoch, in UTC."
[epoch]
(Date. (* 1000 (long epoch))))
| (ns karmanaut.utils
(:gen-class)
(:require [clojure.java.io :as io])
(:import [java.util Calendar
Date
GregorianCalendar
TimeZone]))
(defn env [key default]
(get (System/getenv) key default))
(defn version []
(if (.exists (io/as-file "project.clj"))
(-> "project.clj" slurp read-string (nth 2))
(-> (eval 'karmanaut.utils) .getPackage .getImplementationVersion)))
(defn utcnow []
(Date.))
(defn midnight [dt]
"Returns the given datetime at midnight"
(let [tz (TimeZone/getTimeZone "UTC")
c (GregorianCalendar. tz)]
(doto c
(.setTime dt)
(.set Calendar/HOUR_OF_DAY 0)
(.set Calendar/MINUTE 0)
(.set Calendar/SECOND 0)
(.set Calendar/MILLISECOND 0))
(.getTime c)))
(defn long-to-date
"Reddit timestamps are the number of seconds since the
Unix epoch, in UTC."
[epoch]
(Date. (* 1000 (long epoch))))
|
Create utility functions to act on grid | (ns solver.core
(:gen-class))
(defn create-grid
([] (create-grid 1000))
([w] (create-grid w w))
([w h] (let [row (vec (map (fn [x] false) (range w)))
grid (vec (map (fn [x] row) (range h)))]
grid)))
(defn act-on
([f row a b] (let [low a
high (+ b 1)
difference (- high low)]
(vec (concat
(take low row)
(map f (take difference (drop low row)))
(drop high row)))))
([f grid a b c d] (let [low a
high (+ c 1)
difference (- high low)
act-on-row (fn [row] (act-on f row b d))]
(vec (concat
(take low grid)
(map act-on-row (take difference (drop low grid)))
(drop high grid))))))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!"))
| (ns solver.core
(:gen-class))
(defn create-grid
([] (create-grid 1000))
([w] (create-grid w w))
([w h] (let [row (vec (map (fn [x] false) (range w)))
grid (vec (map (fn [x] row) (range h)))]
grid)))
(defn act-on
([f row a b] (let [low a
high (+ b 1)
difference (- high low)]
(vec (concat
(take low row)
(map f (take difference (drop low row)))
(drop high row)))))
([f grid a b c d] (let [low a
high (+ c 1)
difference (- high low)
act-on-row (fn [row] (act-on f row b d))]
(vec (concat
(take low grid)
(map act-on-row (take difference (drop low grid)))
(drop high grid))))))
(defn on [a b c d grid]
(let [action (fn [_] true)]
(act-on action grid a b c d)))
(defn off [a b c d grid]
(let [action (fn [_] false)]
(act-on action grid a b c d)))
(defn toggle [a b c d grid]
(let [action (fn [x] (not x))]
(act-on action grid a b c d)))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!"))
|
Add support for Emacs support | (defproject cascade "0.2-SNAPSHOT"
:description "Simple, fast, easy web applications in idiomatic Clojure"
:url "http://github.com/hlship/cascade"
:source-path "src/main/clojure"
:resources-path "src/main/resources"
:test-path "src/test/clojure"
:dev-resources-path "src/test/resources"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/algo.monads "0.1.0"]
[compojure "0.6.5"]]
:dev-dependencies [[ring/ring-jetty-adapter "0.3.11"]])
| (defproject cascade "0.2-SNAPSHOT"
:description "Simple, fast, easy web applications in idiomatic Clojure"
:url "http://github.com/hlship/cascade"
:source-path "src/main/clojure"
:resources-path "src/main/resources"
:test-path "src/test/clojure"
:dev-resources-path "src/test/resources"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/algo.monads "0.1.0"]
[compojure "0.6.5"]]
:dev-dependencies [[ring/ring-jetty-adapter "0.3.11"]
[swank-coljure "1.3.1"]
[midje "1.1.1"]])
|
Remove trailing whitespace and bump version. | (defproject clj-ravendb "0.4.2-SNAPSHOT"
:description "A Clojure library for consuming a RavenDB rest api."
:url "https://github.com/markwoodhall/clj-ravendb"
:license {:name "MIT License"
:url "http://opensource.org/licenses/mit-license.php"}
:plugins [[quickie "0.2.5"]]
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-http "0.9.2"]
[org.clojure/core.async "0.1.303.0-886421-alpha"]
[org.clojure/data.json "0.2.3"]]
:deploy-repositories [
["clojars" {:sign-releases false}]
]
:scm {:name "github"
:url "https://github.com/markwoodhall/clj-ravendb"})
| (defproject clj-ravendb "0.5.0"
:description "A Clojure library for consuming a RavenDB rest api."
:url "https://github.com/markwoodhall/clj-ravendb"
:license {:name "MIT License"
:url "http://opensource.org/licenses/mit-license.php"}
:plugins [[quickie "0.2.5"]]
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-http "0.9.2"]
[org.clojure/core.async "0.1.303.0-886421-alpha"]
[org.clojure/data.json "0.2.3"]]
:deploy-repositories [
["clojars" {:sign-releases false}]
]
:scm {:name "github"
:url "https://github.com/markwoodhall/clj-ravendb"})
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-metrics "0.8.0.5"
: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.6-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"]]}})
|
Make criterium a dev dependencie | (defproject fault "0.1.0"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:dev {:dependencies [[junit/junit "4.11"]
[org.mockito/mockito-core "1.10.8"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[clj-http "1.0.1"]]
:junit ["test/java"]
:java-source-paths ["src/java" "test/java"]
:plugins [[lein-junit "1.1.3"]]
:junit-formatter "brief"}}
:javac-target "1.7"
:dependencies [[org.clojure/clojure "1.6.0"]
[criterium "0.4.3"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"])
| (defproject fault "0.1.0"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:dev {:dependencies [[junit/junit "4.11"]
[org.mockito/mockito-core "1.10.8"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[clj-http "1.0.1"]
[criterium "0.4.3"]]
:junit ["test/java"]
:java-source-paths ["src/java" "test/java"]
:plugins [[lein-junit "1.1.3"]]
:junit-formatter "brief"}}
:javac-target "1.7"
:dependencies [[org.clojure/clojure "1.6.0"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"])
|
Add cheshire back for JSON support | (defproject lein-fore-prob "0.1.3-SNAPSHOT"
:description "Leiningen plugin to populate a project from a 4clojure problem."
:url "https://github.com/bfontaine/lein-fore-prob"
:license {:name "Eclipse Public License"
:url "https://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[clj-http "3.10.0"]
[clj-soup/clojure-soup "0.1.3"]]
:profiles {:dev {}
: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.0"]]}}
:aliases {"all" ["with-profile" "dev,1.8:dev,1.9:dev,1.10:dev"]}
:eval-in-leiningen true
:plugins [[lein-cloverage "1.0.2"]])
| (defproject lein-fore-prob "0.1.3-SNAPSHOT"
:description "Leiningen plugin to populate a project from a 4clojure problem."
:url "https://github.com/bfontaine/lein-fore-prob"
:license {:name "Eclipse Public License"
:url "https://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[clj-http "3.10.0"]
[cheshire "5.8.1"]
[clj-soup/clojure-soup "0.1.3"]]
:profiles {:dev {}
: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.0"]]}}
:aliases {"all" ["with-profile" "dev,1.8:dev,1.9:dev,1.10:dev"]}
:eval-in-leiningen true
:plugins [[lein-cloverage "1.0.2"]])
|
Update compojure, add ring deps | (defproject mars-ogler "0.0.1-SNAPSHOT"
:description "Holy cow, it's Mars!"
:url "http://github.com/aperiodic/mars-ogler"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[clj-time "0.4.4"]
[compojure "1.1.1"]
[hiccup "1.0.0"]
[enlive "1.0.1"]]
:plugins [[lein-ring "0.7.1"]]
:ring {:handler mars-ogler.routes/handler})
| (defproject mars-ogler "0.0.1-SNAPSHOT"
:description "Holy cow, it's Mars!"
:url "http://github.com/aperiodic/mars-ogler"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[clj-time "0.4.4"]
[compojure "1.1.3"]
[enlive "1.0.1"]
[hiccup "1.0.0"]
[ring/ring-core "1.1.5"]
[ring/ring-jetty-adapter "1.1.5"]]
:plugins [[lein-ring "0.7.1"]]
:ring {:handler mars-ogler.routes/handler})
|
Fix resource-paths for test & coverage. | (defproject com.lemondronor/turboshrimp-h264j "0.2.2-SNAPSHOT"
:description (str "An AR.Drone video decoder for the turboshrimp library "
"that uses the h264j H.264 decoder.")
:url "https://github.com/wiseman/turboshrimp-h264j"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:dependencies [[com.twilight/h264 "0.0.1"]
[org.clojure/clojure "1.6.0"]]
:profiles {:test
{:dependencies [[com.lemondronor/turboshrimp "0.3.2"]]
:resource-paths ["test-resources"]}
:dev
{:dependencies [[com.lemondronor/turboshrimp "0.3.2"]
[com.lemonodor/gflags "0.7.1"]]
:plugins [[lein-cloverage "1.0.2"]]
:source-paths ["examples"]}})
| (defproject com.lemondronor/turboshrimp-h264j "0.2.2-SNAPSHOT"
:description (str "An AR.Drone video decoder for the turboshrimp library "
"that uses the h264j H.264 decoder.")
:url "https://github.com/wiseman/turboshrimp-h264j"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:dependencies [[com.twilight/h264 "0.0.1"]
[org.clojure/clojure "1.6.0"]]
:profiles {:dev
{:dependencies [[com.lemondronor/turboshrimp "0.3.2"]
[com.lemonodor/gflags "0.7.1"]]
:resource-paths ["test-resources"]
:plugins [[lein-cloverage "1.0.2"]]
:source-paths ["examples"]}})
|
Update lein eastwood plugin (0.1.4 -> 0.1.5) | (defproject lein-jshint "0.1.6-SNAPSHOT"
:description "A Leiningen plugin for running JS code through JSHint."
:url "https://github.com/vbauer/lein-jshint"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[clj-glob "1.0.0" :exclusions [org.clojure/clojure]]
[lein-npm "0.4.0" :exclusions [org.clojure/clojure]]]
:plugins [[jonase/eastwood "0.1.4" :exclusions [org.clojure/clojure]]
[lein-release "1.0.6" :exclusions [org.clojure/clojure]]
[lein-kibit "0.0.8" :exclusions [org.clojure/clojure]]
[lein-bikeshed "0.1.8" :exclusions [org.clojure/clojure]]
[lein-ancient "0.5.5"]]
:eval-in-leiningen true
:pedantic? :abort
:local-repo-classpath true
:lein-release {:deploy-via :clojars
:scm :git})
| (defproject lein-jshint "0.1.6-SNAPSHOT"
:description "A Leiningen plugin for running JS code through JSHint."
:url "https://github.com/vbauer/lein-jshint"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[clj-glob "1.0.0" :exclusions [org.clojure/clojure]]
[lein-npm "0.4.0" :exclusions [org.clojure/clojure]]]
:plugins [[jonase/eastwood "0.1.5" :exclusions [org.clojure/clojure]]
[lein-release "1.0.6" :exclusions [org.clojure/clojure]]
[lein-kibit "0.0.8" :exclusions [org.clojure/clojure]]
[lein-bikeshed "0.1.8" :exclusions [org.clojure/clojure]]
[lein-ancient "0.5.5"]]
:eval-in-leiningen true
:pedantic? :abort
:local-repo-classpath true
:lein-release {:deploy-via :clojars
:scm :git})
|
Update dependency org.onyxplatform/onyx to version 0.7.3-20150901_142736-gd0de107. | (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-20150901_140443-g6e4750b"]
[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-20150901_142736-gd0de107"]
[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"]}})
|
Cut a release for callbacks | (defproject net.uncontended/beehive "0.5.2-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"}
: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.uncontended/precipice-core "0.5.1"]])
| (defproject net.uncontended/beehive "0.5.2"
: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"}
: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.uncontended/precipice-core "0.5.1"]])
|
Fix empty link in about page. | ;; routes.clj
(ns beebster-clj.routes
(:use beebster-clj.core beebster-clj.views compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(defroutes app-routes
(route/resources "/")
(GET "/" [] (index-page))
(GET "/search" [] (about-page))
(GET "/categories" [category] (category-page category))
(POST "/results" [searchvalue] (result-page searchvalue))
(GET "/info" [index] (info-page index))
(ANY "/download" [index mode] (download-page index mode)))
(def app
(handler/site app-routes))
| ;; routes.clj
(ns beebster-clj.routes
(:use beebster-clj.core beebster-clj.views compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(defroutes app-routes
(route/resources "/")
(GET "/" [] (index-page))
(GET "/about" [] (about-page))
(GET "/categories" [category] (category-page category))
(POST "/results" [searchvalue] (result-page searchvalue))
(GET "/info" [index] (info-page index))
(ANY "/download" [index mode] (download-page index mode)))
(def app
(handler/site app-routes))
|
Create Temporary Log-in for event page | (ns event-planner.pages.events)
(defn events-page [id]
[:div "Wow my id is: " id])
| (ns event-planner.pages.events)
(defn events-page [id]
[:div "Wow my id is: " id]
[:div.container
[:div.row.col-md-4
[:form.form-signin
[:h2.form-signin-heading "Sign In"]
[:label {:for "inputusername"
:class "sr-only"} "Username"]
[:input {:type "text"
:id "inputusername"
:placeholder "Username"
:required
:autofocus}]
[:label {:for "inputpassword"
:class "sr-only"} "Password"]
[:input {:type "password"
:id "inputpassword"
:placeholder "Password"}]
[:button.btn.btn-sm.btn-primary {:type "Submit"} "Sign In"]]
[:p ]
[:p "Please note that all sign in usernames and passwords are temporary."]
[:p "To sign in using your account please go to the "
[:a {:href "#"} "Login"] " page."]
]])
|
Update ring-core dependency to Clojure 1.2.0-beta1, updated version to 0.3.0-beta1 | (defproject ring/ring-core "0.2.5"
:description "Ring core libraries."
:url "http://github.com/mmcgrana/ring"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[commons-codec "1.4"]
[commons-io "1.4"]
[commons-fileupload "1.2.1"]
[javax.servlet/servlet-api "2.5"]]
:dev-dependencies [[lein-clojars "0.5.0"]])
| (defproject ring/ring-core "0.3.0-beta1"
:description "Ring core libraries."
:url "http://github.com/mmcgrana/ring"
:dependencies [[org.clojure/clojure "1.2.0-beta1"]
[org.clojure/clojure-contrib "1.2.0-beta1"]
[commons-codec "1.4"]
[commons-io "1.4"]
[commons-fileupload "1.2.1"]
[javax.servlet/servlet-api "2.5"]]
:dev-dependencies [[lein-clojars "0.5.0"]])
|
Add `node` to the Elastic system protocol, so it can be forwarded. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
(ns containium.systems.elasticsearch
(:require [containium.systems :refer (require-system)]
[containium.systems.config :refer (Config get-config)])
(:import [containium.systems Startable Stoppable]
[org.elasticsearch.node Node NodeBuilder]))
;;; The public API for Elastic systems.
(defprotocol Elastic
(whut? [this])) ;;--- FIXME: What would be a good API for Elastic?
;;; The embedded implementation.
(defrecord EmbeddedElastic [^ Node node]
Elastic
(whut? [_])
Stoppable
(stop [_]
(println "Stopping embedded ElasticSearch node...")
(.close node)
(println "Embedded ElasticSearch node stopped.")))
(def embedded
(reify Startable
(start [_ systems]
(let [config (get-config (require-system Config systems) :elastic)
_ (println "Starting embedded ElasticSearch node, using config" config "...")
node (.node (NodeBuilder/nodeBuilder))]
(println "Embedded ElasticSearsch node started.")
(EmbeddedElastic. node)))))
| ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
(ns containium.systems.elasticsearch
(:require [containium.systems :refer (require-system)]
[containium.systems.config :refer (Config get-config)])
(:import [containium.systems Startable Stoppable]
[org.elasticsearch.node Node NodeBuilder]))
;;; The public API for Elastic systems.
(defprotocol Elastic
(node [this]
"Returns the Node object used connecting.")) ;;---TODO: Is this a good API?
;;; The embedded implementation.
(defrecord EmbeddedElastic [^ Node node]
Elastic
(node [_] node)
Stoppable
(stop [_]
(println "Stopping embedded ElasticSearch node...")
(.close node)
(println "Embedded ElasticSearch node stopped.")))
(def embedded
(reify Startable
(start [_ systems]
(let [config (get-config (require-system Config systems) :elastic)
_ (println "Starting embedded ElasticSearch node, using config" config "...")
node (.node (NodeBuilder/nodeBuilder))]
(println "Embedded ElasticSearsch node started.")
(EmbeddedElastic. node)))))
|
Fix CircleCI Build - fixing the test | (ns hydrant.core-test
(:require [clojure.test :refer :all]
[hydrant.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| (ns hydrant.core-test
(:require [clojure.test :refer :all]
[hydrant.core :refer :all]))
(deftest a-test
(testing "TODO - Write tests"
(is (= 1 1))))
|
Remove stuff that is now in nomis-clj-repl-tools | (ns user
"Namespace to support hacking at the REPL."
(:require [clojure.main]
[clojure.string :as str]
[clojure.tools.namespace.move :refer :all]
[clojure.tools.namespace.repl :refer :all]
[midje.repl :refer :all]))
;;;; ___________________________________________________________________________
;;;; Require the standard REPL utils.
;;;;
;;;; This is useful in a `dev` namespace, and is needed in a `user` namespace
;;;; because the requires get blatted by `tnr/refresh` and `reset`.
(apply require clojure.main/repl-requires)
;;;; ___________________________________________________________________________
;;;; ---- u-classpath ----
(defn u-classpath []
(str/split (System/getProperty "java.class.path")
#":"))
;;;; ___________________________________________________________________________
;;;; ---- u-move-ns-dev-src-test ----
(defn u-move-ns-dev-src-test [old-sym new-sym source-path]
(move-ns old-sym new-sym source-path ["dev" "src" "test"]))
;;;; ___________________________________________________________________________
;;;; App-specific additional utilities for the REPL or command line
(comment
(do (autotest :stop)
(autotest :filter (complement :slow)))
)
| (ns user
"Namespace to support hacking at the REPL."
(:require [clojure.main]
[clojure.string :as str]
[clojure.tools.namespace.move :refer :all]
[clojure.tools.namespace.repl :refer :all]
[midje.repl :refer :all]))
;;;; ___________________________________________________________________________
;;;; Require the standard REPL utils.
;;;;
;;;; This is useful in a `dev` namespace, and is needed in a `user` namespace
;;;; because the requires get blatted by `tnr/refresh` and `reset`.
(apply require clojure.main/repl-requires)
;;;; ___________________________________________________________________________
;;;; App-specific additional utilities for the REPL or command line
(comment
(do (autotest :stop)
(autotest :filter (complement :slow)))
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.