phony 2.12.2 → 2.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f6a1fa98b7fc4672a3cedca8d22087f59347ac9
4
- data.tar.gz: 13929f98e7dd3cb0fbab58a6a9e2acbf683184e3
3
+ metadata.gz: 04a5f58c6b6d201bb3e281ca88fe53c2a95bbeff
4
+ data.tar.gz: 1327cdf00c24dac5dd9f1e9f7affa8f887c58efe
5
5
  SHA512:
6
- metadata.gz: 7404bff377c5d9da19f35f3c56b4a910ad77215004b4c3715595c39a172e3802fd96446699b537e7b9d1e4c4dfacad865e65342f98b005dcc4816c5a21d7ec64
7
- data.tar.gz: b0e148e4e443d0bebc19a048f23da64af7dc1465dfb24a9d2e3c114581528450b0655b27af6f8926088d158ecc4ded02eb073b8dcda7aef032cbc9e8460089cd
6
+ metadata.gz: 772f84fc0f5c6d2d3d21c23f38f6e020ce2a0abb3077b518c99493886b4ccf85aa7706b761e24497eb9e6377ed0e29126b9e9fcb4248fcb344d5e956f2b63325
7
+ data.tar.gz: b7831d7dccc0d103b11965386f76e7c1ab9496380f778c1dc38c81d2850c8edc7b216c701ea471bd6b05af779efc8dc6c72f72d384ceeda8c2e9ab88ca89a197
@@ -44,10 +44,11 @@ Phony.define do
44
44
 
45
45
  # Egypt.
46
46
  #
47
- country '20', one_of('800') >> split(7..7) | # Egypt
48
- one_of('2', '3') >> split(8..8) | # Cairo/Giza, Alexandria
49
- fixed(2) >> split(8..8)
50
- # :mobile? => /^1[01246-9]\d+$/, :service? => /^800\d+$/
47
+ country '20', one_of('800') >> split(7..7) | # Egypt toll free
48
+ one_of('3') >> split(7..7) | # Alexandria
49
+ one_of('2') >> split(8..8) | # Cairo/Giza
50
+ one_of('10', '11', '12') >> split(8..8) | # the 3 mobile operators
51
+ fixed(2) >> split(7..7) # all the other 24 provinces
51
52
 
52
53
  # South Africa.
53
54
  #
@@ -62,6 +62,7 @@ ndcs_4digit = [
62
62
  '0432', # Udine
63
63
  '0444', # Vicenza
64
64
  '0461', # Trento
65
+ '0464', # Rovereto
65
66
  '0471', # Bolzano
66
67
  '0481', # Gorizia
67
68
  '0521', # Parma
@@ -346,8 +346,16 @@ describe 'plausibility' do
346
346
  Phony.plausible?('+20 800 12345678').should be_false
347
347
  Phony.plausible?('+20 2 12345678').should be_true
348
348
  Phony.plausible?('+20 2 1234567').should be_false
349
- Phony.plausible?('+20 40 12345678').should be_true
350
- Phony.plausible?('+20 40 1234567').should be_false
349
+ Phony.plausible?('+20 3 1234567').should be_true
350
+ Phony.plausible?('+20 3 12345678').should be_false
351
+ Phony.plausible?('+20 40 1234567').should be_true
352
+ Phony.plausible?('+20 40 12345678').should be_false
353
+ Phony.plausible?('+20 10 12345678').should be_true
354
+ Phony.plausible?('+20 10 1234567').should be_false
355
+ Phony.plausible?('+20 11 12345678').should be_true
356
+ Phony.plausible?('+20 11 1234567').should be_false
357
+ Phony.plausible?('+20 12 12345678').should be_true
358
+ Phony.plausible?('+20 12 1234567').should be_false
351
359
  end
352
360
 
353
361
  it 'is correct for Germany' do
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.2
4
+ version: 2.12.3
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-03-07 00:00:00.000000000 Z
11
+ date: 2015-03-18 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