joelabrahamsson/Page-Type-Builder — pull request #15 by cjberg (2012-03-30 11:17:39+00:00)
Title: Support for disabling page type synchronization through a file

I've added support for disabling page type synchronization through the existence of a file. The file is configured through a new attribute in PTB's configuration section: disablePageTypeUpdationFile.

It's useful in e.g. an EPiServer Enterprise scenario, where multiple sites share the same code and database. Only the first web site needs to synchronize page types, and once that's been done, the deploy script can create a file to prevent further synchronization.

One could of course have achieved the same thing by using configSource to put the Page Type Builder configuration section in a separate file, and then change the original attribute (a separate file is important for not restarting the already started first site, like you would by changing web.config). I just felt this alternative method was better because:

* source-control versioned files needn't be changed, and
* it was a little bit easier to implement in our deployment scripts.

While I was at it, I also introduced disablePageTypeSync and disablePageTypeSyncFile as *synonyms* of the Updation attributes, since I can't seem to remember "Updation" whenever I need it.

I added to already existing unit tests, instead of writing new specs. IMHO, low-level stuff like this is better expressed using unit tests anyway. It’s also *fully backward compatible*.