joelabrahamsson/Page-Type-Builder — pull request #11 by cjberg (2011-12-18 00:38:17+00:00)
Title: Non-public property support for property settings synchronization (2nd try)

This is an updated pull-request (in a new branch) for enabling property settings synchronization to work with non-public page properties, e.g., a protected property only used by the infrastructure in a base class (my use case). While it does support non-public properties now, the settings updater would still not crash in case it cannot find a property for some other reason. No exceptions are thrown, instead favoring to continue silently. I did however leave some commented code for throwing an exception, just in case a fail-fast developer mode should be introduced (just delete it if it’s not on the roadmap).

Instead of unit tests, the specifications were updated to verify and catch the non-public case as well. I tried to avoid code duplication by reusing the same behaviors for both the public and non-public cases.

I also made small improvements to the code in general, but put each of those in separate commits. It should be easy to review each commit, and should you disagree with any of them, just cherry-pick the ones you like.

Please tell me if I need to improve something. All tests and specs pass, of course.