phone_number_validator 0.5.7 → 0.5.8

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: 3a3357f093def1a54cac18559260492fe0ed61c70c16c8fb107e7f0001ac7f92
4
- data.tar.gz: f776c143b8c1db46e8b42eac8328229fc06854f7bcade04b42521bb894834726
3
+ metadata.gz: 72c117ad19fa060f5d643e142ed2052a58acf8ed377cde2dbc1a9b54a636f715
4
+ data.tar.gz: da37be8c29dc41debbfb0c7648f7644887d6c8000d03156105f98160fdc47991
5
5
  SHA512:
6
- metadata.gz: 1fa251b3467ed06a2dcda370c4a5745a171858f6067a1c29e47c636769a42dcb1fdfb43e7bf156866efa7775e1af23381e844edf7ccf9aa54903147d93731447
7
- data.tar.gz: 365c36a420694f94800fa205601fffed6c0840d1297f3b0cc9238795a81917a511f81543ee0732867e8b82d616eb8bc904c277722f2c78bfc5ec64e6f5d7b0f0
6
+ metadata.gz: d2966df8442a331549e9e360982222901bafebf604f2f95aff06e9a1dfef529b1cdd674491033100f8f2bf6c693159b47c64b502da2e1954a7ff92464b0abff4
7
+ data.tar.gz: fd0b9a0a0494778eea274afc32e785af3bbfa2adfa55232367bcbe217d501b0a46f5bc3dfa5aae4318074ffff4dfe3d4e71d85966adc27ee0f41b8cad8868dad
@@ -200,7 +200,7 @@ regex the pattern with the phone number</p>
200
200
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate</span>
201
201
  <span class="ruby-keyword">if</span> (<span class="ruby-ivar">@phone_number</span>.<span class="ruby-identifier">match</span>(<span class="ruby-constant">PHONE_NUMBER_REGEX</span>))
202
202
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>
203
- <span class="ruby-keyword">elsif</span> (<span class="ruby-ivar">@phone_number</span> <span class="ruby-operator">==</span> <span class="ruby-string">&#39;&#39;</span>)
203
+ <span class="ruby-keyword">elsif</span> (<span class="ruby-ivar">@phone_number</span> <span class="ruby-operator">==</span> <span class="ruby-string">&#39;&#39;</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@phone_number</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>)
204
204
  <span class="ruby-keyword">return</span> <span class="ruby-value">:nil</span>
205
205
  <span class="ruby-keyword">else</span>
206
206
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>
data/doc/created.rid CHANGED
@@ -1,6 +1,6 @@
1
- Fri, 23 Nov 2018 20:11:25 -0800
1
+ Fri, 23 Nov 2018 21:09:54 -0800
2
2
  README.rdoc Fri, 23 Nov 2018 19:32:32 -0800
3
3
  lib/phone_number_validator.rb Fri, 23 Nov 2018 20:11:17 -0800
4
- lib/phone_number_validator/validator.rb Fri, 23 Nov 2018 20:06:20 -0800
4
+ lib/phone_number_validator/validator.rb Fri, 23 Nov 2018 21:09:35 -0800
5
5
  test/test_phone_number_validator.rb Fri, 23 Nov 2018 19:43:10 -0800
6
6
  bin/pnv Fri, 23 Nov 2018 20:09:29 -0800
Binary file
Binary file
Binary file
@@ -25,7 +25,7 @@ class PhoneNumberValidator::Validator
25
25
  def validate
26
26
  if (@phone_number.match(PHONE_NUMBER_REGEX))
27
27
  return true
28
- elsif (@phone_number == '')
28
+ elsif (@phone_number == '' || @phone_number == nil)
29
29
  return :nil
30
30
  else
31
31
  return false
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'phone_number_validator'
3
- spec.version = '0.5.7'
3
+ spec.version = '0.5.8'
4
4
  spec.date = Time.now.strftime("%Y-%m-%d")
5
5
  spec.summary = 'Validate any US phone number!'
6
6
  spec.description = <<-EOF
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phone_number_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - bag33188