phone_number_validator 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/doc/js/darkfish.js CHANGED
@@ -59,7 +59,7 @@ function hookSearch() {
59
59
  var html = '';
60
60
 
61
61
  // TODO add relative path to <script> per-page
62
- html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
62
+ html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
63
63
  if (result.params)
64
64
  html += '<span class="params">' + result.params + '</span>';
65
65
  html += '</a>';
@@ -121,9 +121,9 @@ function highlightClickTarget( event ) {
121
121
  };
122
122
  };
123
123
 
124
- function loadAsync(path, success) {
124
+ function loadAsync(path, success, prefix) {
125
125
  $.ajax({
126
- url: rdoc_rel_prefix + path,
126
+ url: prefix + path,
127
127
  dataType: 'script',
128
128
  success: success,
129
129
  cache: true
@@ -154,8 +154,8 @@ $(document).ready( function() {
154
154
  });
155
155
  }
156
156
 
157
- loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
158
- loadAsync('js/search.js', search_success_function('search_loaded'));
159
- loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
160
- loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
157
+ loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
158
+ loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
159
+ loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
160
+ loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
161
161
  });
data/doc/js/navigation.js CHANGED
@@ -59,9 +59,8 @@ Navigation = new function() {
59
59
  }
60
60
  break;
61
61
  case 13: //Event.KEY_RETURN:
62
- if (this.$current)
63
- e.preventDefault();
64
- this.select(this.$current);
62
+ if (this.$current) e.preventDefault();
63
+ this.select(this.$current);
65
64
  break;
66
65
  }
67
66
  if (e.ctrlKey && e.shiftKey) this.select(this.$current);
@@ -80,7 +79,7 @@ Navigation = new function() {
80
79
  var go = function() {
81
80
  if (!_this.moveTimeout) return;
82
81
  _this[isDown ? 'moveDown' : 'moveUp']();
83
- _this.moveTimout = setTimeout(go, 100);
82
+ _this.moveTimeout = setTimeout(go, 100);
84
83
  }
85
84
  this.moveTimeout = setTimeout(go, 200);
86
85
  }
Binary file
@@ -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 represents 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 (987) 654-3210 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 expects 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 functionality\n"],["PhoneNumberValidator::Validator","","PhoneNumberValidator/Validator.html","","<p>This class does all of the matching and checking work for the validation of the phone number.\n"],["PhoneNumberValidatorTest","","PhoneNumberValidatorTest.html","","<p>This class represents 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 (987) 654-3210 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 <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 expects the output to be <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 <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 regex 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
data/doc/js/searcher.js CHANGED
@@ -172,6 +172,7 @@ Searcher.prototype = new function() {
172
172
  result.path = info[2];
173
173
  result.params = info[3];
174
174
  result.snippet = info[4];
175
+ result.badge = info[6];
175
176
  return result;
176
177
  }
177
178
 
