phony 1.6.3 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  h1. Phony
2
2
 
3
- Used in e.g.: "airbnb.com":http://airbnb.com, "restorm.com":http://restorm.com, "socialcam.com":http://socialcam.com (and many, many others).
3
+ Used in e.g.: "airbnb.com":http://airbnb.com, "restorm.com":http://restorm.com, "socialcam.com":http://socialcam.com, "zendesk.com":http://www.zendesk.com/ (and many, many others).
4
4
 
5
5
  h2. Description
6
6
 
@@ -9,7 +9,7 @@ This gem can normalize, format and split E164 numbers.
9
9
 
10
10
  The (admittedly crazy) *goal* of this Gem is to be able to format/split all phone numbers in the world.
11
11
 
12
- Currently handles Afghan, Algerian, Austrian, Australian, Belgian, Brazilian, Chilean, Chinese, Croatian, Cuban, Czech, Danish, Dutch, Egyptian, French, German, Greek, Hungarian, Italian, Lithuanian, Malaysian, Mexican, (The) Netherlands, New Zealand, Norwegian, Peruvian, Polish, Russian, Romanian, Singapore, Slovakian, South African, South Korean, Spanish, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, and Venezuelan numbers.
12
+ Currently handles Afghan, Algerian, Austrian, Australian, Belgian, Brazilian, Chilean, Chinese, Croatian, Cuban, Czech, Danish, Dutch, Egyptian, French, German, Greek, Hungarian, Italian, Ireland, Lithuanian, Malaysian, Mexican, (The) Netherlands, New Zealand, Norwegian, Peruvian, Polish, Russian, Romanian, Singapore, Slovakian, South African, South Korean, Spanish, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, and Venezuelan numbers.
13
13
  And to some extent, all others. Just try if it works for you.
14
14
 
15
15
  If it doesn't, please "enter an issue":http://github.com/floere/phony/issues.
@@ -31,7 +31,6 @@ ndcs_with_5_subscriber_digits = [
31
31
  '67', # Nenagh
32
32
  '68', # Listowel
33
33
  '69', # Newcastle West
34
- '76', # VoIP
35
34
  '93', # Tuam
36
35
  ('94'..'99').to_a # Castlebar, Castlerea, Claremorris, Clifden, Ballina, Belmullet, Westport, Kilronan
37
36
  ].flatten
@@ -57,6 +56,7 @@ ndcs_with_7_subscriber_digits = [
57
56
  '66', # Tralee, Dingle, Killorglin, Cahirciveen
58
57
  '71', # Sligo, Manorhamilton, Carrick-on-Shannon
59
58
  '74', # Donegal, Letterkenny, Dungloe, Buncrana
59
+ '76', # VoIP
60
60
  '90', # Athlone, Ballinasloe, Portumna, Roscommon
61
61
  '94' # Ballinrobe
62
62
  ]
@@ -112,11 +112,11 @@ describe 'country descriptions' do
112
112
  Phony.split('3545511234').should == ['354', '551', '1234'] # Reykjavík
113
113
  end
114
114
  it 'handles irish numbers' do
115
- Phony.split('35311234567').should == ['353', '1', '123', '4567'] # Dublin, 7 digit subscriber #
116
- Phony.split('3532212345').should == ['353', '22', '12345'] # Mallow, 5 digit subscriber #
117
- Phony.split('35345123456').should == ['353', '45', '123456'] # Naas, 6 digit subscriber #
115
+ Phony.split('35311234567').should == ['353', '1', '123', '4567'] # Dublin, 7 digit subscriber #
116
+ Phony.split('3532212345').should == ['353', '22', '12345'] # Mallow, 5 digit subscriber #
117
+ Phony.split('35345123456').should == ['353', '45', '123456'] # Naas, 6 digit subscriber #
118
118
  Phony.split('353801234567').should == ['353', '80', '123', '4567'] # Mobile
119
- Phony.split('3537612345').should == ['353', '76', '12345'] # VoIP
119
+ Phony.split('353761234567').should == ['353', '76', '123', '4567'] # VoIP
120
120
  Phony.split('353800123456').should == ['353', '800', '123456'] # Freefone
121
121
  Phony.split('353000123456').should == ['353', '000123456'] # No NDC/local split for unrecognized
122
122
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: