- 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.