The code in production correctly guesses whether CSV is part of a class or not. We should consistently put requrie 'csv' at the top of files that use it, so that it always correctly resolves.
Actual behavior
Sometimes the code in production is not correctly guessing whether CSV belongs to the class it shows up in, or the top level CSV class.
Steps to replicate
Try to run the process_newly_cataloged_records rake task
Expected behavior
The code in production correctly guesses whether
CSV
is part of a class or not. We should consistently putrequrie 'csv'
at the top of files that use it, so that it always correctly resolves.Actual behavior
Sometimes the code in production is not correctly guessing whether
CSV
belongs to the class it shows up in, or the top level CSV class.Steps to replicate
Try to run the
process_newly_cataloged_records
rake taskImpact of this bug
Rake tasks will intermittently fail
Honeybadger link and code snippet, if applicable
Honeybadger link
Implementation notes, if any
Add
require 'csv'
to any files that use the CSV class