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

(download_to_file) fixed: ArgumentError: wrong number of arguments (given 2, expected 1) on Ruby3

Open Inversion-des opened this issue 4 years ago • 2 comments

Inversion-des avatar Jun 16 '21 09:06 Inversion-des

Can we get a new version with this fix?

alessandrostein avatar Aug 07 '22 23:08 alessandrostein

Monkey patch for me in another world:

require 'google_drive'
require 'fileutils'

module MonkeyPatch
  def download_to_file(path, params = {})
    @session.drive_service.get_file(
      id,
      **{ download_dest: path, supports_all_drives: true }.merge(params)
    )
  end
end
GoogleDrive::File.prepend(MonkeyPatch)

bigwheel avatar Dec 18 '23 10:12 bigwheel