Sha256: 7342539acf1fc054f2f9d46f6cac1e3789a3a56ae52847649bebb5f90c2e311b

Contents?: true

Size: 766 Bytes

Versions: 3

Compression:

Stored size: 766 Bytes

Contents

require 'geonames_rails'

namespace :geonames_rails do
  desc 'pull down the geonames data from the server'
  task :pull => :environment do
    GeonamesRails::Puller.new.pull
  end
  
  desc 'pull geonames data, load into db, then clean up after itself'
  task :run => :environment do
    puller = GeonamesRails::Puller.new
    writer = ENV['DRY_RUN'] ? GeonamesRails::Writers::DryRun.new : GeonamesRails::Writers::ActiveRecord.new
    GeonamesRails::Loader.new(puller, writer).load_data
  end
  
  desc 'load the data from files you already have laying about'
  task :load => :environment do
    writer = ENV['DRY_RUN'] ? GeonamesRails::Writers::DryRun.new : GeonamesRails::Writers::ActiveRecord.new
    GeonamesRails::Loader.new(nil, writer).load_data
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
geonames_rails-0.2.2 lib/tasks/geonames_rails.rake
geonames_rails-0.2.1 lib/tasks/geonames_rails.rake
geonames_rails-0.2.0 lib/tasks/geonames_rails.rake