Skip to content

Commit

Permalink
Merge remote branch 'JulianBirch/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Jan 29, 2012
2 parents b54469d + 7f58cbc commit 2f73e7d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion leiningen-core/src/leiningen/core/project.clj 100644 → 100755
Expand Up @@ -90,7 +90,13 @@
(defn- profile-key-merge
"Merge profile values into the project map based on their type."
[key result latter]
(cond (= :dependencies key)
(cond (-> result meta :displace)
latter

(-> latter meta :replace)
latter

(= :dependencies key)
(merge-dependencies result latter)

(= :repositories key)
Expand Down
12 changes: 11 additions & 1 deletion leiningen-core/test/leiningen/core/test/project.clj 100644 → 100755
Expand Up @@ -59,4 +59,14 @@
(-> {:resources-path ["resources"]
:profiles {:blue {:resources-path ["blue-resources"]}}}
(merge-profiles [:qa :tes :blue])
:resources-path)))))
:resources-path)))
(is (= ["/etc/myapp" "test/hi" "blue-resources"]
(-> {:resources-path ^:displace ["resources"]
:profiles {:blue {:resources-path ["blue-resources"]}}}
(merge-profiles [:qa :tes :blue])
:resources-path)))
(is (= ["replaced"]
(-> {:resources-path ["resources"]
:profiles {:blue {:resources-path ^:replace ["replaced"]}}}
(merge-profiles [:blue :qa :tes ])
:resources-path)))))

0 comments on commit 2f73e7d

Please sign in to comment.