Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Move to 0.4.0-SNAPSHOT to prepare for eventual release | ;; Copyright © 2014 JUXT LTD.
(defproject cylon "0.4.0"
:description "An integrated security system for applications built on component"
:url "https://github.com/juxt/cylon"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[juxt.modular/bidi "0.5.0"]
[juxt.modular/ring "0.5.0"]
[prismatic/schema "0.2.1"]
[ring/ring-core "1.2.2"]
[hiccup "1.0.5"]
[org.clojure/tools.logging "0.2.6"]
;; Required for OAuth2 support
[cheshire "5.3.1"]
[juxt.modular/http-kit "0.5.1"]
[liberator "0.11.0"]
]
:profiles {:dev {:dependencies [[org.clojure/clojure "1.6.0"]]}})
| ;; Copyright © 2014 JUXT LTD.
(defproject cylon "0.4.0-SNAPSHOT"
:description "An integrated security system for applications built on component"
:url "https://github.com/juxt/cylon"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[juxt.modular/bidi "0.5.0"]
[juxt.modular/ring "0.5.0"]
[prismatic/schema "0.2.1"]
[ring/ring-core "1.2.2"]
[hiccup "1.0.5"]
[org.clojure/tools.logging "0.2.6"]
;; Required for OAuth2 support
[cheshire "5.3.1"]
[juxt.modular/http-kit "0.5.1"]
[liberator "0.11.0"]
]
:profiles {:dev {:dependencies [[org.clojure/clojure "1.6.0"]]}})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.13.3.0-alpha4"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.13.3.0-SNAPSHOT"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.11.0.0-alpha5"
: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 to most recent version of byteable. | (defproject inet.data "0.2.0-SNAPSHOT"
:description "Represent and manipulate various Internet entities as data."
:url "http://github.com/llasram/inet.data"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[hier-set "1.1.1"]]
:plugins [[lein-ragel "0.1.0"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java" "target/ragel"]
:ragel-source-paths ["src/ragel"]
:javac-options ["-g"]
:prep-tasks [ragel javac]
:profiles {:dev {:dependencies [[byteable "0.1.1"]]
:warn-on-reflection true}})
| (defproject inet.data "0.2.0-SNAPSHOT"
:description "Represent and manipulate various Internet entities as data."
:url "http://github.com/llasram/inet.data"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[hier-set "1.1.1"]]
:plugins [[lein-ragel "0.1.0"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java" "target/ragel"]
:ragel-source-paths ["src/ragel"]
:javac-options ["-g"]
:prep-tasks [ragel javac]
:profiles {:dev {:dependencies [[byteable "0.2.0"]]
:warn-on-reflection true}})
|
Add marginalia support to lein | (defproject dungeon-crusade "0.0.1-SNAPSHOT"
:description "dungeon-crusade"
:dependencies [[org.clojure/clojure "1.6.0"]
[ns-tracker "0.2.2"]
[org.clojure/math.combinatorics "0.0.7"]
[org.clojure/clojure-contrib "1.2.0"]
[org.clojars.vishk/algotools "0.1.0"]
[clj-tiny-astar "0.1.0-SNAPSHOT"]
[org.clojars.folcon/clojure-lanterna "0.9.5-SNAPSHOT"]]
:main dungeon-crusade.core
:repl-init dungeon-crusade.main)
| (defproject dungeon-crusade "0.0.1-SNAPSHOT"
:description "dungeon-crusade"
:plugins [[lein-marginalia "0.7.1"]]
:dependencies [[org.clojure/clojure "1.6.0"]
[ns-tracker "0.2.2"]
[org.clojure/math.combinatorics "0.0.7"]
[org.clojure/clojure-contrib "1.2.0"]
[org.clojars.vishk/algotools "0.1.0"]
[clj-tiny-astar "0.1.0-SNAPSHOT"]
[org.clojars.folcon/clojure-lanterna "0.9.5-SNAPSHOT"]]
:main dungeon-crusade.core
:repl-init dungeon-crusade.main)
|
Rename parameters to log* function | ; Copyright 2009 Howard M. Lewis Ship
;
; 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.
(ns #^{:doc "Wrappers around Simple Logging Facade for Java (SLF4J)"}
cascade.logging
(:import (org.slf4j LoggerFactory Logger)))
(defn #^Logger get-logger [#^String name]
(LoggerFactory/getLogger name))
(defmacro log*
[check-fn log-fn fmt & args]
(let [logger-name (name (ns-name *ns*))]
`(let [logger# (get-logger ~logger-name)]
(and
(. logger# ~check-fn)
(. logger# ~log-fn (format ~fmt ~@args))))))
(defmacro debug
[fmt & args]
`(log* isDebugEnabled debug ~fmt ~@args))
(defmacro info
[fmt & args]
`(log* isInfoEnabled info ~fmt ~@args))
(defmacro error
[fmt & args]
`(log* isErrorEnabled error ~fmt ~@args)) | ; Copyright 2009 Howard M. Lewis Ship
;
; 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.
(ns #^{:doc "Wrappers around Simple Logging Facade for Java (SLF4J)"}
cascade.logging
(:import (org.slf4j LoggerFactory Logger)))
(defn #^Logger get-logger [#^String name]
(LoggerFactory/getLogger name))
(defmacro log*
[check-member log-member fmt & args]
(let [logger-name (name (ns-name *ns*))]
`(let [logger# (get-logger ~logger-name)]
(and
(. logger# ~check-member)
(. logger# ~log-member (format ~fmt ~@args))))))
(defmacro debug
[fmt & args]
`(log* isDebugEnabled debug ~fmt ~@args))
(defmacro info
[fmt & args]
`(log* isInfoEnabled info ~fmt ~@args))
(defmacro error
[fmt & args]
`(log* isErrorEnabled error ~fmt ~@args)) |
Add jUnit as a dependency | (set-env!
:source-paths #{"src"}
:dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"]
[boot/core "2.0.0-rc12" :scope "provided"]])
(def +version+ "0.1.0")
(task-options!
pom {:project 'radicalzephyr/boot-junit
:version +version+
:description "Run some jUnit tests in boot!"
:url "https://github.com/radicalzephyr/boot-junit"
:scm {:url "https://github.com/radicalzephyr/boot-junit"}
:license {"Eclipse Public License"
"http://www.eclipse.org/legal/epl-v10.html"}})
| (set-env!
:source-paths #{"src"}
:dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"]
[boot/core "2.0.0-rc12" :scope "provided"]
[junit "4.12" :scope "provided"]])
(def +version+ "0.1.0")
(task-options!
pom {:project 'radicalzephyr/boot-junit
:version +version+
:description "Run some jUnit tests in boot!"
:url "https://github.com/radicalzephyr/boot-junit"
:scm {:url "https://github.com/radicalzephyr/boot-junit"}
:license {"Eclipse Public License"
"http://www.eclipse.org/legal/epl-v10.html"}})
|
Change the default drum beat ;) | (ns drum-machine.state)
(def initial-state
{:tracks
[{:name "Kick"
:source "http://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/kicks/61[kb]bass-kickers-2.wav.mp3"
:play-on [1 3]
:volume 1.0}
{:name "Snare"
:source "http://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/snares/57[kb]acoustic_snare.aif.mp3"
:play-on [2 4]
:volume 1.0}
{:name "Hi-Hat"
:source "http://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/hats/29[kb]909-squoosh-hat.aif.mp3"
:play-on [1 2 3 4]
:volume 0.1}]})
| (ns drum-machine.state)
(def initial-state
{:tracks
[{:name "Kick"
:source "http://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/kicks/61[kb]bass-kickers-2.wav.mp3"
:play-on [1]
:volume 1.0}
{:name "Snare"
:source "http://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/snares/57[kb]acoustic_snare.aif.mp3"
:play-on [3]
:volume 1.0}
{:name "Hi-Hat"
:source "http://sampleswap.org/samples-ghost/DRUMS%20and%20SINGLE%20HITS/hats/29[kb]909-squoosh-hat.aif.mp3"
:play-on [1 2 3 4]
:volume 0.1}]})
|
Tweak ssl/tls settings for better defaults and more flexibility. | (ns postal.smtp
(:use [postal.message :only [make-jmessage]]
[postal.support :only [make-props]])
(:import [javax.mail Transport Session]))
(defn smtp-send
([msg]
(let [jmsg (make-jmessage msg)]
(try
(Transport/send jmsg)
{:code 0 :error :SUCCESS :message "message sent"}
(catch Exception e
{:code 99 :error (class e) :message (.getMessage e)}))))
([auth-map & msgs]
(let [{:keys [host port user pass sender] :or {host "localhost"
port 25}}
auth-map
session (doto (Session/getInstance (make-props sender auth-map))
(.setDebug false))]
(with-open [transport (.getTransport session (if (and user pass)
"smtps"
"smtp"))]
(.connect transport host port (str user) (str pass))
(let [jmsgs (map #(make-jmessage % session) msgs)]
(doseq [jmsg jmsgs]
(.sendMessage transport jmsg (.getAllRecipients jmsg)))
{:code 0 :error :SUCCESS :message "messages sent"})))))
| (ns postal.smtp
(:use [postal.message :only [make-jmessage]]
[postal.support :only [make-props]])
(:import [javax.mail Transport Session]))
(defn smtp-send
([msg]
(let [jmsg (make-jmessage msg)]
(try
(Transport/send jmsg)
{:code 0 :error :SUCCESS :message "message sent"}
(catch Exception e
{:code 99 :error (class e) :message (.getMessage e)}))))
([auth-map & msgs]
(let [{:keys [host port
user pass
sender ssl] :or {host "localhost"}}
auth-map
port (if (not port)
(if ssl 465 25))
protocol (if ssl "smtps" "smtp")
session (doto (Session/getInstance (make-props sender auth-map))
(.setDebug false))]
(with-open [transport (.getTransport session (if ssl "smtps" "smtp"))]
(.connect transport host port (str user) (str pass))
(let [jmsgs (map #(make-jmessage % session) msgs)]
(doseq [jmsg jmsgs]
(.sendMessage transport jmsg (.getAllRecipients jmsg)))
{:code 0 :error :SUCCESS :message "messages sent"})))))
|
Add a flag to show the query status | (ns bartleby.db)
(def default-db
"Default state"
{:tasks []})
| (ns bartleby.db)
(def default-db
"Default state"
{:rest ""
:tasks []})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.8.11.7"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.8.11.8-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)
|
Revert "Test commit from core to Kafka." | (defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150822_210824-ga0dc570"]
[clj-kafka "0.2.8-0.8.1.1" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]]
[cheshire "5.4.0"]
[zookeeper-clj "0.9.1" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]]
:profiles {:dev {:dependencies [[midje "1.7.0" :exclusions [commons-codec]]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150821_215046-g67feccf"]
[clj-kafka "0.2.8-0.8.1.1" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]]
[cheshire "5.4.0"]
[zookeeper-clj "0.9.1" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]]
:profiles {:dev {:dependencies [[midje "1.7.0" :exclusions [commons-codec]]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-datomic "0.10.0.0-beta1"
: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-beta1"]]
: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-beta1"]]
: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"]}})
|
Update lein-release & lein-bikeshed plugins | (defproject lein-jslint "0.1.5-SNAPSHOT"
:description "A Leiningen plugin for running JS code through JSLint."
:url "https://github.com/vbauer/lein-jslint"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[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.5" :exclusions [org.clojure/clojure]]
[lein-kibit "0.0.8" :exclusions [org.clojure/clojure]]
[lein-bikeshed "0.1.7" :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-jslint "0.1.5-SNAPSHOT"
:description "A Leiningen plugin for running JS code through JSLint."
:url "https://github.com/vbauer/lein-jslint"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[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})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.13.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.9.13.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)
|
Add description on main page | (ns pict-source.index
(:require [hiccup.page :refer [html5]]))
;;;; Index page template
(defn page [dictionaries]
[:div {:class "content"}
(for [dict-row (partition-all 3 dictionaries)]
[:div {:class "row"}
(for [dict dict-row]
[:div {:class "four columns"}
[:h2
[:a {:href (str "/" (:lang dict) "/")} (:lang dict)]]
[:p (:description dict)]
[:p (str (:words-count dict) " words")]])])])
| (ns pict-source.index
(:require [hiccup.page :refer [html5]]))
;;;; Index page template
(defn page [dictionaries]
[:div {:class "content"}
[:div {:class "row"}
[:div {:class "twelve column"}
[:p
"The programmers open dictionary from programmers for culture of using your own spoken language."
" I highly encourage you to "
[:a {:href "https://github.com/shvetsovdm/pict-source"} "contribute to dictionaries and to the project"]
"."]]]
(for [dict-row (partition-all 3 dictionaries)]
[:div {:class "row"}
(for [dict dict-row]
[:div {:class "four columns"}
[:h2
[:a {:href (str "/" (:lang dict) "/")} (:lang dict)]]
[:p (:description dict)]
[:p (str (:words-count dict) " words")]])])])
|
Create database fixture for tests. | (ns webdev.core-test
(:require [clojure.test :refer :all]
[webdev.core :refer [app]]
[ring.mock.request :as mock]))
(deftest routes
(testing "/items"
(let [response (app (mock/request :get "/items"))]
(is (= 200 (:status response)))))
(testing "not found"
(let [response (app (mock/request :get "/no-such-route"))]
(is (= 404 (:status response))))))
| (ns webdev.core-test
(:require [clojure.test :refer :all]
[webdev.core :refer [app]]
[webdev.item.model :as model]
[ring.mock.request :as mock]))
(defn db-fixture [f]
(model/create-table "jdbc:postgresql://localhost/webdev")
(f))
(use-fixtures :once db-fixture)
(deftest routes
(testing "/items"
(let [response (app (mock/request :get "/items"))]
(is (= 200 (:status response)))))
(testing "not found"
(let [response (app (mock/request :get "/no-such-route"))]
(is (= 404 (:status response))))))
|
Update to latest releases of ClojureScript, Weasel, and simple-brepl. | (defproject shrimp "0.1.0-SNAPSHOT"
:description "Demo project for Goby."
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2371"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[weasel "0.4.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.0.3"]
[jarohen/simple-brepl "0.1.1"]]
:source-paths ["goby-src"
"src"]
:brepl {:ip "127.0.0.1"}
:cljsbuild {:builds {:dev
{:source-paths ["goby-src"
"src"
"dev-src"]
:compiler {:output-to "js/main.js"
:optimizations :whitespace
:static-fns false
:externs ["goby-externs.js" "externs.js"]
:pretty-print true}}
:rel
{:source-paths ["goby-src"
"src"
"rel-src"]
:compiler {:output-to "js/main.js"
:optimizations :advanced
:static-fns true
:externs ["goby-externs.js" "externs.js"]
:pretty-print false
:pseudo-names false}}}})
| (defproject shrimp "0.1.0-SNAPSHOT"
:description "Demo project for Goby."
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2511"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[weasel "0.4.2"]]
:plugins [[lein-cljsbuild "1.0.3"]
[jarohen/simple-brepl "0.1.2"]]
:source-paths ["goby-src"
"src"]
:brepl {:ip "127.0.0.1"}
:cljsbuild {:builds {:dev
{:source-paths ["goby-src"
"src"
"dev-src"]
:compiler {:output-to "js/main.js"
:optimizations :whitespace
:static-fns false
:externs ["goby-externs.js" "externs.js"]
:pretty-print true}}
:rel
{:source-paths ["goby-src"
"src"
"rel-src"]
:compiler {:output-to "js/main.js"
:optimizations :advanced
:static-fns true
:externs ["goby-externs.js" "externs.js"]
:pretty-print false
:pseudo-names false}}}})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.8.11.1"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.8.11.2-SNAPSHOT"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
|
Remove duplication & lein-midje dependency | (defproject reply "0.1.0-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[jline "2.7"]
[org.thnetos/cd-client "0.3.4"]
[clj-stacktrace "0.2.4"]
[org.clojure/tools.nrepl "0.2.0-beta7"]
[com.cemerick/drawbridge "0.0.3"]
[clojure-complete "0.2.1"]]
:profiles {:dev {:dependencies
[[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]}}
:dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java"
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:main ^{:skip-aot true} reply.main)
| (let [dev-deps '[[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]]]
(defproject reply "0.1.0-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[jline "2.7"]
[org.thnetos/cd-client "0.3.4"]
[clj-stacktrace "0.2.4"]
[org.clojure/tools.nrepl "0.2.0-beta7"]
[com.cemerick/drawbridge "0.0.3"]
[clojure-complete "0.2.1"]]
:profiles {:dev {:dependencies ~dev-deps}}
:dev-dependencies ~dev-deps
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java"
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:main ^{:skip-aot true} reply.main))
|
Set sign-releases false for deploy-repository | (defproject oph/clj-parent "0.1.0"
:url "http://example.com/FIXME"
:license {:name "EUPL"
:url "http://www.osor.eu/eupl/"}
:plugins [[lein-modules "0.3.11"]]
:modules {:inherited {
:repositories [["oph-releases" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-release-local"
:sign-releases false
:snapshots false}]
["oph-snapshots" "https://artifactory.oph.ware.fi/artifactory/oph-sade-snapshot-local"]]
:deploy-repositories {"snapshots" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-snapshot-local"}
"releases" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-release-local"}}}})
| (defproject oph/clj-parent "0.1.0"
:url "http://example.com/FIXME"
:license {:name "EUPL"
:url "http://www.osor.eu/eupl/"}
:plugins [[lein-modules "0.3.11"]]
:modules {:inherited {
:repositories [["oph-releases" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-release-local"
:snapshots false}]
["oph-snapshots" "https://artifactory.oph.ware.fi/artifactory/oph-sade-snapshot-local"]]
:deploy-repositories {"snapshots" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-snapshot-local"}
"releases" {:url "https://artifactory.oph.ware.fi/artifactory/oph-sade-release-local"}
:sign-releases false}}})
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.7.0-alpha6"
: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.7.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)
|
Bring back the Postgres libs. | (defproject viewer "0.1.0-SNAPSHOT"
:description "EVE Online Data Dump Viewer"
:url "http://evemastery.appspot.com/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0-RC1"]
[ring "1.2.2"]
[compojure "1.1.6"]
[org.clojure/data.json "0.2.4"]
[hiccup "1.0.4"]
[appengine-magic "0.5.1-SNAPSHOT"]]
:plugins [[appengine-magic "0.5.1-SNAPSHOT"]])
| (defproject viewer "0.1.0-SNAPSHOT"
:description "EVE Online Data Dump Viewer"
:url "http://evemastery.appspot.com/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0-RC1"]
[org.clojure/java.jdbc "0.3.2"]
[postgresql "9.1-901.jdbc4"]
[ring "1.2.2"]
[compojure "1.1.6"]
[org.clojure/data.json "0.2.4"]
[hiccup "1.0.4"]
[appengine-magic "0.5.1-SNAPSHOT"]]
:plugins [[appengine-magic "0.5.1-SNAPSHOT"]])
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.12.0.0-beta3"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.12.0.0-SNAPSHOT"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-bookkeeper "0.8.1.0-alpha7"
: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-alpha7"]]
: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.0-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-alpha7"]]
: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"]}})
|
Add specs for the return type of hosts-to-ids | (ns instaskip.innkeeper-hosts-client
(:require [clj-http.client :as client]
[instaskip.case-utils :refer [snake-to-hyphen-keyword]]
[instaskip.innkeeper-client :as innkeeper]
[clojure.spec :as s]))
(def hosts-url (str innkeeper/innkeeper-url "/hosts"))
(defn- hosts-response []
(client/get hosts-url {:headers {"Authorization" innkeeper/read-token}
:insecure? true}))
(defn- to-tuple-fn [id-to-host]
[(id-to-host :name) (Integer. (id-to-host :id))])
(defn hosts-to-ids
"A map in the format:
{\"host1.com\" 1
\"host2.com\" 2}"
[]
(->> (hosts-response)
innkeeper/extract-body
(map to-tuple-fn)
(into {})))
(comment
(hosts-to-ids))
| (ns instaskip.innkeeper-hosts-client
(:require [clj-http.client :as client]
[instaskip.case-utils :refer [snake-to-hyphen-keyword]]
[instaskip.innkeeper-client :as innkeeper]
[clojure.spec :as s]))
(def hosts-url (str innkeeper/innkeeper-url "/hosts"))
(defn- hosts-response []
(client/get hosts-url {:headers {"Authorization" innkeeper/read-token}
:insecure? true}))
(defn- to-tuple-fn [id-to-host]
[(id-to-host :name) (Integer. (id-to-host :id))])
(s/def :k/hosts-to-ids (s/map-of string? integer?))
(s/fdef hosts-to-ids
:ret :k/hosts-to-ids)
(defn hosts-to-ids
"Returns map from hosts to host ids"
[]
(->> (hosts-response)
innkeeper/extract-body
(map to-tuple-fn)
(into {})))
(s/instrument #'hosts-to-ids)
(comment
(hosts-to-ids))
|
Revert back clj-kafka as tests are timing out Timeouts are possibly due to an issue with the embedded server on some versions of kafka | (defproject org.onyxplatform/onyx-kafka "0.7.2.1-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.onyxplatform/onyx "0.7.2"]
[clj-kafka "0.3.2" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]]
[com.stuartsierra/component "0.2.3"]
[cheshire "5.4.0"]
[zookeeper-clj "0.9.1" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]]
:profiles {:dev {:dependencies [[midje "1.7.0"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-kafka "0.7.2.1-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.onyxplatform/onyx "0.7.2"]
[clj-kafka "0.2.8-0.8.1.1" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]]
[com.stuartsierra/component "0.2.3"]
[cheshire "5.4.0"]
[zookeeper-clj "0.9.1" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]]
:profiles {:dev {:dependencies [[midje "1.7.0"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Add html5-docs and test2junit config. | ;(defproject cli4clj "0.8.0"
(defproject cli4clj "0.8.1-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-assorted-utils "1.11.0"]
[jline/jline "2.14-SNAPSHOT"]]
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"]])
| ;(defproject cli4clj "0.8.0"
(defproject cli4clj "0.8.1-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-assorted-utils "1.11.0"]
[jline/jline "2.13"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"]])
|
Remove swank-clojure dev dependency. Also from lazytest. | (defproject midje "1.3.0-RC2"
:description "A TDD library for Clojure, with an emphasis on mocks"
:url "https://github.com/marick/Midje"
:dependencies [[org.clojure/clojure "[1.2.0],[1.2.1],[1.3.0]"]
; :dependencies [[org.clojure/clojure "[1.2.0],[1.2.1]"]
[ordered "1.0.0"]
[org.clojure/math.combinatorics "0.0.1"]
[org.clojure/algo.monads "0.1.0"]
[org.clojure/core.unify "0.5.1"]
[utilize "0.1.3"]
[colorize "0.1.1"]
[org.clojure/tools.macro "0.1.1"]]
:dev-dependencies [[swank-clojure "1.2.1"]
[slamhound "1.1.1"]
[com.intelie/lazytest "1.0.0-SNAPSHOT"]]
;; automatically detects when your :dependencies key changes and runs
;; lein deps behind the scenes when necessary.
:checksum-deps true)
| (defproject midje "1.3.0-RC2"
:description "A TDD library for Clojure, with an emphasis on mocks"
:url "https://github.com/marick/Midje"
:dependencies [[org.clojure/clojure "[1.2.0],[1.2.1],[1.3.0]"]
[ordered "1.0.0"]
[org.clojure/math.combinatorics "0.0.1"]
[org.clojure/algo.monads "0.1.0"]
[org.clojure/core.unify "0.5.1"]
[utilize "0.1.3"]
[colorize "0.1.1"]
[org.clojure/tools.macro "0.1.1"]]
:dev-dependencies [[slamhound "1.1.1"]
[com.intelie/lazytest "1.0.0-SNAPSHOT" :exclusions [swank-clojure]]]
;; automatically detects when your :dependencies key changes and runs
;; lein deps behind the scenes when necessary.
:checksum-deps true)
|
Add servlet dependency for running tests in REPL | (defproject carambar "0.1.0-SNAPSHOT"
:description "Carambar !!"
: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.zip "0.1.1"]
[ring/ring-core "1.3.2"]
[compojure "1.3.2"]
[ring/ring-json "0.3.1"]]
:profiles {:dev {:dependencies [[midje "1.6.3"]]}}
:plugins [[lein-ring "0.9.2"]]
:uberjar-name "carambar.jar"
:ring {:handler carambar.core/app
:init carambar.core/init})
| (defproject carambar "0.1.0-SNAPSHOT"
:description "Carambar !!"
: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.zip "0.1.1"]
[ring/ring-core "1.3.2"]
[compojure "1.3.2"]
[ring/ring-json "0.3.1"]]
:profiles {:dev {:dependencies [[midje "1.6.3"]
[javax.servlet/servlet-api "2.5"]]}}
:plugins [[lein-ring "0.9.2"]]
:uberjar-name "carambar.jar"
:ring {:handler carambar.core/app
:init carambar.core/init})
|
Upgrade cheshire dependency to the latest one. | (defproject buddy/buddy-sign "0.5.1"
:description "High level message signing for Clojure"
:url "https://github.com/funcool/buddy-sign"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "provided"]
[com.taoensso/nippy "2.8.0"]
[buddy/buddy-core "0.6.0-SNAPSHOT"]
;; [slingshot "0.12.2"]
[cats "0.4.0"]
[clj-time "0.9.0"]
[cheshire "5.4.0"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
| (defproject buddy/buddy-sign "0.5.1"
:description "High level message signing for Clojure"
:url "https://github.com/funcool/buddy-sign"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "provided"]
[com.taoensso/nippy "2.8.0"]
[buddy/buddy-core "0.6.0-SNAPSHOT"]
;; [slingshot "0.12.2"]
[cats "0.4.0"]
[clj-time "0.9.0"]
[cheshire "5.5.0"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
|
Add incubator (wanted << string interpolation) | (defproject kixi/terraboot "0.4.4-SNAPSHOT"
:description "Terraform modules for kixi framework"
: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"]
[cheshire "5.5.0"]
[stencil "0.5.0"]
[clj-yaml "0.4.0"]
[expectations "2.0.9"]]
:repositories [["releases" {:url "https://clojars.org/repo"
:creds :gpg}]
["snapshots" {:url "https://clojars.org/repo"
:creds :gpg}]])
| (defproject kixi/terraboot "0.4.4-SNAPSHOT"
:description "Terraform modules for kixi framework"
: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"]
[cheshire "5.5.0"]
[stencil "0.5.0"]
[clj-yaml "0.4.0"]
[expectations "2.0.9"]
[org.clojure/core.incubator "0.1.4"]]
:repositories [["releases" {:url "https://clojars.org/repo"
:creds :gpg}]
["snapshots" {:url "https://clojars.org/repo"
:creds :gpg}]])
|
Update lein-javac to recent stable version. | (defproject fleetdb "0.2.0"
:description "A schema-free database optimized for agile development."
:url "http://github.com/mmcgrana/fleetdb"
:source-path "src/clj"
:java-source-path "src/jvm/"
:javac-fork "true"
:namespaces [fleetdb.server]
:dependencies
[[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[clj-stacktrace "0.1.2"]
[net.sf.jopt-simple/jopt-simple "3.2"]
[clj-json "0.2.0"]]
:dev-dependencies
[[lein-javac "1.2.1-SNAPSHOT"]
[clj-unit "0.1.0"]])
| (defproject fleetdb "0.2.0"
:description "A schema-free database optimized for agile development."
:url "http://github.com/mmcgrana/fleetdb"
:source-path "src/clj"
:java-source-path "src/jvm/"
:javac-fork "true"
:hooks [leiningen.hooks.javac]
:namespaces [fleetdb.server]
:dependencies
[[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[clj-stacktrace "0.1.2"]
[net.sf.jopt-simple/jopt-simple "3.2"]
[clj-json "0.2.0"]]
:dev-dependencies
[[org.clojars.mmcgrana/lein-javac "1.2.1"]
[clj-unit "0.1.0"]])
|
Use test resources only in midje profile | (defproject yorck-ratings "2.0.0"
:description "IMDB ratings for movies playing in Yorck cinemas Berlin"
:url "https://yorck-ratings.treppo.org"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[http-kit "2.3.0"]
[ring/ring-devel "1.6.3"]
[ring/ring-core "1.6.3"]
[http-kit.fake "0.2.2"]
[luminus/config "0.8"]
[hickory "0.7.1"]
[org.clojure/core.async "0.4.474"]]
:main ^:skip-aot yorck-ratings.web
:target-path "target/%s"
:profiles {:uberjar {:aot :all}
:dev {:resource-paths ["test/resources" "config/dev"]
:dependencies [[midje "1.9.1"] [midje-notifier "0.2.0"]]
:plugins [[lein-midje "3.2.1"]]}
:test {:resource-paths ["test/resources" "config/test"]}}
:min-lein-version "2.4.0"
:uberjar-name "yorck-ratings-standalone.jar")
| (defproject yorck-ratings "2.0.0"
:description "IMDB ratings for movies playing in Yorck cinemas Berlin"
:url "https://yorck-ratings.treppo.org"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[http-kit "2.3.0"]
[ring/ring-devel "1.6.3"]
[ring/ring-core "1.6.3"]
[http-kit.fake "0.2.2"]
[luminus/config "0.8"]
[hickory "0.7.1"]
[org.clojure/core.async "0.4.474"]]
:main ^:skip-aot yorck-ratings.web
:target-path "target/%s"
:profiles {:uberjar {:aot :all}
:dev {:resource-paths ["config/dev"]
:dependencies [[midje "1.9.1"] [midje-notifier "0.2.0"]]
:plugins [[lein-midje "3.2.1"]]}
:midje {:resource-paths ["test/resources" "config/test"]}}
:min-lein-version "2.8.0"
:uberjar-name "yorck-ratings-standalone.jar")
|
Build docs to API dir | (defproject io.atomix/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-all "1.0.0-rc4"]
[io.atomix.catalyst/catalyst-netty "1.0.7"]]
:repositories [["sonatype-nexus-snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:plugins [[lein-codox "0.9.0"]]
:codox {:output-path "target/docs/docs"
:metadata {:doc/format :markdown}
:source-uri "http://github.com/atomix/trinity/blob/master/{filepath}#L{line}"})
| (defproject io.atomix/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-all "1.0.0-rc4"]
[io.atomix.catalyst/catalyst-netty "1.0.7"]]
:repositories [["sonatype-nexus-snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:plugins [[lein-codox "0.9.0"]]
:codox {:output-path "target/docs/api"
:metadata {:doc/format :markdown}
:source-uri "http://github.com/atomix/trinity/blob/master/{filepath}#L{line}"})
|
Add functionality to Logout button | (ns rmfu-ui.nav
(:require [secretary.core :as secretary :include-macros true]))
(defn nav
"Renders basic nav with an .active link"
[active]
[:nav {:className "navbar navbar-light bg-faded"}
[:a.navbar-brand "FEED"]
[:ul.nav.navbar-nav
(for [anchor ["about" "create" "profile"]
:let [title (clojure.string/capitalize anchor)
class-names (if (= active anchor) "nav-item active" "nav-item")]]
^{:key anchor} [:li {:className class-names}
[:a.nav-link {:href (str "/#/" anchor)} title]])]
[:form.form-inline.navbar-form.pull-right
[:button.btn.btn-success-outline {:type "button"} "logout"]]]) | (ns rmfu-ui.nav
(:require [secretary.core :as secretary :include-macros true]))
(defn logout []
"Logs the user out by deleting key form local storage"
(.removeItem (.-localStorage js/window) "rmfu-feed-identity-token")
)
(defn nav
"Renders basic nav with an .active link"
[active]
[:nav {:className "navbar navbar-light bg-faded"}
[:a.navbar-brand "FEED"]
[:ul.nav.navbar-nav
(for [anchor ["about" "create" "profile"]
:let [title (clojure.string/capitalize anchor)
class-names (if (= active anchor) "nav-item active" "nav-item")]]
^{:key anchor} [:li {:className class-names}
[:a.nav-link {:href (str "/#/" anchor)} title]])]
[:form.form-inline.navbar-form.pull-right
[:button.btn.btn-success-outline {:type "button" :on-click #(logout)} "logout"]]])
|
Add dedupe-by and index-by helpers | (ns com.wsscode.pathom.misc
#?(:clj (:import (java.util UUID))))
#?(:clj (def INCLUDE_SPECS true)
:cljs (goog-define INCLUDE_SPECS true))
(defn pathom-random-uuid []
#?(:clj (UUID/randomUUID)
:cljs (random-uuid)))
| (ns com.wsscode.pathom.misc
#?(:clj (:import (java.util UUID))))
#?(:clj (def INCLUDE_SPECS true)
:cljs (goog-define INCLUDE_SPECS true))
(defn pathom-random-uuid []
#?(:clj (UUID/randomUUID)
:cljs (random-uuid)))
(defn dedupe-by
"Returns a lazy sequence removing consecutive duplicates in coll when passed to a function f.
Returns a transducer when no collection is provided."
{:added "1.7"}
([f]
(fn [rf]
(let [pv (volatile! ::none)]
(fn
([] (rf))
([result] (rf result))
([result x]
(let [prior @pv
fx (f x)]
(vreset! pv fx)
(if (= prior fx)
result
(rf result x))))))))
([f coll] (sequence (dedupe-by f) coll)))
(defn index-by
"Like group by, but will keep only the last result."
[f coll]
(reduce
(fn [m x]
(assoc m (f x) x))
{}
coll))
|
Add print and factory methods for BlobRefs. | (ns mvxcvi.vault.blob
(:require (clojure [string :as string])
digest))
;; HASH ALGORITHMS
(def ^:private digest-functions
"Map of content hashing algorithms to functional implementations."
{:md5 digest/md5
:sha1 digest/sha-1
:sha256 digest/sha-256})
(def digest-algorithms
"Set of available content hashing algorithms."
(into #{} (keys digest-functions)))
;; BLOB REFERENCE
(defrecord BlobRef
[algorithm digest]
Object
(toString [this]
(str (name algorithm) ":" digest)))
(defn content-address
"Calculates the blob reference for the given content."
[algorithm content]
(let [hashfn (digest-functions algorithm)]
(when-not hashfn
(throw (IllegalArgumentException.
(str "Unsupported digest algorithm: " algorithm
", must be one of " (string/join ", " digest-algorithms)))))
(BlobRef. algorithm (-> content hashfn .toLowerCase))))
(defn parse-address
"Parses an address string into a blobref. Accepts either a hash URI or the
shorter \"algo:address\" format."
[address]
(let [address (str address)
address (if (re-find #"^urn:" address) (subs address 4) address)
[algorithm digest] (string/split address #":" 2)]
(BlobRef. (keyword algorithm) digest)))
| (ns mvxcvi.vault.blob
(:require (clojure [string :as string])
digest))
;; HASH ALGORITHMS
(def ^:private digest-functions
"Map of content hashing algorithms to functional implementations."
{:md5 digest/md5
:sha1 digest/sha-1
:sha256 digest/sha-256})
(def digest-algorithms
"Set of available content hashing algorithms."
(into #{} (keys digest-functions)))
;; BLOB REFERENCE
(defrecord BlobRef
[algorithm digest]
Object
(toString [this]
(str (name algorithm) ":" digest)))
(defmethod print-method BlobRef
[value ^java.io.Writer w]
(.write w (str "#vault/blobref " \" value \")))
(defn hash-content
"Calculates the blob reference for the given content."
[algorithm content]
(let [hashfn (digest-functions algorithm)]
(when-not hashfn
(throw (IllegalArgumentException.
(str "Unsupported digest algorithm: " algorithm
", must be one of " (string/join ", " digest-algorithms)))))
(BlobRef. algorithm (-> content hashfn .toLowerCase))))
(defn parse-address
"Parses an address string into a blobref. Accepts either a hash URI or the
shorter \"algo:address\" format."
[address]
(let [address (if (re-find #"^urn:" address) (subs address 4) address)
[algorithm digest] (string/split address #":" 2)]
(BlobRef. (keyword algorithm) digest)))
(defn blob-ref
"Constructs a blobref out of the arguments."
([x]
(if (instance? BlobRef x)
x
(parse-address (str x))))
([algorithm digest]
(BlobRef. algorithm digest)))
|
Fix compiling of namespace that include a - character. | (ns leiningen.compile
"Compile the namespaces listed in project.clj or all namespaces in src."
(:use [clojure.contrib.java-utils :only [file]]
[clojure.contrib.find-namespaces :only [find-namespaces-in-dir]])
(:refer-clojure :exclude [compile]))
(defn compile
"Ahead-of-time compile the project. Looks for all namespaces under src/
unless a list of :namespaces is provided in project.clj."
[project]
;; TODO: use a java subprocess in case a different clojure version is needed
(doseq [n (or (:namespaces project)
(find-namespaces-in-dir (file (:root project) "src")))]
(let [ns-file (str (.replaceAll (name n) "\\." "/"))]
(when (> (.lastModified (file (:root project) "src" (str ns-file ".clj")))
(.lastModified (file (:root project) "classes"
(str ns-file "__init.class"))))
(println "Compiling" n)
(clojure.core/compile n)))))
| (ns leiningen.compile
"Compile the namespaces listed in project.clj or all namespaces in src."
(:use [clojure.contrib.java-utils :only [file]]
[clojure.contrib.find-namespaces :only [find-namespaces-in-dir]])
(:refer-clojure :exclude [compile]))
(defn compile
"Ahead-of-time compile the project. Looks for all namespaces under src/
unless a list of :namespaces is provided in project.clj."
[project]
;; TODO: use a java subprocess in case a different clojure version is needed
(doseq [n (or (:namespaces project)
(find-namespaces-in-dir (file (:root project) "src")))]
(let [ns-file (str (-> (name n)
(.replaceAll "\\." "/")
(.replaceAll "-" "_")))]
(when (> (.lastModified (file (:root project) "src" (str ns-file ".clj")))
(.lastModified (file (:root project) "classes"
(str ns-file "__init.class"))))
(println "Compiling" n)
(clojure.core/compile n)))))
|
Fix stop method of http-kit component | ;; Copyright © 2014 JUXT LTD.
(ns modular.http-kit
(:require
[schema.core :as s]
[com.stuartsierra.component :as component]
[clojure.tools.logging :refer :all]
[modular.ring :refer (request-handler WebRequestHandler)]
[org.httpkit.server :refer (run-server)]))
(def default-port 3000)
(defrecord Webserver [port]
component/Lifecycle
(start [this]
(if-let [provider (first (filter #(satisfies? WebRequestHandler %) (vals this)))]
(let [h (request-handler provider)]
(assert h)
(let [server (run-server h {:port port})]
(assoc this :server server :port port)))
(throw (ex-info (format "http-kit module requires the existence of a component that satisfies %s" WebRequestHandler)
{:this this}))))
(stop [this]
(when-let [server (:server this)]
(server)
(dissoc this :server))))
(defn new-webserver [& {:as opts}]
(let [{:keys [port]} (->> (merge {:port default-port} opts)
(s/validate {:port s/Int}))]
(->Webserver port)
))
| ;; Copyright © 2014 JUXT LTD.
(ns modular.http-kit
(:require
[schema.core :as s]
[com.stuartsierra.component :as component]
[clojure.tools.logging :refer :all]
[modular.ring :refer (request-handler WebRequestHandler)]
[org.httpkit.server :refer (run-server)]))
(def default-port 3000)
(defrecord Webserver [port]
component/Lifecycle
(start [this]
(if-let [provider (first (filter #(satisfies? WebRequestHandler %) (vals this)))]
(let [h (request-handler provider)]
(assert h)
(let [server (run-server h {:port port})]
(assoc this :server server :port port)))
(throw (ex-info (format "http-kit module requires the existence of a component that satisfies %s" WebRequestHandler)
{:this this}))))
(stop [this]
(if-let [server (:server this)]
(server))
(dissoc this :server)))
(defn new-webserver [& {:as opts}]
(let [{:keys [port]} (->> (merge {:port default-port} opts)
(s/validate {:port s/Int}))]
(->Webserver port)
))
|
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-datomic "0.8.1.0-0.8.1"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.1"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]
[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-datomic "0.8.1.1-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.1"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]
[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Update HTTP Kit and postgreSQL dependencies. | (defproject webdev "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"]
[ring "1.3.2"]
[compojure "1.3.1"]
[http-kit "2.1.16"]
[org.clojure/java.jdbc "0.3.6"]
[java-jdbc/dsl "0.1.1"]
[postgresql/postgresql "9.1-901.jdbc4"]
[hiccup "1.0.5"]
[environ "1.0.0"]]
:min-lein-version "2.0.0"
:uberjar-name "webdev.jar"
:main webdev.core
:profiles {
:dev {
:env {:database-url "jdbc:postgresql://localhost/webdev"}
:main webdev.core/-dev-main
:dependencies [[ring/ring-mock "0.2.0"]]}
:test {
:env {:database-url "jdbc:postgresql://localhost/webdev_test"}}}
:plugins [[lein-environ "1.0.0"]
[lein-ancient "0.5.5"]
[lein-kibit "0.0.8"]
[jonase/eastwood "0.2.1"]
[lein-bikeshed "0.2.0"]])
| (defproject webdev "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"]
[ring "1.3.2"]
[compojure "1.3.1"]
[http-kit "2.1.19"]
[org.clojure/java.jdbc "0.3.6"]
[java-jdbc/dsl "0.1.1"]
[postgresql/postgresql "9.1-901-1.jdbc4"]
[hiccup "1.0.5"]
[environ "1.0.0"]]
:min-lein-version "2.0.0"
:uberjar-name "webdev.jar"
:main webdev.core
:profiles {
:dev {
:env {:database-url "jdbc:postgresql://localhost/webdev"}
:main webdev.core/-dev-main
:dependencies [[ring/ring-mock "0.2.0"]]}
:test {
:env {:database-url "jdbc:postgresql://localhost/webdev_test"}}}
:plugins [[lein-environ "1.0.0"]
[lein-ancient "0.5.5"]
[lein-kibit "0.0.8"]
[jonase/eastwood "0.2.1"]
[lein-bikeshed "0.2.0"]])
|
Make the version align with devcards | (defproject devcards/lein-template "0.1.3"
:description "A Leinigen template for devcards"
:url "https://github.com/bhauman/devcards-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm { :name "git"
:url "https://github.com/bhauman/devcards-template"}
:eval-in-leiningen true)
| (defproject devcards/lein-template "0.1.4"
:description "A Leinigen template for devcards"
:url "https://github.com/bhauman/devcards-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm { :name "git"
:url "https://github.com/bhauman/devcards-template"}
:eval-in-leiningen true)
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.0.10"
: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.0.11-SNAPSHOT"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "MIT License"
:url "http://choosealicense.com/licenses/mit/#"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
|
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.8.8.3"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:plugins [[lein-set-version "0.4.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}}
:eval-in-leiningen true)
| (defproject onyx-app/lein-template "0.8.8.4-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 dependency org.onyxplatform/onyx to version 0.7.3-20150828_160954-g51b5cf8. | (defproject org.onyxplatform/onyx-datomic "0.7.3-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150828_152050-gd122e3e"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-datomic "0.7.3-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150828_160954-g51b5cf8"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Add support for figwheel repl with cider | (defproject gigrig "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.8.0"]
[org.clojure/clojurescript "1.8.40"]
[reagent "0.5.1"]]
:clean-targets ^{:protect false} ["resources/public/js" "target"]
:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.2"]]
:source-paths ["src" "env/dev"]}}
:plugins [[lein-cljsbuild "1.1.3"]
[lein-figwheel "0.5.2"]]
:cljsbuild {:builds [{:id "dev"
:source-paths ["src"]
:figwheel true
:compiler {:main gigrig.core
:optimizations :none
:asset-path "js/out"
:output-to "resources/public/js/core.js"
:output-dir "resources/public/js/out"}}]})
| (defproject gigrig "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.8.0"]
[org.clojure/clojurescript "1.8.40"]
[reagent "0.5.1"]]
:clean-targets ^{:protect false} ["resources/public/js" "target"]
:profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.1"]
[org.clojure/tools.nrepl "0.2.11"]
[figwheel-sidecar "0.5.2"]]
:source-paths ["src" "env/dev"]}}
:plugins [[lein-cljsbuild "1.1.3"]
[lein-figwheel "0.5.2"]]
:cljsbuild {:builds [{:id "dev"
:source-paths ["src"]
:figwheel true
:compiler {:main gigrig.core
:optimizations :none
:asset-path "js/out"
:output-to "resources/public/js/core.js"
:output-dir "resources/public/js/out"}}]})
|
Update ring-core dependency to 1.3.0 | (defproject compojure "1.1.8"
: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.3.0"]
[org.clojure/tools.macro "0.1.0"]
[clout "1.2.0"]
[ring/ring-core "1.2.2"]]
:plugins [[codox "0.8.0"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.1.8/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:dependencies [[ring-mock "0.1.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}})
| (defproject compojure "1.1.8"
: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.3.0"]
[org.clojure/tools.macro "0.1.0"]
[clout "1.2.0"]
[ring/ring-core "1.3.0"]]
:plugins [[codox "0.8.0"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.1.8/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:dependencies [[ring-mock "0.1.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}})
|
Revert "Adding test commit to test ci" | (defproject nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"
:description "Provides common utility code for CMR projects."
:url "***REMOVED***projects/CMR/repos/cmr-common-lib/browse"
:dependencies [[org.clojure/clojure "1.5.1"]
[com.taoensso/timbre "3.1.6"]
[ring/ring-jetty-adapter "1.2.2"]
[org.clojure/test.check "0.5.7"]
[org.clojure/data.xml "0.0.7"]]
;test commit message for ci
:profiles
{:dev {:dependencies [[org.clojure/tools.namespace "0.2.4"]
[org.clojars.gjahad/debug-repl "0.3.3"]]
:source-paths ["src" "dev" "test"]}})
| (defproject nasa-cmr/cmr-common-lib "0.1.1-SNAPSHOT"
:description "Provides common utility code for CMR projects."
:url "***REMOVED***projects/CMR/repos/cmr-common-lib/browse"
:dependencies [[org.clojure/clojure "1.5.1"]
[com.taoensso/timbre "3.1.6"]
[ring/ring-jetty-adapter "1.2.2"]
[org.clojure/test.check "0.5.7"]
[org.clojure/data.xml "0.0.7"]]
:profiles
{:dev {:dependencies [[org.clojure/tools.namespace "0.2.4"]
[org.clojars.gjahad/debug-repl "0.3.3"]]
:source-paths ["src" "dev" "test"]}})
|
Prepare for next development iteration (0.1.4-SNAPSHOT) | (defproject cljam "0.1.3"
:description "A DNA Sequence Alignment/Map (SAM) library for Clojure"
:url "https://github.com/chrovis/cljam"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.2.6"]
[org.clojure/tools.cli "0.3.1"]
[me.raynes/fs "1.4.5"]
[pandect "0.3.2"]
[clj-sub-command "0.2.1"]
[bgzf4j "0.1.0"]
[com.climate/claypoole "1.0.0"]]
:plugins [[lein-midje "3.1.3"]
[lein-bin "0.3.4"]
[lein-marginalia "0.7.1"]]
:profiles {:dev {:dependencies [[midje "1.6.3"]
[criterium "0.4.3"]
[cavia "0.1.3"]
[primitive-math "0.1.3"]]
:global-vars {*warn-on-reflection* true}}}
:main cljam.main
:aot [cljam.main]
:bin {:name "cljam"}
:repl-options {:init-ns user}
:signing {:gpg-key "developer@xcoo.jp"})
| (defproject cljam "0.1.4-SNAPSHOT"
:description "A DNA Sequence Alignment/Map (SAM) library for Clojure"
:url "https://github.com/chrovis/cljam"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.2.6"]
[org.clojure/tools.cli "0.3.1"]
[me.raynes/fs "1.4.5"]
[pandect "0.3.2"]
[clj-sub-command "0.2.1"]
[bgzf4j "0.1.0"]
[com.climate/claypoole "1.0.0"]]
:plugins [[lein-midje "3.1.3"]
[lein-bin "0.3.4"]
[lein-marginalia "0.7.1"]]
:profiles {:dev {:dependencies [[midje "1.6.3"]
[criterium "0.4.3"]
[cavia "0.1.3"]
[primitive-math "0.1.3"]]
:global-vars {*warn-on-reflection* true}}}
:main cljam.main
:aot [cljam.main]
:bin {:name "cljam"}
:repl-options {:init-ns user}
:signing {:gpg-key "developer@xcoo.jp"})
|
Add ollback-last method to aid testing of migrations | (ns user
(:require [clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[com.stuartsierra.component :as component]
[environ.core :refer (env)]
[clojure.java.jdbc :as jdbc]
[route-ccrs.system :as sys]
[route-ccrs.database :as db]))
(in-ns 'environ.core)
(defn refresh-env
"A hack to allow in-repl refresh of the environment vars"
[]
(def env
(merge (read-env-file)
(read-system-env)
(read-system-props))))
(in-ns 'user)
(def system nil)
(defn init []
(environ.core/refresh-env)
(alter-var-root #'system (constantly (sys/system))))
(defn start []
(alter-var-root #'system sys/start))
(defn stop []
(if system
(alter-var-root #'system sys/stop)))
(defn go
"Initialize the current development system and start it's components"
[]
(init)
(start)
:running)
(defn reset []
(stop)
(refresh :after 'user/go))
| (ns user
(:require [clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[com.stuartsierra.component :as component]
[environ.core :refer (env)]
[clojure.java.jdbc :as jdbc]
[ragtime.core :as ragtime]
[ragtime.sql.database :as ragtime-db]
[route-ccrs.system :as sys]
[route-ccrs.database :as db]))
(in-ns 'environ.core)
(defn refresh-env
"A hack to allow in-repl refresh of the environment vars"
[]
(def env
(merge (read-env-file)
(read-system-env)
(read-system-props))))
(in-ns 'user)
(def system nil)
(defn init []
(environ.core/refresh-env)
(alter-var-root #'system (constantly (sys/system))))
(defn start []
(alter-var-root #'system sys/start))
(defn stop []
(if system
(alter-var-root #'system sys/stop)))
(defn go
"Initialize the current development system and start it's components"
[]
(init)
(start)
:running)
(defn reset []
(stop)
(refresh :after 'user/go))
(defn rollback-last []
(ragtime/rollback-last (ragtime-db/map->SqlDatabase (-> system :db))))
|
Add dependencies for serving web requests | (defproject catalog "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "https://github.com/sbsdev/catalog"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/data.zip "0.1.1"]
[medley "0.7.0"]
[prismatic/schema "1.0.3"]
[clj-time "0.11.0"]
[comb "0.1.0" :exclusions [org.clojure/clojure]]
[org.clojure/data.xml "0.0.8"]
[org.apache.xmlgraphics/fop "2.0"]]
:plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
[refactor-nrepl "2.0.0-SNAPSHOT"]]
:main ^:skip-aot catalog.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
| (defproject catalog "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "https://github.com/sbsdev/catalog"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/data.zip "0.1.1"]
[medley "0.7.0"]
[prismatic/schema "1.0.3"]
[clj-time "0.11.0"]
[comb "0.1.0" :exclusions [org.clojure/clojure]]
[org.clojure/data.xml "0.0.8"]
[org.apache.xmlgraphics/fop "2.0"]
[hiccup "1.0.5"]
[org.immutant/web "2.0.0"]
[ring/ring-defaults "0.1.5"]
[ring/ring-core "1.4.0"]
[ring/ring-devel "1.4.0"]
[com.cemerick/friend "0.2.1"]
[compojure "1.4.0"]]
:plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
[refactor-nrepl "2.0.0-SNAPSHOT"]]
:main ^:skip-aot catalog.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
|
Prepare for next development iteration (0.4.1-SNAPSHOT) | (defproject jungerer "0.4.0"
:description "Clojure network/graph library wrapping JUNG"
:url "https://github.com/totakke/jungerer"
:license {:name "The BSD 3-Clause License"
:url "https://opensource.org/licenses/BSD-3-Clause"}
:min-lein-version "2.7.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[net.sf.jung/jung-algorithms "2.1.1"]
[net.sf.jung/jung-api "2.1.1"]
[net.sf.jung/jung-graph-impl "2.1.1"]
[net.sf.jung/jung-io "2.1.1"]
[net.sf.jung/jung-visualization "2.1.1"]]
:profiles {:dev {:global-vars {*warn-on-reflection* true}}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0-alpha12"]]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}}
:deploy-repositories [["snapshots" {:url "https://clojars.org/repo/"
:username [:env/clojars_username :gpg]
:password [:env/clojars_password :gpg]}]]
:codox {:source-uri "https://github.com/totakke/jungerer/blob/{version}/{filepath}#L{line}"})
| (defproject jungerer "0.4.1-SNAPSHOT"
:description "Clojure network/graph library wrapping JUNG"
:url "https://github.com/totakke/jungerer"
:license {:name "The BSD 3-Clause License"
:url "https://opensource.org/licenses/BSD-3-Clause"}
:min-lein-version "2.7.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[net.sf.jung/jung-algorithms "2.1.1"]
[net.sf.jung/jung-api "2.1.1"]
[net.sf.jung/jung-graph-impl "2.1.1"]
[net.sf.jung/jung-io "2.1.1"]
[net.sf.jung/jung-visualization "2.1.1"]]
:profiles {:dev {:global-vars {*warn-on-reflection* true}}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0-alpha12"]]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}}
:deploy-repositories [["snapshots" {:url "https://clojars.org/repo/"
:username [:env/clojars_username :gpg]
:password [:env/clojars_password :gpg]}]]
:codox {:source-uri "https://github.com/totakke/jungerer/blob/{version}/{filepath}#L{line}"})
|
Update dependency to Clojure 1.3.0 | (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-RC0"]
[org.clojure/algo.monads "0.1.0"]
[compojure "0.6.5"]])
| (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"]])
|
Add box2d and bullet to dependencies | (defproject nightmod "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[clojail "1.0.6"]
[com.badlogicgames.gdx/gdx "1.0-SNAPSHOT"]
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.0-SNAPSHOT"]
[com.badlogicgames.gdx/gdx-platform "1.0-SNAPSHOT"
:classifier "natives-desktop"]
[com.cemerick/pomegranate "0.3.0"]
[nightcode "0.3.3-SNAPSHOT"
:exclusions [leiningen
lein-ancient
lein-cljsbuild
lein-droid
lein-fruit
play-clj/lein-template]]
[org.clojure/clojure "1.6.0"]
[org.eclipse.jgit "3.2.0.201312181205-r"]
[play-clj "0.3.0-SNAPSHOT"]
[seesaw "1.4.4"]]
:repositories [["sonatype"
"https://oss.sonatype.org/content/repositories/snapshots/"]]
:javac-options ["-target" "1.6" "-source" "1.6" "-Xlint:-options"]
:aot [nightmod.core]
:main nightmod.core)
| (defproject nightmod "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[clojail "1.0.6"]
[com.badlogicgames.gdx/gdx "1.0-SNAPSHOT"]
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.0-SNAPSHOT"]
[com.badlogicgames.gdx/gdx-box2d "1.0-SNAPSHOT"]
[com.badlogicgames.gdx/gdx-box2d-platform "1.0-SNAPSHOT"
:classifier "natives-desktop"]
[com.badlogicgames.gdx/gdx-bullet "1.0-SNAPSHOT"]
[com.badlogicgames.gdx/gdx-bullet-platform "1.0-SNAPSHOT"
:classifier "natives-desktop"]
[com.badlogicgames.gdx/gdx-platform "1.0-SNAPSHOT"
:classifier "natives-desktop"]
[com.cemerick/pomegranate "0.3.0"]
[nightcode "0.3.3-SNAPSHOT"
:exclusions [leiningen
lein-ancient
lein-cljsbuild
lein-droid
lein-fruit
play-clj/lein-template]]
[org.clojure/clojure "1.6.0"]
[org.eclipse.jgit "3.2.0.201312181205-r"]
[play-clj "0.3.0-SNAPSHOT"]
[seesaw "1.4.4"]]
:repositories [["sonatype"
"https://oss.sonatype.org/content/repositories/snapshots/"]]
:javac-options ["-target" "1.6" "-source" "1.6" "-Xlint:-options"]
:aot [nightmod.core]
:main nightmod.core)
|
Remove parsley, regex, antlr deps. | (defproject isla "0.1.0-SNAPSHOT"
:description "A programming language for children"
:dependencies [[org.clojure/clojure "1.3.0"]]) | (defproject isla "0.1.0-SNAPSHOT"
:description "A programming language for children"
:dependencies [[org.clojure/clojure "1.3.0"]]
:main isla.parser) |
Use lein-multi, and test 1.4 beta | (defproject useful "0.7.6"
:description "A collection of generally-useful Clojure utility functions"
:dependencies [[clojure "1.3.0"]
[org.clojure/tools.macro "0.1.1"]])
| (defproject useful "0.7.6"
:description "A collection of generally-useful Clojure utility functions"
:dependencies [[clojure "1.4.0-beta1"]
[org.clojure/tools.macro "0.1.1"]]
:multi-deps {"1.3" [[clojure "1.3.0"]]
"1.2" [[clojure "1.2.1"]]
:all [[org.clojure/tools.macro "0.1.1"]]})
|
Update innuendo to match new refheap API | (defproject foreclojure "2.0.0-alpha5"
:description "4clojure - a website for learning Clojure"
:dependencies [[org.clojure/clojure "1.4.0"]
[compojure "1.1.0"]
[hiccup "1.0.0"]
[clojail "1.0.1"]
[lib-noir "0.1.1"]
[congomongo "0.1.9"]
[org.jasypt/jasypt "1.7"]
[cheshire "4.0.0"]
[useful "0.8.3-alpha4"]
[amalloy/ring-gzip-middleware "0.1.2"]
[amalloy/mongo-session "0.0.2"]
[innuendo "0.1.6"]
[ring "1.1.1"]
[incanter/incanter-core "1.3.0"]
[incanter/incanter-charts "1.3.0"]
[commons-lang "2.6"]
[org.apache.commons/commons-email "1.2"]
[org.clojure/data.xml "0.0.5"]]
:plugins [[lein-ring "0.7.1"]]
:profiles {:dev {:dependencies [[midje "1.3.0" :exclusions [org.clojure/clojure]]]}}
:checksum-deps true
:main foreclojure.core
:ring {:handler foreclojure.core/app
:init foreclojure.mongo/prepare-mongo})
| (defproject foreclojure "2.0.0-alpha5"
:description "4clojure - a website for learning Clojure"
:dependencies [[org.clojure/clojure "1.4.0"]
[compojure "1.1.0"]
[hiccup "1.0.0"]
[clojail "1.0.1"]
[lib-noir "0.1.1"]
[congomongo "0.1.9"]
[org.jasypt/jasypt "1.7"]
[cheshire "4.0.0"]
[useful "0.8.3-alpha4"]
[amalloy/ring-gzip-middleware "0.1.2"]
[amalloy/mongo-session "0.0.2"]
[innuendo "0.1.7"]
[ring "1.1.1"]
[incanter/incanter-core "1.3.0"]
[incanter/incanter-charts "1.3.0"]
[commons-lang "2.6"]
[org.apache.commons/commons-email "1.2"]
[org.clojure/data.xml "0.0.5"]]
:plugins [[lein-ring "0.7.1"]]
:profiles {:dev {:dependencies [[midje "1.3.0" :exclusions [org.clojure/clojure]]]}}
:checksum-deps true
:main foreclojure.core
:ring {:handler foreclojure.core/app
:init foreclojure.mongo/prepare-mongo})
|
Add fressian for clojurescript lib. | (defproject io.replikativ/incognito "0.2.2"
:description "Safe transport of unknown record types in distributed systems."
:url "https://github.com/replikativ/incognito"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha14" :scope "provided"]
[org.clojure/data.fressian "0.2.1" :scope "provided"]
[com.cognitect/transit-clj "0.8.285" :scope "provided"]
[com.cognitect/transit-cljs "0.8.239" :scope "provided"]]
:profiles {:test {:dependencies [[clj-time "0.13.0"]]}})
| (defproject io.replikativ/incognito "0.2.3 - Snapshot"
:description "Safe transport of unknown record types in distributed systems."
:url "https://github.com/replikativ/incognito"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha14" :scope "provided"]
[org.clojure/clojurescript "1.9.946" :scope "provided"]
[org.clojure/data.fressian "0.2.1" :scope "provided"]
[com.cognitect/transit-clj "0.8.285" :scope "provided"]
[com.cognitect/transit-cljs "0.8.239" :scope "provided"]
[fress "0.2.0-SNAPSHOT"]]
:profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.1"]]
:figwheel {:nrepl-port 7888
:nrepl-middleware ["cider.nrepl/cider-middleware"
"cemerick.piggieback/wrap-cljs-repl"]}
:plugins [[lein-figwheel "0.5.8"]]}
:test {:dependencies [[clj-time "0.13.0"]]}}
)
|
Add dependencies on librator, cheshire. | (defproject tweetbook "0.1.0"
:description "Tweet snippets from books"
:url "http://{app-engine-id}.appspot.com"
:dependencies [[org.clojure/clojure "1.6.0"]
[compojure "1.1.6"]
[hiccup "1.0.5"]
[ring-server "0.3.1"]
[lib-noir "0.8.4"]
[twitter-api "0.7.5"]
[com.novemberain/monger "2.0.0-rc1"]
]
:plugins [[lein-ring "0.8.10"]]
:ring {:handler tweetbook.handler/app
:init tweetbook.handler/init
:destroy tweetbook.handler/destroy}
:aot :all
:profiles
{:production
{:ring
{:open-browser? false, :stacktraces? false, :auto-reload? false}}
:dev
{:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.2.1"]]}})
| (defproject tweetbook "0.1.0"
:description "Tweet snippets from books"
:url "http://{app-engine-id}.appspot.com"
:dependencies [[org.clojure/clojure "1.6.0"]
[compojure "1.1.6"]
[liberator "0.11.1"]
[cheshire "5.3.1"]
[hiccup "1.0.5"]
[ring-server "0.3.1"]
[lib-noir "0.8.4"]
[twitter-api "0.7.5"]
[com.novemberain/monger "2.0.0-rc1"]
]
:plugins [[lein-ring "0.8.10"]]
:ring {:handler tweetbook.handler/app
:init tweetbook.handler/init
:destroy tweetbook.handler/destroy}
:aot :all
:profiles
{:production
{:ring
{:open-browser? false, :stacktraces? false, :auto-reload? false}}
:dev
{:dependencies [[ring-mock "0.1.5"] [ring/ring-devel "1.2.1"]]}})
|
Update clojure dependency to 1.6.0 | (defproject puppetlabs/clj-ldap "0.1.0-SNAPSHOT"
:description "Clojure ldap client (Puppet Labs's fork)."
:url "https://github.com/puppetlabs/clj-ldap"
:dependencies [[org.clojure/clojure "1.3.0"]
[com.unboundid/unboundid-ldapsdk "2.3.0"]]
:dev-dependencies [[jline "0.9.94"]
[org.apache.directory.server/apacheds-all "1.5.5"]
[fs "1.1.2"]
[org.slf4j/slf4j-simple "1.5.6"]
[lein-clojars "0.7.0"]]
:aot [clj-ldap.client]
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo
:comments "same as Clojure"})
| (defproject puppetlabs/clj-ldap "0.1.0-SNAPSHOT"
:description "Clojure ldap client (Puppet Labs's fork)."
:url "https://github.com/puppetlabs/clj-ldap"
:dependencies [[org.clojure/clojure "1.6.0"]
[com.unboundid/unboundid-ldapsdk "2.3.0"]]
:dev-dependencies [[jline "0.9.94"]
[org.apache.directory.server/apacheds-all "1.5.5"]
[fs "1.1.2"]
[org.slf4j/slf4j-simple "1.5.6"]
[lein-clojars "0.7.0"]]
:aot [clj-ldap.client]
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo
:comments "same as Clojure"})
|
Update dependency org.onyxplatform/onyx to version 0.11.0-20170913_201530-gd7db048. | (defproject org.onyxplatform/onyx-peer-http-query "0.11.0.0-SNAPSHOT"
:description "An Onyx health and query HTTP server"
:url "https://github.com/onyx-platform/onyx-peer-http-query"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.11.0-alpha4"]
[ring/ring-core "1.6.2"]
[org.clojure/java.jmx "0.3.4"]
[ring-jetty-component "0.3.1"]
[cheshire "5.7.0"]]
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:profiles {:dev {:dependencies [[clj-http "3.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
| (defproject org.onyxplatform/onyx-peer-http-query "0.11.0.0-SNAPSHOT"
:description "An Onyx health and query HTTP server"
:url "https://github.com/onyx-platform/onyx-peer-http-query"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.11.0-20170913_201530-gd7db048"]
[ring/ring-core "1.6.2"]
[org.clojure/java.jmx "0.3.4"]
[ring-jetty-component "0.3.1"]
[cheshire "5.7.0"]]
:repositories {"snapshots" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:profiles {:dev {:dependencies [[clj-http "3.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
|
Add record-spec to cljs test runner. | (ns active.clojure.test-runner
(:require [doo.runner :refer-macros [doo-tests]]
[active.clojure.condition-test]
[active.clojure.debug-test]
[active.clojure.lens-test]
[active.clojure.monad-test]
[active.clojure.record-test]
[active.clojure.match-test]
[active.clojure.config-test]))
(doo-tests 'active.clojure.condition-test
'active.clojure.debug-test
'active.clojure.lens-test
'active.clojure.monad-test
'active.clojure.record-test
'active.clojure.match-test
'active.clojure.config-test)
| (ns active.clojure.test-runner
(:require [doo.runner :refer-macros [doo-tests]]
[active.clojure.condition-test]
[active.clojure.debug-test]
[active.clojure.lens-test]
[active.clojure.monad-test]
[active.clojure.record-test]
[active.clojure.record-spec-test]
[active.clojure.match-test]
[active.clojure.config-test]))
(doo-tests 'active.clojure.condition-test
'active.clojure.debug-test
'active.clojure.lens-test
'active.clojure.monad-test
'active.clojure.record-test
'active.clojure.record-spec-test
'active.clojure.match-test
'active.clojure.config-test)
|
Update and simplify geometry example | (defproject geometry-reagent "0.5.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2816"]
[reagent "0.5.0"]
[figwheel "0.2.3-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.0.4"]
[lein-figwheel "0.2.3-SNAPSHOT"]]
:hooks [leiningen.cljsbuild]
:profiles {:dev {:cljsbuild
{:builds {:client {:source-paths ["devsrc"]
:compiler
{:main geometry.dev
:optimizations :none
:source-map true
:source-map-timestamp true}}}}}
:prod {:cljsbuild
{:builds {:client {:compiler
{:optimizations :advanced
:elide-asserts true
:pretty-print false}}}}}}
:figwheel {:repl false}
:cljsbuild {:builds {:client {:source-paths ["src"]
:compiler
{:output-dir "target/client"
:output-to "target/client.js"}}}})
| (defproject geometry-reagent "0.5.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "0.0-3308"]
[reagent "0.5.0"]
[figwheel "0.3.7"]]
:plugins [[lein-cljsbuild "1.0.6"]
[lein-figwheel "0.3.7"]]
:hooks [leiningen.cljsbuild]
:profiles {:dev {:cljsbuild
{:builds {:client
{:figwheel {:on-jsload "geometry.core/run"}
:compiler {:main "geometry.core"
:optimizations :none}}}}}
:prod {:cljsbuild
{:builds {:client
{:compiler {:optimizations :advanced
:elide-asserts true
:pretty-print false}}}}}}
:figwheel {:repl false}
:cljsbuild {:builds {:client
{:source-paths ["src"]
:compiler {:output-dir "target/client"
:output-to "target/client.js"}}}})
|
Disable hidden mode on Android again | (ns net.nightweb.main
(:use [neko.application :only [defapplication]]
[neko.notify :only [notification]]
[neko.resource :only [get-resource get-string]]
[net.clandroid.service :only [defservice
start-foreground
start-receiver
stop-receiver]]
[nightweb.router :only [start-router
stop-router]]))
(defapplication net.nightweb.Application)
(def service-name "net.nightweb.MainService")
(def shutdown-receiver-name "ACTION_CLOSE_APP")
(defservice
net.nightweb.MainService
:def service
:on-create
(fn [this]
(start-foreground
this 1 (notification
:icon (get-resource :drawable :ic_launcher)
:content-title (get-string :shut_down_nightweb)
:content-text (get-string :nightweb_is_running)
:action [:broadcast shutdown-receiver-name]))
(start-receiver this
shutdown-receiver-name
(fn [context intent]
(try
(.stopSelf service)
(catch java.lang.Exception e nil))))
(start-router (.getAbsolutePath (.getFilesDir this)) true))
:on-destroy
(fn [this]
(stop-receiver this shutdown-receiver-name)
(stop-router)))
| (ns net.nightweb.main
(:use [neko.application :only [defapplication]]
[neko.notify :only [notification]]
[neko.resource :only [get-resource get-string]]
[net.clandroid.service :only [defservice
start-foreground
start-receiver
stop-receiver]]
[nightweb.router :only [start-router
stop-router]]))
(defapplication net.nightweb.Application)
(def service-name "net.nightweb.MainService")
(def shutdown-receiver-name "ACTION_CLOSE_APP")
(defservice
net.nightweb.MainService
:def service
:on-create
(fn [this]
(start-foreground
this 1 (notification
:icon (get-resource :drawable :ic_launcher)
:content-title (get-string :shut_down_nightweb)
:content-text (get-string :nightweb_is_running)
:action [:broadcast shutdown-receiver-name]))
(start-receiver this
shutdown-receiver-name
(fn [context intent]
(try
(.stopSelf service)
(catch java.lang.Exception e nil))))
(start-router (.getAbsolutePath (.getFilesDir this)) false))
:on-destroy
(fn [this]
(stop-receiver this shutdown-receiver-name)
(stop-router)))
|
Comment out the browser REPL by default. | ;; To connect to the browser REPL:
;;
;; Comment in the last line (repl/connect) in this file
;;
;; In one terminal run:
;; lein ring server-headless
;;
;; In a second terminal, run:
;; cd src/coming_soon/cljs
;; lein trampoline cljsbuild repl-listen
;; DON'T type anything yet into the REPL, it's not connected
;;
;; Open a browser to http://localhost:3000 (possibly refresh a few times)
;;
;; Pause for a moment, then in the 2nd terminal, test if your connected with:
;; (+ 1 1)
;;
;; If you get 2, you're all set!
;;
;; To do anything useful, the next thing you probably want to do is (in-ns 'coming-soon) to switch to coming-soon's client-side namespace.
(ns connect
(:require [clojure.browser.repl :as repl]))
;; Comment in to connect to the browser REPL
(repl/connect "http://localhost:9000/repl") | ;; To connect to the browser REPL:
;;
;; Comment in the last line (repl/connect) in this file
;;
;; In one terminal run:
;; lein ring server-headless
;;
;; In a second terminal, run:
;; cd src/coming_soon/cljs
;; lein trampoline cljsbuild repl-listen
;; DON'T type anything yet into the REPL, it's not connected
;;
;; Open a browser to http://localhost:3000 (possibly refresh a few times)
;;
;; Pause for a moment, then in the 2nd terminal, test if your connected with:
;; (+ 1 1)
;;
;; If you get 2, you're all set!
;;
;; To do anything useful, the next thing you probably want to do is (in-ns 'coming-soon) to switch to coming-soon's client-side namespace.
(ns connect
(:require [clojure.browser.repl :as repl]))
;; Comment in to connect to the browser REPL
;(repl/connect "http://localhost:9000/repl") |
Stop printing system map on each go/reset. | (ns user
(:require
[com.stuartsierra.component :as component]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]
[kixi.hecuba.system :refer (new-system)]
[clojure.pprint :refer (pprint)]
[clojure.reflect :refer (reflect)]
[clojure.repl :refer (apropos dir doc find-doc pst source)]
[modular :refer (system)]))
(defn init
"Constructs the current development system."
[]
(alter-var-root #'system
(constantly (new-system))))
(defn start
"Starts the current development system."
[]
(alter-var-root #'system component/start))
(defn stop
"Shuts down and destroys the current development system."
[]
(alter-var-root #'system
(fn [s] (when s (component/stop s)))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset []
(stop)
(refresh :after 'user/go))
| (ns user
(:require
[com.stuartsierra.component :as component]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]
[kixi.hecuba.system :refer (new-system)]
[clojure.pprint :refer (pprint)]
[clojure.reflect :refer (reflect)]
[clojure.repl :refer (apropos dir doc find-doc pst source)]
[modular :refer (system)]))
(defn init
"Constructs the current development system."
[]
(alter-var-root #'system
(constantly (new-system))))
(defn start
"Starts the current development system."
[]
(alter-var-root #'system component/start))
(defn stop
"Shuts down and destroys the current development system."
[]
(alter-var-root #'system
(fn [s] (when s (component/stop s)))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start)
nil)
(defn reset []
(stop)
(refresh :after 'user/go)
nil)
|
Fix comments and docstrings for accuracy. | (ns circle.backend.build.inference
"fns for creating a build from a source tree"
(:use circle.util.fs)
(:require [circle.backend.build.template :as template])
(:require [circle.backend.action :as action])
(:require circle.backend.build.inference.rails
circle.backend.build.inference.php))
(def inference-fns {:rails (var circle.backend.build.inference.rails/spec)
:php (var circle.backend.build.inference.php/spec)})
(defn set-inferred [actions]
(map #(action/set-source % :inferred) actions))
(def action-order [:pre-setup :setup :post-setup :pre-test :test :post-test])
(defn merge-actions [specs]
(->> specs
(group-by :type)
((apply juxt action-order))
(apply concat)))
(defn infer-actions
"Dispatches on repo type returned from (infer-repo-type). Returns a
seq of build actions."
[repo]
(let [actions (->> inference-fns
(vals)
(mapcat #(% repo))
(merge-actions)
(set-inferred))]
;; if we do an inference, and come up with nothing useful, don't
;; add the template, because that would start nodes. Just return []
(if (seq actions)
(template/apply-template :build actions)
[])))
| (ns circle.backend.build.inference
"fns for creating a build from a source tree"
(:use circle.util.fs)
(:require [circle.backend.build.template :as template])
(:require [circle.backend.action :as action])
(:require circle.backend.build.inference.rails
circle.backend.build.inference.php))
(def inference-fns {:rails (var circle.backend.build.inference.rails/spec)
:php (var circle.backend.build.inference.php/spec)})
(defmethod infer-actions* :clojure [_ repo]
(circle.backend.build.inference.clojure/spec repo))
(defn set-inferred [actions]
(map #(action/set-source % :inferred) actions))
(def action-order [:pre-setup :setup :post-setup :pre-test :test :post-test])
(defn merge-actions [specs]
(->> specs
(group-by :type)
((apply juxt action-order))
(apply concat)))
(defn infer-actions
"Dispatches on repo type returned from (infer-repo-type). Returns a
seq of build actions."
[repo]
(let [actions (->> inference-fns
(vals)
(mapcat #(% repo))
(merge-actions)
(set-inferred))]
;; if we do an inference, and come up with nothing useful, don't
;; add the template, because that would start nodes. Just return []
(if (seq actions)
(template/apply-template :build actions)
[])))
|
Use defn instead of def | (ns whitman.client)
(def format-url [url user]
(format url user))
| (ns whitman.client)
(defn format-url [url user]
(format url user))
|
Add some index code sketches. | (ns vault.index.core)
| (ns vault.index.core
(:require
[vault.blob.store :as store :refer [BlobStore]]))
(defprotocol Index
(search
[this pattern]
[this pattern attr test key]
"Search the index for entries with values matching the given pattern.
Returns an ascending sequence.")
(rsearch
[this pattern]
[this pattern attr test key]
"Search the index for entries with values matching the given pattern.
Returns a descending sequence.")
(update
[this record]
"Return an updated version of the index with information about the record."))
(defrecord MemoryIndex [attrs index])
(extend-type MemoryIndex
Index
(update
[{:keys [attrs index] :as this} record]
(let [key-vec (vec (map record attrs))]
(when (some nil? key-vec)
(throw (IllegalArgumentException.
(str "Cannot update index with record missing required "
"attributes " (pr-str attrs) " " (pr-str record)))))
(->>
(->
index
(get key-vec (hash-set))
(conj record))
(assoc index key-vec)
(assoc this :index)))))
(defn memory-index
[attr & attrs]
(MemoryIndex. (vec (cons attr attrs)) (sorted-map)))
#_
{:blob HashID ; blob hash-id
:size Long ; blob byte length
:type Keyword ; data type
:stored-at DateTime} ; time added to index
#_
(extend-type BlobIndex
Index
(search
[this prefix]
()
)
BlobStore
(enumerate
[this opts]
nil)
(stat
[this id]
nil)
(put!
[this blob]
nil))
#_
(defn changes-by
[indexes pk-id]
(let [roots (index/rsearch (:ref/to indexes) [pk-id :vault.entity/root])
updates (index/rsearch (:ref/to indexes) [pk-id :vault.entity/update])]
(rmerge-sort-by :time roots updates)))
|
Switch back to using iterate | (ns advent-2017.day-17)
(def input 345)
(defn spin [step [current-pos value buffer]]
(let [new-pos (inc (mod (+ current-pos step) value))]
[new-pos (inc value) (-> (subvec buffer 0 new-pos)
(into [value])
(into (subvec buffer new-pos)))]))
(defn part-1 []
(let [[current-pos _ buffer] (nth (iterate (partial spin input) [0 1 [0]]) 2017)]
(buffer (inc current-pos))))
(defn part-2 []
(loop [current-pos 0 value 1 after-zero nil]
(if (== (dec value) 50000000)
after-zero
(let [new-pos (inc (mod (+ current-pos input) value))]
(recur new-pos (inc value) (if (== 1 new-pos)
value
after-zero))))))
| (ns advent-2017.day-17)
(def input 345)
(defn spin [step [current-pos value buffer]]
(let [new-pos (inc (mod (+ current-pos step) value))]
[new-pos (inc value) (-> (subvec buffer 0 new-pos)
(into [value])
(into (subvec buffer new-pos)))]))
(defn nth' [coll n]
(first (into [] (comp (drop n) (take 1)) coll)))
(defn part-1 []
(let [[current-pos _ buffer] (nth' (iterate (partial spin input) [0 1 [0]]) 2017)]
(buffer (inc current-pos))))
(defn spin' [step [current-pos value after-zero]]
(let [new-pos (inc (mod (+ current-pos step) value))]
[new-pos (inc value) (if (== 1 new-pos)
value
after-zero)]))
(defn part-2 []
(last (nth' (iterate (partial spin' input) [0 1 nil]) 50000000)))
|
Update bouncy castle version to 1.58 | (defproject buddy/buddy-core "1.3.0"
:description "Cryptographic Api for Clojure."
:url "https://github.com/funcool/buddy-core"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.9.0-alpha14" :scope "provided"]
[org.clojure/test.check "0.9.0" :scope "test"]
[commons-codec/commons-codec "1.10"]
[org.bouncycastle/bcprov-jdk15on "1.57"]
[org.bouncycastle/bcpkix-jdk15on "1.57"]]
:source-paths ["src"]
:test-paths ["test"]
:jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"])
| (defproject buddy/buddy-core "1.3.0"
:description "Cryptographic Api for Clojure."
:url "https://github.com/funcool/buddy-core"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.9.0-alpha19" :scope "provided"]
[org.clojure/test.check "0.9.0" :scope "test"]
[commons-codec/commons-codec "1.10"]
[org.bouncycastle/bcprov-jdk15on "1.58"]
[org.bouncycastle/bcpkix-jdk15on "1.58"]]
:source-paths ["src"]
:test-paths ["test"]
:jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"])
|
Move test-check dep to dev env | (defproject obb-rules "1.5"
:description "Orion's Belt battle rules"
:url "https://github.com/orionsbelt-battlegrounds/obb-rules"
:license {:name "The MIT License"
:url "file://LICENSE"
:distribution :repo
:comments "Copyright 2011-2014 Pedro Santos All Rights Reserved."}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/math.numeric-tower "0.0.4"]
[org.clojure/test.check "0.6.2"]]
:source-paths ["src"]
:test-paths ["test"]
:scm {:name "git"
:url "git@github.com:orionsbelt-battlegrounds/obb-rules.git"}
:profiles {:dev
{:plugins [[com.jakemccrary/lein-test-refresh "0.5.4"]
[lein-cloverage "1.0.2"]]}}
)
| (defproject obb-rules "1.5"
:description "Orion's Belt battle rules"
:url "https://github.com/orionsbelt-battlegrounds/obb-rules"
:license {:name "The MIT License"
:url "file://LICENSE"
:distribution :repo
:comments "Copyright 2011-2014 Pedro Santos All Rights Reserved."}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/math.numeric-tower "0.0.4"]
]
:source-paths ["src"]
:test-paths ["test"]
:scm {:name "git"
:url "git@github.com:orionsbelt-battlegrounds/obb-rules.git"}
:profiles {:dev
{:dependencies [[org.clojure/test.check "0.6.2"]]
:plugins [[com.jakemccrary/lein-test-refresh "0.5.4"]
[lein-cloverage "1.0.2"]]}}
)
|
Update dependency org.onyxplatform/onyx to version 0.7.3-20150827_202930-g49ef67c. | (defproject org.onyxplatform/onyx-datomic "0.7.3-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150827_160450-g706d154"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-datomic "0.7.3-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150827_202930-g49ef67c"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Revert CLJ version (for now) | (defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is causing the spec error"
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha20" :scope "provided"]
[org.clojure/clojurescript "1.9.908" :scope "provided"]
[clansi "1.0.0"]
[fipp "0.6.8"]
[spectrace "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}}
:profiles
{:dev {:dependencies [[org.clojure/test.check "0.10.0-alpha2"]]}})
| (defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is causing the spec error"
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha19" :scope "provided"]
[org.clojure/clojurescript "1.9.908" :scope "provided"]
[clansi "1.0.0"]
[fipp "0.6.8"]
[spectrace "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}}
:profiles
{:dev {:dependencies [[org.clojure/test.check "0.10.0-alpha2"]]}})
|
Add io.aviso/pretty as a dependency | (defproject io.aviso/tracker "0.1.0"
:description "Track per-thread operations when exceptions occur"
:url "https://github.com/AvisoNovate/tracker"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
]
:codox {:src-dir-uri "https://github.com/AvisoNovate/tracker/blob/master/"
:src-linenum-anchor-prefix "L"}
:profiles {:dev {:dependencies [[log4j "1.2.17"]]}})
| (defproject io.aviso/tracker "0.1.0"
:description "Track per-thread operations when exceptions occur"
:url "https://github.com/AvisoNovate/tracker"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[io.aviso/pretty "0.1.8"]]
:codox {:src-dir-uri "https://github.com/AvisoNovate/tracker/blob/master/"
:src-linenum-anchor-prefix "L"}
:profiles {:dev {:dependencies [[log4j "1.2.17"]]}})
|
Make finding of version more robust. | (ns lexemic.core
(:require [cljs.nodejs :as node]
[lexemic.sentiment.simple :as sentiment]))
(def ^:private version
(.-version (node/require "../package.json")))
(def ^:private fs
(node/require "fs"))
(def ^:private spacer "")
(def ^:private version (str "Lexemic v" version))
(def ^:private usage-banner "Usage: lexemic [command] [implementation] [target...]")
(def ^:private supported-commands #{"help" "sentiment"})
(defn- show-help []
(do
(println version)
(println spacer)
(println usage-banner)))
(defn- run [cmd impl text]
(condp = cmd
"sentiment" (prn (sentiment/analyse text))
(show-help)))
(defn -main [& args]
(let [command (first args)
impl (let [impl* (second args)]
(when (and impl* (.match impl* #"^-{1,2}"))
impl*))
targets (if impl
(drop 2 args)
(drop 1 args))
file? (fn [path]
(.existsSync fs path))
get-string (fn [x]
(if (file? x)
(.readFileSync fs x "utf8")
(identity x)))
contents (map get-string targets)
input (print-str contents)]
(if-let [cmd (supported-commands command)]
(run cmd impl input)
(show-help))))
(set! *main-cli-fn* -main)
| (ns lexemic.core
(:require [cljs.nodejs :as node]
[lexemic.sentiment.simple :as sentiment]))
(def ^:private version
(.-version (node/require (str (.cwd js/process) "/package.json"))))
(def ^:private fs
(node/require "fs"))
(def ^:private spacer "")
(def ^:private version (str "Lexemic v" version))
(def ^:private usage-banner "Usage: lexemic [command] [implementation] [target...]")
(def ^:private supported-commands #{"help" "sentiment"})
(defn- show-help []
(do
(println version)
(println spacer)
(println usage-banner)))
(defn- run [cmd impl text]
(condp = cmd
"sentiment" (prn (sentiment/analyse text))
(show-help)))
(defn -main [& args]
(let [command (first args)
impl (let [impl* (second args)]
(when (and impl* (.match impl* #"^-{1,2}"))
impl*))
targets (if impl
(drop 2 args)
(drop 1 args))
file? (fn [path]
(.existsSync fs path))
get-string (fn [x]
(if (file? x)
(.readFileSync fs x "utf8")
(identity x)))
contents (map get-string targets)
input (print-str contents)]
(if-let [cmd (supported-commands command)]
(run cmd impl input)
(show-help))))
(set! *main-cli-fn* -main)
|
Remove reset and test, now that reset is not there anymore | (ns dev
(:require [clojure.pprint :refer [pprint]]
[clojure.test :refer [run-all-tests]]
[clojure.reflect :refer [reflect]]
[clojure.repl :refer [apropos dir doc find-doc pst source]]
[clojure.tools.namespace.repl :as tnr]
[clojure.java.io :as io]
[mount.core :as mount :refer [start-without start-with start-with-states
stop-except only except swap swap-states with-args]]
[mount.tools.graph :as mount-graph]
[clojure.tools.logging :as log :refer [spy spyf]]
[adzerk.env :refer [env]]
[<<project-ns>>.core :as core]
[<<project-ns>>.system :as system]))
(defn config
"Pretty print the system status"
[]
(pprint system/config))
(defn status
"Pretty print the system status"
[]
(pprint (mount-graph/states-with-deps)))
(def start #(system/start nil)) ;; no args to start
(def stop system/stop)
(defn go []
(start)
:ready)
(defn test-all []
(run-all-tests #"<<name>>.*test$"))
(defn reset-and-test []
(reset)
(time (test-all)))
| (ns dev
(:require [clojure.pprint :refer [pprint]]
[clojure.test :refer [run-all-tests]]
[clojure.reflect :refer [reflect]]
[clojure.repl :refer [apropos dir doc find-doc pst source]]
[clojure.tools.namespace.repl :as tnr]
[clojure.java.io :as io]
[mount.core :as mount :refer [start-without start-with start-with-states
stop-except only except swap swap-states with-args]]
[mount.tools.graph :as mount-graph]
[clojure.tools.logging :as log :refer [spy spyf]]
[adzerk.env :refer [env]]
[<<project-ns>>.core :as core]
[<<project-ns>>.system :as system]))
(defn config
"Pretty print the system status"
[]
(pprint system/config))
(defn status
"Pretty print the system status"
[]
(pprint (mount-graph/states-with-deps)))
(def start #(system/start nil)) ;; no args to start
(def stop system/stop)
(defn go []
(start)
:ready)
(defn test-all []
(run-all-tests #"<<name>>.*test$"))
|
Insert inline js at body end instead of header end | (ns io.perun.contrib.inject-scripts
(:require [clojure.java.io :as io]
[io.perun.core :as perun]))
(defn inject [html scripts]
(reduce
#(.replaceFirst %1 "</head>" (format "<script>%s</script></head>" %2))
html
scripts))
(defn inject-scripts [scripts in-path out-path]
(let [html (-> in-path io/file slurp)
updated-html (inject html scripts)]
(spit (io/file out-path) updated-html)))
| (ns io.perun.contrib.inject-scripts
(:require [clojure.java.io :as io]
[io.perun.core :as perun]))
(defn inject [html scripts]
(reduce
#(.replaceFirst %1 "</body>" (format "<script>%s</script></body>" %2))
html
scripts))
(defn inject-scripts [scripts in-path out-path]
(let [html (-> in-path io/file slurp)
updated-html (inject html scripts)]
(spit (io/file out-path) updated-html)))
|
Add support for preconditions, example | (ns detritus.variants
(:require [detritus.update :refer [take-when]]))
(defmacro defvariant
{:doc "Defines a variant constructor with a namespace qualified tag, and keyword named members."
:arglists '([name doc-string? attr-map? members])}
[vname & args]
(let [;; Parse direct args
[?docstring args] (take-when string? "" args)
[?attr-map args] (take-when map? {} args)
members (first args)
;; FIXME inline guards are a bad habit of mine
_ (assert (vector? members) "Members is not a vector!")
_ (assert (every? symbol? members) "Members may contain only symbols!")
;; Build used datastructures
kw-members (map (comp keyword name) members)
kw-tag (keyword (name (ns-name *ns*))
(name vname))
?attr-map (assoc ?attr-map
:variant true
:variant/members kw-members
:variant/tag kw-tag)]
`(defn ~vname ~?docstring ~?attr-map ~members
[~kw-tag (hash-map ~@(interleave kw-members members))])))
| (ns detritus.variants
(:require [detritus.update :refer [take-when]]))
(defmacro defvariant
"Defines a variant constructor with a namespace qualified tag, and keyword
named members. Preconditions on members may be specified by the pre-map.
Ex. (defvariant test \"A demo variant\" [a b]
{:pre [(number? a) (vector? b)]})"
{:arglists '([name doc-string? attr-map? members pre-map?])}
[vname & args]
(let [;; Parse direct args
[?docstring args] (take-when string? "" args)
[?attr-map args] (take-when map? {} args)
[members args] (take-when vector? nil args)
[?pre-map args] (take-when map? {} args)
;; FIXME inline guards are a bad habit of mine
_ (assert (vector? members) "Members is not a vector!")
_ (assert (every? symbol? members) "Members may contain only symbols!")
;; Build used datastructures
kw-members (map (comp keyword name) members)
kw-tag (keyword (name (ns-name *ns*))
(name vname))
?attr-map (assoc ?attr-map
:variant true
:variant/members kw-members
:variant/tag kw-tag)]
`(defn ~vname ~?docstring ~?attr-map ~members
~?pre-map
[~kw-tag (hash-map ~@(interleave kw-members members))])))
|
Add support for new profile persistence. | ;; 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.repo.users
"A main interface for access to remote resources."
(:refer-clojure :exclude [do])
(:require [beicon.core :as rx]
[uxbox.repo.core :refer (request url send!)]
[uxbox.state :as ust]))
(defmethod request :fetch/profile
[type _]
(let [url (str url "/profile/me")]
(send! {:method :get :url url})))
(defmethod request :update/profile
[type data]
(let [params {:url (str url "/profile/me")
:method :put
:body data}]
(send! params)))
(defmethod request :update/password
[type data]
(let [params {:url (str url "/profile/me/password")
:method :put
:body data}]
(send! params)))
| ;; 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.repo.users
"A main interface for access to remote resources."
(:require [beicon.core :as rx]
[uxbox.repo.core :refer (request url send!)]
[uxbox.util.transit :as t]))
(defn- decode-payload
[{:keys [payload] :as rsp}]
(let [metadata (:metadata payload)]
(assoc rsp :payload
(assoc payload :metadata (t/decode metadata)))))
(defmethod request :fetch/profile
[type _]
(let [url (str url "/profile/me")
params {:method :get :url url}]
(->> (send! params)
(rx/map decode-payload))))
(defmethod request :update/profile
[type {:keys [metadata id] :as body}]
(let [body (assoc body :metadata (t/encode metadata))
params {:url (str url "/profile/me")
:method :put
:body body}]
(->> (send! params)
(rx/map decode-payload))))
(defmethod request :update/password
[type data]
(let [params {:url (str url "/profile/me/password")
:method :put
:body data}]
(send! params)))
|
Clean up the defgauge macro a bit. | (ns metrics.gauges
(:use [metrics.utils :only (metric-name)])
(:import (com.yammer.metrics Metrics))
(:import (com.yammer.metrics.core Gauge)))
; Create ----------------------------------------------------------------------
(defmacro gauge
"Create a new Gauge metric with the given title.
The body exprs will be used to retrieve the value of the Gauge when requested."
[title & body]
`(Metrics/newGauge (metric-name ~title)
(proxy [Gauge] []
(value [] (do ~@body)))))
(defn gauge-fn
"Create a new Gauge metric with the given title.
The given function will be called (with no arguments) to retrieve the value of
the Gauge when requested."
[title f]
(Metrics/newGauge (metric-name title)
(proxy [Gauge] []
(value [] (f)))))
(defmacro defgauge
"Define a new Gauge metric with the given title.
The rest of the arguments may be a body form or function to call to
retrieve the value of the Gauge."
[title & body]
(cond (and (= 1 (count body)) (and (symbol? (first body))
(fn? (eval (first body)))))
`(gauge-fn ~(str title) ~(first body))
true
`(gauge ~(str title) ~@body)))
; Read ------------------------------------------------------------------------
(defn value
"Return the value of the given Gauge."
[^Gauge g]
(.value g))
| (ns metrics.gauges
(:use [metrics.utils :only (metric-name)])
(:import (com.yammer.metrics Metrics))
(:import (com.yammer.metrics.core Gauge)))
; Create ----------------------------------------------------------------------
(defmacro gauge
"Create a new Gauge metric with the given title.
The body exprs will be used to retrieve the value of the Gauge when requested."
[title & body]
`(Metrics/newGauge (metric-name ~title)
(proxy [Gauge] []
(value [] (do ~@body)))))
(defn gauge-fn
"Create a new Gauge metric with the given title.
The given function will be called (with no arguments) to retrieve the value of
the Gauge when requested."
[title f]
(Metrics/newGauge (metric-name title)
(proxy [Gauge] []
(value [] (f)))))
(defmacro defgauge
"Define a new Gauge metric with the given title.
The rest of the arguments may be a body form or function to call to
retrieve the value of the Gauge."
[title & [b & bs :as body]]
(if (and (empty? bs)
(symbol? b)
(fn? (eval b)))
`(def ~title (gauge-fn ~(str title) ~b))
`(def ~title (gauge ~(str title) ~@body))))
; Read ------------------------------------------------------------------------
(defn value
"Return the value of the given Gauge."
[^Gauge g]
(.value g))
|
Update clojure game template to use new entity system | (ns {{namespace}}
(:require [play-clj.core :refer :all])
(:import [com.badlogic.gdx.graphics Color]
[com.badlogic.gdx.graphics.g2d BitmapFont]
[com.badlogic.gdx.scenes.scene2d.ui Label Label$LabelStyle]))
(defn on-show
[screen]
(create-renderer! screen :type :stage)
(let [style (Label$LabelStyle. (BitmapFont.) (Color. 1 1 1 1))
label (Label. "Hello world!" style)]
(set-entities! screen [label])))
(defn on-render
[screen]
(clear!)
(draw! screen (get-entities screen)))
(defscreen main-screen
:on-show on-show
:on-render on-render)
(defgame {{app-name}}
:on-create (fn [this]
(set-screen! this main-screen)))
| (ns {{namespace}}
(:require [play-clj.core :refer :all])
(:import [com.badlogic.gdx.graphics Color]
[com.badlogic.gdx.graphics.g2d BitmapFont]
[com.badlogic.gdx.scenes.scene2d.ui Label Label$LabelStyle]))
(defscreen main-screen
:on-show
(fn [screen entities]
(create-renderer! screen :type :stage)
(let [style (Label$LabelStyle. (BitmapFont.) (Color. 1 1 1 1))
label (Label. "Hello world!" style)]
[label]))
:on-render
(fn [screen entities]
(clear!)
(draw! screen entities)
entities))
(defgame {{app-name}}
:on-create
(fn [this]
(set-screen! this main-screen)))
|
Convert files to strs, makes it easier to regex later | (ns circle.util.fs
"utilities for working with files and directories"
(:require fs)
(:require [clojure.java.io :as io])
(:import org.apache.commons.io.FileUtils)
(:import (org.apache.commons.io.filefilter
IOFileFilter
TrueFileFilter))
(:require [circle.sh :as sh]))
(def symlink-filter (reify IOFileFilter
(accept [this file]
(not (FileUtils/isSymlink file)))))
(defn all-files
"Returns a list of all files in the repos"
[dir]
(when (fs/exists? dir)
(FileUtils/listFiles (io/as-file dir)
symlink-filter
symlink-filter)))
(defn files-matching
"Returns a list of files that match re."
[dir re]
(->> dir
(all-files)
(filter #(re-find re %))))
(defn re-file?
"True if the contents of the file match the regex"
[file re]
(when (fs/exists? file)
(boolean (seq (re-find re (slurp file))))))
(defn line-count
"returns the number of lines in the file"
[file]
(if (fs/exists? file)
(->> file (slurp) (re-seq #"\n") (count))
0)) | (ns circle.util.fs
"utilities for working with files and directories"
(:require fs)
(:require [clojure.java.io :as io])
(:import org.apache.commons.io.FileUtils)
(:import (org.apache.commons.io.filefilter
IOFileFilter
TrueFileFilter))
(:require [circle.sh :as sh]))
(def symlink-filter (reify IOFileFilter
(accept [this file]
(not (FileUtils/isSymlink file)))))
(defn all-files
"Returns a list of all files in the repos"
[dir]
(when (fs/exists? dir)
(map str (FileUtils/listFiles (io/as-file dir)
symlink-filter
symlink-filter))))
(defn files-matching
"Returns a list of files that match re."
[dir re]
(->> dir
(all-files)
(filter #(re-find re %))))
(defn re-file?
"True if the contents of the file match the regex"
[file re]
(when (fs/exists? file)
(boolean (seq (re-find re (slurp file))))))
(defn line-count
"returns the number of lines in the file"
[file]
(if (fs/exists? file)
(->> file (slurp) (re-seq #"\n") (count))
0)) |
Support optional 'amount' query param to gendata, overriding default behavior of doubling. | (ns org.scode.httpgctest
(:gen-class)
(:require [clojure.contrib.duck-streams :as duck-streams])
(:use [compojure]
[compojure.http response])
(:import (java.io ByteArrayOutputStream
ByteArrayInputStream
FileInputStream
File)))
(defn gen-recursive-garbage [lvl garbage]
(if (> 0 lvl)
(gen-recursive-garbage (dec lvl) {:some-nice-garbage [1 2 3 4 5 6 7 8 9 10]})
(do
(Thread/sleep (rand 1000))
garbage)))
(defn serve-gengarbage [request]
(do
(doseq [future (doall (for [i (range 10)] (future (gen-recursive-garbage 50 []))))]
@future)
{:status 200
:headers {}
:body "Garbage all around."}))
(def data (ref ["data"]))
(defn serve-gendata [request]
(dosync
(alter data #(concat %1 (repeat (count %1) "data"))))
{:status 200
:headers {}
:body (str "size is now " (count @data))})
(defroutes greeter
(GET "/gengarbage"
serve-gengarbage)
(GET "/gendata"
serve-gendata))
(defn -main [& args]
(run-server {:port 9191}
"/*" (servlet greeter)))
| (ns org.scode.httpgctest
(:gen-class)
(:require [clojure.contrib.duck-streams :as duck-streams])
(:use [compojure]
[compojure.http response])
(:import (java.io ByteArrayOutputStream
ByteArrayInputStream
FileInputStream
File)))
(defn gen-recursive-garbage [lvl garbage]
(if (> 0 lvl)
(gen-recursive-garbage (dec lvl) {:some-nice-garbage [1 2 3 4 5 6 7 8 9 10]})
(do
(Thread/sleep (rand 1000))
garbage)))
(defn serve-gengarbage [request]
(do
(doseq [future (doall (for [i (range 10)] (future (gen-recursive-garbage 50 []))))]
@future)
{:status 200
:headers {}
:body "Garbage all around."}))
(def data (ref ["data"]))
(defn serve-gendata [request]
(let [amount (let [amstr (:amount (:query-params request))]
(if amstr
(Integer/parseInt amstr)
(count @data)))]
(dosync
(alter data #(concat %1 (repeat amount "data"))))
{:status 200
:headers {}
:body (str "size is now " (count @data))}))
(defroutes greeter
(GET "/gengarbage"
serve-gengarbage)
(GET "/gendata"
serve-gendata))
(defn -main [& args]
(run-server {:port 9191}
"/*" (servlet greeter)))
|
Implement "src" and "artifact" modes in loader | (ns leiningen.grim
(:require [leiningen.core.eval :refer [eval-in-project]]))
(def deps
['[org.clojure/tools.namespace "0.2.7"]
'[org.clojure/java.classpath "0.2.2"]
'[org.clojure-grimoire/lib-grimoire "0.1.1"]
'[org.clojure-grimoire/lein-grim "0.1.1"] ;; FIXME: do this better?
'[me.arrdem/detritus "0.2.0"]])
(defn grim
[project & args]
(let [args (concat ((juxt :group :name :version) project) args)]
(eval-in-project
(update-in project [:dependencies] concat deps)
`(do (require 'grimoire.doc)
(grimoire.doc/-main ~@args)))))
| (ns leiningen.grim
(:require [leiningen.core.eval :refer [eval-in-project]]))
(def deps
['[org.clojure/tools.namespace "0.2.7"]
'[org.clojure/java.classpath "0.2.2"]
'[org.clojure-grimoire/lib-grimoire "0.1.1"]
'[org.clojure-grimoire/lein-grim "0.1.1"] ;; FIXME: do this better?
'[me.arrdem/detritus "0.2.0"]])
(defn grim
"Usage: lein grim src <dst>
: lein grim artifact <groupid> <artifactid> <version> <dst>
In source mode, lein-grim traverses the source paths of the current project,
enumerating and documenting all namespaces. This is intended for documenting
projects for which you have both source and a lein project.
In artifact mode, lein-grim traverses an artifact on the classpath enumerating
and documenting the namespaces therein. This is intended for documenting
projects such as clojure.core which may not exist as a covenient lein project
but which do exist as artifacts."
[project mode & args]
{:pre [(#{"src" "artifact"} mode)]}
(let [args (if (= "src" mode)
(concat ((juxt :group :name :version) project) args)
args)
paths (if (= "src" mode)
(vec (:source-paths project))
:classpath)]
(eval-in-project
(update-in project [:dependencies] concat deps)
`(do (require 'grimoire.doc)
(grimoire.doc/-main ~@args ~paths)))))
|
Update dependency org.onyxplatform/onyx to version 0.7.3-20150828_152050-gd122e3e. | (defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150827_202930-g49ef67c"]
[clj-kafka "0.3.2" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]]
[com.stuartsierra/component "0.2.3"]
[cheshire "5.5.0"]
[zookeeper-clj "0.9.3" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]]
:profiles {:dev {:dependencies [[midje "1.7.0"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
| (defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150828_152050-gd122e3e"]
[clj-kafka "0.3.2" :exclusions [org.apache.zookeeper/zookeeper zookeeper-clj]]
[com.stuartsierra/component "0.2.3"]
[cheshire "5.5.0"]
[zookeeper-clj "0.9.3" :exclusions [io.netty/netty org.apache.zookeeper/zookeeper]]]
:profiles {:dev {:dependencies [[midje "1.7.0"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
|
Use safe incognito set reader. | (defproject io.replikativ/konserve "0.3.0-beta1"
:description "Durable cross-platform key-value store protocol with core.async."
:url "http://github.com/replikativ/konserve"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:source-paths ["src"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.48"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[io.replikativ/incognito "0.1.1"]]
:plugins [[lein-cljsbuild "1.0.6"]]
:profiles {:dev {:plugins [[com.cemerick/austin "0.1.6"]]}}
:cljsbuild
{:builds
[{:source-paths ["src"]
:compiler
{:output-to "resources/public/js/main.js"
:optimizations :simple
:pretty-print true}}]})
| (defproject io.replikativ/konserve "0.3.0-beta2"
:description "Durable cross-platform key-value store protocol with core.async."
:url "http://github.com/replikativ/konserve"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:source-paths ["src"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.48"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[io.replikativ/incognito "0.1.2"]]
:plugins [[lein-cljsbuild "1.0.6"]]
:profiles {:dev {:plugins [[com.cemerick/austin "0.1.6"]]}}
:cljsbuild
{:builds
[{:source-paths ["src"]
:compiler
{:output-to "resources/public/js/main.js"
:optimizations :simple
:pretty-print true}}]})
|
Update cljs compiler to 1.9.36 | (defproject funcool/promesa "1.2.0"
:description "A promise library for ClojureScript"
:url "https://github.com/funcool/promesa"
:license {:name "BSD (2 Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.8.51" :scope "provided"]
[funcool/cats "1.2.1" :scope "provided"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojure
:target "doc/dist/latest/api"}
:plugins [[funcool/codeina "0.3.0"]
[lein-ancient "0.6.7" :exclusions [org.clojure/tools.reader]]])
| (defproject funcool/promesa "1.2.0"
:description "A promise library for ClojureScript"
:url "https://github.com/funcool/promesa"
:license {:name "BSD (2 Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.36" :scope "provided"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojure
:target "doc/dist/latest/api"}
:plugins [[funcool/codeina "0.3.0"]
[lein-ancient "0.6.7" :exclusions [org.clojure/tools.reader]]])
|
Simplify Basic auth and json parsing in test-utils/spotify-oauth-token | (ns clj-spotify.test-utils
(:require
[clojure.data.json :as json]
[clojure.data :as data]
[clj-http.client :as client]
[clojure.data.codec.base64 :as b64]
))
(def enc-auth-string
(str "Basic "
(->
(str (System/getenv "SPOTIFY_CLIENT_ID") ":" (System/getenv "SPOTIFY_SECRET_TOKEN"))
(.getBytes)
(b64/encode)
(String. "UTF-8"))))
(defonce spotify-oauth-token (->
"https://accounts.spotify.com/api/token"
(client/post {:form-params {:grant_type "client_credentials"} :headers {:Authorization enc-auth-string}})
:body
(json/read-str :key-fn keyword)
:access_token))
(defn reset-volatile-vals
"Function to reset values that change over time such as amount of followers or popularity ranking."
[k v]
(condp
:followers {:href nil, :total 0}
:popularity 0
:total 0
:snapshot_id "123456"
(and (string? v) (.contains v "scdn.co")) "https://scdn.co/preview/ref"
:else v))
(defn test-json-string-to-map [s]
"Read string and transform to json but ignore certain keys."
(json/read-str s :value-fn reset-volatile-vals :key-fn keyword))
| (ns clj-spotify.test-utils
(:require
[clojure.data.json :as json]
[clj-http.client :as client]
))
(defonce spotify-oauth-token
(-> "https://accounts.spotify.com/api/token"
(client/post {:form-params {:grant_type "client_credentials"}
:basic-auth [(System/getenv "SPOTIFY_CLIENT_ID")
(System/getenv "SPOTIFY_SECRET_TOKEN")]
:as :json})
:body
:access_token))
(defn reset-volatile-vals
"Function to reset values that change over time such as amount of followers or popularity ranking."
[k v]
(condp
:followers {:href nil, :total 0}
:popularity 0
:total 0
:snapshot_id "123456"
(and (string? v) (.contains v "scdn.co")) "https://scdn.co/preview/ref"
:else v))
(defn test-json-string-to-map [s]
"Read string and transform to json but ignore certain keys."
(json/read-str s :value-fn reset-volatile-vals :key-fn keyword))
|
Use site-id in ComicRepository protocol method arguments | (ns comic-reader.comic-repository)
(defprotocol ComicRepository
(list-sites [this] "List all the comic sites available from this repository.")
(list-comics [this site] "List all the comics available on this site.")
(previous-locations [this site comic-id location n] "Get up-to n locations that precede `location' in a comic.")
(next-locations [this site comic-id location n] "Get up-to n locations that follow `location' in a comic.")
(image-tag [this site location] "Get the hiccup image tag for this comic location."))
(defprotocol WritableComicRepository
(store-sites [this sites] "Store a seq of site records.")
(store-comics [this site-id comics] "Store a seq of comic records.")
(store-locations [this site-id comic-id locations] "Store a seq of location records."))
| (ns comic-reader.comic-repository)
(defprotocol ComicRepository
(list-sites [this] "List all the comic sites available from this repository.")
(list-comics [this site-id] "List all the comics available on this site.")
(previous-locations [this site-id comic-id location n] "Get up-to n locations that precede `location' in a comic.")
(next-locations [this site-id comic-id location n] "Get up-to n locations that follow `location' in a comic.")
(image-tag [this site-id location] "Get the hiccup image tag for this comic location."))
(defprotocol WritableComicRepository
(store-sites [this sites] "Store a seq of site records.")
(store-comics [this site-id comics] "Store a seq of comic records.")
(store-locations [this site-id comic-id locations] "Store a seq of location records."))
|
Terminate stack traces at any "speclj" namespace | (ns user
(:use
speclj.config
io.aviso.tracker
io.aviso.repl
clojure.pprint
[io.aviso.twixt :only [get-asset-uris default-options]]
io.aviso.twixt.startup
ring.adapter.jetty)
(:require
;; See https://github.com/slagyr/speclj/issues/79
speclj.run.standard))
(install-pretty-exceptions)
(alter-var-root #'default-config assoc :color true :reporters ["documentation"])
(defn handler
[request]
(track "Invoking handler (that throws exceptions)"
(if (= (:uri request) "/fail")
;; This will fail at some depth:
(doall
(get-asset-uris (:twixt request) "invalid-coffeescript.coffee")))))
(defn app
[]
(wrap-with-twixt handler default-options true))
(defn launch []
(let [server (run-jetty (app) {:port 8888 :join? false})]
#(.stop server))) | (ns user
(:use speclj.config
io.aviso.tracker
io.aviso.repl
clojure.pprint
[io.aviso.twixt :only [get-asset-uris default-options]]
io.aviso.exception
io.aviso.twixt.startup
ring.adapter.jetty)
;; See https://github.com/slagyr/speclj/issues/79
(:require speclj.run.standard))
(install-pretty-exceptions)
(alter-var-root #'*default-frame-filter*
(fn [default-frame-filter]
(fn [frame]
(if (= (:package frame) "speclj")
:terminate
(default-frame-filter frame)))))
(alter-var-root #'default-config assoc :color true :reporters ["documentation"])
(defn handler
[request]
(track "Invoking handler (that throws exceptions)"
(if (= (:uri request) "/fail")
;; This will fail at some depth:
(doall
(get-asset-uris (:twixt request) "invalid-coffeescript.coffee")))))
(defn app
[]
(wrap-with-twixt handler default-options true))
(defn launch []
(let [server (run-jetty (app) {:port 8888 :join? false})]
#(.stop server))) |
Update show-files task to show input and user files as well. | (set-env!
:dependencies '[[org.clojure/clojure "1.6.0"]
[boot-jruby "0.2.0"]]
:source-paths #{"resources"})
(require
'[clojure.java.io :as io]
'[boot.jruby :refer [jruby make-jruby]])
(deftask haml
"convert haml to html"
[]
(let [jrb (make-jruby)]
(with-pre-wrap fileset
(jrb fileset
;; installs the haml gem, unless it's already installed
:gem [["haml" "4.0.5"]]
;; sets data from clojure in the ruby runtime, as globals
:set-var {"$haml_files" (->> fileset input-files (by-ext [".haml"]) (mapv #(.getAbsolutePath (tmpfile %))))
"$data" {:what_the "nuts"}}
;; evaluates resources/render_haml.rb, that does the actual work
:eval-file [(-> "render_haml.rb" io/resource io/file .getAbsolutePath)]))))
(deftask show-files
"A debug task to println any files with :ext in the fileset"
[e ext PATH [str] "extensions to show"]
(with-pre-wrap fileset
(doseq [:let [out-f (output-files fileset)]
f (if (seq ext) (by-ext ext out-f) out-f)]
(println (str "\n" (tmppath f) ":\n\n")
(slurp (tmpfile f))))
fileset))
| (set-env!
:dependencies '[[org.clojure/clojure "1.6.0"]
[boot-jruby "0.2.0"]]
:source-paths #{"resources"})
(require
'[clojure.java.io :as io]
'[boot.jruby :refer [jruby make-jruby]])
(deftask haml
"convert haml to html"
[]
(let [jrb (make-jruby)]
(with-pre-wrap fileset
(jrb fileset
;; installs the haml gem, unless it's already installed
:gem [["haml" "4.0.5"]]
;; sets data from clojure in the ruby runtime, as globals
:set-var {"$haml_files" (->> fileset input-files (by-ext [".haml"]) (mapv #(.getAbsolutePath (tmpfile %))))
"$data" {:what_the "nuts"}}
;; evaluates resources/render_haml.rb, that does the actual work
:eval-file [(-> "render_haml.rb" io/resource io/file .getAbsolutePath)]))))
(deftask show-files
"A debug task to println any files with :ext in the fileset"
[e ext PATH [str] "extensions to show"]
(with-pre-wrap fileset
(doseq [:let [out-f (->> [user-files input-files output-files]
(mapcat #(% fileset))
set)]
f (if (seq ext) (by-ext ext out-f) out-f)]
(println (str "\n" (tmppath f) ":\n\n")
(slurp (tmpfile f))))
fileset))
|
Tag parameter `s` as `CharSequence` | (ns toucan.util
"Utility functions used by other Toucan modules."
(:require [clojure.string :as s])
(:import java.util.Locale))
(defn keyword->qualified-name
"Return keyword K as a string, including its namespace, if any (unlike `name`).
(keyword->qualified-name :type/FK) -> \"type/FK\""
[k]
(when k
(s/replace (str k) #"^:" "")))
(defn lower-case
"Locale-agnostic version of `clojure.string/lower-case`.
`clojure.string/lower-case` uses the default locale in conversions, turning
`ID` into `ıd`, in the Turkish locale. This function always uses the
`Locale/US` locale."
[s]
(.. s toString (toLowerCase (Locale/US))))
| (ns toucan.util
"Utility functions used by other Toucan modules."
(:require [clojure.string :as s])
(:import java.util.Locale))
(defn keyword->qualified-name
"Return keyword K as a string, including its namespace, if any (unlike `name`).
(keyword->qualified-name :type/FK) -> \"type/FK\""
[k]
(when k
(s/replace (str k) #"^:" "")))
(defn lower-case
"Locale-agnostic version of `clojure.string/lower-case`.
`clojure.string/lower-case` uses the default locale in conversions, turning
`ID` into `ıd`, in the Turkish locale. This function always uses the
`Locale/US` locale."
[^CharSequence s]
(.. s toString (toLowerCase (Locale/US))))
|
Use new data format for sse data and translate them to clojure data | (ns funnel-front.actions.app-actions
(:use [funnel-front.lib.helpers :only [clog!]]
[funnel-front.stores.main-store :only [app-state]]))
(defn update-app-state [event]
(let [data (.parse js/JSON (.-data event))
queries (.-query_ids data)
body (.parse js/JSON (.-body data))]
(.log js/console data)
(swap! app-state
update-in
[:queries (keyword (first queries)) :items]
conj {:body body})))
| (ns funnel-front.actions.app-actions
(:use [funnel-front.lib.helpers :only [clog!]]
[funnel-front.stores.main-store :only [app-state]]))
(defn update-app-state [event]
(let [data (.parse js/JSON (.-data event))
queries (.-queries data)
body (.parse js/JSON (.-body data))]
(.log js/console data)
(.log js/console "first match :" (.-id (first queries)))
(swap! app-state
update-in
[:queries (keyword (.-id (first queries))) :items]
conj {:body (js->clj body)})
(.log js/console @app-state)
))
|
Move default port calculation to `go` fn | (ns comic-reader.system
(:require [clojure.tools.namespace.repl :refer [refresh]]
[comic-reader.server :as server]
[comic-reader.sites :as sites]
[com.stuartsierra.component :as component]
[environ.core :refer [env]]))
(defn comic-reader-system [config-options]
(let [{:keys [app port]} config-options]
(component/system-map
:site-scraper (sites/new-site-scraper)
:server (component/using
(server/new-server app port)
[:site-scraper]))))
(def system nil)
(defn init [config-options]
(alter-var-root #'system
(constantly (comic-reader-system config-options))))
(defn start []
(alter-var-root #'system component/start))
(defn stop []
(alter-var-root #'system
(fn [s] (when s (component/stop s)))))
(defn go [config-options]
(init config-options)
(start))
(defn reset []
(stop)
(refresh :after 'comic-reader.system/-main))
(defn -main [& [port]]
(let [port (Integer. (or port (env :port) 10555))]
(go {:app server/app
:port port})))
| (ns comic-reader.system
(:require [clojure.tools.namespace.repl :refer [refresh]]
[comic-reader.server :as server]
[comic-reader.sites :as sites]
[com.stuartsierra.component :as component]
[environ.core :refer [env]]))
(defn comic-reader-system [config-options]
(let [{:keys [app port]} config-options]
(component/system-map
:site-scraper (sites/new-site-scraper)
:server (component/using
(server/new-server app port)
[:site-scraper]))))
(def system nil)
(defn init [config-options]
(alter-var-root #'system
(constantly (comic-reader-system config-options))))
(defn start []
(alter-var-root #'system component/start))
(defn stop []
(alter-var-root #'system
(fn [s] (when s (component/stop s)))))
(defn go [& [port]]
(let [port (Integer. (or port (env :port) 10555))]
(init {:app server/app
:port port})
(start)))
(defn reset []
(stop)
(refresh :after 'comic-reader.system/go))
(defn -main [& args]
(apply go args))
|
Replace loop-recur with iterate in nth-prime | (ns nth-prime)
(defn sqrt
"Wrapper around java's sqrt method."
[number]
(int (Math/ceil (Math/sqrt number))))
(defn divides?
"Helper function to decide if a number is evenly divided by divisor."
[number divisor]
(zero? (mod number divisor)))
(defn- prime-by-trial-division?
"Simple trial division prime check."
[number]
(empty? (for [n (range 3 (inc (sqrt number)) 2) :when (divides? number n)] n)))
(defn prime? [number]
(cond
(= 2 number) true
(even? number) false
:else (prime-by-trial-division? number)))
(defn next-prime [start]
(loop [n (inc start)]
(if (prime? n)
n
(recur (inc n)))))
(defn nth-prime [index]
(when (not (pos? index))
(throw (IllegalArgumentException. "nth-prime expects a positive integer for an argument")))
(loop [cur-prime 2
num-times 1]
(if (= num-times index)
cur-prime
(recur (next-prime cur-prime) (inc num-times)))))
| (ns nth-prime)
(defn sqrt
"Wrapper around java's sqrt method."
[number]
(int (Math/ceil (Math/sqrt number))))
(defn divides?
"Helper function to decide if a number is evenly divided by divisor."
[number divisor]
(zero? (mod number divisor)))
(defn- prime-by-trial-division?
"Simple trial division prime check."
[number]
(empty? (for [n (range 3 (inc (sqrt number)) 2) :when (divides? number n)] n)))
(defn prime? [number]
(cond
(= 2 number) true
(even? number) false
:else (prime-by-trial-division? number)))
(defn next-prime [start]
(loop [n (inc start)]
(if (prime? n)
n
(recur (inc n)))))
(def primes (iterate next-prime 1))
(defn nth-prime [index]
(when (not (pos? index))
(throw (IllegalArgumentException. "nth-prime expects a positive integer for an argument")))
(nth primes index))
|
Add note about clj http implementation of http | (ns com.wsscode.pathom.diplomat.http.clj-http
(:require [clj-http.client :as client]
[com.wsscode.pathom.diplomat.http :as http]
[clojure.spec.alpha :as s]))
(defn request [req]
(s/assert ::http/request req)
(client/request req))
(s/fdef request
:args (s/cat :request ::http/request)
:ret ::http/response)
| (ns com.wsscode.pathom.diplomat.http.clj-http
(:require [clj-http.client :as client]
[com.wsscode.pathom.diplomat.http :as http]
[clojure.spec.alpha :as s]))
; TODO not working at this point, will be implemented later
(defn request [req]
(s/assert ::http/request req)
(client/request req))
(s/fdef request
:args (s/cat :request ::http/request)
:ret ::http/response)
|
Add clj support for path->ns | (ns adzerk.boot-cljs.util
(:require [clojure.java.io :as io]
[clojure.string :as string]))
(defn path->js
"Given a path to a CLJS namespace source file, returns the corresponding
Google Closure namespace name for goog.provide() or goog.require()."
[path]
(-> path
(string/replace #"\.clj[s|c]$" "")
(string/replace #"[/\\]" ".")))
(defn path->ns
"Given a path to a CLJS namespace source file, returns the corresponding
CLJS namespace name."
[path]
(-> (path->js path) (string/replace #"_" "-")))
(defn get-name
[path-or-file]
(-> path-or-file io/file .getName))
(defn path [& parts]
(.getPath (apply io/file parts)))
| (ns adzerk.boot-cljs.util
(:require [clojure.java.io :as io]
[clojure.string :as string]))
(defn path->js
"Given a path to a CLJS namespace source file, returns the corresponding
Google Closure namespace name for goog.provide() or goog.require()."
[path]
(-> path
(string/replace #"\.clj([s|c])?$" "")
(string/replace #"[/\\]" ".")))
(defn path->ns
"Given a path to a CLJS namespace source file, returns the corresponding
CLJS namespace name."
[path]
(-> (path->js path) (string/replace #"_" "-")))
(defn get-name
[path-or-file]
(-> path-or-file io/file .getName))
(defn path [& parts]
(.getPath (apply io/file parts)))
|
Update dropwizard to v0.8.2, bump minor version | (defproject dropwizard-clojure/dropwizard-clojure "0.1.1"
:description "Dropwizard for Clojure"
:url "https://github.com/stevensurgnier/dropwizard-clojure"
:license {:name "Apache License 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.3.1"]
[io.dropwizard/dropwizard-core "0.7.1"]]
:source-paths ["src/main/clojure"]
:test-paths ["src/test/clojure"]
:profiles {:uberjar {:aot :all}}
:global-vars {*warn-on-reflection* true})
| (defproject dropwizard-clojure/dropwizard-clojure "0.2.0"
:description "Dropwizard for Clojure"
:url "https://github.com/stevensurgnier/dropwizard-clojure"
:license {:name "Apache License 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.3.1"]
[io.dropwizard/dropwizard-core "0.8.2"]]
:source-paths ["src/main/clojure"]
:test-paths ["src/test/clojure"]
:profiles {:uberjar {:aot :all}}
:global-vars {*warn-on-reflection* true})
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.