phony 3.0.6 → 3.0.8

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
  SHA256:
3
- metadata.gz: 9339012fe2b02a70b5c7cd4b8cc85ab4acc273abd0210b2897f1801b3d90a6e1
4
- data.tar.gz: f1686fc319228b4ab0815a7dcdc5889b39013ebe66eefb976ea79be01c3fef5f
3
+ metadata.gz: '08ae00278425f684f2ac8a2a1515dc0519baa62e659f44ee820ef9786083b235'
4
+ data.tar.gz: ae6ba31fda7b33e4a85190431492ebb78f988a00d6a4a370d36a257df5b55892
5
5
  SHA512:
6
- metadata.gz: c6b41b07baaee3ce84a6aaa8910f1859109397f511a8c58ac9797e3f72414e2714fa2fca83ce671f14d64e805c911d2aab4c5b84a569a17df5e3878f8a60d99f
7
- data.tar.gz: 504ac2475ef093416e75998c7f402e6d0e9d8299ad024b4b096adfe1c9247ea07703809dfe64fda7a5238fa8a6a5a6bd46fc3536d98f01dbf19a7f26a61bf4b6
6
+ metadata.gz: 6851fddd099f4ec7649fc8956c35d596576c51efa17da4e721cc30db9653389b18bd60a7a55149fcd8793603d44a214a3ddd13694a5865735ca82040495123e4
7
+ data.tar.gz: ed75d83bf4451030ba8e18fc427686480c07427216e95dead593d23c972de45c18a219403139ddcb01d8c0146153c773826fccb48d2a4b844f7b382682133771
@@ -300,7 +300,7 @@ Phony.define do
300
300
  one_of(*ndcs_3digit) >> matched_split(
301
301
  /\A\d{4}\z/ => [4],
302
302
  /\A1\d{5}\z/ => [6],
303
- /\A1\d{6}\z/ => [7],
303
+ /\A\d{7}\z/ => [7],
304
304
  /\A[^1]\d{4}\z/ => [5],
305
305
  /\A[^1]\d{5}\z/ => [3, 3]
306
306
  )
@@ -24,20 +24,15 @@ Phony.define do
24
24
  /\A\d{5}\z/ => [3, 2],
25
25
  /\A\d+\z/ => [3, 3]
26
26
  ) |
27
- one_of(%w[61 63 64 65 67]) >> matched_split(
27
+ one_of(%w[61 62 63 64 65 67]) >> matched_split(
28
28
  /\A\d{6}\z/ => [3, 3],
29
+ /\A\d{7}\z/ => [4, 3],
29
30
  /\A\d+\z/ => [3, 3, 3]
30
31
  ) |
31
32
  one_of(%w[66]) >> matched_split(
32
33
  /\A\d{4}\z/ => [4],
33
34
  /\A\d+\z/ => [3, 3]
34
35
  ) |
35
- one_of(%w[62]) >> split(3, 3) |
36
- one_of(%w[67]) >> matched_split(
37
- /\A\d{6}\z/ => [3, 3],
38
- /\A\d{7}\z/ => [4, 3],
39
- /\A\d+\z/ => [3, 3, 3]
40
- ) |
41
36
  one_of(%w[60 81 82 83 85]) >> split(4, 3) |
42
37
  fixed(2) >> split(3, 3)
43
38
  end
@@ -69,7 +69,10 @@ ndcs_with_3_subscriber_digits = %w[331700]
69
69
 
70
70
  Phony.define do
71
71
  country '992',
72
- trunk('8') |
72
+ # The trunk code '8' is also the leading digit of the MegaFon mobile
73
+ # NDCs (88x), so the scheme is ambiguous. Do not strip it on normalize
74
+ # (same as Russia and Latvia, which share this '8' ambiguity).
75
+ trunk('8', normalize: false) |
73
76
  one_of(ndcs_with_3_subscriber_digits) >> split(3) |
74
77
  one_of(ndcs_with_5_subscriber_digits) >> split(3, 2) |
75
78
  one_of(ndcs_with_6_subscriber_digits) >> split(3, 3) |
@@ -536,6 +536,7 @@ Phony.define do
536
536
  match(/\A(32)\d+\z/) >> split(2, 3, 2) | # mobile Orange Madagascar
537
537
  match(/\A(33)\d+\z/) >> split(2, 3, 2) | # mobile Airtel Madagascar
538
538
  match(/\A(34)\d+\z/) >> split(2, 3, 2) | # mobile Telecom Malagasy (Telma)
539
+ match(/\A(35)\d+\z/) >> split(2, 3, 2) | # mobile Airtel Madagascar
539
540
  match(/\A(37)\d+\z/) >> split(2, 3, 2) | # mobile Orange Madagascar
540
541
  match(/\A(38)\d+\z/) >> split(2, 3, 2) | # mobile Telecom Malagasy (Telma)
541
542
  match(/\A(39)\d+\z/) >> split(2, 3, 2) # mobile Blueline Madagascar
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-05-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
13
  and formatting. Lots of formatting options: International (+.., 00..), national
@@ -84,7 +83,6 @@ licenses:
84
83
  - MIT
85
84
  metadata:
86
85
  rubygems_mfa_required: 'true'
87
- post_install_message:
88
86
  rdoc_options: []
89
87
  require_paths:
90
88
  - lib
@@ -99,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
97
  - !ruby/object:Gem::Version
100
98
  version: '0'
101
99
  requirements: []
102
- rubygems_version: 3.5.21
103
- signing_key:
100
+ rubygems_version: 4.0.16
104
101
  specification_version: 4
105
102
  summary: Fast international phone number (E164 standard) normalizing, splitting and
106
103
  formatting.