phony 2.14.1 → 2.14.2

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: 6f176fe5c0972820c2a7b6c68a28134df005a268
4
- data.tar.gz: 59bda0f14c11a48cc4f11798fc9d74cb63c21fe8
3
+ metadata.gz: 0397d5e261947d0331ec2fb7164e9838bd785534
4
+ data.tar.gz: 386ad88c4cc8ded7c5d7635a336000c6666cb099
5
5
  SHA512:
6
- metadata.gz: e6e8c2d1de18eed818f6f039ef2c26e554aa1e4e71a8665bead03d2ef99a263a2540eb0fac72e4bbd0ebe00a146e5dd326237745e99ff74380fa5e9fab901b2a
7
- data.tar.gz: 201013ab59ddfc703d2da4044066324c87d1befe6dca48fbecdbc8d5952ac7ae64765bff59c630109f19647a7cc039eb717e74c5b326fd2a2fddcd466cc6c5fc
6
+ metadata.gz: 1e97dba8ca0702c309138861c48af8b156408282509677579367458fe7335ac13d345e84ca17eab85d6c67dfb01447c1c7c08889f6026d82776f9651f6000565
7
+ data.tar.gz: 32f74b1cfdd3d4301c1e60526cca67e5b0ee2b765c1230bf66e7a05dcf370d3d1a7afded3ce51587615115e61f3fda2183d3f67bccb781b94071b3e22812ece1
data/README.textile CHANGED
@@ -11,6 +11,11 @@ The (admittedly crazy) goal of this Gem is to be able to normalize/format/split
11
11
 
12
12
  Used in: "airbnb.com":http://airbnb.com, "socialcam.com":http://socialcam.com, "zendesk.com":http://www.zendesk.com/ (and many, many others).
13
13
 
14
+ h2. Runtime Memory Usage
15
+
16
+ According to "memory_profiler":https://github.com/SamSaffron/memory_profiler, the Phony gem uses roughly 1 MB of memory per Ruby process.
17
+ Usage was generated using: @ruby -e 'require "memory_profiler"; MemoryProfiler.report(allow_files: "phony"){ require "phony" }.pretty_print'@
18
+
14
19
  h2. Description
15
20
 
16
21
  This gem normalizes, formats and splits "*E164 phone numbers*":http://en.wikipedia.org/wiki/E.164. A valid E164 phone number *must* include a country code.
@@ -22,6 +27,7 @@ E164 numbers are international numbers with a country dial prefix, usually an ar
22
27
 
23
28
  It currently handles the countries listed at the end of this README.
24
29
 
30
+ It is covered by roughly 1,800 tests (June 2105).
25
31
  If it doesn't work, please "enter an issue":http://github.com/floere/phony/issues or better, fork and "send a pull request":http://github.com/floere/phony/pulls.
26
32
 
27
33
  h2. Installation
@@ -96,7 +96,7 @@ 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|91|92|93|94|95|96|97|98|99)9\d{8}$/) >> split(5,4) |
99
+ match(/^(11|12|13|14|15|16|17|18|19|21|22|24|27|28|81|82|83|84|85|86|87|88|89|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) |
@@ -125,7 +125,7 @@ describe 'country descriptions' do
125
125
  it_splits '5519991311234', ['55', '19', '99131', '1234'] # Rio de Janeiro's 9 digits mobile
126
126
 
127
127
  context "special states with 9 in mobile" do
128
- %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|
128
+ %w{ 11 12 13 14 15 16 17 18 19 21 22 24 27 28 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 97 98 99}.each do |state_code|
129
129
  it_splits "55#{state_code}993051123", ['55', state_code, '99305', '1123']
130
130
  end
131
131
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.1
4
+ version: 2.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-26 00:00:00.000000000 Z
11
+ date: 2015-06-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national