phony 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,10 @@ module Phony
46
46
  #
47
47
  cc, ndc, *rest = Phony.split normalized
48
48
 
49
+ # Element based checking.
50
+ #
51
+ return false unless ndc
52
+
49
53
  # CC.
50
54
  #
51
55
  cc_needed = hints[:cc]
@@ -14,6 +14,10 @@ describe 'validations' do
14
14
  number.should == '123-123-1234'
15
15
  end
16
16
 
17
+ it 'handles small numbers' do
18
+ Phony.plausible?('353').should be_false
19
+ end
20
+
17
21
  it "is correct" do
18
22
  Phony.plausible?('0000000').should be_false
19
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-03 00:00:00.000000000 Z
12
+ date: 2012-06-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Fast international phone number (E164 standard) normalizing, splitting
15
15
  and formatting. Lots of formatting options: International (+.., 00..), national