mcc_mnc 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +2 -0
- data/data/mcc_mnc_full.yaml +7146 -0
- data/data/mcc_mnc_lite.yaml +1182 -0
- data/data/mnc_cc.yaml +201 -0
- data/lib/mcc_mnc/mcc.rb +20 -0
- data/lib/mcc_mnc/version.rb +3 -0
- data/lib/mcc_mnc.rb +6 -0
- data/mcc_mnc.gemspec +23 -0
- metadata +84 -0
data/data/mnc_cc.yaml
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
---
|
2
|
+
289: 995
|
3
|
+
412: 93
|
4
|
+
276: 355
|
5
|
+
603: 213
|
6
|
+
213: 376
|
7
|
+
631: 244
|
8
|
+
722: 54
|
9
|
+
283: 374
|
10
|
+
363: 297
|
11
|
+
505: 61
|
12
|
+
400: 994
|
13
|
+
426: 973
|
14
|
+
470: 880
|
15
|
+
257: 375
|
16
|
+
206: 32
|
17
|
+
702: 501
|
18
|
+
616: 229
|
19
|
+
402: 975
|
20
|
+
736: 591
|
21
|
+
218: 387
|
22
|
+
652: 267
|
23
|
+
724: 55
|
24
|
+
528: 673
|
25
|
+
284: 359
|
26
|
+
613: 226
|
27
|
+
642: 257
|
28
|
+
456: 855
|
29
|
+
624: 237
|
30
|
+
302: 1
|
31
|
+
625: 238
|
32
|
+
623: 236
|
33
|
+
622: 235
|
34
|
+
730: 56
|
35
|
+
460: 86
|
36
|
+
0: 870
|
37
|
+
732: 57
|
38
|
+
654: 269
|
39
|
+
629: 242
|
40
|
+
548: 682
|
41
|
+
712: 506
|
42
|
+
219: 385
|
43
|
+
368: 53
|
44
|
+
280: 357
|
45
|
+
630: 243
|
46
|
+
238: 45
|
47
|
+
638: 253
|
48
|
+
514: 670
|
49
|
+
740: 593
|
50
|
+
602: 20
|
51
|
+
706: 503
|
52
|
+
627: 240
|
53
|
+
657: 291
|
54
|
+
248: 372
|
55
|
+
636: 251
|
56
|
+
288: 298
|
57
|
+
542: 679
|
58
|
+
244: 358
|
59
|
+
208: 33
|
60
|
+
547: 689
|
61
|
+
628: 241
|
62
|
+
607: 220
|
63
|
+
282: 995
|
64
|
+
262: 49
|
65
|
+
620: 233
|
66
|
+
266: 350
|
67
|
+
202: 30
|
68
|
+
290: 299
|
69
|
+
704: 502
|
70
|
+
611: 224
|
71
|
+
632: 245
|
72
|
+
738: 592
|
73
|
+
372: 509
|
74
|
+
708: 504
|
75
|
+
454: 852
|
76
|
+
216: 36
|
77
|
+
404: 91
|
78
|
+
405: 91
|
79
|
+
510: 62
|
80
|
+
432: 98
|
81
|
+
418: 964
|
82
|
+
272: 353
|
83
|
+
234: 44
|
84
|
+
425: 972
|
85
|
+
222: 39
|
86
|
+
612: 225
|
87
|
+
440: 81
|
88
|
+
416: 962
|
89
|
+
401: 7
|
90
|
+
639: 254
|
91
|
+
545: 686
|
92
|
+
467: 850
|
93
|
+
450: 82
|
94
|
+
419: 965
|
95
|
+
437: 996
|
96
|
+
457: 856
|
97
|
+
247: 371
|
98
|
+
415: 961
|
99
|
+
651: 266
|
100
|
+
618: 231
|
101
|
+
606: 218
|
102
|
+
295: 423
|
103
|
+
246: 370
|
104
|
+
270: 352
|
105
|
+
455: 853
|
106
|
+
294: 389
|
107
|
+
646: 261
|
108
|
+
650: 265
|
109
|
+
502: 60
|
110
|
+
472: 960
|
111
|
+
610: 223
|
112
|
+
278: 356
|
113
|
+
551: 692
|
114
|
+
609: 222
|
115
|
+
617: 230
|
116
|
+
334: 52
|
117
|
+
550: 691
|
118
|
+
259: 373
|
119
|
+
212: 377
|
120
|
+
428: 976
|
121
|
+
297: 382
|
122
|
+
604: 212
|
123
|
+
643: 258
|
124
|
+
414: 95
|
125
|
+
649: 264
|
126
|
+
536: 674
|
127
|
+
429: 977
|
128
|
+
204: 31
|
129
|
+
546: 687
|
130
|
+
530: 64
|
131
|
+
710: 505
|
132
|
+
614: 227
|
133
|
+
621: 234
|
134
|
+
555: 683
|
135
|
+
242: 47
|
136
|
+
422: 968
|
137
|
+
410: 92
|
138
|
+
552: 680
|
139
|
+
714: 507
|
140
|
+
537: 675
|
141
|
+
744: 595
|
142
|
+
716: 51
|
143
|
+
515: 63
|
144
|
+
260: 48
|
145
|
+
268: 351
|
146
|
+
330: 1
|
147
|
+
427: 974
|
148
|
+
226: 40
|
149
|
+
250: 7
|
150
|
+
635: 250
|
151
|
+
308: 508
|
152
|
+
549: 685
|
153
|
+
292: 378
|
154
|
+
626: 239
|
155
|
+
420: 966
|
156
|
+
608: 221
|
157
|
+
220: 381
|
158
|
+
633: 248
|
159
|
+
619: 232
|
160
|
+
525: 65
|
161
|
+
231: 421
|
162
|
+
293: 386
|
163
|
+
540: 677
|
164
|
+
637: 252
|
165
|
+
655: 27
|
166
|
+
214: 34
|
167
|
+
413: 94
|
168
|
+
634: 249
|
169
|
+
746: 597
|
170
|
+
653: 268
|
171
|
+
240: 46
|
172
|
+
228: 41
|
173
|
+
417: 963
|
174
|
+
466: 886
|
175
|
+
436: 992
|
176
|
+
640: 255
|
177
|
+
520: 66
|
178
|
+
615: 228
|
179
|
+
539: 676
|
180
|
+
605: 216
|
181
|
+
286: 90
|
182
|
+
438: 993
|
183
|
+
553: 688
|
184
|
+
641: 256
|
185
|
+
255: 380
|
186
|
+
424: 971
|
187
|
+
235: 44
|
188
|
+
310: 1
|
189
|
+
311: 1
|
190
|
+
312: 1
|
191
|
+
313: 1
|
192
|
+
316: 1
|
193
|
+
748: 598
|
194
|
+
434: 998
|
195
|
+
541: 678
|
196
|
+
225: 39
|
197
|
+
734: 58
|
198
|
+
452: 84
|
199
|
+
421: 967
|
200
|
+
645: 260
|
201
|
+
648: 263
|
data/lib/mcc_mnc/mcc.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
module MCC_MNC
|
2
|
+
class MCC
|
3
|
+
attr_reader :mcc, :cc
|
4
|
+
|
5
|
+
def initialize(mcc, cc)
|
6
|
+
@mcc, @cc = mcc, cc
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.find(mcc)
|
10
|
+
@mcc_cc ||= YAML.load(File.read('data/mnc_cc.yaml'))
|
11
|
+
cc = @mcc_cc[Integer("#{mcc}", 10)]
|
12
|
+
new(mcc, cc)
|
13
|
+
end
|
14
|
+
|
15
|
+
def inspect
|
16
|
+
"<MCC mcc: #{mcc}, cc: #{cc}>"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
data/lib/mcc_mnc.rb
ADDED
data/mcc_mnc.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mcc_mnc/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mcc_mnc"
|
8
|
+
spec.version = MCC_MNC::VERSION
|
9
|
+
spec.authors = ["Maciek Dubiński"]
|
10
|
+
spec.email = ["maciek@dubinski.net"]
|
11
|
+
spec.summary = %q{Mobile Country Code / Mobile Network Code lookup tool}
|
12
|
+
spec.description = %q{Mobile Country Code / Mobile Network Code lookup tool}
|
13
|
+
spec.homepage = "https://github.com/irvingwashington/mcc_mnc"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mcc_mnc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Maciek Dubiński
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Mobile Country Code / Mobile Network Code lookup tool
|
42
|
+
email:
|
43
|
+
- maciek@dubinski.net
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE.txt
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- data/mcc_mnc_full.yaml
|
54
|
+
- data/mcc_mnc_lite.yaml
|
55
|
+
- data/mnc_cc.yaml
|
56
|
+
- lib/mcc_mnc.rb
|
57
|
+
- lib/mcc_mnc/mcc.rb
|
58
|
+
- lib/mcc_mnc/version.rb
|
59
|
+
- mcc_mnc.gemspec
|
60
|
+
homepage: https://github.com/irvingwashington/mcc_mnc
|
61
|
+
licenses:
|
62
|
+
- MIT
|
63
|
+
metadata: {}
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
requirements: []
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 2.2.2
|
81
|
+
signing_key:
|
82
|
+
specification_version: 4
|
83
|
+
summary: Mobile Country Code / Mobile Network Code lookup tool
|
84
|
+
test_files: []
|