phonelib 0.9.1 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/extended_data.dat +0 -0
- data/data/phone_data.dat +0 -0
- data/lib/phonelib/data_importer.rb +1 -1
- data/lib/phonelib/phone_analyzer.rb +1 -1
- data/lib/phonelib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e5e37ac67277523ec2768078a0c398df1c9d672f6fa1d95f0fb1ac396eb5472
|
4
|
+
data.tar.gz: 331f23d2f63729492ef0f036df74cf6cebab5e61a44adbc294ab949d5ac7f2b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bebcbf09637c5416820600b368dde2ebe2dfb281c4573ecf310ac7af381dbb35229e3b657e9dd0ec3820c43d7ec70be4afd62f91c1fa9a99d1731e2ae934ebc2
|
7
|
+
data.tar.gz: ae47e8e2b78ec48f76b922bb4d429388b621714c5c14beb6ed89da54568ed2cac5474939928111a5b8d672319ada35f06e5bd05537c2434e3d752157ce1ea2a9
|
data/data/extended_data.dat
CHANGED
Binary file
|
data/data/phone_data.dat
CHANGED
Binary file
|
@@ -209,7 +209,7 @@ module Phonelib
|
|
209
209
|
# adds double country code flag in case country allows
|
210
210
|
def add_double_country_flag(country)
|
211
211
|
if DOUBLE_COUNTRY_CODES_COUNTRIES.include?(country[:id])
|
212
|
-
country[
|
212
|
+
country[Core::DOUBLE_COUNTRY_PREFIX_FLAG] = true
|
213
213
|
end
|
214
214
|
country
|
215
215
|
end
|
@@ -70,7 +70,7 @@ module Phonelib
|
|
70
70
|
# replacing national prefix to simplified format
|
71
71
|
def with_replaced_national_prefix(phone, data)
|
72
72
|
return phone unless data[Core::NATIONAL_PREFIX_TRANSFORM_RULE]
|
73
|
-
phone = phone.gsub(/^#{data[Core::COUNTRY_CODE]}/, '') if phone.start_with?(data[Core::COUNTRY_CODE])
|
73
|
+
phone = phone.gsub(/^#{data[Core::COUNTRY_CODE]}/, '') if phone.start_with?(data[Core::COUNTRY_CODE]) && !data[Core::DOUBLE_COUNTRY_PREFIX_FLAG]
|
74
74
|
pattern = cr("^(?:#{data[Core::NATIONAL_PREFIX_FOR_PARSING]})")
|
75
75
|
match = phone.match pattern
|
76
76
|
if match && match.captures.compact.size > 0
|
data/lib/phonelib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phonelib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vadim Senderovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|