phonie 3.1.11 → 3.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +5 -0
- data/Readme.rdoc +1 -0
- data/lib/phonie/data/phone_countries.yml +3 -0
- data/lib/phonie/version.rb +1 -1
- data/test/countries/id_test.rb +29 -0
- metadata +5 -114
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b02f64163737c849b8fede3e9d4e88a9d39ef6d
|
4
|
+
data.tar.gz: 8c7ea1f1d92601eff986422d8db0e1d59bdd9f20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69f76f8f160aed2a8158e86f0dc8798c6e774a68387a321fb6084aa229aed8b45cbf369cfc3844f1f33e3f50d7c8fa2888bd344b6e13b2bc0ccb3cb2ab4a0c3a
|
7
|
+
data.tar.gz: 289c2ca6a9bb502970bf7e75bd5db3ffde4459be8af56910618bbec817180c83a56188c38eaa584a1365706ed83fc8ad205d2e3cc8f2e93ed12777035a0f2cb6
|
data/Changelog.md
CHANGED
data/Readme.rdoc
CHANGED
data/lib/phonie/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
|
+
|
3
|
+
## Indonesia
|
4
|
+
class IDTest < Phonie::TestCase
|
5
|
+
def test_mobile
|
6
|
+
parse_test('6281311122233', '62', '813', '11122233', "Indonesia", true)
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_long_with_default_country_code
|
10
|
+
Phonie.configuration.default_country_code = '62'
|
11
|
+
parse_test('81311122233', '62', '813', '11122233')
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_short_with_default_country_code_and_area_code
|
15
|
+
Phonie.configuration.default_country_code = '62'
|
16
|
+
Phonie.configuration.default_area_code = '813'
|
17
|
+
parse_test('11122233', '62', '813', '11122233')
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_lengths
|
21
|
+
Phonie.configuration.default_country_code = '62'
|
22
|
+
|
23
|
+
phone = Phonie::Phone.parse("81311122233")
|
24
|
+
assert phone
|
25
|
+
|
26
|
+
phone = Phonie::Phone.parse("813111222334")
|
27
|
+
assert_nil phone
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phonie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomislav Car
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-07-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activemodel
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- test/countries/hr_test.rb
|
152
152
|
- test/countries/ht_test.rb
|
153
153
|
- test/countries/hu_test.rb
|
154
|
+
- test/countries/id_test.rb
|
154
155
|
- test/countries/ie_test.rb
|
155
156
|
- test/countries/il_test.rb
|
156
157
|
- test/countries/in_test.rb
|
@@ -234,118 +235,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
235
|
version: '0'
|
235
236
|
requirements: []
|
236
237
|
rubyforge_project:
|
237
|
-
rubygems_version: 2.2.
|
238
|
+
rubygems_version: 2.2.2
|
238
239
|
signing_key:
|
239
240
|
specification_version: 4
|
240
241
|
summary: Phone number parsing, validation and formatting
|
241
|
-
test_files:
|
242
|
-
- test/countries/ae_test.rb
|
243
|
-
- test/countries/af_test.rb
|
244
|
-
- test/countries/al_test.rb
|
245
|
-
- test/countries/am_test.rb
|
246
|
-
- test/countries/ar_test.rb
|
247
|
-
- test/countries/at_test.rb
|
248
|
-
- test/countries/au_test.rb
|
249
|
-
- test/countries/az_test.rb
|
250
|
-
- test/countries/ba_test.rb
|
251
|
-
- test/countries/bd_test.rb
|
252
|
-
- test/countries/be_test.rb
|
253
|
-
- test/countries/bf_test.rb
|
254
|
-
- test/countries/bg_test.rb
|
255
|
-
- test/countries/bo_test.rb
|
256
|
-
- test/countries/br_test.rb
|
257
|
-
- test/countries/bs_test.rb
|
258
|
-
- test/countries/bt_test.rb
|
259
|
-
- test/countries/by_test.rb
|
260
|
-
- test/countries/bz_test.rb
|
261
|
-
- test/countries/ca_test.rb
|
262
|
-
- test/countries/ch_test.rb
|
263
|
-
- test/countries/cl_test.rb
|
264
|
-
- test/countries/cn_test.rb
|
265
|
-
- test/countries/co_test.rb
|
266
|
-
- test/countries/cr_test.rb
|
267
|
-
- test/countries/cy_test.rb
|
268
|
-
- test/countries/cz_test.rb
|
269
|
-
- test/countries/de_test.rb
|
270
|
-
- test/countries/dk_test.rb
|
271
|
-
- test/countries/dz_test.rb
|
272
|
-
- test/countries/ec_test.rb
|
273
|
-
- test/countries/ee_test.rb
|
274
|
-
- test/countries/eg_test.rb
|
275
|
-
- test/countries/es_test.rb
|
276
|
-
- test/countries/et_test.rb
|
277
|
-
- test/countries/fi_test.rb
|
278
|
-
- test/countries/fr_test.rb
|
279
|
-
- test/countries/gb_test.rb
|
280
|
-
- test/countries/ge_test.rb
|
281
|
-
- test/countries/gf_test.rb
|
282
|
-
- test/countries/gh_test.rb
|
283
|
-
- test/countries/gr_test.rb
|
284
|
-
- test/countries/gt_test.rb
|
285
|
-
- test/countries/gu_test.rb
|
286
|
-
- test/countries/gy_test.rb
|
287
|
-
- test/countries/hk_test.rb
|
288
|
-
- test/countries/hr_test.rb
|
289
|
-
- test/countries/ht_test.rb
|
290
|
-
- test/countries/hu_test.rb
|
291
|
-
- test/countries/ie_test.rb
|
292
|
-
- test/countries/il_test.rb
|
293
|
-
- test/countries/in_test.rb
|
294
|
-
- test/countries/iq_test.rb
|
295
|
-
- test/countries/ir_test.rb
|
296
|
-
- test/countries/is_test.rb
|
297
|
-
- test/countries/it_test.rb
|
298
|
-
- test/countries/jp_test.rb
|
299
|
-
- test/countries/ke_test.rb
|
300
|
-
- test/countries/kh_text.rb
|
301
|
-
- test/countries/km_test.rb
|
302
|
-
- test/countries/kr_test.rb
|
303
|
-
- test/countries/kw_test.rb
|
304
|
-
- test/countries/lk_test.rb
|
305
|
-
- test/countries/lt_test.rb
|
306
|
-
- test/countries/lu_test.rb
|
307
|
-
- test/countries/lv_test.rb
|
308
|
-
- test/countries/ma_test.rb
|
309
|
-
- test/countries/me_test.rb
|
310
|
-
- test/countries/mt_test.rb
|
311
|
-
- test/countries/mu_test.rb
|
312
|
-
- test/countries/mx_test.rb
|
313
|
-
- test/countries/ng_test.rb
|
314
|
-
- test/countries/ni_test.rb
|
315
|
-
- test/countries/nl_test.rb
|
316
|
-
- test/countries/no_test.rb
|
317
|
-
- test/countries/np_test.rb
|
318
|
-
- test/countries/nz_test.rb
|
319
|
-
- test/countries/ph_test.rb
|
320
|
-
- test/countries/pk_test.rb
|
321
|
-
- test/countries/pl_test.rb
|
322
|
-
- test/countries/pr_test.rb
|
323
|
-
- test/countries/pt_test.rb
|
324
|
-
- test/countries/qa_test.rb
|
325
|
-
- test/countries/ro_test.rb
|
326
|
-
- test/countries/rs_test.rb
|
327
|
-
- test/countries/ru_test.rb
|
328
|
-
- test/countries/sa_test.rb
|
329
|
-
- test/countries/se_test.rb
|
330
|
-
- test/countries/sg_test.rb
|
331
|
-
- test/countries/si_test.rb
|
332
|
-
- test/countries/sk_test.rb
|
333
|
-
- test/countries/sn_test.rb
|
334
|
-
- test/countries/sv_test.rb
|
335
|
-
- test/countries/th_test.rb
|
336
|
-
- test/countries/tn_test.rb
|
337
|
-
- test/countries/to_test.rb
|
338
|
-
- test/countries/tr_test.rb
|
339
|
-
- test/countries/tt_test.rb
|
340
|
-
- test/countries/tw_test.rb
|
341
|
-
- test/countries/ua_test.rb
|
342
|
-
- test/countries/us_test.rb
|
343
|
-
- test/countries/uy_test.rb
|
344
|
-
- test/countries/vn_test.rb
|
345
|
-
- test/countries/za_test.rb
|
346
|
-
- test/countries/zw_test.rb
|
347
|
-
- test/country_test.rb
|
348
|
-
- test/extension_test.rb
|
349
|
-
- test/phone_test.rb
|
350
|
-
- test/railties/validator_test.rb
|
351
|
-
- test/test_helper.rb
|
242
|
+
test_files: []
|