phone_classifier 0.0.2 → 0.0.3

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.
data/README.md CHANGED
@@ -60,6 +60,7 @@ Supported Countries
60
60
  * +386, Slovenia
61
61
  * +420, Czech Republic
62
62
  * +421, Slovakia
63
+ * +852, Hong Kong
63
64
 
64
65
 
65
66
  Where is it used
@@ -43,6 +43,7 @@ module Forbidden
43
43
  '386' => %w{ 80 89 90 }, # Slovenia
44
44
  '420' => %w{ 8.. 9.. }, # Czech republic
45
45
  '421' => %w{ }, # Slovakia
46
+ '852' => %w{ 7... 8...}, # Hong Kong
46
47
  }
47
48
  end
48
49
  end
@@ -43,6 +43,7 @@
43
43
  '386' => %w{ 30 40 31 41 51 71 70 64}, # Slovenia
44
44
  '420' => %w{ 60[1-8] 72. 73. 77. 79. 91 }, # Czech Republic
45
45
  '421' => %w{ 9.. }, # Slovakia
46
+ '852' => %w{ 5... 6... 9... }, # Hong Kong
46
47
  }
47
48
  end
48
49
  end
@@ -322,6 +322,21 @@ describe PhoneClassifier do
322
322
  end
323
323
 
324
324
 
325
+ end
326
+
327
+ context "Hong Kong Numbers" do
328
+
329
+ it "should set mobile numbers" do
330
+ phone_number = "852 6123 1234"
331
+ PhoneClassifier.new(phone_number).kind.should == :mobile
332
+ end
333
+
334
+ it "should set service numbers " do
335
+ phone_number = "852 8123 1234"
336
+ PhoneClassifier.new(phone_number).kind.should == :forbidden
337
+ end
338
+
339
+
325
340
  end
326
341
 
327
342
  end
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.2
5
+ version: 0.0.3
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-11-09 00:00:00.000000000 Z
12
+ date: 2012-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement