StreetAddress 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/street_address.rb +2 -1
- data/test/test_street_address.rb +1 -0
- metadata +40 -28
data/lib/street_address.rb
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
module StreetAddress
|
66
66
|
class US
|
67
|
-
VERSION = '1.0.
|
67
|
+
VERSION = '1.0.5'
|
68
68
|
DIRECTIONAL = {
|
69
69
|
"north" => "N",
|
70
70
|
"northeast" => "NE",
|
@@ -850,6 +850,7 @@ module StreetAddress
|
|
850
850
|
end
|
851
851
|
|
852
852
|
def line1(s = "")
|
853
|
+
return if intersection?
|
853
854
|
s += number
|
854
855
|
s += " " + prefix unless prefix.nil?
|
855
856
|
s += " " + street unless street.nil?
|
data/test/test_street_address.rb
CHANGED
@@ -138,6 +138,7 @@ class StreetAddressUsTest < Test::Unit::TestCase
|
|
138
138
|
assert_equal addr.intersection?, true
|
139
139
|
assert_equal addr.street_type, "Blvd"
|
140
140
|
assert_equal addr.street_type2, "St"
|
141
|
+
assert_equal addr.line1, nil
|
141
142
|
|
142
143
|
addr = StreetAddress::US.parse(@int3)
|
143
144
|
assert_equal addr.city, "San Francisco"
|
metadata
CHANGED
@@ -1,58 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: StreetAddress
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
version: 1.0.5
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Derrek Long
|
9
13
|
- Nicholas Schleuter
|
10
14
|
autorequire:
|
11
15
|
bindir: bin
|
12
16
|
cert_chain: []
|
13
|
-
date: 2013-01-17 00:00:00.000000000 Z
|
14
|
-
dependencies: []
|
15
|
-
description: ! 'StreetAddress::US allows you to send any string to parse and if the
|
16
|
-
string is a US address returns an object of the address broken into it''s substituent
|
17
|
-
parts.
|
18
17
|
|
18
|
+
date: 2013-06-16 00:00:00 -07:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
19
21
|
|
22
|
+
description: |
|
23
|
+
StreetAddress::US allows you to send any string to parse and if the string is a US address returns an object of the address broken into it's substituent parts.
|
24
|
+
|
20
25
|
A port of Geo::StreetAddress::US by Schuyler D. Erle and Tim Bunce.
|
21
26
|
|
22
|
-
'
|
23
27
|
email: derreklong@gmail.com
|
24
28
|
executables: []
|
29
|
+
|
25
30
|
extensions: []
|
31
|
+
|
26
32
|
extra_rdoc_files: []
|
27
|
-
|
33
|
+
|
34
|
+
files:
|
28
35
|
- README.rdoc
|
29
36
|
- Rakefile
|
30
37
|
- LICENSE
|
31
38
|
- lib/street_address.rb
|
32
|
-
|
39
|
+
has_rdoc: true
|
33
40
|
homepage: https://github.com/derrek/street-address
|
34
41
|
licenses: []
|
42
|
+
|
35
43
|
post_install_message:
|
36
44
|
rdoc_options: []
|
37
|
-
|
45
|
+
|
46
|
+
require_paths:
|
38
47
|
- lib
|
39
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
requirements:
|
48
|
-
- -
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
version: "0"
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
51
62
|
requirements: []
|
63
|
+
|
52
64
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.
|
65
|
+
rubygems_version: 1.3.6
|
54
66
|
signing_key:
|
55
67
|
specification_version: 3
|
56
68
|
summary: Parse Addresses into substituent parts. This gem includes US only.
|
57
|
-
test_files:
|
69
|
+
test_files:
|
58
70
|
- test/test_street_address.rb
|