phony 2.7.0 → 2.7.1

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: 055df3c7e25fbdb39a1bbab1c292b56a55d7e7e4
4
- data.tar.gz: ef63c44cee1c6dd42f037e3e1718c5f709e05eed
3
+ metadata.gz: b98c697126632e45ed3dfc739db33485690e62eb
4
+ data.tar.gz: 9ab5998082caef35ab68faa2193986bd46574ebd
5
5
  SHA512:
6
- metadata.gz: 93d72fa4508dd5e8d4f317a4ffa41ad997a2b18278b3c66210dd72a7d1083153a73d22d4504aae031f9a60ee2706ed1b0a2261d72c534b0c8ba71801ef8cd2c8
7
- data.tar.gz: e5c2bc906b360210632c22ab3eccfdc896fe775d1abc701c2c860821c1d781df5a1b4e437b2806b507aefc182236a62297bd18c5cc5c7c5a0feade85670b6263
6
+ metadata.gz: fa170648c998124add0388d410af347dc2133ec4b8cd3b3716ef470d6e5040cd9c6842f1eab48ce9ebdcf0f281ed2e8ac720408fc2f3a6d8e2e9a69226279c28
7
+ data.tar.gz: a985480e774bedda8e3b6f3628d00e3b857b28f36d7246a6ff9616079a26cf02b1135ec402a5c9e6ae7dd90771d2976168565f11831ae61b2efbcd2147c11b48
@@ -96,10 +96,10 @@ special_numbers_4 = %w{ 3003 4004 4020 }
96
96
 
97
97
  Phony.define do
98
98
  country '55',
99
- match(/^(11|12|13|14|15|16|17|18|19|21|22|24|27|28)9\d{8}$/) >> split(5,4) |
99
+ match(/^(11|12|13|14|15|16|17|18|19|21|22|24|27|28|91|92|93|94|95|96|97|98|99)9\d{8}$/) >> split(5,4) |
100
100
  match(ndcs) >> split(4,4) |
101
101
  one_of(special_numbers_3_4) >> split(3,4) |
102
102
  one_of(special_numbers_4) >> split(4) |
103
103
  one_of(service) >> split(3) |
104
104
  fixed(3) >> split(3)
105
- end
105
+ end
@@ -108,6 +108,7 @@ describe 'country descriptions' do
108
108
  it_splits '26776712345', %w(267 7 6712 345)
109
109
  it_splits '26781234567', %w(267 8 1234 567)
110
110
  end
111
+
111
112
  describe 'Brazil' do
112
113
  it_splits '551112341234', ['55', '11', '1234', '1234']
113
114
  it_splits '5511981231234', ['55', '11', '98123', '1234'] # São Paulo's 9 digits mobile
@@ -117,7 +118,7 @@ describe 'country descriptions' do
117
118
  it_splits '5519991311234', ['55', '19', '99131', '1234'] # Rio de Janeiro's 9 digits mobile
118
119
 
119
120
  context "special states with 9 in mobile" do
120
- %w{ 11 12 13 14 15 16 17 18 19 21 22 24 27 28}.each do |state_code|
121
+ %w{ 11 12 13 14 15 16 17 18 19 21 22 24 27 28 91 92 93 94 95 96 97 98 99}.each do |state_code|
121
122
  it_splits "55#{state_code}993051123", ['55', state_code, '99305', '1123']
122
123
  end
123
124
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2014-11-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: ! 'Fast international phone number (E164 standard) normalizing, splitting
13
+ description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national
15
15
  (0..), and local.'
16
16
  email: florian.hanke+phony@gmail.com
@@ -19,6 +19,9 @@ extensions: []
19
19
  extra_rdoc_files:
20
20
  - README.textile
21
21
  files:
22
+ - README.textile
23
+ - lib/phony.rb
24
+ - lib/phony/countries.rb
22
25
  - lib/phony/countries/austria.rb
23
26
  - lib/phony/countries/bangladesh.rb
24
27
  - lib/phony/countries/belarus.rb
@@ -57,7 +60,6 @@ files:
57
60
  - lib/phony/countries/uruguay.rb
58
61
  - lib/phony/countries/vietnam.rb
59
62
  - lib/phony/countries/zimbabwe.rb
60
- - lib/phony/countries.rb
61
63
  - lib/phony/country.rb
62
64
  - lib/phony/country_codes.rb
63
65
  - lib/phony/dsl.rb
@@ -72,8 +74,6 @@ files:
72
74
  - lib/phony/national_splitters/variable.rb
73
75
  - lib/phony/trunk_code.rb
74
76
  - lib/phony/vanity.rb
75
- - lib/phony.rb
76
- - README.textile
77
77
  - spec/functional/error_spec.rb
78
78
  - spec/functional/normalize_spec.rb
79
79
  - spec/functional/plausibility_spec.rb
@@ -100,17 +100,17 @@ require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ! '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.0.3
113
+ rubygems_version: 2.2.2
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Fast international phone number (E164 standard) normalizing, splitting and