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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8eb5cd500f5cce3041305c589776fd4d87b051faa4df73d5618afef24bd43666
4
- data.tar.gz: 9eb37b441cac9cc645aa23a4e9e13ae7b38d0dea7ecb6a1996bb277042b10487
3
+ metadata.gz: c3f8e7fe24a6bafb1bbb3f6d1b816b119ac44843910766135e07ceca70113dba
4
+ data.tar.gz: d9b3ae4e1d6c4831851e1772bdea89bc7cd546f0968e6fcb44e194fa73009a16
5
5
  SHA512:
6
- metadata.gz: c9faebfcc45bf3c91301246b2a6287022fdc4caf4562edd6e205189c16987025f338709fde5c6904af9509dd6d41030e3ec09b4680ccc84378d5fb79d87636ff
7
- data.tar.gz: fb22853ef3b910fa4f9c6e85aed7156e32a4248e60408b8e4b50a968814f1c4eb61f3ca7b99657bd2aa39c0ebaec5bfd7283c863bd2dcb2bc13b1af9dc3e521a
6
+ metadata.gz: e67a1c2d70a2d7f415677f8e5dc606cb295152fc0dc1429ea2526086d7465c4dbf7e37ebdae10f27e2683aea5ee1846099353b089f720b247857870f467c2ffa
7
+ data.tar.gz: 67292dc389d84851d3ee89661a9f93e6d90514af538efebab4b9cae5c1789a9c44e0b797eec45102f4b6f8ecf5a1acfe4ee549cc0422c5d9758cebd3f30ee7a7
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 valid?
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 valid?
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]
@@ -1,4 +1,4 @@
1
1
  module Phonelib
2
2
  # @private
3
- VERSION = '0.8.3'
3
+ VERSION = '0.8.5'
4
4
  end
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.3
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-08-19 00:00:00.000000000 Z
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.13.0
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.13.0
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.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.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.0.9
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