Skip to content

Commit

Permalink
Merge pull request #254 from minimum2scp/fix/timeout_google-api-clien…
Browse files Browse the repository at this point in the history
…t_0.11.0

Support google-api-client 0.11.0
  • Loading branch information
gimite committed Apr 6, 2017
2 parents b87ac58 + 5bc599b commit 87c727c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion google_drive.gemspec
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.require_paths = ['lib']

s.add_dependency('nokogiri', ['>= 1.5.3', '< 2.0.0'])
s.add_dependency('google-api-client', ['>= 0.9.0', '< 1.0.0'])
s.add_dependency('google-api-client', ['>= 0.11.0', '< 1.0.0'])
s.add_dependency('googleauth', ['>= 0.5.0', '< 1.0.0'])
s.add_development_dependency('test-unit', ['>= 3.0.0', '< 4.0.0'])
s.add_development_dependency('rake', ['>= 0.8.0'])
Expand Down
5 changes: 3 additions & 2 deletions lib/google_drive/api_client_fetcher.rb
Expand Up @@ -22,8 +22,9 @@ def initialize(authorization)
@drive.authorization = authorization
# Make the timeout virtually infinite because some of the operations (e.g., uploading a large file)
# can take very long.
@drive.request_options.timeout_sec = 100_000_000
@drive.request_options.open_timeout_sec = 100_000_000
@drive.client_options.open_timeout_sec = 100_000_000
@drive.client_options.read_timeout_sec = 100_000_000
@drive.client_options.send_timeout_sec = 100_000_000
end

attr_reader(:drive)
Expand Down

0 comments on commit 87c727c

Please sign in to comment.