Fix Macro.camelize/1 for screaming snake case #5631

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
@devonestes
Contributor

devonestes commented Jan 8, 2017

It was pointed out that Macro.underscore/1 had some issues dealing
with screaming snake case, and in the comments for that issue
@eksperimental also noted that Macro.camelize/1 was buggy with
screaming snake case as well. I've dealt with the Macro.underscore/1
bug in a separate commit, but this commit handles the secondary bug.

Fix Macro.camelize/1 for screaming snake case
It was pointed out that `Macro.underscore/1` had some issues dealing
with screaming snake case, and in the comments for that issue
@eksperimental also noted that `Macro.camelize/1` was buggy with
screaming snake case as well. I've dealt with the `Macro.underscore/1`
bug in a separate commit, but this commit handles the secondary bug.
@kelvinst

LGTM!

@adkron

This comment has been minimized.

Show comment
Hide comment
@adkron

adkron Jan 16, 2017

Contributor

I just saw your PR. I diid #5662 on the exact same issue. I saw the comment in #5627, but since they weren't linked I went for it. We ended up with close to the same solution, but I was able to remove a few clauses. Should we merge the two?

Contributor

adkron commented Jan 16, 2017

I just saw your PR. I diid #5662 on the exact same issue. I saw the comment in #5627, but since they weren't linked I went for it. We ended up with close to the same solution, but I was able to remove a few clauses. Should we merge the two?

@josevalim

This comment has been minimized.

Show comment
Hide comment
@josevalim

josevalim Jan 18, 2017

Member

Thank you! I have merged #5662 since it also includes a refactoring.
❤️ 💚 💙 💛 💜

Member

josevalim commented Jan 18, 2017

Thank you! I have merged #5662 since it also includes a refactoring.
❤️ 💚 💙 💛 💜

@josevalim josevalim closed this Jan 18, 2017

@adkron

This comment has been minimized.

Show comment
Hide comment
@adkron

adkron Jan 18, 2017

Contributor

@devonestes, I wrote an article about the refactoring in case you would like to take a look. I wanted to thank you for the code you put in so I made sure to do that in the article too. Have a good day.
http://dirtyinformation.com/blog/2017/01/18/two_duplication_refactorings_in_elixir

Contributor

adkron commented Jan 18, 2017

@devonestes, I wrote an article about the refactoring in case you would like to take a look. I wanted to thank you for the code you put in so I made sure to do that in the article too. Have a good day.
http://dirtyinformation.com/blog/2017/01/18/two_duplication_refactorings_in_elixir

@devonestes

This comment has been minimized.

Show comment
Hide comment
@devonestes

devonestes Jan 19, 2017

Contributor

@adkron That was awful nice of you - thanks! And good refactoring, too!

Contributor

devonestes commented Jan 19, 2017

@adkron That was awful nice of you - thanks! And good refactoring, too!

@devonestes devonestes deleted the devonestes:Issue-5627-2 branch Jan 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment