phonelib 0.8.3 → 0.8.5
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_formatter.rb +2 -2
- data/lib/phonelib/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3f8e7fe24a6bafb1bbb3f6d1b816b119ac44843910766135e07ceca70113dba
|
4
|
+
data.tar.gz: d9b3ae4e1d6c4831851e1772bdea89bc7cd546f0968e6fcb44e194fa73009a16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e67a1c2d70a2d7f415677f8e5dc606cb295152fc0dc1429ea2526086d7465c4dbf7e37ebdae10f27e2683aea5ee1846099353b089f720b247857870f467c2ffa
|
7
|
+
data.tar.gz: 67292dc389d84851d3ee89661a9f93e6d90514af538efebab4b9cae5c1789a9c44e0b797eec45102f4b6f8ecf5a1acfe4ee549cc0422c5d9758cebd3f30ee7a7
|
data/data/extended_data.dat
CHANGED
Binary file
|
data/data/phone_data.dat
CHANGED
Binary file
|
@@ -5,7 +5,7 @@ module Phonelib
|
|
5
5
|
# @param formatted [Boolean] whether to return numbers only or formatted
|
6
6
|
# @return [String] formatted national number
|
7
7
|
def national(formatted = true)
|
8
|
-
return @national_number unless
|
8
|
+
return @national_number unless possible?
|
9
9
|
format_match, format_string = formatting_data
|
10
10
|
|
11
11
|
if format_match
|
@@ -52,7 +52,7 @@ module Phonelib
|
|
52
52
|
def international(formatted = true, prefix = '+')
|
53
53
|
prefix = formatted if formatted.is_a?(String)
|
54
54
|
return nil if sanitized.empty?
|
55
|
-
return "#{prefix}#{country_prefix_or_not}#{sanitized}" unless
|
55
|
+
return "#{prefix}#{country_prefix_or_not}#{sanitized}" unless possible?
|
56
56
|
return "#{prefix}#{data_country_code}#{@national_number}" unless formatted
|
57
57
|
|
58
58
|
fmt = @data[country][:format]
|
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.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vadim Senderovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.15'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: '1.15'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.
|
75
|
+
version: 1.0.9
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0.
|
82
|
+
version: 1.0.9
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
|
-
rubygems_version: 3.
|
200
|
+
rubygems_version: 3.1.4
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Gem validates phone numbers with Google libphonenumber database
|