phone_classifier 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -41,6 +41,7 @@ Supported Countries
41
41
  * +60, Malaysia
42
42
  * +65, Singapore
43
43
  * +94, Sri Lanka
44
+ * +91, India
44
45
  * +98, Iran
45
46
  * +212, Morocco
46
47
  * +213, Algeria
@@ -23,6 +23,7 @@ module Forbidden
23
23
  '49' => %w{ 1. 164 168 169 180 181 19[0-4] 800 900 }, # Germany
24
24
  '60' => %w{ 100 101 102 103 104 108 112 991 994 995 999 }, # Malaysia
25
25
  '65' => %w{ 3... 800 1800 1900 }, # Singapore
26
+ '91' => %w{ 90 95 96 }, # India
26
27
  '94' => %w{ }, # Sri Lanka
27
28
  '98' => %w{ 95. 96. 97. 98. 99.} , #Iran
28
29
  '212' => %w{ 8. }, # Morocco
@@ -23,6 +23,7 @@
23
23
  '49' => %w{ 151 152 157 159 160 162 163 17[0-9] }, # Germany
24
24
  '60' => %w{ 10 11 12 13 14 153 154 156 158 16 17 18 19 }, # Malaysia
25
25
  '65' => %w{ 8... 9... }, # Singapore
26
+ '91' => %w{ 91 92 93 94 97 98 99 }, # India
26
27
  '94' => %w{ 71 72 75 77 78 }, # Sri Lanka
27
28
  '98' => %w{ 91. 92. 93. } , #Iran
28
29
  '212' => %w{ 6. }, # Morocco
@@ -298,6 +298,18 @@ describe PhoneClassifier do
298
298
  end
299
299
  end
300
300
 
301
+ context 'Indian Numbers' do
302
+
303
+ it 'should set mobile numbers' do
304
+ phone_number = '91 99 111 22 111'
305
+ PhoneClassifier.new(phone_number).kind.should == :mobile
306
+ end
307
+
308
+ it 'should set service numbers ' do
309
+ phone_number = '91 96 111 22 111'
310
+ PhoneClassifier.new(phone_number).kind.should == :forbidden
311
+ end
312
+ end
301
313
 
302
314
  context "Iran Numbers" do
303
315
 
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: phone_classifier
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.5
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jens-Christian Fischer
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2012-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement