Skip to content
Browse files

Update to the dynapath 0.2.0 api.

  • Loading branch information...
1 parent a4cb170 commit 2353b1f24cf359cd707015d7394e3fdec75c9363 @tobias tobias committed Nov 21, 2012
Showing with 5 additions and 12 deletions.
  1. +1 −1 project.clj
  2. +4 −11 src/bultitude/core.clj
View
2 project.clj
@@ -3,7 +3,7 @@
:description "A library for find Clojure namespaces on the classpath."
:url "https://github.com/Raynes/bultitude"
:dependencies [[org.clojure/clojure "1.4.0"]
- [dynapath "0.1.0"]]
+ [dynapath "0.2.0"]]
:aliases {"test-all" ["with-profile" "dev,default:dev,1.3,default:dev,1.2,default" "test"]}
:profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
:1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}})
View
15 src/bultitude/core.clj
@@ -1,7 +1,7 @@
(ns bultitude.core
(:require [clojure.java.io :as io]
[clojure.string :as string]
- [dynapath.core :as dp])
+ [dynapath.util :as dp])
(:import (java.util.jar JarFile)
(java.util.zip ZipException)
(java.io File BufferedReader PushbackReader InputStreamReader)
@@ -62,21 +62,14 @@
(.split classpath (System/getProperty "path.separator")))
(defn loader-classpath
- "Returns a sequence of File paths from a classloader."
+ "Returns a sequence of File objects from a classloader."
[loader]
- (when (dp/readable-classpath? loader)
- (map io/as-file (dp/classpath-urls loader))))
+ (map io/as-file (dp/classpath-urls loader)))
(defn classpath-files
"Returns a sequence of File objects of the elements on the classpath."
([classloader]
- (distinct
- (mapcat
- loader-classpath
- (reverse
- (take-while
- identity
- (iterate #(.getParent %) classloader))))))
+ (map io/as-file (dp/all-classpath-urls classloader)))
([] (classpath-files (clojure.lang.RT/baseLoader))))
(defn- classpath->collection [classpath]

0 comments on commit 2353b1f

Please sign in to comment.
Something went wrong with that request. Please try again.