phonie 3.1.4 → 3.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91826b9ba490e3278c49a0cc9a5972fab533b79e
4
- data.tar.gz: 53866ac14eeff195795a4d6609dd357fa7d895c8
3
+ metadata.gz: 313c452c1fe65176f2a8492c1223b1f61efe017c
4
+ data.tar.gz: 342f4a57124026c40429ca1ca5897668ea71e7f9
5
5
  SHA512:
6
- metadata.gz: eb2c113330a3e967996307db8d1845acca0bfe5f6f0314cb3df5b709ae1fc10a439a586b04e81b3f6418904241d012c210003e90efb5c6abfeec3809af8c6612
7
- data.tar.gz: 15f0fd46e9c4c3d847786ca437fec54d6b9eaefb973b2de4ba2a8f38214fb4a284fc7b10b3930c95c9f3168df5723d21711d5837a36dba545872305ed34f9bb5
6
+ metadata.gz: c60bb1e0a7f7b65b48efa58458868afb7db034cfbf92169d3aebe61efeea69bbfeee9a68b1aee9eb90503af8bf2a30e3d0ac04d54bba68074636dec7796ef4fd
7
+ data.tar.gz: c2205acaf886b2789268810670ab44fcb205af901fcdf081e8383e14eb608643c28b80ca46d2f1dab157730d7b2e92733f9235da060d07c5df7860fa24f32037
data/Changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ 3.1.5
2
+ =====
3
+
4
+ * Adds support for Hong Kong
5
+ * Fixes mobile parsing for Thailand
6
+
1
7
  3.1.4
2
8
  =====
3
9
 
data/Readme.rdoc CHANGED
@@ -138,6 +138,7 @@ Currently tested on:
138
138
  [GT] Guatemala
139
139
  [GU] Guam
140
140
  [GY] Guyana
141
+ [HK] Hong Kong
141
142
  [HR] Croatia
142
143
  [HU] Hungary
143
144
  [IE] Ireland
@@ -608,6 +608,10 @@
608
608
  :char_2_code: None
609
609
  :iso_3166_code: HK
610
610
  :name: Hong Kong
611
+ :area_code: 2|3|5|6|7|8|9
612
+ :number_format: \d{8}
613
+ :mobile_format: (5|6|7|9)\d{7}
614
+ :local_number_format: \d{7}
611
615
  :international_dialing_prefix: '001'
612
616
  -
613
617
  :country_code: '372'
@@ -1045,8 +1049,8 @@
1045
1049
  :international_dialing_prefix: '001'
1046
1050
  :area_code: '(2|[3-9]\d)'
1047
1051
  :local_number_format: '\d{6,7}'
1048
- :number_format: '\d{8}'
1049
- :mobile_format: '([6,8,9][0-9])\d{6}'
1052
+ :number_format: '\d{8,9}'
1053
+ :mobile_format: '[6,8,9]\d{7,8}'
1050
1054
  -
1051
1055
  :country_code: '886'
1052
1056
  :national_dialing_prefix: None
@@ -1,3 +1,3 @@
1
1
  module Phonie
2
- VERSION = '3.1.4'
2
+ VERSION = '3.1.5'
3
3
  end
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ ## Hong Kong
4
+ class HKTest < Phonie::TestCase
5
+ def test_local
6
+ parse_test('+85225555555', '852', '2', '5555555', 'Hong Kong', false)
7
+ end
8
+
9
+ def test_mobile
10
+ parse_test('+85265555555', '852', '6', '5555555', 'Hong Kong', true)
11
+ end
12
+ end
13
+
@@ -8,6 +8,7 @@ class THTest < Phonie::TestCase
8
8
  end
9
9
 
10
10
  def test_mobile
11
+ parse_test('+66940734567', '66', '94', '0734567', 'Thailand', true)
11
12
  parse_test('+6687342563', '66', '87', '342563', 'Thailand', true)
12
13
  end
13
14
  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
4
+ version: 3.1.5
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: 2014-07-27 00:00:00.000000000 Z
15
+ date: 2014-08-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activemodel
@@ -147,6 +147,7 @@ files:
147
147
  - test/countries/gt_test.rb
148
148
  - test/countries/gu_test.rb
149
149
  - test/countries/gy_test.rb
150
+ - test/countries/hk_test.rb
150
151
  - test/countries/hr_test.rb
151
152
  - test/countries/ht_test.rb
152
153
  - test/countries/hu_test.rb
@@ -282,6 +283,7 @@ test_files:
282
283
  - test/countries/gt_test.rb
283
284
  - test/countries/gu_test.rb
284
285
  - test/countries/gy_test.rb
286
+ - test/countries/hk_test.rb
285
287
  - test/countries/hr_test.rb
286
288
  - test/countries/ht_test.rb
287
289
  - test/countries/hu_test.rb