pinpoint 0.2.1 → 0.3.0
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.
- data/lib/pinpoint/address.rb +4 -2
- data/lib/pinpoint/version.rb +1 -1
- data/spec/address_spec.rb +24 -12
- metadata +2 -2
data/lib/pinpoint/address.rb
CHANGED
@@ -50,7 +50,8 @@ module Pinpoint
|
|
50
50
|
present?(street_and_premises) &&
|
51
51
|
present?(city) &&
|
52
52
|
present?(state) &&
|
53
|
-
present?(postal_code)
|
53
|
+
present?(postal_code) &&
|
54
|
+
present?(country)
|
54
55
|
end
|
55
56
|
|
56
57
|
def incomplete?
|
@@ -61,7 +62,8 @@ module Pinpoint
|
|
61
62
|
blank?(street_and_premises) &&
|
62
63
|
blank?(city) &&
|
63
64
|
blank?(state) &&
|
64
|
-
blank?(postal_code)
|
65
|
+
blank?(postal_code) &&
|
66
|
+
blank?(country)
|
65
67
|
end
|
66
68
|
|
67
69
|
def to_s(options = { :country => :us, :format => :one_line })
|
data/lib/pinpoint/version.rb
CHANGED
data/spec/address_spec.rb
CHANGED
@@ -54,7 +54,8 @@ describe 'Pinpoint::Address' do
|
|
54
54
|
street: '',
|
55
55
|
city: 'Nashville',
|
56
56
|
state: 'Tennessee',
|
57
|
-
zip_code: '37203'
|
57
|
+
zip_code: '37203',
|
58
|
+
country: 'US'
|
58
59
|
)
|
59
60
|
end
|
60
61
|
|
@@ -69,7 +70,8 @@ describe 'Pinpoint::Address' do
|
|
69
70
|
street: nil,
|
70
71
|
city: 'Nashville',
|
71
72
|
state: 'Tennessee',
|
72
|
-
zip_code: '37203'
|
73
|
+
zip_code: '37203',
|
74
|
+
country: 'US'
|
73
75
|
)
|
74
76
|
end
|
75
77
|
|
@@ -84,7 +86,8 @@ describe 'Pinpoint::Address' do
|
|
84
86
|
street: '919 Broadway',
|
85
87
|
city: 'Nashville',
|
86
88
|
state: 'Tennessee',
|
87
|
-
zip_code: '37203'
|
89
|
+
zip_code: '37203',
|
90
|
+
country: 'US'
|
88
91
|
)
|
89
92
|
end
|
90
93
|
|
@@ -99,7 +102,8 @@ describe 'Pinpoint::Address' do
|
|
99
102
|
street: nil,
|
100
103
|
city: nil,
|
101
104
|
state: nil,
|
102
|
-
zip_code: nil
|
105
|
+
zip_code: nil,
|
106
|
+
country: nil
|
103
107
|
)
|
104
108
|
end
|
105
109
|
|
@@ -116,7 +120,8 @@ describe 'Pinpoint::Address' do
|
|
116
120
|
street: '',
|
117
121
|
city: 'Nashville',
|
118
122
|
state: 'Tennessee',
|
119
|
-
zip_code: '37203'
|
123
|
+
zip_code: '37203',
|
124
|
+
country: 'US'
|
120
125
|
)
|
121
126
|
end
|
122
127
|
|
@@ -131,7 +136,8 @@ describe 'Pinpoint::Address' do
|
|
131
136
|
street: nil,
|
132
137
|
city: 'Nashville',
|
133
138
|
state: 'Tennessee',
|
134
|
-
zip_code: '37203'
|
139
|
+
zip_code: '37203',
|
140
|
+
country: 'US'
|
135
141
|
)
|
136
142
|
end
|
137
143
|
|
@@ -146,7 +152,8 @@ describe 'Pinpoint::Address' do
|
|
146
152
|
street: '919 Broadway',
|
147
153
|
city: 'Nashville',
|
148
154
|
state: 'Tennessee',
|
149
|
-
zip_code: '37203'
|
155
|
+
zip_code: '37203',
|
156
|
+
country: 'US'
|
150
157
|
)
|
151
158
|
end
|
152
159
|
|
@@ -161,7 +168,8 @@ describe 'Pinpoint::Address' do
|
|
161
168
|
street: nil,
|
162
169
|
city: nil,
|
163
170
|
state: nil,
|
164
|
-
zip_code: nil
|
171
|
+
zip_code: nil,
|
172
|
+
country: nil
|
165
173
|
)
|
166
174
|
end
|
167
175
|
|
@@ -178,7 +186,8 @@ describe 'Pinpoint::Address' do
|
|
178
186
|
street: '',
|
179
187
|
city: 'Nashville',
|
180
188
|
state: 'Tennessee',
|
181
|
-
zip_code: '37203'
|
189
|
+
zip_code: '37203',
|
190
|
+
country: 'US'
|
182
191
|
)
|
183
192
|
end
|
184
193
|
|
@@ -193,7 +202,8 @@ describe 'Pinpoint::Address' do
|
|
193
202
|
street: nil,
|
194
203
|
city: 'Nashville',
|
195
204
|
state: 'Tennessee',
|
196
|
-
zip_code: '37203'
|
205
|
+
zip_code: '37203',
|
206
|
+
country: 'US'
|
197
207
|
)
|
198
208
|
end
|
199
209
|
|
@@ -208,7 +218,8 @@ describe 'Pinpoint::Address' do
|
|
208
218
|
street: '919 Broadway',
|
209
219
|
city: 'Nashville',
|
210
220
|
state: 'Tennessee',
|
211
|
-
zip_code: '37203'
|
221
|
+
zip_code: '37203',
|
222
|
+
country: 'US'
|
212
223
|
)
|
213
224
|
end
|
214
225
|
|
@@ -223,7 +234,8 @@ describe 'Pinpoint::Address' do
|
|
223
234
|
street: nil,
|
224
235
|
city: nil,
|
225
236
|
state: nil,
|
226
|
-
zip_code: nil
|
237
|
+
zip_code: nil,
|
238
|
+
country: nil
|
227
239
|
)
|
228
240
|
end
|
229
241
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pinpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|