Binary file
@@ -1,104 +1,136 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>Table of Contents - Phone Number Validator</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "./";
11
- </script>
12
-
13
- <script src="./js/jquery.js"></script>
14
- <script src="./js/darkfish.js"></script>
15
-
16
- <link href="./css/fonts.css" rel="stylesheet">
17
- <link href="./css/rdoc.css" rel="stylesheet">
18
-
19
-
20
-
21
- <body id="top" class="table-of-contents">
22
- <main role="main">
23
- <h1 class="class">Table of Contents - Phone Number Validator</h1>
24
-
25
- <h2 id="pages">Pages</h2>
26
- <ul>
27
- <li class="file">
28
- <a href="README_rdoc.html">README</a>
29
-
30
- <ul>
31
- <li><a href="README_rdoc.html#label-Phone+Number+Validator">Phone Number Validator</a>
32
- <li><a href="README_rdoc.html#label-About">About</a>
33
- <li><a href="README_rdoc.html#label-Regular+Expression">Regular Expression</a>
34
- <li><a href="README_rdoc.html#label-Installing">Installing</a>
35
- <li><a href="README_rdoc.html#label-Install+Required+Gems-2FDependencies">Install Required Gems/Dependencies</a>
36
- <li><a href="README_rdoc.html#label-Updating+Required+Gems-2FDependencies">Updating Required Gems/Dependencies</a>
37
- <li><a href="README_rdoc.html#label-Uninstalling">Uninstalling</a>
38
- <li><a href="README_rdoc.html#label-Testing">Testing</a>
39
- <li><a href="README_rdoc.html#label-Usage">Usage</a>
40
- <li><a href="README_rdoc.html#label-In+command+line">In command line</a>
41
- <li><a href="README_rdoc.html#label-Output">Output</a>
42
- <li><a href="README_rdoc.html#label-In+Ruby+code">In Ruby code</a>
43
- <li><a href="README_rdoc.html#label-Output">Output</a>
44
- <li><a href="README_rdoc.html#label-Development">Development</a>
45
- </ul>
46
- </li>
47
-
48
- </ul>
49
-
50
- <h2 id="classes">Classes and Modules</h2>
51
- <ul>
52
- <li class="class">
53
- <a href="PhoneNumberValidator.html">PhoneNumberValidator</a>
54
- </li>
55
- <li class="class">
56
- <a href="PhoneNumberValidator/Validator.html">PhoneNumberValidator::Validator</a>
57
- </li>
58
- <li class="class">
59
- <a href="PhoneNumberValidatorTest.html">PhoneNumberValidatorTest</a>
60
- </li>
61
- </ul>
62
-
63
- <h2 id="methods">Methods</h2>
64
- <ul>
65
-
66
- <li class="method">
67
- <a href="PhoneNumberValidator/Validator.html#method-c-new">::new</a>
68
- &mdash;
69
- <span class="container">PhoneNumberValidator::Validator</span>
70
-
71
- <li class="method">
72
- <a href="PhoneNumberValidator.html#method-c-validate">::validate</a>
73
- &mdash;
74
- <span class="container">PhoneNumberValidator</span>
75
-
76
- <li class="method">
77
- <a href="PhoneNumberValidatorTest.html#method-i-test_invalid_phone_number">#test_invalid_phone_number</a>
78
- &mdash;
79
- <span class="container">PhoneNumberValidatorTest</span>
80
-
81
- <li class="method">
82
- <a href="PhoneNumberValidatorTest.html#method-i-test_no_phone_number">#test_no_phone_number</a>
83
- &mdash;
84
- <span class="container">PhoneNumberValidatorTest</span>
85
-
86
- <li class="method">
87
- <a href="PhoneNumberValidatorTest.html#method-i-test_valid_phone_number">#test_valid_phone_number</a>
88
- &mdash;
89
- <span class="container">PhoneNumberValidatorTest</span>
90
-
91
- <li class="method">
92
- <a href="PhoneNumberValidator/Validator.html#method-i-validate">#validate</a>
93
- &mdash;
94
- <span class="container">PhoneNumberValidator::Validator</span>
95
- </ul>
96
- </main>
97
-
98
-
99
- <footer id="validator-badges" role="contentinfo">
100
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
101
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
102
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
103
- </footer>
104
-
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>Table of Contents - Phone Number Validator</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+
23
+ <body id="top" class="table-of-contents">
24
+ <main role="main">
25
+ <h1 class="class">Table of Contents - Phone Number Validator</h1>
26
+
27
+
28
+
29
+ <h2 id="pages">Pages</h2>
30
+ <ul>
31
+
32
+ <li class="file">
33
+ <a href="README_rdoc.html">README</a>
34
+
35
+ <ul>
36
+
37
+ <li><a href="README_rdoc.html#label-Phone+Number+Validator">Phone Number Validator</a>
38
+
39
+ <li><a href="README_rdoc.html#label-About">About</a>
40
+
41
+ <li><a href="README_rdoc.html#label-Regular+Expression">Regular Expression</a>
42
+
43
+ <li><a href="README_rdoc.html#label-Installing">Installing</a>
44
+
45
+ <li><a href="README_rdoc.html#label-Install+Required+Gems-2FDependencies">Install Required Gems/Dependencies</a>
46
+
47
+ <li><a href="README_rdoc.html#label-Updating+Required+Gems-2FDependencies">Updating Required Gems/Dependencies</a>
48
+
49
+ <li><a href="README_rdoc.html#label-Uninstalling">Uninstalling</a>
50
+
51
+ <li><a href="README_rdoc.html#label-Testing">Testing</a>
52
+
53
+ <li><a href="README_rdoc.html#label-Usage">Usage</a>
54
+
55
+ <li><a href="README_rdoc.html#label-In+command+line">In command line</a>
56
+
57
+ <li><a href="README_rdoc.html#label-Output">Output</a>
58
+
59
+ <li><a href="README_rdoc.html#label-In+Ruby+code">In Ruby code</a>
60
+
61
+ <li><a href="README_rdoc.html#label-Output">Output</a>
62
+
63
+ <li><a href="README_rdoc.html#label-Output+Types">Output Types</a>
64
+
65
+ <li><a href="README_rdoc.html#label-Development">Development</a>
66
+
67
+ </ul>
68
+
69
+ </li>
70
+
71
+ </ul>
72
+
73
+
74
+ <h2 id="classes">Classes and Modules</h2>
75
+ <ul>
76
+
77
+ <li class="class">
78
+ <a href="PhoneNumberValidator.html">PhoneNumberValidator</a>
79
+
80
+ </li>
81
+
82
+ <li class="class">
83
+ <a href="PhoneNumberValidator/Validator.html">PhoneNumberValidator::Validator</a>
84
+
85
+ </li>
86
+
87
+ <li class="class">
88
+ <a href="PhoneNumberValidatorTest.html">PhoneNumberValidatorTest</a>
89
+
90
+ </li>
91
+
92
+ </ul>
93
+
94
+ <h2 id="methods">Methods</h2>
95
+ <ul>
96
+
97
+ <li class="method">
98
+ <a href="PhoneNumberValidator/Validator.html#method-c-new">::new</a>
99
+ &mdash;
100
+ <span class="container">PhoneNumberValidator::Validator</span>
101
+
102
+ <li class="method">
103
+ <a href="PhoneNumberValidator.html#method-c-validate">::validate</a>
104
+ &mdash;
105
+ <span class="container">PhoneNumberValidator</span>
106
+
107
+ <li class="method">
108
+ <a href="PhoneNumberValidatorTest.html#method-i-test_invalid_phone_number">#test_invalid_phone_number</a>
109
+ &mdash;
110
+ <span class="container">PhoneNumberValidatorTest</span>
111
+
112
+ <li class="method">
113
+ <a href="PhoneNumberValidatorTest.html#method-i-test_no_phone_number">#test_no_phone_number</a>
114
+ &mdash;
115
+ <span class="container">PhoneNumberValidatorTest</span>
116
+
117
+ <li class="method">
118
+ <a href="PhoneNumberValidatorTest.html#method-i-test_valid_phone_number">#test_valid_phone_number</a>
119
+ &mdash;
120
+ <span class="container">PhoneNumberValidatorTest</span>
121
+
122
+ <li class="method">
123
+ <a href="PhoneNumberValidator/Validator.html#method-i-validate">#validate</a>
124
+ &mdash;
125
+ <span class="container">PhoneNumberValidator::Validator</span>
126
+
127
+ </ul>
128
+ </main>
129
+
130
+
131
+ <footer id="validator-badges" role="contentinfo">
132
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
133
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.1.
134
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
135
+ </footer>
136
+
@@ -1,18 +1,18 @@
1
- ##
2
- # This class is the master/parent class to all of the validation functionality
3
- class PhoneNumberValidator
4
- class << self
5
-
6
- ##
7
- # Validates any United States phone number!
8
- #
9
- # <b>Arguments:</b>
10
- # phone_number: (String)
11
- def validate(phone_number)
12
- validator = Validator.new(phone_number)
13
- validator.validate
14
- end
15
- end
16
- end
17
-
18
- require 'phone_number_validator/validator'
1
+ ##
2
+ # This class is the master/parent class to all of the validation functionality
3
+ class PhoneNumberValidator
4
+ class << self
5
+
6
+ ##
7
+ # Validates any United States phone number!
8
+ #
9
+ # <b>Arguments:</b>
10
+ # phone_number: (String)
11
+ def validate(phone_number)
12
+ validator = Validator.new(phone_number)
13
+ validator.validate
14
+ end
15
+ end
16
+ end
17
+
18
+ require 'phone_number_validator/validator'
@@ -1,33 +1,33 @@
1
- ##
2
- # This class does all of the matching and checking work for the validation of the phone number.
3
- class PhoneNumberValidator::Validator
4
-
5
- ##
6
- # The regex pattern for validating US phone numbers
7
- #
8
- # Regular Expression tested using {regexr.com}[https://regexr.com/]
9
- #
10
- # The regular expression used can be found in <em>README.rdoc</em> on the documentation's home page
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
-
13
- ##
14
- # Initializes the <b>@phone_number</b> instance variable
15
- def initialize(phone_number = '+1 (987) 654-3210 ext. 198842')
16
- @phone_number = phone_number
17
- end
18
-
19
- ##
20
- # Checks to see if the phone number the user entered is valid
21
- # by testing regex the pattern with the phone number
22
- #
23
- # <b>Return Type:</b> boolean or symbol
24
- def validate
25
- if (@phone_number.match(PHONE_NUMBER_REGEX))
26
- return true
27
- elsif (@phone_number == '' || @phone_number == nil)
28
- return nil
29
- else
30
- return false
31
- end
32
- end
33
- end
1
+ ##
2
+ # This class does all of the matching and checking work for the validation of the phone number.
3
+ class PhoneNumberValidator::Validator
4
+
5
+ ##
6
+ # The regex pattern for validating US phone numbers
7
+ #
8
+ # Regular Expression tested using {regexr.com}[https://regexr.com/]
9
+ #
10
+ # The regular expression used can be found in <em>README.rdoc</em> on the documentation's home page
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
+
13
+ ##
14
+ # Initializes the <b>@phone_number</b> instance variable
15
+ def initialize(phone_number = '+1 (987) 654-3210 ext. 198842')
16
+ @phone_number = phone_number
17
+ end
18
+
19
+ ##
20
+ # Checks to see if the phone number the user entered is valid
21
+ # by testing regex the pattern with the phone number
22
+ #
23
+ # <b>Return Type:</b> boolean or symbol
24
+ def validate
25
+ if (@phone_number.match(PHONE_NUMBER_REGEX))
26
+ return true
27
+ elsif (@phone_number == '' || @phone_number == nil)
28
+ return nil
29
+ else
30
+ return false
31
+ end
32
+ end
33
+ end
@@ -1,36 +1,34 @@
1
- Gem::Specification.new do |spec|
2
- spec.name = 'phone_number_validator'
3
- spec.version = '0.9.4'
4
- spec.date = Time.now.strftime("%Y-%m-%d")
5
- spec.summary = 'Validate any US phone number!'
6
- spec.description = <<-EOF
7
- This gem is a United States phone number validator.
8
- This gem uses a complex regular expression that can validate any United States phone number.
9
- Check out the documentation under the links section to see how to use this gem.
10
- EOF
11
- spec.author = 'bag33188'
12
- spec.email = 'shuckle168@gmail.com'
13
- spec.files = `git ls-files -z`.split("\x0")
14
- # spec.files = ['phone_number_validator.gemspec', 'Gemfile', 'Rakefile', 'LICENSE', 'README.rdoc']
15
- # spec.files += Dir['lib/**/*'] + Dir['bin/*'] + Dir['doc/**/*'] + Dir['test/*']
16
- spec.require_paths = %w(lib lib/phone_number_validator doc test bin .)
17
- spec.test_files = ['test/test_phone_number_validator.rb']
18
- spec.executables << 'pnv'
19
- spec.homepage = 'https://github.com/bag33188/phone-number-validator'
20
- spec.license = 'MIT'
21
- spec.bindir = 'bin'
22
- spec.extra_rdoc_files = ['README.rdoc']
23
- spec.platform = Gem::Platform::RUBY
24
- spec.required_ruby_version = '>= 2.0.0'
25
- spec.required_rubygems_version = '>= 2.0.0'
26
- spec.post_install_message = "Thanks for installing my phone_number_validator gem!\r\nI hope you will enjoy using it! :)"
27
- spec.requirements << 'A Windows, Mac, or Linux computer with Ruby and RubyGems Installed.'
28
- spec.metadata = {
29
- 'bug_tracker_uri' => 'https://github.com/bag33188/phone-number-validator/issues',
30
- 'source_code_uri' => 'https://github.com/bag33188/phone-number-validator',
31
- "documentation_uri" => 'https://www.rubydoc.info/gems/phone_number_validator'
32
- }
33
- spec.add_development_dependency 'bundler', '~> 1.11', '>= 1.11.2'
34
- spec.add_development_dependency 'rake' , '~> 11.2', '>= 11.2.2'
35
- spec.add_development_dependency 'rdoc' , '~> 6.0' , '>= 6.0.4'
36
- end
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'phone_number_validator'
3
+ spec.version = '0.9.5'
4
+ spec.date = Time.now.strftime("%Y-%m-%d")
5
+ spec.summary = 'Validate any US phone number!'
6
+ spec.description = <<-EOF
7
+ This gem is a United States phone number validator.
8
+ This gem uses a complex regular expression that can validate any United States phone number.
9
+ Check out the documentation under the links section to see how to use this gem.
10
+ EOF
11
+ spec.author = 'bag33188'
12
+ spec.email = 'shuckle168@gmail.com'
13
+ spec.files = `git ls-files -z`.split("\x0")
14
+ # spec.files = ['phone_number_validator.gemspec', 'Gemfile', 'Rakefile', 'LICENSE', 'README.rdoc']
15
+ # spec.files += Dir['lib/**/*'] + Dir['bin/*'] + Dir['doc/**/*'] + Dir['test/*']
16
+ spec.require_paths = %w(lib lib/phone_number_validator doc test bin .)
17
+ spec.test_files = ['test/test_phone_number_validator.rb']
18
+ spec.executables << 'pnv'
19
+ spec.homepage = 'https://github.com/bag33188/phone-number-validator'
20
+ spec.license = 'MIT'
21
+ spec.bindir = 'bin'
22
+ spec.extra_rdoc_files = ['README.rdoc']
23
+ spec.platform = Gem::Platform::RUBY
24
+ spec.required_ruby_version = '>= 2.0.0'
25
+ spec.required_rubygems_version = '>= 2.0.0'
26
+ spec.post_install_message = "Thanks for installing my phone_number_validator gem!\r\nI hope you will enjoy using it! :)"
27
+ spec.requirements << 'A Windows, Mac, or Linux computer with Ruby and RubyGems Installed.'
28
+ spec.metadata = {
29
+ 'bug_tracker_uri' => 'https://github.com/bag33188/phone-number-validator/issues',
30
+ 'source_code_uri' => 'https://github.com/bag33188/phone-number-validator',
31
+ "documentation_uri" => 'https://www.rubydoc.info/gems/phone_number_validator'
32
+ }
33
+ spec.add_development_dependency 'bundler', '~> 1.11', '>= 1.11.2'
34
+ end