spark_api 1.3.20 → 1.3.21
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 +1 -1
- data/spec/unit/spark_api/models/listing_spec.rb +15 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.21
|
@@ -129,7 +129,7 @@ module SparkApi
|
|
129
129
|
end
|
130
130
|
|
131
131
|
def street_address
|
132
|
-
self.UnparsedFirstLineAddress.delete(DATA_MASK).strip().gsub(/\s{2,}/, ' ')
|
132
|
+
(self.UnparsedFirstLineAddress || '').delete(DATA_MASK).strip().gsub(/\s{2,}/, ' ')
|
133
133
|
end
|
134
134
|
|
135
135
|
def region_address
|
@@ -87,13 +87,22 @@ describe Listing do
|
|
87
87
|
@listing.should_not respond_to(:Videos)
|
88
88
|
end
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
describe '.street_address' do
|
91
|
+
it 'should return the street address' do
|
92
|
+
@listing.street_address.should eq("100 Someone's St")
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'should remove data masks' do
|
96
|
+
@listing.StandardFields["UnparsedFirstLineAddress"] = "********"
|
97
|
+
@listing.street_address.should eq("")
|
98
|
+
end
|
93
99
|
|
94
|
-
|
95
|
-
|
96
|
-
|
100
|
+
it 'should handle a missing unparsed first line address' do
|
101
|
+
[nil, '', ' '].each do |current|
|
102
|
+
@listing.StandardFields['UnparsedFirstLineAddress'] = current
|
103
|
+
@listing.street_address.should eq('')
|
104
|
+
end
|
105
|
+
end
|
97
106
|
end
|
98
107
|
|
99
108
|
it "should return the regional address" do
|
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: 49
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 21
|
10
|
+
version: 1.3.21
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brandon Hornseth
|