Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to completely override the handler and event namespace. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

benbp
Copy link

@benbp benbp commented Sep 26, 2014

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.

@ifandelse
Copy link
Owner

@benbp thanks so much for submitting this - I will definitely look over it and ping you with any questions. Bear with me - been a busy (but awesome) time on my end lately, so I'm a bit behind on PR stuff overall.

@benbp
Copy link
Author

benbp commented Sep 29, 2014

Thanks @ifandelse, appreciate the response. No worries about the busyness, and please let me know if there's anything else I can do to take work off your hands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants