phony 2.20.4 → 2.20.5
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 +4 -4
- data/lib/phony/countries.rb +8 -1
- data/spec/lib/phony/countries_spec.rb +4 -0
- metadata +15 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 443ce0ac52dcde0ab0b419d6c49123ac60fdb6525ce56df52c09102b2a1b79af
|
|
4
|
+
data.tar.gz: 3db5d454a9c112ad429b1c0986379bae3230685bcc795aaedf5c0f7feba2a902
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0081748a294e804a1e1870dc40bc9e4359733f25f54e73dbbf2ad7fd01661af91e6724fa550dc61a29f4ff0c2f3b2b9161160657c852493e63afbdc839f7ae7
|
|
7
|
+
data.tar.gz: 0f371abf103cd53b85093973e96cbf3ae91d9d44b3e4e1b7db51826ce2a9f818252d9774cdd81abcdcf5f893dd696cf2649b70a0e7960164e8f02b4ca8618088
|
data/lib/phony/countries.rb
CHANGED
|
@@ -920,7 +920,14 @@ Phony.define do
|
|
|
920
920
|
)
|
|
921
921
|
|
|
922
922
|
country '671', todo # Spare code
|
|
923
|
-
|
|
923
|
+
|
|
924
|
+
# Australian External Territories https://en.wikipedia.org/wiki/Telephone_numbers_in_Norfolk_Island
|
|
925
|
+
# Norfolk Island
|
|
926
|
+
country '672',
|
|
927
|
+
fixed(1) >> split(2,3) |
|
|
928
|
+
match(/^(2\d+)$/) >> split(3) | # Fixed
|
|
929
|
+
match(/^(5\d+)$/) >> split(3) # Mobile
|
|
930
|
+
|
|
924
931
|
country '673', fixed(1) >> split(3, 3) # Brunei Darussalam http://www.wtng.info/wtng-673-bn.html
|
|
925
932
|
country '674', none >> split(3, 4) # Nauru (Republic of) http://www.wtng.info/wtng-674-nr.html
|
|
926
933
|
|
|
@@ -593,6 +593,10 @@ describe 'country descriptions' do
|
|
|
593
593
|
it_splits '31222123456', ['31', '222', '123', '456']
|
|
594
594
|
it_splits '3197012345678', ['31', '970', '1234', '5678'] # machine-to-machine
|
|
595
595
|
end
|
|
596
|
+
describe 'Norfolk Island' do
|
|
597
|
+
it_splits '672321234', ['672', '3', '21', '234'] # fixed
|
|
598
|
+
it_splits '672351234', ['672', '3', '51', '234'] # mobile
|
|
599
|
+
end
|
|
596
600
|
describe 'Norway' do
|
|
597
601
|
it_splits '4721234567', ['47',false,'21','23','45','67']
|
|
598
602
|
it_splits '4731234567', ['47',false,'31','23','45','67']
|
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.20.
|
|
4
|
+
version: 2.20.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Hanke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-05-
|
|
11
|
+
date: 2023-05-06 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
|
|
@@ -115,26 +115,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
116
|
version: '0'
|
|
117
117
|
requirements: []
|
|
118
|
-
rubygems_version: 3.
|
|
118
|
+
rubygems_version: 3.3.26
|
|
119
119
|
signing_key:
|
|
120
120
|
specification_version: 4
|
|
121
121
|
summary: Fast international phone number (E164 standard) normalizing, splitting and
|
|
122
122
|
formatting.
|
|
123
123
|
test_files:
|
|
124
|
-
- spec/
|
|
125
|
-
- spec/
|
|
126
|
-
- spec/lib/phony/country_spec.rb
|
|
127
|
-
- spec/lib/phony/national_code_spec.rb
|
|
124
|
+
- spec/functional/config_spec.rb
|
|
125
|
+
- spec/functional/plausibility_spec.rb
|
|
128
126
|
- spec/lib/phony/countries_spec.rb
|
|
127
|
+
- spec/lib/phony/country_codes_spec.rb
|
|
128
|
+
- spec/lib/phony/country_spec.rb
|
|
129
129
|
- spec/lib/phony/dsl_spec.rb
|
|
130
|
-
- spec/lib/phony/
|
|
130
|
+
- spec/lib/phony/local_splitters/fixed_spec.rb
|
|
131
|
+
- spec/lib/phony/local_splitters/regex_spec.rb
|
|
132
|
+
- spec/lib/phony/national_code_spec.rb
|
|
133
|
+
- spec/lib/phony/national_splitters/default_spec.rb
|
|
134
|
+
- spec/lib/phony/national_splitters/fixed_spec.rb
|
|
131
135
|
- spec/lib/phony/national_splitters/none_spec.rb
|
|
132
136
|
- spec/lib/phony/national_splitters/regex_spec.rb
|
|
133
|
-
- spec/lib/phony/national_splitters/
|
|
134
|
-
- spec/lib/phony/
|
|
135
|
-
- spec/lib/phony/country_codes_spec.rb
|
|
136
|
-
- spec/lib/phony/local_splitters/regex_spec.rb
|
|
137
|
-
- spec/lib/phony/local_splitters/fixed_spec.rb
|
|
137
|
+
- spec/lib/phony/national_splitters/variable_spec.rb
|
|
138
|
+
- spec/lib/phony/trunk_code_spec.rb
|
|
138
139
|
- spec/lib/phony/vanity_spec.rb
|
|
139
|
-
- spec/
|
|
140
|
-
- spec/functional/plausibility_spec.rb
|
|
140
|
+
- spec/lib/phony_spec.rb
|