phone_number_validator 0.7.7 → 0.7.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: 833fadc4eb04cb42798c529fd6577e0dbe0165e85f1657af0c7ead035b6fb138
4
- data.tar.gz: 416656feef6d6999589b89486f04d7e8d73d59aba0aa61766968c5d71a4ed9e6
3
+ metadata.gz: 28b96060524df2d557dd8b6db8d3a16e5235ef9b218d06cff8ed65c6cc127980
4
+ data.tar.gz: c609af773109b9c6ce602d7c120666da27017b8e8c7fecc5589f1ab1532d2e2b
5
5
  SHA512:
6
- metadata.gz: 22281cf86f8ed7d943a83961785353fd64e2261b6b27e34658095718baefda6a65b03255e3ad5a9ebaadf54f6234cc7690a53def4c700d488c9ae0a96528d01e
7
- data.tar.gz: 482422a20a9256f1bd719016cb8115227b5a158392feaab84a62988e67f6acbb0ef14cc11ecbb1a51c4cf31b4a73d9d5100bf5c629137ab98b51a7a52f2d17d3
6
+ metadata.gz: e0ed5eecbb04b67c90ee43e142e46eaa27974bb3a049ac84788029e03bb045ef5d73e2e4d4ffe37ef72640efc94af78604c2dccb34bf81ad649b286c2ba26961
7
+ data.tar.gz: 50384857b4e2e9211143dd5c7901f1573c746cec20d427b758f42295718e83b7cdd7aec7580ec004863a9011b2198202c2f71ecddb05eb26e632e4b8acf30c93
@@ -143,7 +143,7 @@ documentation&#39;s home page</p>
143
143
 
144
144
  <div class="method-description">
145
145
 
146
- <p>initializes the <strong>@phone_number</strong> instance variable</p>
146
+ <p>Initializes the <strong>@phone_number</strong> instance variable</p>
147
147
 
148
148
 
149
149
 
@@ -187,16 +187,13 @@ documentation&#39;s home page</p>
187
187
  <p>Checks to see if the phone number the user entered is valid by testing
188
188
  regex the pattern with the phone number</p>
189
189
 
190
- <p><strong>Return Type:</strong></p>
191
-
192
- <pre class="ruby"><span class="ruby-identifier">boolean</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">symbol</span>
193
- </pre>
190
+ <p><strong>Return Type:</strong> boolean or symbol</p>
194
191
 
195
192
 
196
193
 
197
194
 
198
195
  <div class="method-source-code" id="validate-source">
199
- <pre><span class="ruby-comment"># File lib/phone_number_validator/validator.rb, line 25</span>
196
+ <pre><span class="ruby-comment"># File lib/phone_number_validator/validator.rb, line 24</span>
200
197
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate</span>
201
198
  <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
199
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>
data/doc/created.rid CHANGED
@@ -1,6 +1,6 @@
1
- Sun, 25 Nov 2018 12:24:28 -0800
1
+ Sun, 25 Nov 2018 12:49:31 -0800
2
2
  README.rdoc Sun, 25 Nov 2018 12:24:18 -0800
3
3
  lib/phone_number_validator.rb Sun, 25 Nov 2018 11:28:37 -0800
4
- lib/phone_number_validator/validator.rb Sun, 25 Nov 2018 11:28:37 -0800
4
+ lib/phone_number_validator/validator.rb Sun, 25 Nov 2018 12:49:19 -0800
5
5
  test/test_phone_number_validator.rb Sun, 25 Nov 2018 11:28:37 -0800
