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 support for phone numbers with extensions #138

Merged
merged 5 commits into from
Apr 21, 2016

Conversation

jerryclinesmith
Copy link
Contributor

Requested in issue #57 and #78, this pull request adds support for phone numbers with extensions.

Leveraging some code from the "phone" gem, I'm basically extracting the extension, running the normal code using Phony, then adding the extension back at the end.

"+31 (0)30 1234 123 x999".phony_normalized # => '31301234123 x999'
"+31 (0)30 1234 123 ext999".phony_normalized # => '31301234123 x999'
"+31 (0)30 1234 123 #999".phony_normalized # => '31301234123 x999'

I think there could be more options around formatting, but wanted to gauge interest in accepting the changes first.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.76% when pulling 9e69742 on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.76% when pulling 42968fa on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.76% when pulling 4442e8e on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.762% when pulling 08e7445 on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.762% when pulling 6f27842 on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b442c72 on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ada7e6e on jerryclinesmith:extension-support into cfb90f5 on joost:master.

@joost
Copy link
Owner

joost commented Apr 19, 2016

Seems supernice also. Also here.. we should add your pull request text to the README.

Update documentation for extension support
@jerryclinesmith
Copy link
Contributor Author

Comments added, glad to see it pulled in! Thanks

@joost
Copy link
Owner

joost commented Apr 21, 2016

Sorry, your other PR introduced some conflicts :| :)

# Conflicts:
#	lib/phony_rails.rb
@jerryclinesmith
Copy link
Contributor Author

Should be fixed now...

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a3da999 on jerryclinesmith:extension-support into 337f886 on joost:master.

@joost joost merged commit d34c4fc into joost:master Apr 21, 2016
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.

3 participants