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

Make Configurator.FormatterFactories public #150

Closed
hazzik opened this issue Apr 9, 2014 · 5 comments
Closed

Make Configurator.FormatterFactories public #150

hazzik opened this issue Apr 9, 2014 · 5 comments

Comments

@hazzik
Copy link
Member

hazzik commented Apr 9, 2014

I suggest to make Configurator.FormatterFactories public or add methods to add and remove factories from configuration. It can be useful if someone wants to use custom formatter which is, for example, not ready to be included to a library, etc.

@MehdiK
Copy link
Member

MehdiK commented Apr 10, 2014

Good idea. This is rather related to localisation suggestion in #105.

@MehdiK
Copy link
Member

MehdiK commented Apr 17, 2014

Some more thoughts:

  • Why is FormatterFactories in Configurator but ConverterFactories and OrdinalizerFactories in their own classes? I get the Formatters are used from a few places while others are used from one extension only; but I think we should move these along with their resolution logic to Configurator too. Which leads me to:
  • We need to make all factories public.

I think we should tackle this whole thing in one hit.

THoughts?

@justin-edwards
Copy link
Contributor

I'd agree, adding / removing formatters, ordinalizers, and converters is definitely configuration so it makes sense to expose that all through Configurator.

It seems like the next thing to handle with these would be #218 and making the factories lazy by default. I'll see if I can spend a little time this evening and get a nice solution that'll take care of both issues one go without cluttering up Configurator too much.

@MehdiK
Copy link
Member

MehdiK commented Apr 17, 2014

Thanks @justin-edwards

justin-edwards added a commit to justin-edwards/Humanizer that referenced this issue Apr 20, 2014
justin-edwards added a commit to justin-edwards/Humanizer that referenced this issue Apr 23, 2014
justin-edwards added a commit to justin-edwards/Humanizer that referenced this issue Apr 23, 2014
@MehdiK
Copy link
Member

MehdiK commented Apr 27, 2014

Fixed in #243

@MehdiK MehdiK closed this as completed Apr 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants