phony 2.12.12 → 2.12.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0413986973e6c4d3f359a59ae739c43efc8ef2b5
4
- data.tar.gz: f0cb839c8fb1f6f718a713b01e8e9c0fbc66538a
3
+ metadata.gz: c670f516f90acf33d456bc169f72f6b13dbadc6f
4
+ data.tar.gz: 147c782d3f2d9541a25ada856e1613b747d5eae8
5
5
  SHA512:
6
- metadata.gz: e3a65f282d2feb6c846fad5b870c759e99ed60939b649326f96ced72b253e62223624c4f3d202c1466c5e871f4f2346295f1b31ce2f182d11d36d9c978b4e306
7
- data.tar.gz: 6ccbb11ac1c8590ffd4a47ef260eda590fe1c5524dfbb9e22b0be8c6a364683864b8cd09d139e5bc6ebb3a3bdc94f909d56dec7442c9e5cf648d25fff4b413ee
6
+ metadata.gz: 12b757a513dd15b85248df13d55fca1109c1875ac1685c3db27746eab522a244c13856b358ce1cdc6be6edbfe24762a4a716a2b426217412c2e0867d644e6568
7
+ data.tar.gz: df82d33575ec5e2fdde96fd8a2b1564df0f2a5d5388ea2a5fe9c96327650b774fffb53be23d01f6843aecf7d8dff9525379759398804e0db9b3bc7f2b4f73374
data/README.textile CHANGED
@@ -24,7 +24,7 @@ E164 numbers are international numbers with a country dial prefix, usually an ar
24
24
 
25
25
  Learn more about E164 numbers "here":http://en.wikipedia.org/wiki/E.164.
26
26
 
27
- Currently handles Abhas, Afghan, Algerian, Argentinan, Austrian, Australian, Azerbaijani, Belgian, Brazilian, Cambodian, Chilean, Chinese, Croatian, Cuban, Cypriot, Czech, Danish, Dutch, Egyptian, El Salvadorian, Estonian, French, German, Ghanan, Gibraltar, Greek, Haiti, Hong Kong, Hungarian, Indian, Iran, Irish, Israel, Italian, Kazakh, Lithuanian, Luxembourgian, Malaysian, Malta, Mexican, Monaco, Morocco, New Zealand, Nigerian, Norwegian, Peruvian, Polish, Romanian, Russian, Rwandan, Seychelles, Singapore, Slovakian, South African, South Korean, South Osetian, Spanish, Sri Lankan, Sudan, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, Venezuelan, and Vietnamese numbers.
27
+ Currently handles Abhas, Afghan, Algerian, Argentinan, Austrian, Australian, Azerbaijani, Belgian, Brazilian, Cambodian, Chilean, Chinese, Croatian, Cuban, Cypriot, Czech, Danish, Dutch, Egyptian, El Salvadorian, Estonian, French, German, Ghanan, Gibraltar, Greek, Haiti, Hong Kong, Hungarian, Indian, Iran, Irish, Israel, Italian, Kazakh, Liberian, Lithuanian, Luxembourgian, Malaysian, Malta, Mexican, Monaco, Morocco, New Zealand, Nigerian, Norwegian, Peruvian, Polish, Romanian, Russian, Rwandan, Seychelles, Singapore, Slovakian, South African, South Korean, South Osetian, Spanish, Sri Lankan, Sudan, Swedish, Swiss, Thailand, Tunisian, Turkish, Liechtenstein, UK, US, Venezuelan, Vietnamese, and Zambian numbers.
28
28
 
29
29
  And to some extent, all others. Just try if it works for you.
30
30
 
@@ -102,7 +102,7 @@ Always use it with a country code, as Phony needs it to know what country to nor
102
102
 
103
103
  h3(#formatting). Formatting
104
104
 
105
- Aliased as @Phony.formatted(number_string)@.
105
+ Aliased as @Phony.formatted(number_string)@.
106
106
 
107
107
  You really need to give it a normalized phone number WITH country code, so:
108
108
 
@@ -453,10 +453,10 @@ Phony.define do
453
453
  country '259', todo # -
454
454
 
455
455
  # Zambia
456
- # http://en.wikipedia.org/wiki/Telephone_numbers_in_Zambia
456
+ # http://www.wtng.info/wtng-260-zm.html
457
457
  country '260',
458
- match(/^(9[567])/) >> split(7) | # Mobile
459
- match(/^(21[1-8])/) >> split(6) # Geographic
458
+ match(/^(9(55|66|7[7-9]))/) >> split(6) | # mobile
459
+ match(/^(21[1-8])/) >> split(6) # fixed
460
460
 
461
461
  # Madagascar http://www.wtng.info/wtng-261-mg.html
462
462
  # http://www.itu.int/oth/T020200007F/en
@@ -964,6 +964,10 @@ describe 'plausibility' do
964
964
  '+967 7 234 567',
965
965
  '+967 77 123 4567',
966
966
  '+967 58 1234']
967
+ it 'is correct for Zambia' do
968
+ Phony.plausible?('+260 955 123456').should be_true # mobile
969
+ Phony.plausible?('+260 211 123456').should be_true # fixed
970
+ end
967
971
  it_is_correct_for 'Zimbabwe', :samples => [['+263 2582 123 456', '+263 2582 123'],
968
972
  ['+263 147 123 456', '+263 147 123'],
969
973
  ['+263 270 123 456', '+263 270 123 45'],
@@ -696,8 +696,8 @@ describe 'country descriptions' do
696
696
  it_splits '84412345678', ['84', '4', '1234', '5678'] # Hanoi
697
697
  end
698
698
  describe 'Zambia' do
699
- it_splits '260977640895', ['260', '97', '7640895'] # mobile
700
- it_splits '260211229049', ['260', '211', '229049'] # fixed
699
+ it_splits '260955123456', ['260', '955', '123456'] # mobile
700
+ it_splits '260211123456', ['260', '211', '123456'] # fixed
701
701
  end
702
702
  describe 'New Zealand' do
703
703
  it_splits '6491234567', ['64', '9', '123', '4567']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.12
4
+ version: 2.12.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-26 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national