ifandelse/machina.postal — pull request #5 by benbp (2014-09-26 22:21:33+00:00)
Title: Add option to completely override the handler and event namespace.

This PR adds the option to specify a handlerNamespace or eventNamespace attribute, rather than having the eventNamespace be automatically prefixed with fsm.namespace.

In my specific use case of machina.postal, I need the handler and event namespaces to be individually overridable, because I do not know what the handler namespace of a given FSM will be in advance, but I do need to have the event namespace be constant. I imagine this addition might be useful for others as well for this reason. I could have used a regex postal listener, but would rather not.

I have added FSM.handlerNamespace here in addition to FSM.eventNamespace, which I acknowledge is redundant with FSM.namespace, because I thought it would be clearer naming-wise to be able to declare FSM.handlerNamespace and FSM.eventNamespace rather than just FSM.namespace and FSM.eventNamespace. It is still compatible with using FSM.namespace in the default way, regardless, as there are no breaking changes.