207   def log_entry 
208 @log_entry ||= LogEntry.new({:batch_created_on => exec_time})
209 end
210 def log_entry=(l)
211 @log_entry = l
212 end

63 row_h[:listing_id] = 0 unless row_h[:listing_id]
64
65 if Vehicle.exists?(:vin => row_h[:vin])
66 log_entry.update_status(row[:contact], row[:vin], 'update')
67 v = Vehicle.find_by_vin(row_h[:vin])
68 else
69 log_entry.update_status(row[:contact], row[:vin], 'new')
70 v = Vehicle.new
71 end
72
73 debugger
74 options = parse_options(row_h.delete(:options), row_h[:contact], row_h[:vin]) if row_h[:options]
75 v.options = options unless options.nil?



Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader
Started
/home/wallace/wheels/config/../app/models/vehicle_data_feed.rb:74 options = parse_options(row_h.delete(:options), row_h[:contact], row_h[:vin]) if row_h[:options]
(rdb:1) v i self
@attributes => {"image_file"=>nil, "inline_images"=>nil, "uri"=>nil, "statistics"=>nil, "username"=>nil, "type"=>"VehicleDataFeed", "id"=>12, "image_file_name_separator"=>nil, "column_separator"=>nil, "description"=>nil, "mapping"=>{:options=>21, :make_id=>5, :transmission=>15, :model_id=>6, :engine=>16, :contact_id=>0, :ext_color=>9, :year=>4, :images=>19, :vin=>1, :int_color=>10, :stock_num=>2, :price=>11, :listing_id=>3, :mileage=>14}, "option_name_separator"=>nil, "pull"=>nil, "password"=>nil, "last_run_on"=>nil, "created_at"=>Fri Nov 16 02:20:32 -0500 2007, "headers"=>true, "data_file"=>"autobase_test_1.csv"}
@contact => nil
@errors => #<ActiveRecord::Errors:0x2b5a62737e30 @base=#<VehicleDataFeed:0x2b5a627fb380 @contact=nil, @mocha=#<Mock:0x2b5a626b8f18>, @errors=#<ActiveRecord::Errors:0x2b5a62737e30 ...>, @new_record_before_save=true, @new_record=false, @exec_time=Fri Nov 16 02:20:32 -0500 2007, @attributes={"image_file"=>nil, "inline_images"=>nil, "uri"=>nil, "statistics"=>nil, "username"=>nil, "type"=>"VehicleDataFeed", "id"=>12, "image_file_name_separator"=>nil, "column_separator"=>nil, "description"=>nil, "mapping"=>{:options=>21, :make_id=>5, :transmission=>15, :model_id=>6, :engine=>16, :contact_id=>0, :ext_color=>9, :year=>4, :images=>19, :vin=>1, :int_color=>10, :stock_num=>2, :price=>11, :listing_id=>3, :mileage=>14}, "option_name_separator"=>nil, "pull"=>nil, "password"=>nil, "last_run_on"=>nil, "created_at"=>Fri Nov 16 02:20:32 -0500 2007, "headers"=>true, "data_file"=>"autobase_test_1.csv"}>, @errors={}>
@exec_time => Fri Nov 16 02:20:32 -0500 2007
@mocha => #<Mock:0x2b5a626b8f18>
@new_record => false
@new_record_before_save => true
(rdb:1) p log_entry
#<LogEntry:0x2b5a626081e0 @new_record=true, @attributes={"loggable_id"=>nil, "msg"=>{nil=>{"2B3KA53H86H424231"=>{}, nil=>{"status"=>"new"}}}, "is_successful"=>true, "batch_created_on"=>Fri Nov 16 02:20:32 -0500 2007, "unique_identifier"=>nil, "loggable_type"=>nil}>
(rdb:1) s
/home/wallace/wheels/config/../app/models/vehicle_data_feed.rb:74 options = parse_options(row_h.delete(:options), row_h[:contact], row_h[:vin]) if row_h[:options]
(rdb:1)
/home/wallace/wheels/config/../app/models/data_feed.rb:38 parse_opts = {}
(rdb:1) v i self
@attributes => {"image_file"=>nil, "inline_images"=>nil, "uri"=>nil, "statistics"=>nil, "username"=>nil, "type"=>"VehicleDataFeed", "id"=>12, "image_file_name_separator"=>nil, "column_separator"=>nil, "description"=>nil, "mapping"=>{:options=>21, :make_id=>5, :transmission=>15, :model_id=>6, :engine=>16, :contact_id=>0, :ext_color=>9, :year=>4, :images=>19, :vin=>1, :int_color=>10, :stock_num=>2, :price=>11, :listing_id=>3, :mileage=>14}, "option_name_separator"=>nil, "pull"=>nil, "password"=>nil, "last_run_on"=>nil, "created_at"=>Fri Nov 16 02:20:32 -0500 2007, "headers"=>true, "data_file"=>"autobase_test_1.csv"}
@contact => nil
@errors => #<ActiveRecord::Errors:0x2b5a62737e30 @base=#<VehicleDataFeed:0x2b5a627fb380 @contact=nil, @mocha=#<Mock:0x2b5a626b8f18>, @errors=#<ActiveRecord::Errors:0x2b5a62737e30 ...>, @new_record_before_save=true, @new_record=false, @exec_time=Fri Nov 16 02:20:32 -0500 2007, @attributes={"image_file"=>nil, "inline_images"=>nil, "uri"=>nil, "statistics"=>nil, "username"=>nil, "type"=>"VehicleDataFeed", "id"=>12, "image_file_name_separator"=>nil, "column_separator"=>nil, "description"=>nil, "mapping"=>{:options=>21, :make_id=>5, :transmission=>15, :model_id=>6, :engine=>16, :contact_id=>0, :ext_color=>9, :year=>4, :images=>19, :vin=>1, :int_color=>10, :stock_num=>2, :price=>11, :listing_id=>3, :mileage=>14}, "option_name_separator"=>nil, "pull"=>nil, "password"=>nil, "last_run_on"=>nil, "created_at"=>Fri Nov 16 02:20:32 -0500 2007, "headers"=>true, "data_file"=>"autobase_test_1.csv"}>, @errors={}>
@exec_time => Fri Nov 16 02:20:32 -0500 2007
@mocha => #<Mock:0x2b5a626b8f18>
@new_record => false
@new_record_before_save => true
(rdb:1) p log_entry
#<LogEntry:0x2b5a6253a510 @new_record=true, @attributes={"loggable_id"=>nil, "msg"=>nil, "is_successful"=>nil, "batch_created_on"=>Fri Nov 16 02:20:32 -0500 2007, "unique_identifier"=>nil, "loggable_type"=>nil}>
(rdb:1)