BikeCsvImporter: fix incorrect method signatures

This commit is contained in:
Ilya Konanykhin
2017-03-20 21:25:24 +06:00
parent 0a338a2485
commit c1ca501204
2 changed files with 19 additions and 22 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ namespace :import do
file, dry_run = args.values_at :file, :dry_run
next puts "Usage: rake #{t.name}[$csv_file_path[,$dry_run=dry]]" unless file
next puts "File #{file} does not exist or is unreachable" unless File.readable? file
pp BikeCsvImporter.new(file, dry_run == 'dry').run
BikeCsvImporter.new(file).run dry_run == 'dry'
end
# Analyze a single field from CSV file
@@ -13,7 +13,7 @@ namespace :import do
file, field = args.values_at :file, :field
next puts "Usage: rake #{t.name}[$csv_file_path[,\"$field_name\"]]" unless file
next puts "File #{file} does not exist or is unreachable" unless File.readable? file
pp BikeCsvImporter.new(file).analyze field ? [field] : []
BikeCsvImporter.new(file).analyze field ? [field] : []
end
end
end