isotoma/yaybu — pull request #96 by Jc2k (2012-10-27 22:16:44+00:00)
Title: Refactor handling of yaybu arguments and yay config

This is the one of the first units of refactoring.

It:

* creates a new subclass of `yay.config.Config` which has all the logic for loading defaults.
* moves a lot of config setup code to `yaybu/core/config.py`
* picks up the searchpath from a context object
* wraps `Config.load_uri` and `Config.add` so that they raise Yaybu errors
* Adds both `Config.set_arguments` and `Config.set_arguments_from_argv`
* moves the YaybuArg code to `yaybu/core/config.py`
* makes YaybuArgParsingError a proper Yaybu exception (this should mean the cmdline prints nice stderr messages on problems, alas commands.py doesn't do this uniformly yet)

And in order to test this change, I tidied up `yaybu apply` and `yaybu push` a little (fixing things like validation) and added command line arguments to them.