Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ufalan committed Aug 26, 2015
1 parent 9e8dc65 commit e1bf1fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
9 changes: 3 additions & 6 deletions build.boot
@@ -1,13 +1,11 @@
(set-env!
:dependencies '[[org.clojure/clojure "1.6.0" :scope "provided"]
[boot/core "2.0.0-rc4" :scope "provided"]
[adzerk/bootlaces "0.1.8" :scope "test"]]
:dependencies '[[adzerk/bootlaces "0.1.12" :scope "test"]]
:source-paths #{"src"})

(require '[adzerk.bootlaces :refer :all]
'[alandipert.boot-trinkets :refer [run]])

(def +version+ "1.0.1")
(def +version+ "2.0.0")

(bootlaces! +version+)

Expand All @@ -17,5 +15,4 @@
:description "Alan's odd collection of boot tasks and utilities"
:url "https://github.com/alandipert/boot-trinkets"
:scm {:url "https://github.com/alandipert/boot-trinkets"}
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}})
:license {"Eclipse Public License" "http://www.eclipse.org/legal/epl-v10.html"}})
17 changes: 2 additions & 15 deletions src/alandipert/boot_trinkets.clj
Expand Up @@ -5,21 +5,8 @@
[boot.util :as util]
[clojure.java.io :as io]))

(defmacro without-exiting
"Evaluates body in a context where System/exit doesn't work.
Returns result of evaluating body, or nil if code in body attempted to exit."
[& body]
`(let [old-sm# (System/getSecurityManager)
new-sm# (proxy [SecurityManager] []
(checkPermission [p#])
(checkExit [s#] (throw (SecurityException.))))]
(System/setSecurityManager ^SecurityManager new-sm#)
(try ~@body
(catch SecurityException e#)
(finally (System/setSecurityManager old-sm#)))))

(defn copy [tf dir]
(let [f (core/tmpfile tf)]
(let [f (core/tmp-file tf)]
(io/copy f (doto (io/file dir (:path tf)) io/make-parents))))

(defn run-main
Expand All @@ -34,7 +21,7 @@
"Add classes to a pod and run a main method."
[m main CLASSNAME sym "The main class"
a args ARGUMENTS [str] "String arguments to pass to the main class's main method"]
(let [classdir (core/temp-dir!)
(let [classdir (core/tmp-dir!)
runners (pod/pod-pool (core/get-env))]
(core/with-pre-wrap fileset
(let [class-files (->> fileset
Expand Down

0 comments on commit e1bf1fa

Please sign in to comment.