infochimps-labs/ironfan — pull request #179 by mrflip (2012-09-30 10:03:15+00:00)
Title: Model cleanup, knife cluster bootstrap fix, integration specs.

* Specs for scripts (but not really) -- Tried to see if I could do specs for scripts without a mock mode for chef. It works-ish but I'd like to see if this is really the right approach.
- ironfan_go! spec helper loads the basic chef environment. Chef will as usual look for a .chef directory holding a knife.rb, etc -- if there's one in the repo root, it will be used.
- added a demo cluster, and a serialized version of its computers
- Fixed an error in Ironfan.load_cluster when using a string vs. a symbol to load

* Model cleanup -- So that I can load fixtures, made it so that models will accept the serialized versions of themselves. This involved overriding a couple receive_foo methods, fixing some types (eg provider takes a Class, not an Ironfan::Provider), and making sure that hash keys are symbolized.

* knife cluster bootstrap sets Chef::Config[:environment] (fixes #148) -- I can't see a way (or a need) for bootstrapping under multiple simultaneous environments. The bootstrap script runs one single command across all its machines; anything else would involve lots of code. The command will fail if you ask for an inconsistent script to be run, but now works correctly.