Permalink
Browse files

+ phony rename

  • Loading branch information...
1 parent 638d8c1 commit cedc4c2f91d3f358debf18bc8cb8cb0af71cf8ec @floere committed Nov 4, 2010
Showing with 257 additions and 254 deletions.
  1. +1 −1 LICENSE
  2. +46 −46 README.textile
  3. +18 −18 doc/classes/E164.html
  4. +2 −2 doc/classes/E164.src/M000003.html
  5. +2 −2 doc/classes/E164.src/M000004.html
  6. +2 −2 doc/classes/E164.src/M000005.html
  7. +2 −2 doc/classes/E164.src/M000006.html
  8. +7 −7 doc/classes/E164/NDC.html
  9. +1 −1 doc/classes/E164/NDC.src/M000007.html
  10. +2 −2 doc/classes/E164/NDC/Austria.html
  11. +2 −2 doc/classes/E164/NDC/FixedSize.html
  12. +1 −1 doc/classes/E164/NDC/FixedSize.src/M000011.html
  13. +1 −1 doc/classes/E164/NDC/FixedSize.src/M000012.html
  14. +2 −2 doc/classes/E164/NDC/Germany.html
  15. +2 −2 doc/classes/E164/NDC/Prefix.html
  16. +1 −1 doc/classes/E164/NDC/Prefix.src/M000008.html
  17. +1 −1 doc/classes/E164/NDC/Prefix.src/M000009.html
  18. +1 −1 doc/classes/E164/NDC/Prefix.src/M000010.html
  19. +4 −4 doc/classes/E164/NDC/Splitter.html
  20. +1 −1 doc/classes/E164/NDC/Splitter.src/M000013.html
  21. +1 −1 doc/classes/E164/NDC/Splitter.src/M000014.html
  22. +1 −1 doc/classes/E164/NDC/Splitter.src/M000015.html
  23. +1 −1 doc/classes/E164/NDC/Splitter.src/M000016.html
  24. +1 −1 doc/classes/E164/NDC/Splitter.src/M000017.html
  25. +1 −1 doc/classes/E164/NDC/Splitter.src/M000018.html
  26. +4 −4 doc/files/lib/e164_rb.html
  27. +3 −3 doc/files/spec/lib/e164_spec_rb.html
  28. +1 −1 lib/ndc/austria.rb
  29. +3 −3 lib/ndc/fixed_size.rb
  30. +1 −1 lib/ndc/germany.rb
  31. +1 −1 lib/ndc/prefix.rb
  32. +3 −3 lib/ndc/splitter.rb
  33. +12 −9 lib/{e164.rb → phony.rb}
  34. +5 −5 e164.gemspec → phony.gemspec
  35. BIN pkg/e164-0.0.3.gem
  36. BIN pkg/e164-0.0.4.gem
  37. BIN pkg/e164-0.0.5.gem
  38. BIN pkg/e164-0.0.6.gem
  39. BIN pkg/e164-0.0.7.gem
  40. BIN pkg/e164-0.0.8.gem
  41. BIN pkg/e164-1.0.0.gem
  42. BIN pkg/e164-1.0.1.gem
  43. +2 −2 spec/lib/ndc/austria_spec.rb
  44. +6 −6 spec/lib/ndc/fixed_size_spec.rb
  45. +2 −2 spec/lib/ndc/germany_spec.rb
  46. +2 −2 spec/lib/ndc/prefix_spec.rb
  47. +4 −4 spec/lib/ndc/splitter_spec.rb
  48. +103 −103 spec/lib/{e164_spec.rb → phony_spec.rb}
  49. +1 −1 spec/spec_helper.rb
