Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Faraday 1.x #7

Merged
merged 1 commit into from
May 6, 2020
Merged

Fix compatibility with Faraday 1.x #7

merged 1 commit into from
May 6, 2020

Conversation

odlp
Copy link
Contributor

@odlp odlp commented May 6, 2020

Changes:

  • Fixes missing faraday/upload_io require (breaking change between Faraday 1.0rc1 -> 1.0)
  • Update Appraisals to test Faraday 1.x instead of rc1

Fixes: #6

- "faraday/upload_io" is no longer present since 1.0
- Update Appraisals to test Faraday 1.x instead of rc1

Fixes #6
@odlp odlp requested a review from groe May 6, 2020 15:02
@@ -22,5 +22,9 @@ def self.determine_content_type(file_path)
end

private_class_method :determine_content_type

# UploadIO for Faraday < 0.16.0
FARADAY_FILE = defined?(Faraday::FilePart) ? Faraday::FilePart : Faraday::UploadIO
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses Faraday::FilePart where available, as a replacement for the now deprecated Faraday::UploadIO:

https://github.com/lostisland/faraday/blob/87ecaf96822ef03ef6e86a9b9b57caa97e4c0fa8/lib/faraday/file_part.rb#L57-L59

Copy link
Contributor

@groe groe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@groe groe merged commit fbf5c7a into master May 6, 2020
@odlp odlp deleted the fix-faraday-1x branch May 6, 2020 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

faraday/upload_io (LoadError)
2 participants