phony 2.8.1 → 2.8.2

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: dd36ebf747e5d7267d9ebc733be37f3e44fe9a03
4
- data.tar.gz: 09ea3cc54099fe93a3a1e8344989a6fe635d34d8
3
+ metadata.gz: c5db8b2a510f9d2e363fc24ade7837ace9db8d9b
4
+ data.tar.gz: e53b10c977d397d9b0c6dca770dbddd560b808e7
5
5
  SHA512:
6
- metadata.gz: 53b4870d90edfe19ef2bfedea402a9e1eb23452fb451170bdd14644226b55a95016020b1c3c35a2c654366e3e671a24880b52581a9eea1076131594f8c363268
7
- data.tar.gz: c211186914ba9feb78535ad85e7018bd4b60718054e948b737a8531df5cbe2340830b881804246698e31f079b8fd39de3b83eb63ba558a2c244db1354deaacdc
6
+ metadata.gz: ded8e1e3d7206b255f7fe25978878a6e52866d466e5bf58bb2b382a107da7802775eb035425924b069a30a515f1300b6846ec126b508f7214033eec0aaa2763f
7
+ data.tar.gz: 5c8474e09d66faed68e6111212cd0b528e2da1f47ee696773264d1b18cf3a10eb9733115bb6b879f66438dd8270a096c67d41891aafb5b29f29e00c70fc3cd1b
@@ -790,15 +790,15 @@ four_digit_ndc = [
790
790
  ]
791
791
 
792
792
  Phony.define do
793
- country '44',
793
+ country '44',
794
794
  trunk('0') |
795
- one_of(mobile_ndc) >> split(6) | # 4-6
796
- one_of(two_digit_ndc) >> split(4,4) | # 2-4-4
797
- match(/^([58]00)\d{6}$/) >> split(6) | # 3-6, Special handling for 500 and 800.
798
- one_of(three_digit_ndc) >> split(3,4) | # 3-3-4
799
- match(/^(16977)\d{4}$/) >> split(4) | # 5-4, Special handling for 16977.
800
- one_of(five_digit_ndc) >> split(5) | # 5-5
801
- one_of(variable_length_number) >> split(6) | # 4-6 and 4-5, in 40 areas.
802
- one_of(four_digit_ndc) >> split(6) | # 4-6
803
- fixed(4) >> split(6) # Catchall for undefined numbers.
804
- end
795
+ one_of(mobile_ndc) >> split(6) | # 4-6
796
+ one_of(two_digit_ndc) >> split(4,4) | # 2-4-4
797
+ match(/^([58]00)\d{6}$/) >> split(6) | # 3-6, Special handling for 500 and 800.
798
+ one_of(three_digit_ndc) >> split(3,4) | # 3-3-4
799
+ match(/^(16977)\d{4}$/) >> split(4) | # 5-4, Special handling for 16977.
800
+ one_of(five_digit_ndc) >> split(5) | # 5-5
801
+ one_of(variable_length_number) >> split(5..6) | # 4-6 and 4-5, in 40 areas.
802
+ one_of(four_digit_ndc) >> split(6) | # 4-6
803
+ fixed(4) >> split(6) # Catchall for undefined numbers.
804
+ end
@@ -821,6 +821,9 @@ describe 'plausibility' do
821
821
  '+971 600 641 234',
822
822
  '+971 500 641 234',
823
823
  '+971 200 641 234']
824
+
825
+ it_is_correct_for 'United Kingdom', :samples => ['+44 1827 50111']
826
+
824
827
  it_is_correct_for 'Uruguay (Eastern Republic of)', :samples => ['+598 800 123 45',
825
828
  '+598 2 012 3456',
826
829
  '+598 21 123 456',
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: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke