phonelib 0.8.2 → 0.8.4
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 +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc68ad6683a9dbc13f88b825e589c1836a31e83b8f67c6e71d54afac44d0fceb
|
4
|
+
data.tar.gz: 39ed9dfdc4bf02a8850c18068be4e24407141734718a71e8fa4779f0f1c4ff17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21e94b4cd849e0116189ef7b232dd2d6949b02b9e6e295dfe463272b035669a062d90902e7f4aa6c98001c05dfa2c803f9e83320fe1b32e16f654d88305c62ca
|
7
|
+
data.tar.gz: f05c697263e31b17a6946ac9fda9c52780fa2aaef23b4031ba7eced4b34b5d576a581dbeacda334d962cb64cd46edebc1aa1c0e5fbcdf9661ccc7d0f28448dbd
|
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.4
|
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-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -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.0.
|
200
|
+
rubygems_version: 3.0.9
|
201
201
|
signing_key:
|
202
202
|
specification_version: 4
|
203
203
|
summary: Gem validates phone numbers with Google libphonenumber database
|