phony 2.19.5 → 2.19.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 992055cdb02a340ea072dfd5909e05fb5cab8bd2c223764539527a1b13635404
4
- data.tar.gz: 2357031c39a1a1345fb84ef4800115f867c815627a018dc029660165f3f2c04c
3
+ metadata.gz: ac3633c9c80cf15daea1dd2037b9480b9e4de9c29268e6f32922b5f2dc3f227c
4
+ data.tar.gz: 76390500957d4eb37fd63b63d010f691374c6f5e07fce5f4a736b4749004736e
5
5
  SHA512:
6
- metadata.gz: 7a4c94d5e5af075704d1a4651160f98f00346a8885f4bb9a38b9d47bdec0749bb2c3b3442d3ece7e5fe9aa624e93ad21c26f780114c8e06a89de04ca2dd662dd
7
- data.tar.gz: 38f16122cad2ee8b1ecdc909c12c3383d6a69072d5ddcbdfca49a88420df60d0e8874bb69f74b9da2804631951145625a4b843214ce925bdbc3a5b0e72d86426
6
+ metadata.gz: 32ddea147de2d58e78f726bcba48e7d3f7bfc83a4d8c29263774876bac5af0ef438aac3211bbf916e820796d640cafc11c59f86973721e911d1a2ed3d83ddd9e
7
+ data.tar.gz: 2e3456336cc64377eee6690fe643fdb965e4377ef006a9cb603d5492ff0740e8d2729f24dfd8907b4695d09a294acc5dab43cd57f53d6ddd2f9ad84a20be53d8
@@ -97,7 +97,7 @@ module Phony
97
97
 
98
98
  # False if it fails the basic check.
99
99
  #
100
- return false unless (4..16) === normalized.size
100
+ return false unless (4..16) === normalized.size # unless hints[:check_length] == false
101
101
 
102
102
  country, cc, rest = partial_split normalized
103
103
 
@@ -62,6 +62,8 @@ module Phony
62
62
  #
63
63
  #
64
64
  def plausible? rest, hints = {}
65
+ return true if hints[:check_length] == false
66
+
65
67
  @length === rest.inject(0) { |total, part| total + part.size }
66
68
  end
67
69
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.5
4
+ version: 2.19.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-29 00:00:00.000000000 Z
11
+ date: 2021-11-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.0.3
118
+ rubygems_version: 3.1.6
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Fast international phone number (E164 standard) normalizing, splitting and