phony 2.0.0.beta2 → 2.0.0.beta3

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.
@@ -49,16 +49,18 @@ three_digit_ndc = [
49
49
  '161', # Manchester
50
50
  '191', # Tyne and Wear/County Durham
51
51
 
52
- # Services [3+7].
52
+ # Non-geographic [3+7].
53
53
  #
54
- '300', # Non-geographic charged at same rate as 01
54
+ '300', # Non-geographic numbers charged at geographic rates.
55
55
  '301',
56
+ '302',
56
57
  '303',
57
58
  '306',
58
59
  '308',
59
60
  '309',
60
61
  '330',
61
62
  '331',
63
+ '332',
62
64
  '333',
63
65
  '336',
64
66
  '339',
@@ -74,17 +76,17 @@ three_digit_ndc = [
74
76
  '800', # Freephone (10 digits) # 9 digits handled in specific rule, see below.
75
77
  '808', # Freephone (10 digits)
76
78
 
77
- '842', # Business rate [3+7].
79
+ '842', # Non-geographic numbers (NTS) with Service Charge up to 7p/min [3+7].
78
80
  '843',
79
81
  '844',
80
82
  '845',
81
- '870',
82
83
 
83
- '871', # Premium rate [3+7].
84
+ '870', # Non-geographic numbers (NTS) with Service Charge up to 13p/min [3+7].
85
+ '871',
84
86
  '872',
85
87
  '873',
86
88
 
87
- '900', # Premium rate content services [3+7].
89
+ '900', # Premium Rate Services (PRS) with Service Charge up to 300p/min [3+7].
88
90
  '901',
89
91
  '902',
90
92
  '903',
@@ -92,10 +94,24 @@ three_digit_ndc = [
92
94
  '905',
93
95
  '906',
94
96
  '907',
95
-
96
- '908', # Sexual entertainment services [3+7].
97
+ '910',
98
+ '911',
99
+ '912',
100
+ '913',
101
+ '914',
102
+ '915',
103
+ '916',
104
+ '917',
105
+ '918',
106
+ '919',
107
+
108
+ '908', # Sexual entertainment services (SES) with Service Charge up to 300p/min [3+7].
97
109
  '909',
110
+ '981',
98
111
  '982',
112
+ '983',
113
+ '984',
114
+ '989',
99
115
  ]
100
116
 
101
117
  # five_digit_ndc_with_nine_digits
@@ -59,6 +59,15 @@ describe 'validations' do
59
59
  it 'is correct' do
60
60
  Phony.plausible?('+4231231212').should be_true
61
61
  end
62
+ it 'is correct' do
63
+ Phony.plausible?('+4755121212').should be_true
64
+ end
65
+ it 'is correct' do
66
+ Phony.plausible?('+475512121').should be_false
67
+ end
68
+ it 'is correct' do
69
+ Phony.plausible?('+47551212121').should be_false
70
+ end
62
71
  it 'is correct' do
63
72
  Phony.plausible?('010').should be_false
64
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta2
4
+ version: 2.0.0.beta3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-07 00:00:00.000000000 Z
12
+ date: 2013-05-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Fast international phone number (E164 standard) normalizing, splitting
15
15
  and formatting. Lots of formatting options: International (+.., 00..), national