zipcoder 0.7.1 → 0.7.2
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.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/zipcoder/ext/string.rb +1 -1
- data/lib/zipcoder/version.rb +1 -1
- data/spec/zipcoder_spec.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 598d049180065e0c7881ad7c123d99e8030bba4d
|
4
|
+
data.tar.gz: 6b96e424fc1339d80c95ec2698a472f24485ac45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52d58280a07b22c128ff7ce5361f4848d891da41e95a2ff007f3fe86db32a789bb54a82c917296a43c24a225f254dc64667837c200dcd18c144d0f40b6eaede9
|
7
|
+
data.tar.gz: 0e322a89ac181addbfc62b169bf140896e86231be363bcd5b754325fa7554d244a9a814e648c615869b8ac8c19487b8ed2b842046cd5e190c0809ef1d8f97827
|
data/README.md
CHANGED
data/lib/zipcoder/ext/string.rb
CHANGED
@@ -29,7 +29,7 @@ class String
|
|
29
29
|
self.split(',').each do |zip_group|
|
30
30
|
if zip_group.include? '-'
|
31
31
|
components = zip_group.split('-')
|
32
|
-
((components[0].to_i)
|
32
|
+
((components[0].to_i)..(components[1].to_i)).each do |zip|
|
33
33
|
zips.push(zip.to_s)
|
34
34
|
end
|
35
35
|
else
|
data/lib/zipcoder/version.rb
CHANGED
data/spec/zipcoder_spec.rb
CHANGED
@@ -284,8 +284,9 @@ describe Zipcoder do
|
|
284
284
|
end
|
285
285
|
it "only returns the zip codes" do
|
286
286
|
zip_codes = "Austin, TX".city_info zips_only: true
|
287
|
-
expect(zip_codes.count).to eq(
|
287
|
+
expect(zip_codes.count).to eq(47)
|
288
288
|
expect(zip_codes[0]).to eq('78701')
|
289
|
+
expect(zip_codes[-1]).to eq('78799')
|
289
290
|
end
|
290
291
|
it "returns an nil when the city state is non-existent" do
|
291
292
|
zip_codes = ", ".city_info
|