6
6
  bin/pnv Sun, 25 Nov 2018 12:14:53 -0800
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["phonenumbervalidator","validator","phonenumbervalidatortest","new()","test_invalid_phone_number()","test_no_phone_number()","test_valid_phone_number()","validate()","validate()","readme"],"longSearchIndex":["phonenumbervalidator","phonenumbervalidator::validator","phonenumbervalidatortest","phonenumbervalidator::validator::new()","phonenumbervalidatortest#test_invalid_phone_number()","phonenumbervalidatortest#test_no_phone_number()","phonenumbervalidatortest#test_valid_phone_number()","phonenumbervalidator::validate()","phonenumbervalidator::validator#validate()",""],"info":[["PhoneNumberValidator","","PhoneNumberValidator.html","","<p>This class is the master/parent class to all of the validation\nfunctionality\n"],["PhoneNumberValidator::Validator","","PhoneNumberValidator/Validator.html","","<p>This class does all of the matching and checking work for the validation of\nthe phone number.\n"],["PhoneNumberValidatorTest","","PhoneNumberValidatorTest.html","","<p>This class respresents the testing-unit for this gem app\n<p><strong>Inherits from:</strong>\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Test</span><span class=\"ruby-operator\">::</span><span class=\"ruby-constant\">Unit</span><span class=\"ruby-operator\">::</span><span class=\"ruby-constant\">TestCase</span>\n</pre>\n"],["new","PhoneNumberValidator::Validator","PhoneNumberValidator/Validator.html#method-c-new","(phone_number = '+1 (949) 355-6244 ext. 198842')","<p>initializes the <strong>@phone_number</strong> instance variable\n"],["test_invalid_phone_number","PhoneNumberValidatorTest","PhoneNumberValidatorTest.html#method-i-test_invalid_phone_number","()","<p>This test inputs an invalid phone number and expects the output to be\n<strong>false</strong>\n"],["test_no_phone_number","PhoneNumberValidatorTest","PhoneNumberValidatorTest.html#method-i-test_no_phone_number","()","<p>This test inputs no phone number and expectst the output to be\n<strong>:nil</strong>\n"],["test_valid_phone_number","PhoneNumberValidatorTest","PhoneNumberValidatorTest.html#method-i-test_valid_phone_number","()","<p>This test inputs a valid phone number and expects the output to be\n<strong>true</strong>\n"],["validate","PhoneNumberValidator","PhoneNumberValidator.html#method-c-validate","(phone_number)","<p>Validates any United States phone number!\n<p><strong>Arguments:</strong>\n\n<pre>phone_number: (String)</pre>\n"],["validate","PhoneNumberValidator::Validator","PhoneNumberValidator/Validator.html#method-i-validate","()","<p>Checks to see if the phone number the user entered is valid by testing\nregex the pattern with the phone …\n"],["README","","README_rdoc.html","","<p>Phone Number Validator\n<p>About\n<p>This app is a US phone number-validating RubyGem.\n"]]}}
1
+ var search_data = {"index":{"searchIndex":["phonenumbervalidator","validator","phonenumbervalidatortest","new()","test_invalid_phone_number()","test_no_phone_number()","test_valid_phone_number()","validate()","validate()","readme"],"longSearchIndex":["phonenumbervalidator","phonenumbervalidator::validator","phonenumbervalidatortest","phonenumbervalidator::validator::new()","phonenumbervalidatortest#test_invalid_phone_number()","phonenumbervalidatortest#test_no_phone_number()","phonenumbervalidatortest#test_valid_phone_number()","phonenumbervalidator::validate()","phonenumbervalidator::validator#validate()",""],"info":[["PhoneNumberValidator","","PhoneNumberValidator.html","","<p>This class is the master/parent class to all of the validation\nfunctionality\n"],["PhoneNumberValidator::Validator","","PhoneNumberValidator/Validator.html","","<p>This class does all of the matching and checking work for the validation of\nthe phone number.\n"],["PhoneNumberValidatorTest","","PhoneNumberValidatorTest.html","","<p>This class respresents the testing-unit for this gem app\n<p><strong>Inherits from:</strong>\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Test</span><span class=\"ruby-operator\">::</span><span class=\"ruby-constant\">Unit</span><span class=\"ruby-operator\">::</span><span class=\"ruby-constant\">TestCase</span>\n</pre>\n"],["new","PhoneNumberValidator::Validator","PhoneNumberValidator/Validator.html#method-c-new","(phone_number = '+1 (949) 355-6244 ext. 198842')","<p>Initializes the <strong>@phone_number</strong> instance variable\n"],["test_invalid_phone_number","PhoneNumberValidatorTest","PhoneNumberValidatorTest.html#method-i-test_invalid_phone_number","()","<p>This test inputs an invalid phone number and expects the output to be\n<strong>false</strong>\n"],["test_no_phone_number","PhoneNumberValidatorTest","PhoneNumberValidatorTest.html#method-i-test_no_phone_number","()","<p>This test inputs no phone number and expectst the output to be\n<strong>:nil</strong>\n"],["test_valid_phone_number","PhoneNumberValidatorTest","PhoneNumberValidatorTest.html#method-i-test_valid_phone_number","()","<p>This test inputs a valid phone number and expects the output to be\n<strong>true</strong>\n"],["validate","PhoneNumberValidator","PhoneNumberValidator.html#method-c-validate","(phone_number)","<p>Validates any United States phone number!\n<p><strong>Arguments:</strong>\n\n<pre>phone_number: (String)</pre>\n"],["validate","PhoneNumberValidator::Validator","PhoneNumberValidator/Validator.html#method-i-validate","()","<p>Checks to see if the phone number the user entered is valid by testing\nregex the pattern with the phone …\n"],["README","","README_rdoc.html","","<p>Phone Number Validator\n<p>About\n<p>This app is a US phone number-validating RubyGem.\n"]]}}
Binary file
@@ -11,7 +11,7 @@ class PhoneNumberValidator::Validator
11
11
  PHONE_NUMBER_REGEX = Regexp.new('^(?:(?:[2-9]11)|(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:\x20+|#|x\.?|ext\.?|extension)\s*(\d+))?)$', Regexp::IGNORECASE)
12
12
 
13
13
  ##
14
- # initializes the <b>@phone_number</b> instance variable
14
+ # Initializes the <b>@phone_number</b> instance variable
15
15
  def initialize(phone_number = '+1 (949) 355-6244 ext. 198842')
16
16
  @phone_number = phone_number
17
17
  end
@@ -20,8 +20,7 @@ class PhoneNumberValidator::Validator
20
20
  # Checks to see if the phone number the user entered is valid
21
21
  # by testing regex the pattern with the phone number
22
22
  #
23
- # <b>Return Type:</b>
24
- # boolean or symbol
23
+ # <b>Return Type:</b> boolean or symbol
25
24
  def validate
26
25
  if (@phone_number.match(PHONE_NUMBER_REGEX))
27
26
  return true
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'phone_number_validator'
3
- spec.version = '0.7.7'
3
+ spec.version = '0.7.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.7.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - bag33188