tools/import_areas.rb in iarea-0.1.2 vs tools/import_areas.rb in iarea-0.1.3

- old
+ new

@@ -1,6 +1,7 @@ #!/usr/bin/env ruby +# coding: utf-8 require 'csv' require 'json' require 'sequel' @@ -85,9 +86,13 @@ :east => area['msEast'], :north => area['msNorth'], :zone_id => area['zone'], :prefecture_id => area['pref'] } + # fix .js problem + if hash[:name] == '新宿1?2丁目' + hash[:name] = '新宿1〜2丁目' + end db[:areas].insert(hash) area['neighbors'].each do |neighbor| db[:neighbors].insert({:areacode => areacode, :neighbor_areacode => neighbor}) end