datasift/storyplayer — pull request #78 by stuartherbert (2013-10-15 22:38:57+00:00)
Title: New: support for restricting environments that stories can run against

This PR adds an important safety feature - the ability to restrict which environments a story can run against. (Issue #64)

* The default behaviour is that all stories can run against all environments. This preserves backwards compatibility, and makes it quick and easy to get into using Storyplayer in the first case.
* If an environment's config sets 'mustBeWhitelisted' to TRUE, then a story must call $story->runsOn(), otherwise the story will not be allowed to run.

This allows us to mark our production environment as an 'opt-in' environment; so that we can stop tests that do things like deleting all users running against that environment :)