Permalink
Browse files

Normalize :repositories values into map. This fixes search task.

  • Loading branch information...
technomancy committed Dec 3, 2011
1 parent e0e0fe2 commit 2c4fdac5e1cbd03761e4f0f817a7353819cedc1b
Showing with 10 additions and 8 deletions.
  1. +4 −3 leiningen-core/src/leiningen/core/project.clj
  2. +1 −1 src/leiningen/test.clj
  3. +2 −1 test/leiningen/test/search.clj
  4. +3 −3 todo.org
@@ -32,10 +32,11 @@
"Public only for macroexpansion purposes, :repositories needs special
casing logic for merging default values with user-provided ones."
[{:keys [omit-default-repositories repositories] :as
- project}]
+ project}]
(assoc project :repositories
- (concat repositories (if-not omit-default-repositories
- (:repositories defaults)))))
+ (for [[id repo] (concat repositories (if-not omit-default-repositories
+ (:repositories defaults)))]
+ [id (if (string? repo) {:url repo} repo)])))
(defmacro defproject
"The project.clj file must either def a project map or call this macro."
View
@@ -6,7 +6,7 @@
[leiningen.core.eval :as eval])
(:import (java.io File)))
-(def ^{:dynamic true} *exit-after-tests* true)
+(def ^:dynamic *exit-after-tests* true)
(defn- form-for-hook-selectors [selectors]
`(when (seq ~selectors)
@@ -4,7 +4,8 @@
[leiningen.search]))
(deftest test-searchy
- (binding [remote-index-url (constantly (io/resource "test/sample-index.zip"))]
+ (with-redefs [remote-index-url (constantly
+ (io/resource "test/sample-index.zip"))]
(ensure-fresh-index ["test" {:url "http://example.com/repo"}])
(is (= #{"segments.gen" "_0.cfx" "timestamp" "_0.cfs" "segments_2"}
(set (.list (index-location "http://example.com/repo")))))
View
@@ -40,9 +40,9 @@ See also https://github.com/technomancy/leiningen/issues
- [ ] pom (steal from depot)
- [ ] repl (figure out nrepl integration)
- [ ] retest
- - [ ] run
- - [ ] search
- - [ ] test
+ - [X] run
+ - [X] search
+ - [X] test
- [ ] trampoline
- [ ] uberjar
* For 1.6.2

0 comments on commit 2c4fdac

Please sign in to comment.