phone_number_validator 1.0.0 → 1.0.1
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 +4 -4
- data/Rakefile +1 -1
- data/bin/pnv +0 -39
- data/doc/Object.html +1 -1
- data/doc/created.rid +2 -2
- data/doc/js/search_index.js.gz +0 -0
- data/phone_number_validator.gemspec +2 -2
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b13b1206f90e4a52b66955dcc7aa8394ef764872a0c6ca12c048add243819e02
|
4
|
+
data.tar.gz: 829eb0275403d2d4a53724a5093a2d520ae29ac6026588db9ae0774543c0964c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2170eeedec669451f2eedb9510d8440e54acacb1ea27da871eed877e001c3439d89223282b26ee9fdf51ca35692e71f81c40fa8acf07495e7027c071edc24789
|
7
|
+
data.tar.gz: 7c237ad8be5781ea73d65bcbcff9b575ace6a2c0e6c2c5d86551934f1905f62853833cb04c647df75aa320cec4e37a3467d993c649dfb46455ca5b64c62407ab
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ RDoc::Task.new do |rdoc|
|
|
12
12
|
rdoc.main = 'README.rdoc'
|
13
13
|
rdoc.title = 'Phone Number Validator'
|
14
14
|
rdoc.rdoc_dir = 'doc'
|
15
|
-
rdoc.rdoc_files.include('README.rdoc', 'lib/*.rb', 'lib/**/*.rb', 'test/*.rb'
|
15
|
+
rdoc.rdoc_files.include('README.rdoc', 'lib/*.rb', 'lib/**/*.rb', 'test/*.rb')
|
16
16
|
end
|
17
17
|
|
18
18
|
# for Windows
|
data/bin/pnv
CHANGED
@@ -10,45 +10,6 @@
|
|
10
10
|
|
11
11
|
require 'phone_number_validator'
|
12
12
|
|
13
|
-
##
|
14
|
-
# <b>For command line usage:</b>
|
15
|
-
#
|
16
|
-
# Checks to see if the phone number the user entered is valid
|
17
|
-
# by testing regex the pattern with the phone number
|
18
|
-
#
|
19
|
-
# <b>Return Type:</b> boolean or string
|
20
|
-
#
|
21
|
-
# === Examples
|
22
|
-
#
|
23
|
-
# ==== Ex. 1
|
24
|
-
#
|
25
|
-
# $ pnv "+1 (987) 654-3210 ext. 198842"
|
26
|
-
#
|
27
|
-
# ===== Output
|
28
|
-
#
|
29
|
-
# => true
|
30
|
-
#
|
31
|
-
# ==== Ex. 2
|
32
|
-
#
|
33
|
-
# pnv "+1 (987 778873-321a0 ext.ff99"
|
34
|
-
#
|
35
|
-
# ===== Output
|
36
|
-
#
|
37
|
-
# => false
|
38
|
-
#
|
39
|
-
# ==== Ex. 3
|
40
|
-
#
|
41
|
-
# pnv ""
|
42
|
-
#
|
43
|
-
# ===== Output
|
44
|
-
# => "No phone number entered."
|
45
|
-
#
|
46
|
-
# ==== Ex. 4
|
47
|
-
#
|
48
|
-
# pnv
|
49
|
-
#
|
50
|
-
# ===== Output
|
51
|
-
# => "No phone number entered."
|
52
13
|
def pnv
|
53
14
|
if (ARGV[0] == nil || ARGV[0] == '')
|
54
15
|
print "No phone number entered.\r\n"
|
data/doc/Object.html
CHANGED
@@ -166,7 +166,7 @@
|
|
166
166
|
|
167
167
|
|
168
168
|
<div class="method-source-code" id="pnv-source">
|
169
|
-
<pre><span class="ruby-comment"># File
|
169
|
+
<pre><span class="ruby-comment"># File lib/pnv/pnv.rb, line 42</span>
|
170
170
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pnv</span>
|
171
171
|
<span class="ruby-keyword">if</span> (<span class="ruby-constant">ARGV</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">||</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">''</span>)
|
172
172
|
<span class="ruby-identifier">print</span> <span class="ruby-string">"No phone number entered.\r\n"</span>
|
data/doc/created.rid
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Thu, 08 Aug 2019 15:
|
1
|
+
Thu, 08 Aug 2019 15:46:44 -0700
|
2
2
|
README.rdoc Thu, 08 Aug 2019 14:17:33 -0700
|
3
3
|
lib/phone_number_validator.rb Thu, 08 Aug 2019 14:17:33 -0700
|
4
4
|
lib/phone_number_validator/validator.rb Thu, 08 Aug 2019 15:00:41 -0700
|
5
|
+
lib/pnv/pnv.rb Thu, 08 Aug 2019 15:43:40 -0700
|
5
6
|
test/test_phone_number_validator.rb Thu, 08 Aug 2019 14:17:33 -0700
|
6
|
-
bin/pnv Thu, 08 Aug 2019 15:06:15 -0700
|
data/doc/js/search_index.js.gz
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'phone_number_validator'
|
3
|
-
spec.version = '1.0.
|
3
|
+
spec.version = '1.0.1'
|
4
4
|
spec.date = Time.now.strftime("%Y-%m-%d")
|
5
5
|
spec.summary = 'Validate any US phone number!'
|
6
6
|
spec.description = <<-EOF
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.homepage = 'https://github.com/bag33188/phone-number-validator'
|
20
20
|
spec.license = 'MIT'
|
21
21
|
spec.bindir = 'bin'
|
22
|
-
spec.extra_rdoc_files =
|
22
|
+
spec.extra_rdoc_files = ['README.rdoc']
|
23
23
|
spec.platform = Gem::Platform::RUBY
|
24
24
|
spec.required_ruby_version = '>= 2.6.0'
|
25
25
|
spec.required_rubygems_version = '>= 2.6.0'
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bag33188
|
@@ -40,7 +40,6 @@ executables:
|
|
40
40
|
extensions: []
|
41
41
|
extra_rdoc_files:
|
42
42
|
- README.rdoc
|
43
|
-
- bin/pnv
|
44
43
|
files:
|
45
44
|
- ".gitignore"
|
46
45
|
- Gemfile
|