aus_phones 0.9.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 +7 -0
- data/.gitignore +14 -0
- data/.idea/.name +1 -0
- data/.idea/aus_phones.iml +32 -0
- data/.idea/codeStyleSettings.xml +13 -0
- data/.idea/misc.xml +14 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +670 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +72 -0
- data/Rakefile +3 -0
- data/aus_phones.gemspec +28 -0
- data/config/phones.yml +599 -0
- data/lib/aus_phones.rb +192 -0
- data/lib/aus_phones/version.rb +3 -0
- data/spec/aus_phones_spec.rb +186 -0
- data/spec/spec_helper.rb +2 -0
- data/tasks/rspec.rake +3 -0
- metadata +136 -0
data/lib/aus_phones.rb
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
require 'aus_phones/version'
|
|
2
|
+
require 'ostruct'
|
|
3
|
+
require 'yaml'
|
|
4
|
+
require 'active_support/core_ext/hash/keys'
|
|
5
|
+
|
|
6
|
+
class AusPhones
|
|
7
|
+
attr_reader :input, :phone_number
|
|
8
|
+
|
|
9
|
+
CNF = OpenStruct.new(YAML::load_file(File.join(__dir__, '../config/phones.yml')).deep_symbolize_keys)
|
|
10
|
+
|
|
11
|
+
def initialize(input='')
|
|
12
|
+
raise RuntimeError.new('Not a string') unless input.is_a? String
|
|
13
|
+
@input = input
|
|
14
|
+
@phone_number = build
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def is_valid?
|
|
18
|
+
phone_number.is_valid
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def is_form_valid?
|
|
22
|
+
phone_number.is_form_valid
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def is_emergency?
|
|
26
|
+
phone_number.type == 'emergency'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def is_mobile?
|
|
30
|
+
phone_number.type == 'mobile'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def is_landline?
|
|
34
|
+
phone_number.type == 'landline'
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def is_satellite?
|
|
38
|
+
phone_number.type == 'satellite'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def is_voip?
|
|
42
|
+
phone_number.type == 'voip'
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def is_data?
|
|
46
|
+
phone_number.type == 'data'
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def is_nongeo?
|
|
50
|
+
phone_number.type == 'nongeo'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def is_test?
|
|
54
|
+
phone_number.type == 'test'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def is_fictitious?
|
|
58
|
+
phone_number.type == 'fictitious'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def type
|
|
62
|
+
phone_number.type
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def region
|
|
66
|
+
phone_number.region
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def carrier
|
|
70
|
+
phone_number.carrier
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def description
|
|
74
|
+
phone_number.description
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def area_code
|
|
78
|
+
phone_number.area_code
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def dial_local
|
|
82
|
+
phone_number.number
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def dial_domestic
|
|
86
|
+
if (phone_number.number.to_s.size == 0)
|
|
87
|
+
return nil
|
|
88
|
+
else
|
|
89
|
+
"#{phone_number.area_code}#{phone_number.number}"
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def dial_international
|
|
94
|
+
if (phone_number.area_code.start_with?('0') || phone_number.number.start_with?('0'))
|
|
95
|
+
dial = "#{phone_number.area_code}#{phone_number.number}"
|
|
96
|
+
return dial.sub(/^0/, CNF.prefix)
|
|
97
|
+
else
|
|
98
|
+
return nil
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def format_local
|
|
103
|
+
if (phone_number.number.to_s.size == 0)
|
|
104
|
+
return nil
|
|
105
|
+
elsif (phone_number.number.to_s.size == 12)
|
|
106
|
+
return phone_number.number.sub(/^([0-9]{4})([0-9]{4})([0-9]{4})$/, '\1 \2 \3')
|
|
107
|
+
elsif (phone_number.number.to_s.size == 11)
|
|
108
|
+
return phone_number.number.sub(/^([0-9]{4})([0-9]{3})([0-9]{4})$/, '\1 \2 \3')
|
|
109
|
+
elsif (phone_number.number.to_s.size == 10)
|
|
110
|
+
return phone_number.number.sub(/^([0-9]{4})([0-9]{3})([0-9]{3})$/, '\1 \2 \3')
|
|
111
|
+
elsif (phone_number.number.to_s.size == 9)
|
|
112
|
+
return phone_number.number.sub(/^([0-9]{3})([0-9]{3})([0-9]{3})$/, '\1 \2 \3')
|
|
113
|
+
elsif (phone_number.number.to_s.size == 8)
|
|
114
|
+
return phone_number.number.sub(/^([0-9]{4})([0-9]{4})$/, '\1 \2')
|
|
115
|
+
elsif (phone_number.number.to_s.size == 7)
|
|
116
|
+
return phone_number.number.sub(/^([0-9]{3})([0-9]{4})$/, '\1 \2')
|
|
117
|
+
elsif (phone_number.number.to_s.size == 6)
|
|
118
|
+
return phone_number.number.sub(/^([0-9]{3})([0-9]{3})$/, '\1 \2')
|
|
119
|
+
elsif (phone_number.number.to_s.size < 6)
|
|
120
|
+
return phone_number.number
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def format_domestic
|
|
125
|
+
if phone_number.number.to_s.size == 0
|
|
126
|
+
nil
|
|
127
|
+
else
|
|
128
|
+
if phone_number.area_code.to_s.size == 0
|
|
129
|
+
format_local
|
|
130
|
+
else
|
|
131
|
+
"(#{phone_number.area_code}) #{format_local}"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def format_international
|
|
137
|
+
if phone_number.area_code.start_with?('0')
|
|
138
|
+
area_code = phone_number.area_code.sub(/^0/, '')
|
|
139
|
+
number = format_local
|
|
140
|
+
return "+#{CNF.prefix} (#{area_code}) #{number}"
|
|
141
|
+
elsif phone_number.number.start_with?('0')
|
|
142
|
+
number = format_local
|
|
143
|
+
number = number.sub(/^0/, '')
|
|
144
|
+
return "+#{CNF.prefix} #{number}"
|
|
145
|
+
else
|
|
146
|
+
return nil
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
private
|
|
152
|
+
|
|
153
|
+
def build
|
|
154
|
+
# Create a data structure
|
|
155
|
+
phone_number = OpenStruct.new(
|
|
156
|
+
is_valid: false,
|
|
157
|
+
is_form_valid: false,
|
|
158
|
+
type: nil,
|
|
159
|
+
region: nil,
|
|
160
|
+
carrier: nil,
|
|
161
|
+
description: nil,
|
|
162
|
+
area_code: nil,
|
|
163
|
+
number: nil
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
# Clean out non standard characters
|
|
167
|
+
cleaned = input.gsub(/[^0-9\+]/, '')
|
|
168
|
+
|
|
169
|
+
# Remove international prefix
|
|
170
|
+
cleaned = cleaned.gsub(/\+#{CNF.prefix}/, '0')
|
|
171
|
+
|
|
172
|
+
# Match Number to profile
|
|
173
|
+
CNF.phones.each do |profile|
|
|
174
|
+
m = Regexp.new(profile[:pattern]).match(cleaned)
|
|
175
|
+
if m then
|
|
176
|
+
phone_number.is_valid = true
|
|
177
|
+
phone_number.is_form_valid = profile[:valid]
|
|
178
|
+
phone_number.area_code = profile[:area_code]
|
|
179
|
+
phone_number.type = profile[:type]
|
|
180
|
+
phone_number.carrier = profile[:carrier]
|
|
181
|
+
phone_number.state = profile[:state]
|
|
182
|
+
phone_number.region = profile[:region]
|
|
183
|
+
phone_number.description = profile[:description]
|
|
184
|
+
phone_number.number = m[1]
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
phone_number
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
RSpec.describe AusPhones do
|
|
4
|
+
# before :all do
|
|
5
|
+
# @phone = AusPhones.new '+61 2 9900 0000'
|
|
6
|
+
# end
|
|
7
|
+
|
|
8
|
+
let(:phone) {AusPhones.new '+61 2 9900 0000'}
|
|
9
|
+
|
|
10
|
+
it 'takes one parameter and returns an AusPhones' do
|
|
11
|
+
expect(phone).to be_instance_of(AusPhones)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'recognises emergency numbers' do
|
|
15
|
+
expect(AusPhones.new('000').is_emergency?).to eq(true)
|
|
16
|
+
expect(AusPhones.new('999').is_emergency?).to eq(true)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it 'recognises emergency numbers as invalid' do
|
|
20
|
+
expect(AusPhones.new('000').is_valid?).to eq(true)
|
|
21
|
+
expect(AusPhones.new('999').is_valid?).to eq(true)
|
|
22
|
+
expect(AusPhones.new('000').is_form_valid?).to eq(false)
|
|
23
|
+
expect(AusPhones.new('999').is_form_valid?).to eq(false)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it 'validates central east region phone number as true' do
|
|
27
|
+
expect(AusPhones.new('+61 2 3300 0000').is_form_valid?).to eq(true)
|
|
28
|
+
expect(AusPhones.new('02 3300 0000').is_form_valid?).to eq(true)
|
|
29
|
+
expect(AusPhones.new('(02) 3300 0000').is_form_valid?).to eq(true)
|
|
30
|
+
expect(AusPhones.new('02-3300-0000').is_form_valid?).to eq(true)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it 'validates south east region phone number as true' do
|
|
34
|
+
expect(AusPhones.new('+61 3 3300 0000').is_form_valid?).to eq(true)
|
|
35
|
+
expect(AusPhones.new('03 3300 0000').is_form_valid?).to eq(true)
|
|
36
|
+
expect(AusPhones.new('(03) 3300 0000').is_form_valid?).to eq(true)
|
|
37
|
+
expect(AusPhones.new('03-3300-0000').is_form_valid?).to eq(true)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it 'validates north east region phone number as true' do
|
|
41
|
+
expect(AusPhones.new('+61 7 3300 0000').is_form_valid?).to eq(true)
|
|
42
|
+
expect(AusPhones.new('07 3300 0000').is_form_valid?).to eq(true)
|
|
43
|
+
expect(AusPhones.new('(07) 3300 0000').is_form_valid?).to eq(true)
|
|
44
|
+
expect(AusPhones.new('07-3300-0000').is_form_valid?).to eq(true)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it 'validates central and west region phone number as true' do
|
|
48
|
+
expect(AusPhones.new('+61 8 2500 0000').is_form_valid?).to eq(true)
|
|
49
|
+
expect(AusPhones.new('08 2500 0000').is_form_valid?).to eq(true)
|
|
50
|
+
expect(AusPhones.new('(08) 2500 0000').is_form_valid?).to eq(true)
|
|
51
|
+
expect(AusPhones.new('08-2500-0000').is_form_valid?).to eq(true)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
it 'validates mobile number' do
|
|
55
|
+
expect(AusPhones.new('+61 488 000 000').is_form_valid?).to eq(true)
|
|
56
|
+
expect(AusPhones.new('0488 000 000').is_form_valid?).to eq(true)
|
|
57
|
+
expect(AusPhones.new('(0488) 000 000').is_form_valid?).to eq(true)
|
|
58
|
+
expect(AusPhones.new('(0)488 000 000').is_form_valid?).to eq(true)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
it 'validates phone number as mobile' do
|
|
62
|
+
expect(AusPhones.new('+61 488 000 000').is_mobile?).to eq(true)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it 'validates mobile carrier' do
|
|
66
|
+
expect(AusPhones.new('0400 000 000').carrier).to eq('Telstra')
|
|
67
|
+
expect(AusPhones.new('0401 000 000').carrier).to eq('Optus')
|
|
68
|
+
expect(AusPhones.new('0404 000 000').carrier).to eq('Vodafone')
|
|
69
|
+
expect(AusPhones.new('0420 000 000').carrier).to eq('Rail Corporation New South Wales')
|
|
70
|
+
expect(AusPhones.new('0420 020 000').carrier).to eq('Dialogue Communications Pty Limited')
|
|
71
|
+
expect(AusPhones.new('0420 030 000').carrier).to eq('Symbio Network Pty Ltd')
|
|
72
|
+
expect(AusPhones.new('0420 100 000').carrier).to eq('Pivotel Satellite Pty Limited')
|
|
73
|
+
expect(AusPhones.new('0420 119 000').carrier).to eq('COMPATEL Limited')
|
|
74
|
+
expect(AusPhones.new('0469 000 000').carrier).to eq('Lycamobile')
|
|
75
|
+
expect(AusPhones.new('0488 800 000').carrier).to eq('My Number Pty Ltd')
|
|
76
|
+
expect(AusPhones.new('0489 840 000').carrier).to eq('Victorian Rail Track')
|
|
77
|
+
expect(AusPhones.new('0489 900 000').carrier).to eq('Novatel Telephony Pty Ltd')
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
it 'validates phone number as satellite' do
|
|
81
|
+
expect(AusPhones.new('014 000 000').is_satellite?).to eq(true)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
it 'validates phone number as voip' do
|
|
85
|
+
expect(AusPhones.new('0550 000 000').is_voip?).to eq(true)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
it 'validates phone number as data' do
|
|
89
|
+
expect(AusPhones.new('0198 000 000').is_data?).to eq(true)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
it 'validates fictitious numbers' do
|
|
93
|
+
expect(AusPhones.new('+61 1 5550 0000').is_fictitious?).to eq(true)
|
|
94
|
+
expect(AusPhones.new('+61 1 555 000 000').is_fictitious?).to eq(true)
|
|
95
|
+
expect(AusPhones.new('+61 1 7010 0000').is_fictitious?).to eq(true)
|
|
96
|
+
expect(AusPhones.new('+61 1 701 000 000').is_fictitious?).to eq(true)
|
|
97
|
+
expect(AusPhones.new('+61 2 5550 0000').is_fictitious?).to eq(true)
|
|
98
|
+
expect(AusPhones.new('+61 2 555 000 000').is_fictitious?).to eq(true)
|
|
99
|
+
expect(AusPhones.new('+61 2 7010 0000').is_fictitious?).to eq(true)
|
|
100
|
+
expect(AusPhones.new('+61 2 701 000 000').is_fictitious?).to eq(true)
|
|
101
|
+
expect(AusPhones.new('+61 3 5550 0000').is_fictitious?).to eq(true)
|
|
102
|
+
expect(AusPhones.new('+61 3 555 000 000').is_fictitious?).to eq(true)
|
|
103
|
+
expect(AusPhones.new('+61 3 7010 0000').is_fictitious?).to eq(true)
|
|
104
|
+
expect(AusPhones.new('+61 3 701 000 000').is_fictitious?).to eq(true)
|
|
105
|
+
expect(AusPhones.new('+61 4 5550 0000').is_fictitious?).to eq(true)
|
|
106
|
+
expect(AusPhones.new('+61 4 555 000 000').is_fictitious?).to eq(true)
|
|
107
|
+
expect(AusPhones.new('+61 4 7010 0000').is_fictitious?).to eq(true)
|
|
108
|
+
expect(AusPhones.new('+61 4 701 000 000').is_fictitious?).to eq(true)
|
|
109
|
+
expect(AusPhones.new('+61 5 5550 0000').is_fictitious?).to eq(true)
|
|
110
|
+
expect(AusPhones.new('+61 5 555 000 000').is_fictitious?).to eq(true)
|
|
111
|
+
expect(AusPhones.new('+61 5 7010 0000').is_fictitious?).to eq(true)
|
|
112
|
+
expect(AusPhones.new('+61 5 701 000 000').is_fictitious?).to eq(true)
|
|
113
|
+
expect(AusPhones.new('+61 6 5550 0000').is_fictitious?).to eq(true)
|
|
114
|
+
expect(AusPhones.new('+61 6 555 000 000').is_fictitious?).to eq(true)
|
|
115
|
+
expect(AusPhones.new('+61 6 7010 0000').is_fictitious?).to eq(true)
|
|
116
|
+
expect(AusPhones.new('+61 6 701 000 000').is_fictitious?).to eq(true)
|
|
117
|
+
expect(AusPhones.new('+61 7 5550 0000').is_fictitious?).to eq(true)
|
|
118
|
+
expect(AusPhones.new('+61 7 555 000 000').is_fictitious?).to eq(true)
|
|
119
|
+
expect(AusPhones.new('+61 7 7010 0000').is_fictitious?).to eq(true)
|
|
120
|
+
expect(AusPhones.new('+61 7 701 000 000').is_fictitious?).to eq(true)
|
|
121
|
+
expect(AusPhones.new('+61 8 5550 0000').is_fictitious?).to eq(true)
|
|
122
|
+
expect(AusPhones.new('+61 8 555 000 000').is_fictitious?).to eq(true)
|
|
123
|
+
expect(AusPhones.new('+61 8 7010 0000').is_fictitious?).to eq(true)
|
|
124
|
+
expect(AusPhones.new('+61 8 701 000 000').is_fictitious?).to eq(true)
|
|
125
|
+
expect(AusPhones.new('+61 9 5550 0000').is_fictitious?).to eq(true)
|
|
126
|
+
expect(AusPhones.new('+61 9 555 000 000').is_fictitious?).to eq(true)
|
|
127
|
+
expect(AusPhones.new('+61 9 7010 0000').is_fictitious?).to eq(true)
|
|
128
|
+
expect(AusPhones.new('+61 9 701 000 000').is_fictitious?).to eq(true)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
it 'validates phone number as test' do
|
|
132
|
+
expect(AusPhones.new('12711').is_test?).to eq(true)
|
|
133
|
+
expect(AusPhones.new('12722123').is_test?).to eq(true)
|
|
134
|
+
expect(AusPhones.new('1272312').is_test?).to eq(true)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
it 'validates test number carriers' do
|
|
138
|
+
expect(AusPhones.new('12722123').carrier).to eq('Telstra')
|
|
139
|
+
expect(AusPhones.new('1272312').carrier).to eq('Optus')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
it 'correctly identifies invalid phone numbers' do
|
|
143
|
+
expect(AusPhones.new('+61 2 9900 +0000').is_valid?).to eq(false)
|
|
144
|
+
expect(AusPhones.new('+61 2 9900 +0000').is_form_valid?).to eq(false)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
it 'identifies correct area codes' do
|
|
148
|
+
expect(AusPhones.new('+61 (2) 3300 0000').area_code).to eq('02')
|
|
149
|
+
expect(AusPhones.new('(02) 3300 0000').area_code).to eq('02')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
it 'generates number for dialing local' do
|
|
153
|
+
expect(AusPhones.new('(02) 3300 0000').dial_local).to eq('33000000')
|
|
154
|
+
expect(AusPhones.new('(0)488 000 000').dial_local).to eq('0488000000')
|
|
155
|
+
expect(AusPhones.new('1800 801 920').dial_local).to eq('1800801920')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
it 'generates number for dialing domestic' do
|
|
159
|
+
expect(AusPhones.new('(02) 3300 0000').dial_domestic).to eq('0233000000')
|
|
160
|
+
expect(AusPhones.new('(0)488 000 000').dial_domestic).to eq('0488000000')
|
|
161
|
+
expect(AusPhones.new('1800 801 920').dial_domestic).to eq('1800801920')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
it 'generates number for dialing international' do
|
|
165
|
+
expect(AusPhones.new('(02) 3300 0000').dial_international).to eq('61233000000')
|
|
166
|
+
expect(AusPhones.new('(0)488 000 000').dial_international).to eq('61488000000')
|
|
167
|
+
expect(AusPhones.new('1800 801 920').dial_international).to eq(nil)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
it 'format numbers for dialing local' do
|
|
172
|
+
expect(AusPhones.new('(02) 3300 0000').format_local).to eq('3300 0000')
|
|
173
|
+
expect(AusPhones.new('(0)488 000 000').format_local).to eq('0488 000 000')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
it 'format numbers for dialing domestic' do
|
|
177
|
+
expect(AusPhones.new('(02) 3300 0000').format_domestic).to eq('(02) 3300 0000')
|
|
178
|
+
expect(AusPhones.new('(0)488 000 000').format_domestic).to eq('0488 000 000')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
it 'format numbers for international dialing' do
|
|
182
|
+
expect(AusPhones.new('(02) 3300 0000').format_international).to eq('+61 (2) 3300 0000')
|
|
183
|
+
expect(AusPhones.new('(0)488 000 000').format_international).to eq('+61 488 000 000')
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/tasks/rspec.rake
ADDED
metadata
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: aus_phones
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.9.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- bevans157
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-05-25 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: activesupport
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '4.2'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '4.2'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.7'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.7'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '10.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '10.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: awesome_print
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rspec
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '3.0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '3.0'
|
|
83
|
+
description: 'AusPhones validates and identifies Australian phone numbers by region
|
|
84
|
+
and type (mobile, land-line etc) '
|
|
85
|
+
email:
|
|
86
|
+
- ben.s.evans@gmail.com
|
|
87
|
+
executables: []
|
|
88
|
+
extensions: []
|
|
89
|
+
extra_rdoc_files: []
|
|
90
|
+
files:
|
|
91
|
+
- ".gitignore"
|
|
92
|
+
- ".idea/.name"
|
|
93
|
+
- ".idea/aus_phones.iml"
|
|
94
|
+
- ".idea/codeStyleSettings.xml"
|
|
95
|
+
- ".idea/misc.xml"
|
|
96
|
+
- ".idea/modules.xml"
|
|
97
|
+
- ".idea/vcs.xml"
|
|
98
|
+
- ".idea/workspace.xml"
|
|
99
|
+
- Gemfile
|
|
100
|
+
- LICENSE.txt
|
|
101
|
+
- README.md
|
|
102
|
+
- Rakefile
|
|
103
|
+
- aus_phones.gemspec
|
|
104
|
+
- config/phones.yml
|
|
105
|
+
- lib/aus_phones.rb
|
|
106
|
+
- lib/aus_phones/version.rb
|
|
107
|
+
- spec/aus_phones_spec.rb
|
|
108
|
+
- spec/spec_helper.rb
|
|
109
|
+
- tasks/rspec.rake
|
|
110
|
+
homepage: https://github.com/bevans157/aus_phone
|
|
111
|
+
licenses:
|
|
112
|
+
- MIT
|
|
113
|
+
metadata: {}
|
|
114
|
+
post_install_message:
|
|
115
|
+
rdoc_options: []
|
|
116
|
+
require_paths:
|
|
117
|
+
- lib
|
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - ">="
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0'
|
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
|
+
requirements:
|
|
125
|
+
- - ">="
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: '0'
|
|
128
|
+
requirements: []
|
|
129
|
+
rubyforge_project:
|
|
130
|
+
rubygems_version: 2.4.5
|
|
131
|
+
signing_key:
|
|
132
|
+
specification_version: 4
|
|
133
|
+
summary: Australian phone number validator
|
|
134
|
+
test_files:
|
|
135
|
+
- spec/aus_phones_spec.rb
|
|
136
|
+
- spec/spec_helper.rb
|