spark_api 1.3.19 → 1.3.20
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/spark_api/models/listing.rb +2 -2
- data/spec/unit/spark_api/models/listing_spec.rb +6 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.20
|
@@ -128,8 +128,8 @@ module SparkApi
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
def street_address
|
132
|
-
|
131
|
+
def street_address
|
132
|
+
self.UnparsedFirstLineAddress.delete(DATA_MASK).strip().gsub(/\s{2,}/, ' ')
|
133
133
|
end
|
134
134
|
|
135
135
|
def region_address
|
@@ -11,6 +11,7 @@ describe Listing do
|
|
11
11
|
"City"=>"Fargo",
|
12
12
|
"Longitude"=>"",
|
13
13
|
"StreetName"=>"Someone's",
|
14
|
+
"UnparsedFirstLineAddress"=>"100 Someone's St",
|
14
15
|
"YearBuilt"=>nil,
|
15
16
|
"BuildingAreaTotal"=>"1321.0",
|
16
17
|
"PublicRemarks"=>nil,
|
@@ -90,6 +91,11 @@ describe Listing do
|
|
90
91
|
@listing.street_address.should eq("100 Someone's St")
|
91
92
|
end
|
92
93
|
|
94
|
+
it "should remove masks from the street address" do
|
95
|
+
@listing.StandardFields["UnparsedFirstLineAddress"] = "********"
|
96
|
+
@listing.street_address.should eq("")
|
97
|
+
end
|
98
|
+
|
93
99
|
it "should return the regional address" do
|
94
100
|
@listing.region_address.should eq("Fargo, ND 55320")
|
95
101
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spark_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 20
|
10
|
+
version: 1.3.20
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brandon Hornseth
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2015-01-12 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
type: :runtime
|