You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've ran into a problem when using faraday (through zendesk client gem) and ruby-filemagic gems at the same time.
Ruby-filemagic defines content_type on String and faraday checks for that method to detect files. More info in an issue at zendesk client: zendesk/zendesk_api_client_rb#61
I would create an issue at ruby-filemagic since content_type is a little unexpected on a String, but I think it's actually faraday that doesn't adhere to the "quacks like a duck" rule. It's ok to check for respond_to? instead of kind_of?, but you should check all the methods you intend to use. Faraday uses but doesn't verify existence of original_filename method.
The text was updated successfully, but these errors were encountered:
Hi, I've ran into a problem when using faraday (through zendesk client gem) and ruby-filemagic gems at the same time.
Ruby-filemagic defines
content_type
onString
and faraday checks for that method to detect files. More info in an issue at zendesk client:zendesk/zendesk_api_client_rb#61
I would create an issue at ruby-filemagic since
content_type
is a little unexpected on aString
, but I think it's actually faraday that doesn't adhere to the "quacks like a duck" rule. It's ok to check forrespond_to?
instead ofkind_of?
, but you should check all the methods you intend to use. Faraday uses but doesn't verify existence oforiginal_filename
method.The text was updated successfully, but these errors were encountered: