Skip to content

Commit dcfb4f9

Browse files
author
Chris Blackburn
committed
Fix CSV parsing error for wacky foreign countries and Bump version
more
1 parent cbb6b24 commit dcfb4f9

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
*1.0.5* (October 04, 2024)
2+
3+
* Fix a data parsing error where foreign countries use the pipe symbol in city names
4+
15
*1.0.4* (September 18, 2024)
26

37
* Upgrade Kiba Gem - Now works with Ruby 3.x

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
free_zipcode_data (1.0.4)
4+
free_zipcode_data (1.0.5)
55
colored (~> 1.2)
66
kiba (~> 4.0)
77
optimist (~> 3.0)

lib/free_zipcode_data/data_source.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ def datafile_with_headers
7777
end
7878
@logger.verbose("Preparing: #{filename} for processing...")
7979
CSV.open(filename, 'w') do |outfile|
80-
outfile << %w[COUNTRY POSTAL_CODE CITY STATE SHORT_STATE COUNTY SHORT_COUNTY COMMUNITY SHORT_COMMUNITY LATITUDE LONGITUDE ACCURACY]
81-
CSV.foreach(unzipped_datafile, headers: false, col_sep: "\t", quote_char: '|') do |row|
80+
outfile << %w[COUNTRY POSTAL_CODE CITY STATE SHORT_STATE COUNTY SHORT_COUNTY COMMUNITY
81+
SHORT_COMMUNITY LATITUDE LONGITUDE ACCURACY]
82+
CSV.foreach(unzipped_datafile, headers: false, col_sep: "\t", quote_char: '^') do |row|
8283
outfile << row
8384
end
8485
end

lib/free_zipcode_data/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module FreeZipcodeData
4-
VERSION = '1.0.4'.freeze
4+
VERSION = '1.0.5'.freeze
55
end

0 commit comments

Comments
 (0)