solidusio-contrib / solidus_importer

Solidus importer extension to migrate data from other eCommerce systems
BSD 3-Clause "New" or "Revised" License
15 stars 30 forks source link

Use Paperclip to read the Paperclip attachments #79

Closed sofiabesenski4 closed 2 years ago

sofiabesenski4 commented 2 years ago

We can't rely on the attachment path to be something we can just File.read because it may not be a local file which can be opened.

Instead we can rely on Paperclip to give us an IO adapter which is capable of reading an attachment independent from the backend.

jarednorman commented 2 years ago

Sadly, the specs are failing because our Circle CI orbs are creating docker containers without specifying the text encoding, so it's defaulting to ASCII-8BIT. The fixtures in this repository contain UTF-8, so when we use the correct Paperclip IO adapter (instead of just doing File.read) it will attempt to do the conversion between those encodings. This conversion fails because there are some characters with accents and non breaking spaces that aren't valid ASCII.

@benjaminwil is writing a issue to fix this in the orb, rather than here.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.

benjaminwil commented 2 years ago

Just as an update: the orb was not actually the issue, and no code was changed in the CircleCI orbs as a result of this issue.