travis-ci/travis-core — pull request #315 by svenfuchs (2013-12-23 03:03:24+00:00)
Title: Refactor build config

@BanzaiMan I "needed" to do some Ruby ...

While we were trying to hunt down the `:os` in/exclusion bug the other day I felt somewhat embarrassed about how hard is to understand this part of our codebase.

I've tried to centralize logic that

* normalizes `build.config`
* obfuscates `build.config`
* normalizes/expands the build matrix config (job configs)

Doing so I've found a few odd things, and hopefully already made things more clear/comprehensible.

This is still work in progress, as so far I haven't changed much of the behaviour. As I said on the channel, I'd very much vote for normalizing unknown/unallowed keys in `build.config` in one go (and doing so, maybe also adding "notes" for the user as discussed in the issue, like "You specified :rvm, but your language is Scala, so we ignored this key", dunno.)

I do think this branch should be usable though, and an improvement over what we have now. Tests pass except for two tests that check for the number of queries run during API payload generation (I have no idea why these are affected at all, @drogus could you have a look maybe?).

Feel free to ignore all of this, or cherry-pick from it if that works.