- hanke: Fix for Reunion and Mayotte numbers (Thanks, see #163).
- hanke: Fix for Kiwi numbers (Thanks, see #162).
- hanke: Fix for Indonesian numbers (Thanks, see #161).
- hanke: Fix for Indonesian numbers (Thanks, see #160).
- hanke: Fix for Jakarta numbers (Thanks, see #159).
- hanke: Fix for Spanish numbers (Thanks, see #158).
- hanke: Fix for German numbers (Thanks, see #156).
- hanke: Fix for German numbers (Thanks, see #154).
- hanke: Best effort in case of invalid Italy number (Thanks, see #152).
- hanke: Fixed trunk code replacement (Thanks, see #151).
- hanke: Improvements for Aruba (Thanks @weppos, see #141).
- hanke: Improvements for Austria.
- hanke: Fix for Austria’s 663 numbers (Thanks @weppos, see #139).
- hanke: Countries cannot normalize full numbers anymore. So `Phony[“81”].normalize(“+81 80 1234 5634”).should == ‘818012345634’` will not work anymore. Instead `Phony[“81”].normalize(“80 1234 5678”)` will result in `‘80 1234 5634’`, so can only be used to normalize that country’s national numbers.
- hanke: Fixes for Italy (Thanks @weppos, see #138).
- hanke: Fixes for the Netherlands (Thanks @aeden, see #135).
- hanke: Updates for Brazil and Serbia (see #129 and #132).
- hanke: Fix Belgian numbers (closes #130).
- hanke: Fix for case where number already had a country code:
jp = Phony["81"]; p jp.normalize "+81 80 1234 5634" # => "818012345634"
- hanke: Experimental syntax suggested in #104 added. E.g.
jp = Phony["81"]; p jp.normalize "08012345678" # => "818012345678"
- hanke: Improve Italian numbers.
- hanke: Improve German numbers.
- hanke: Moved trunk codes to where they belong. Handle “(0)” in numbers.
- hanke: Many improvements and API changes.
- hanke: Fixes an issue with eg. Phony#normalize(“+972”) returning not just “972”, but Phony internals (thanks @taf2)!
- hanke: Indonesia (thanks @rjhaveri)!
- hanke: Zambia and mobile numbers for Kenya (thanks @rjhaveri)!
- hanke: Fixes Brazil (thanks @knorrium)!
- hanke: Fixes Estonia (thanks @kritik)!
- hanke: Rwanda (thanks @rjhaveri)!
- hanke: Cambodia (thanks @dwilkie)!
- jcfischer: Gibraltar, Malta, Cyprus, Estonia, Monaco
- hanke: Morocco & Sudan (thanks @jcfischer)!
- hanke: Countries are now plausibility checked less harshly.
- hanke: Luxembourg & Nigeria (thanks @jcfischer)!
- hanke: Many improvements to UK numbers (thanks @g1smd)!
- hanke: More improvements to UK numbers.
- hanke: Many improvements to UK numbers (thanks @g1smd)!
- hanke: Closes floere#53. Countries who don’t have NDCs are now also plausible.
- hanke: Russia, added catchall in last rule and group in regexp.
- hanke: Russia, Kazakhstan, Abhasia and South Osetia (thanks glebm)!
- hanke: Fix for issue #47. If a number contains a rest (CC + NDC + rest) size that is in the range of
1..2
, it is not considered plausible (ie.plausible?
will returnfalse
).
- hanke: Fix for issue #45. Irish phone numbers with unrecognized NDCs are now formatted better when using
:national
formatting (thanks theirishpenguin!).
- hanke: Fix for issue #44.
Phony.plausible?('353')
now returns false (on any number, if the NDC is missing, thanks theirishpenguin!).
- hanke: Fix for issue #42.
CountryCodes#clean
is not destructive anymore, whileCountryCodes#clean!
is.
- hanke: Polish number support much improved (thanks filiptepper!).
- hanke: Specifiable whether a zero is added in front of the NDC when formatting with format
:national
. Example: The US adds none, while Vietnam or Switzerland have one. - hanke: Internal #split method is now more consistent. If there is no NDC, it will return nil. Also, it will return a
"0"
in front of the NDC if a country needs that prefix, andnil
if not.
- hanke: Vietnam! (Closes issue #39)
- hanke: Improvements to the experimental
plausible?(number, hints = {})
feature. It is now possible to give the hintscc
andndc
a regexp, as inPhony.plausible?("1-434-123-1234", cc: /1|7/, ndc: /4(34|35)/)
.
- hanke: Experimental
plausible?
feature. Checks if the given number is a plausible number. Returnsfalse
if 100% not plausible,true
if probably true.
- hanke: Ghana (thanks jschwertfeger!).
- hanke: Fix for Ireland’s VoIP numbers.
- hanke: Ireland, thanks to stevenyan! (Closes pull request #36)
- hanke: Closes floere#32, normalizing numbers with a double zero at the beginning. Aka the “James Bond” release.
- hanke: Phony’s API is now much more lenient by always rendering 10 more numbers. If
split(3, 4)
is defined in the DSL, it actually behaves as ifsplit(3, 4 + 10)
was defined, allowing for irregularities in a country’s scheme that Phony did not cover yet. - hanke: The above change also allows for call-through numbers into offices etc.
- hanke: Fix for argentine republic’s numbers (with input by vilcsak, thanks!).
- hanke: Fix for korean service codes incorrectly formatting korean mobile numbers (by vilcsak, thanks!).
- hanke: Raises when nil is handed into
#normalize
,#split
, or#format
– to fail fast and hard. Please handle e.g. usingnumber && Phony.normalize(number)
, ornumber && Phony.format(number)
.
- hanke: Fix for digits being cut off at the end of a greek mobile number (by vilcsak, thanks!).
- hanke: Singapore, Thailand.
- hanke: Fix for digits being cut off at the end of a number (by mrchucho, thanks!).
- hanke: Exposing
Phony::CountryCodes.instance.international_absolute_format
,Phony::CountryCodes.instance.international_relative_format
,Phony::CountryCodes.instance.national_format
(writer & reader) so people can set their special ndc formats. Especially if they use Phony for just one country. (Thanks sarwagya for the inspiration!)
- hanke: Moved
lib/countries.rb
→lib/phony/countries.rb
(Thanks trans!).
- hanke: Changed
Phony.formatted
toPhony.format
. The old method can still be used. (Thanks trans!)
- hanke: Lithuania. Croatia.
- hanke: Slovakia.
- hanke: Australia.
- hanke: Fix. In certain cases, the Phony DSL clashed with existing DSLs.
- hanke: Finland.
- hanke: Easy DSL for defining countries (easier for you to improve phony :) ).
- hanke: Mexico.
- hanke: Cuba.
- hanke: Tunisia.
- hanke: Denmark, Norway. Skøl!
- hanke: The UK. Thanks yet again to kbingman! (Closes pull request 16)
- hanke: Clashing mobile numbers with Liège in Belgium fixed.
- hanke: Fix by glebm, thanks! Italian number handling did produce errors in Ruby 1.8. Closes issue 13.
- hanke: Italian numbers are correctly normalized: Phony.normalize(‘+390909709511’).should == ‘390909709511’ (Zero in front of area code is not removed, closes issue 12)
- hanke: Italy.
- hanke: Portugal. Polish landline (not mobile).
- hanke: Malaysia.
- hanke: South Korea.
- hanke: China.
- hanke: Turkey.
- hanke: Removed dependency on active support.
- hanke: Made the gem substantially smaller.
- hanke: Adds german 5-digits code formatting (Thanks ledermann!).
- hanke: Afghanistan. Venezuela.
- hanke: German 180, 181 numbers (Thanks kbingman and jcfischer!).
- hanke: Peru. Brasil. Chile.
- hanke: Romania.
- hanke: Sweden. Russia.
- hanke: The Netherlands (Thanks alloy and manfred!).
- hanke: German IVPNs. Poland. Greece. Egypt. Italy. Vanity number handling. Austria. Lots of code structure.
- hanke: Descriptions and dependencies changed.
- hanke: First release! Lots of countries.