sattvik/leinjacker — pull request #6 by dgrnbrg (2012-10-06 21:37:34+00:00)
Title: Fixed bug in hook-eval-in-project and added project map merging

I found a bug in the way I was passing arguments through the eval-in-project, so that it would fail if you depended on the init arguments being passed successfully. (previously, I had no such requirement). This is now fixed.

Secondly, I added a leiningen-agnostic way to merge project maps. Unfortunately, in lein2, you cannot simple `conj` a new dependency onto the project map, because when a task gets called, leiningen will unmerge and remerge the profiles, obliterating the change the the `:dependencies`. In order to support merging in new dependencies and other keys to the project map, you must use `add-profile` and `merge-profile`. On the other hand, lein1 has no knowledge of any of this, and provides no way to recursively sanely merge projects. I've added a function that provides recursive project merging for lein1 and lein2. This is useful for higher-order tasks, like ztellman/sleight and dgrnbrg/guzheng, which I'm updating with this new functionality so that they'll be cross-leiningen compatible.