Fixed now. boisv...@smudge:~/svn/buildr-trunk$ svn commit -m "filter.using(hash) now correctly substitutes mappings with boolean 'false' value" Sending lib/buildr/core/filter.rb Sending spec/core/common_spec.rb Transmitting file data .. Committed revision 926463.
Thanks for reporting! alex On Mon, Mar 22, 2010 at 5:45 PM, Derrick Schneider < [email protected]> wrote: > Hey all, > > I noticed a non-obvious issue with buildr that may be worth mentioning in > the docs. > > I had a profiles.yaml set up as follows: > > development: > enableDailyValueSetter: false > > alpha: > enableDailyValueSetter: true > > The idea being that I want a cron job to run on our development server but > not on individual development boxes. (Otherwise the values get set twice if > a developer leaves his/her machine running overnight, and it's not > idempotent.) > > Then I used buildr as documented: > resources.filter.using :enableDailyValueSetter=> > Buildr.settings.profile['enableDailyValueSetter'] > > That did not cause any change. It took a while to figure out the issue, but > I solved it by using > resources.filter.using :enableDailyValueSetter=> > Buildr.settings.profile['enableDailyValueSetter'].to_s > > My guess is that somewhere in the system, a piece of code says "if > (profileValue) do filter" and of course the "false" was getting evaluated > as > boolean false. > > I don't think that's incorrect behavior, but it might be worth mentioning > in > the docs. > > Derrick > > -- > Writer. Programmer. Puzzle Designer. > http://www.obsessionwithfood.com >
