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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba0b6be5c2a7713ded6c8bbc68a5d12d022b75cbc495bbdcd13cace46ee8467a
4
- data.tar.gz: 6ad47b7928886d2c3222e072a2b2e73566baffe8462fa6a8ee353b9ff7630bca
3
+ metadata.gz: cc68ad6683a9dbc13f88b825e589c1836a31e83b8f67c6e71d54afac44d0fceb
4
+ data.tar.gz: 39ed9dfdc4bf02a8850c18068be4e24407141734718a71e8fa4779f0f1c4ff17
5
5
  SHA512:
6
- metadata.gz: 9a9dd8cc0c6b18a192575c169ff213e2bcf762d1a93f4ecc07aad89729a3173e03fe31e86e35ed4e583446410933367ef7ae9a6f365b47a55e75dd1c53b0b521
7
- data.tar.gz: a468f6781963b983e54e367a0ddb99525ae2f5c1da8ca9b04829c248bf2ffe85705c9f96088eb09a39250cbb616d507288c84e54a27dee11cf42c4bd533dcb7f
6
+ metadata.gz: 21e94b4cd849e0116189ef7b232dd2d6949b02b9e6e295dfe463272b035669a062d90902e7f4aa6c98001c05dfa2c803f9e83320fe1b32e16f654d88305c62ca
7
+ data.tar.gz: f05c697263e31b17a6946ac9fda9c52780fa2aaef23b4031ba7eced4b34b5d576a581dbeacda334d962cb64cd46edebc1aa1c0e5fbcdf9661ccc7d0f28448dbd
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.2'
3
+ VERSION = '0.8.4'
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.2
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-06-05 00:00:00.000000000 Z
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.8
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