diff options
Diffstat (limited to 'lib/tasks/norwegian-postcodes.rake')
-rw-r--r-- | lib/tasks/norwegian-postcodes.rake | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/tasks/norwegian-postcodes.rake b/lib/tasks/norwegian-postcodes.rake deleted file mode 100644 index 6ec53b7..0000000 --- a/lib/tasks/norwegian-postcodes.rake +++ /dev/null @@ -1,13 +0,0 @@ -require 'uri' -require 'open-uri' - -namespace :postcodes do - desc "Fetch postcode database from Bring" - task :fetch, [:data_path] do |t, args| - args.with_defaults(:data_path => 'data') - uri = URI.parse('http://www.bring.no/hele-bring/forside/_attachment/159761') - filename = File.join(args.data_path, 'Postnummerregister_ansi.txt') - puts "Downloading postcodes to: #{filename}..." - IO.write(filename, uri.read) - end -end |