View
@@ -1,4 +1,4 @@
-Copyright (c) 2007 Florian Hanke
+Copyright (c) 2008 Florian Hanke
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -1,111 +1,111 @@
-h1. E164
+h1. Phony
h2. Description
-This gem can normalize, format and split e164 numbers.
+This gem can normalize, format and split Phony numbers.
h2. Some examples
h3. Normalizing
-@E164.normalize('41443643533').should == '41443643533'@
+@Phony.normalize('41443643533').should == '41443643533'@
-@E164.normalize('+41 44 364 35 33').should == '41443643533'@
+@Phony.normalize('+41 44 364 35 33').should == '41443643533'@
-@E164.normalize('+41 44 364 35 33').should == '41443643533'@
+@Phony.normalize('+41 44 364 35 33').should == '41443643533'@
-@E164.normalize('+41 800 11 22 33').should == '41800112233'@
+@Phony.normalize('+41 800 11 22 33').should == '41800112233'@
-@E164.normalize('John: +41 44 364 35 33').should == '41443643533'@
+@Phony.normalize('John: +41 44 364 35 33').should == '41443643533'@
-@E164.normalize('1 (703) 451-5115').should == '17034515115'@
+@Phony.normalize('1 (703) 451-5115').should == '17034515115'@
-@E164.normalize('1-888-407-4747').should == '18884074747'@
+@Phony.normalize('1-888-407-4747').should == '18884074747'@
-@E164.normalize('1.906.387.1698').should == '19063871698'@
+@Phony.normalize('1.906.387.1698').should == '19063871698'@
-@E164.normalize('+41 (044) 364 35 33').should == '41443643533'@
+@Phony.normalize('+41 (044) 364 35 33').should == '41443643533'@
h3. Formatting
-@E164.formatted('41443643532').should == '+41 44 364 35 32'@
+@Phony.formatted('41443643532').should == '+41 44 364 35 32'@
-@E164.formatted('41800112233').should == '+41 800 11 22 33'@
+@Phony.formatted('41800112233').should == '+41 800 11 22 33'@
-@E164.formatted('43198110').should == '+43 1 98110'@
+@Phony.formatted('43198110').should == '+43 1 98110'@
-@E164.formatted('18705551122').should == '+1 870 555 1122'@
+@Phony.formatted('18705551122').should == '+1 870 555 1122'@
h4. International
-@E164.formatted('18091231234', :format => :international).should == '+1 809 123 1234'@
+@Phony.formatted('18091231234', :format => :international).should == '+1 809 123 1234'@
-@E164.formatted('43198110', :format => :international).should == '+43 1 98110'@
+@Phony.formatted('43198110', :format => :international).should == '+43 1 98110'@
-@E164.formatted('43198110', :format => :international_absolute).should == '+43 1 98110'@
+@Phony.formatted('43198110', :format => :international_absolute).should == '+43 1 98110'@
-@E164.formatted('33142278186', :format => :+).should == '+33 1 42 27 81 86'@
+@Phony.formatted('33142278186', :format => :+).should == '+33 1 42 27 81 86'@
-@E164.formatted('43198110', :format => :international_relative).should == '0043 1 98110'@
+@Phony.formatted('43198110', :format => :international_relative).should == '0043 1 98110'@
-@E164.formatted('4233841148', :format => :international_relative).should == '00423 384 11 48'@
+@Phony.formatted('4233841148', :format => :international_relative).should == '00423 384 11 48'@
h4. With spaces
-@E164.formatted('18091231234', :format => :international, :spaces => '').should == '+18091231234'@
+@Phony.formatted('18091231234', :format => :international, :spaces => '').should == '+18091231234'@
-@E164.formatted('43198110', :format => :international, :spaces => '').should == '+43198110'@
+@Phony.formatted('43198110', :format => :international, :spaces => '').should == '+43198110'@
-@E164.formatted('43198110', :format => :international_absolute, :spaces => '').should == '+43198110'@
+@Phony.formatted('43198110', :format => :international_absolute, :spaces => '').should == '+43198110'@
-@E164.formatted('33142278186', :format => :+, :spaces => '').should == '+33142278186'@
+@Phony.formatted('33142278186', :format => :+, :spaces => '').should == '+33142278186'@
-@E164.formatted('43198110', :format => :international_relative, :spaces => '').should == '0043198110'@
+@Phony.formatted('43198110', :format => :international_relative, :spaces => '').should == '0043198110'@
-@E164.formatted('4233841148', :format => :international_relative, :spaces => '').should == '004233841148'@
+@Phony.formatted('4233841148', :format => :international_relative, :spaces => '').should == '004233841148'@
h4. With special spaces
-@E164.formatted('18091231234', :format => :international, :spaces => :-).should == '+1-809-123-1234'@
+@Phony.formatted('18091231234', :format => :international, :spaces => :-).should == '+1-809-123-1234'@
-@E164.formatted('43198110', :format => :international, :spaces => :-).should == '+43-1-98110'@
+@Phony.formatted('43198110', :format => :international, :spaces => :-).should == '+43-1-98110'@
-@E164.formatted('43198110', :format => :international_absolute, :spaces => :-).should == '+43-1-98110'@
+@Phony.formatted('43198110', :format => :international_absolute, :spaces => :-).should == '+43-1-98110'@
-@E164.formatted('33142278186', :format => :+, :spaces => :-).should == '+33-1-42-27-81-86'@
+@Phony.formatted('33142278186', :format => :+, :spaces => :-).should == '+33-1-42-27-81-86'@
-@E164.formatted('43198110', :format => :international_relative, :spaces => :-).should == '0043-1-98110'@
+@Phony.formatted('43198110', :format => :international_relative, :spaces => :-).should == '0043-1-98110'@
-@E164.formatted('4233841148', :format => :international_relative, :spaces => :-).should == '00423-384-11-48'@
+@Phony.formatted('4233841148', :format => :international_relative, :spaces => :-).should == '00423-384-11-48'@
h4. National
-@E164.formatted('41443643532', :format => :national).should == '044 364 35 32'@
+@Phony.formatted('41443643532', :format => :national).should == '044 364 35 32'@
-@E164.formatted('41800112233', :format => :national).should == '0800 11 22 33'@
+@Phony.formatted('41800112233', :format => :national).should == '0800 11 22 33'@
-@E164.formatted('43198110', :format => :national).should == '01 98110'@
+@Phony.formatted('43198110', :format => :national).should == '01 98110'@
h4. Local
-@E164.formatted('41443643532', :format => :local).should == '364 35 32'@
+@Phony.formatted('41443643532', :format => :local).should == '364 35 32'@
-@E164.formatted('493038625454', :format => :local).should == '386 25454'@
+@Phony.formatted('493038625454', :format => :local).should == '386 25454'@
h3. Splitting
-@E164.split('43198110').should == ['43', '1', '98110']@
+@Phony.split('43198110').should == ['43', '1', '98110']@
-@E164.split('33112345678').should == ['33', '1', '12','34','56','78']@
+@Phony.split('33112345678').should == ['33', '1', '12','34','56','78']@
-@E164.split('4976112345').should == ['49', '761', '123', '45']@
+@Phony.split('4976112345').should == ['49', '761', '123', '45']@
-@E164.split('3928061371').should == ['39', '280', '613', '71']@
+@Phony.split('3928061371').should == ['39', '280', '613', '71']@
-@E164.split('41443643532').should == ['41', '44', '364', '35', '32']@
+@Phony.split('41443643532').should == ['41', '44', '364', '35', '32']@
-@E164.split('15551115511').should == ['1', '555', '111', '5511']@
+@Phony.split('15551115511').should == ['1', '555', '111', '5511']@
-@E164.split('6491234567').should == ['64', '9', '123', '4567']@
+@Phony.split('6491234567').should == ['64', '9', '123', '4567']@
-@E164.split('41800334455').should == ['41', '800', '33', '44', '55']@
+@Phony.split('41800334455').should == ['41', '800', '33', '44', '55']@
View
@@ -5,7 +5,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>Module: E164</title>
+ <title>Module: Phony</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
@@ -50,13 +50,13 @@
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
- <td class="class-name-in-header">E164</td>
+ <td class="class-name-in-header">Phony</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
- <a href="../files/lib/e164_rb.html">
- lib/e164.rb
+ <a href="../files/lib/Phony_rb.html">
+ lib/Phony.rb
</a>
<br />
<a href="../files/lib/ndc/austria_rb.html">
@@ -94,8 +94,8 @@
<div id="description">
<p>
-Splits a national number into a <a href="E164.html#M000003">fixed</a> size
-<a href="E164/NDC.html">NDC</a> and rest.
+Splits a national number into a <a href="Phony.html#M000003">fixed</a> size
+<a href="Phony/NDC.html">NDC</a> and rest.
</p>
</div>
@@ -122,7 +122,7 @@ <h3 class="section-bar">Methods</h3>
<h3 class="section-bar">Included Modules</h3>
<div id="includes-list">
- <span class="include-name"><a href="E164/NDC.html">NDC</a></span>
+ <span class="include-name"><a href="Phony/NDC.html">NDC</a></span>
</div>
</div>
@@ -131,7 +131,7 @@ <h3 class="section-bar">Included Modules</h3>
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
- Module <a href="E164/NDC.html" class="link">E164::NDC</a><br />
+ Module <a href="Phony/NDC.html" class="link">Phony::NDC</a><br />
</div>
@@ -149,15 +149,15 @@ <h3 class="section-bar">Public Class methods</h3>
<a name="M000003"></a>
<div class="method-heading">
- <a href="E164.src/M000003.html" target="Code" class="method-signature"
- onclick="popupCode('E164.src/M000003.html');return false;">
+ <a href="Phony.src/M000003.html" target="Code" class="method-signature"
+ onclick="popupCode('Phony.src/M000003.html');return false;">
<span class="method-name">fixed</span><span class="method-args">(national_code_length = 2, options = {})</span>
</a>
</div>
<div class="method-description">
<p>
-Returns a <a href="E164.html#M000003">fixed</a> ndc splitter.
+Returns a <a href="Phony.html#M000003">fixed</a> ndc splitter.
</p>
</div>
</div>
@@ -166,15 +166,15 @@ <h3 class="section-bar">Public Class methods</h3>
<a name="M000005"></a>
<div class="method-heading">
- <a href="E164.src/M000005.html" target="Code" class="method-signature"
- onclick="popupCode('E164.src/M000005.html');return false;">
+ <a href="Phony.src/M000005.html" target="Code" class="method-signature"
+ onclick="popupCode('Phony.src/M000005.html');return false;">
<span class="method-name">formatted</span><span class="method-args">(phone_number, options = {})</span>
</a>
</div>
<div class="method-description">
<p>
-Formats a <a href="E164.html">E164</a> number according to local customs.
+Formats a <a href="Phony.html">Phony</a> number according to local customs.
</p>
</div>
</div>
@@ -183,8 +183,8 @@ <h3 class="section-bar">Public Class methods</h3>
<a name="M000006"></a>
<div class="method-heading">
- <a href="E164.src/M000006.html" target="Code" class="method-signature"
- onclick="popupCode('E164.src/M000006.html');return false;">
+ <a href="Phony.src/M000006.html" target="Code" class="method-signature"
+ onclick="popupCode('Phony.src/M000006.html');return false;">
<span class="method-name">normalize</span><span class="method-args">(phone_number)</span>
</a>
</div>
@@ -200,8 +200,8 @@ <h3 class="section-bar">Public Class methods</h3>
<a name="M000004"></a>
<div class="method-heading">
- <a href="E164.src/M000004.html" target="Code" class="method-signature"
- onclick="popupCode('E164.src/M000004.html');return false;">
+ <a href="Phony.src/M000004.html" target="Code" class="method-signature"
+ onclick="popupCode('Phony.src/M000004.html');return false;">
<span class="method-name">split</span><span class="method-args">(phone_number)</span>
</a>
</div>
@@ -5,12 +5,12 @@
<html>
<head>
- <title>fixed (E164)</title>
+ <title>fixed (Phony)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File lib/e164.rb, line 22</span>
+ <pre><span class="ruby-comment cmt"># File lib/Phony.rb, line 22</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">fixed</span>(<span class="ruby-identifier">national_code_length</span> = <span class="ruby-value">2</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-constant">NDC</span>.<span class="ruby-identifier">fixed</span>(<span class="ruby-identifier">national_code_length</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword kw">end</span></pre>
@@ -5,12 +5,12 @@
<html>
<head>
- <title>split (E164)</title>
+ <title>split (Phony)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File lib/e164.rb, line 377</span>
+ <pre><span class="ruby-comment cmt"># File lib/Phony.rb, line 377</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">phone_number</span>)
<span class="ruby-identifier">splitter_or_number</span>, <span class="ruby-identifier">country_code</span>, <span class="ruby-identifier">ndc</span>, <span class="ruby-identifier">local</span> = <span class="ruby-identifier">split_cc_ndc</span> <span class="ruby-identifier">phone_number</span>
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">splitter_or_number</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">local</span>.<span class="ruby-identifier">nil?</span>
@@ -5,12 +5,12 @@
<html>
<head>
- <title>formatted (E164)</title>
+ <title>formatted (Phony)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File lib/e164.rb, line 386</span>
+ <pre><span class="ruby-comment cmt"># File lib/Phony.rb, line 386</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">formatted</span>(<span class="ruby-identifier">phone_number</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-identifier">splitter_or_number</span>, <span class="ruby-identifier">cc</span>, <span class="ruby-identifier">ndc</span>, <span class="ruby-identifier">local</span> = <span class="ruby-identifier">split_cc_ndc</span> <span class="ruby-identifier">phone_number</span>
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">splitter_or_number</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">local</span>.<span class="ruby-identifier">nil?</span>
@@ -5,12 +5,12 @@
<html>
<head>
- <title>normalize (E164)</title>
+ <title>normalize (Phony)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File lib/e164.rb, line 395</span>
+ <pre><span class="ruby-comment cmt"># File lib/Phony.rb, line 395</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">normalize</span>(<span class="ruby-identifier">phone_number</span>)
<span class="ruby-identifier">phone_number</span> = <span class="ruby-identifier">phone_number</span>.<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">phone_number</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\D*/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/^0+/</span>, <span class="ruby-value str">''</span>) <span class="ruby-comment cmt"># Remove zeros at the beginning and non-digit chars</span>
View
@@ -5,7 +5,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>Module: E164::NDC</title>
+ <title>Module: Phony::NDC</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
@@ -50,7 +50,7 @@
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
- <td class="class-name-in-header">E164::NDC</td>
+ <td class="class-name-in-header">Phony::NDC</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
@@ -110,11 +110,11 @@ <h3 class="section-bar">Methods</h3>
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
- Class <a href="NDC/Austria.html" class="link">E164::NDC::Austria</a><br />
-Class <a href="NDC/FixedSize.html" class="link">E164::NDC::FixedSize</a><br />
-Class <a href="NDC/Germany.html" class="link">E164::NDC::Germany</a><br />
-Class <a href="NDC/Prefix.html" class="link">E164::NDC::Prefix</a><br />
-Class <a href="NDC/Splitter.html" class="link">E164::NDC::Splitter</a><br />
+ Class <a href="NDC/Austria.html" class="link">Phony::NDC::Austria</a><br />
+Class <a href="NDC/FixedSize.html" class="link">Phony::NDC::FixedSize</a><br />
+Class <a href="NDC/Germany.html" class="link">Phony::NDC::Germany</a><br />
+Class <a href="NDC/Prefix.html" class="link">Phony::NDC::Prefix</a><br />
+Class <a href="NDC/Splitter.html" class="link">Phony::NDC::Splitter</a><br />
</div>
@@ -5,7 +5,7 @@
<html>
<head>
- <title>fixed (E164::NDC)</title>
+ <title>fixed (Phony::NDC)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
Oops, something went wrong.

0 comments on commit cedc4c2

Please sign in to comment.