Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (21 sloc) 0.64 kb
namespace :upload do
desc 'Uploads and parses a wXf output file'
task :wxf, :file, :needs => :environment do |t, args|
# your initialization goes here
filename = args[:file]
# standard logging facility
logger = Logger.new(STDOUT)
logger.level = Logger::DEBUG
# your validation goes here
fail "Please provide a file: rake 'upload:wxf[<file>]'" if filename.nil?
fail "File [#{filename}] does not exist" unless File.exists?(filename)
# invoke the plugin
WxfUpload.import(
:file => filename,
:logger => logger
)
logger.close
end
# additional tasks go here
# ...
end
Jump to Line
Something went wrong with that request. Please try again.