google-drive-ruby icon indicating copy to clipboard operation
google-drive-ruby copied to clipboard

Failure when config file name is a Pathname

Open mkamensky opened this issue 5 years ago • 1 comments

When passing a Pathname object to GoogleDrive::Session.from_config, it fails since it expects a Config object. I suggest instead of check if the object is a string, to check if the object responds to one of the required methods (eg :client_id), and if not, treat it as a string. Thanks!

mkamensky avatar Mar 27 '19 09:03 mkamensky

Thanks for the feedback. Sounds good to add support for Pathname. I don't think people pass anything other than String and Pathname for a path, so I would probably just add handling for Pathname.

gimite avatar Mar 28 '19 12:03 gimite