Closed awead closed 8 years ago
@mjgiarlo ok, fixed it up. Incidentally, I changed DetermineMimeType
to use the call/initializer strategy. Upon doing that, rubocop started complaining that Assignment Branch Condition size for determine_mime_type is too high
😠Necessitating private methods.
@awead RUBOCOP. No good deed, eh? :clap:
thanks, @mjgiarlo !
This will ultimately relate to fixing projecthydra/sufia#2553. We interrogate an incoming object about its original name and mime type, providing a values ffor each based on some logic. Testing this was difficult when it was buried in a private method. This surfaces the methods as services which can be more easily tested, as well as exposed to other consuming applications should they wish to make use of them.