phonelib 0.6.23 → 0.6.24
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/phone_analyzer_helper.rb +2 -1
- data/lib/phonelib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25c5a05a6aa505d6044b2f151d441d6b52454e41
|
4
|
+
data.tar.gz: '02680848c2687bff0986facb3ac0118cc388eb7e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 738b1089bf73b682a66fb1cfb6f4c857a0029f0a1f0a0f9990309f6e56a56186bfbc6ec66015e2bd613a1b8c4dd7a13c86b4b2796425af077ef236d27eab4e75
|
7
|
+
data.tar.gz: 610fa8a2d87c6751cf2aeda26d823f33bee1ff925880b402cc6817565b83b587ad0e7570a6a15e428fb91e75d3229c593af944a26171ac60d195dbd295d85e18
|
data/data/extended_data.dat
CHANGED
Binary file
|
data/data/phone_data.dat
CHANGED
Binary file
|
@@ -102,6 +102,7 @@ module Phonelib
|
|
102
102
|
# * +country_optional+ - whether to put country code as optional group
|
103
103
|
def full_regex_for_data(data, type, country_optional = true)
|
104
104
|
regex = []
|
105
|
+
regex << '0{2}?'
|
105
106
|
regex << "(#{data[Core::INTERNATIONAL_PREFIX]})?"
|
106
107
|
regex << "(#{data[Core::COUNTRY_CODE]})#{country_optional ? '?' : ''}"
|
107
108
|
regex << "(#{data[Core::NATIONAL_PREFIX_FOR_PARSING] || data[Core::NATIONAL_PREFIX]})?"
|
@@ -133,7 +134,7 @@ module Phonelib
|
|
133
134
|
def phone_match_data?(phone, data, possible = false)
|
134
135
|
country_code = "#{data[Core::COUNTRY_CODE]}"
|
135
136
|
inter_prefix = "(#{data[Core::INTERNATIONAL_PREFIX]})?"
|
136
|
-
return unless phone.match cr("
|
137
|
+
return unless phone.match cr("^0{2}?#{inter_prefix}#{country_code}")
|
137
138
|
|
138
139
|
type = possible ? Core::POSSIBLE_PATTERN : Core::VALID_PATTERN
|
139
140
|
phone.match full_regex_for_data(data, type, false)
|
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.6.
|
4
|
+
version: 0.6.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vadim Senderovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|