Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More tidyup and use of c.c.duck-stream

  • Loading branch information...
commit 50357bb16ab8e3a149313e999351d089261808b9 1 parent 6556148
@purcell purcell authored Licenser committed
Showing with 5 additions and 7 deletions.
  1. +3 −3 src/leiningen/search.clj
  2. +2 −4 src/leiningen/update.clj
View
6 src/leiningen/search.clj
@@ -11,9 +11,9 @@
(defn search-clojar [what]
(let [p (re-pattern what)]
- (doall (filter
+ (doall (filter
(fn [{description :description artifact-id :artifact-id group-id :group-id}]
- (or
+ (or
(re-find p (or description ""))
(re-find p artifact-id)
(re-find p group-id)))
@@ -32,7 +32,7 @@
what (if show-versions (first args) what)]
(if (.exists (File. (str *lein-dir* "/clojars")))
(let [m (search-clojar what)]
- (println (str "Results for " what ":"))
+ (println "Results for " what ":")
(if show-versions
(println (str-join "\n" (map (fn [{versions :versions artifact-id :artifact-id group-id :group-id}] (str (artifact-name group-id artifact-id) ": " (str-join ", " versions))) m)))
(println (str-join "\n" (map (fn [{description :description artifact-id :artifact-id group-id :group-id}] (format "%-40s - %s" (artifact-name group-id artifact-id) (re-sub #"\n\s*" " " (or description "No description given")))) m)))))
View
6 src/leiningen/update.clj
@@ -46,7 +46,5 @@
updated-project (->> (read-clj project-clj-path)
(maybe-add-updates :dependencies)
(maybe-add-updates :dev-dependencies))]
- (with-open [o (writer project-clj-path)]
- (binding [*out* o]
- (pr updated-project)))))
-
+ (with-out-writer project-clj-path
+ (pr updated-project))))
Please sign in to comment.
Something went wrong with that request. Please try again.