google_drive 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fbf16204aebbad81af360cbfabd953026d32069
4
- data.tar.gz: b78cd887e42ea51e73dcb2e6d8e0ec3537156adf
3
+ metadata.gz: 9c5c48eb7ca964d785f598059fc72d726ffda920
4
+ data.tar.gz: b8009de5c8bf21ac394cacd34fd6c6bb78ee4ec5
5
5
  SHA512:
6
- metadata.gz: 123169ee047156e5e812e436c2bf9a19b132c150b418842e2ed89e8ae1fcdfd89f97acc8725bd48f037887f359f1a263d90483b0fc08dccf440064adb4464167
7
- data.tar.gz: 1ff05ef1a4af8e57040a63833e300c53de04e67fd6122886420260c11631a3dceaf7c74834ab7e3d55c68429d56eecd554041bd6848c7b21a29243a283e95ba8
6
+ metadata.gz: 88ae1ae07556e30a97277bc4729c71bf53a14daa3a2e7aabd47b0243ed96d5274479725203fe555e539db7e465c0e6fb23b966dfbeb68a013496a0e938d6819f
7
+ data.tar.gz: a02f4312b6c9627a05c12ef6a74040d58dff67f0be3a976a2025166d64063a7b526ac45a40e90a9354974b6a6871aa490d14ea55d11482e1fd44746c220956d0
@@ -20,11 +20,14 @@ module GoogleDrive
20
20
  def initialize(authorization)
21
21
  @drive = Google::Apis::DriveV3::DriveService.new
22
22
  @drive.authorization = authorization
23
+
23
24
  # Make the timeout virtually infinite because some of the operations (e.g., uploading a large file)
24
25
  # can take very long.
25
- @drive.client_options.open_timeout_sec = 100_000_000
26
- @drive.client_options.read_timeout_sec = 100_000_000
27
- @drive.client_options.send_timeout_sec = 100_000_000
26
+ # This value is the maximal allowed timeout in seconds on JRuby.
27
+ t = (2 ** 31 - 1) / 1000
28
+ @drive.client_options.open_timeout_sec = t
29
+ @drive.client_options.read_timeout_sec = t
30
+ @drive.client_options.send_timeout_sec = t
28
31
  end
29
32
 
30
33
  attr_reader(:drive)
@@ -15,13 +15,13 @@ module GoogleDrive
15
15
 
16
16
  # Adds the given GoogleDrive::File to the collection.
17
17
  def add(file)
18
- @session.drive.update_file(file.id, add_parents: self.id, fields: '')
18
+ @session.drive.update_file(file.id, add_parents: self.id, fields: '', supports_team_drives: true)
19
19
  nil
20
20
  end
21
21
 
22
22
  # Removes the given GoogleDrive::File from the collection.
23
23
  def remove(file)
24
- @session.drive.update_file(file.id, remove_parents: self.id, fields: '')
24
+ @session.drive.update_file(file.id, remove_parents: self.id, fields: '', supports_team_drives: true)
25
25
  end
26
26
 
27
27
  # Creates a sub-collection with given title. Returns GoogleDrive::Collection object.
@@ -31,7 +31,7 @@ module GoogleDrive
31
31
  mime_type: 'application/vnd.google-apps.folder',
32
32
  parents: [self.id],
33
33
  }
34
- file = @session.drive.create_file(file_metadata, fields: '*')
34
+ file = @session.drive.create_file(file_metadata, fields: '*', supports_team_drives: true)
35
35
  @session.wrap_api_file(file)
36
36
  end
37
37
 
@@ -497,6 +497,7 @@ module GoogleDrive
497
497
  upload_source: source,
498
498
  content_type: 'application/octet-stream',
499
499
  fields: '*',
500
+ supports_team_drives: true
500
501
  }
501
502
  for k, v in params
502
503
  if ![:convert, :convert_mime_type, :parents].include?(k)
@@ -123,8 +123,8 @@ module GoogleDrive
123
123
  @num_rows = nil
124
124
  @num_cols = nil
125
125
  else
126
- @num_rows = row if row > num_rows
127
- @num_cols = col if col > num_cols
126
+ @num_rows = row if @num_rows && row > @num_rows
127
+ @num_cols = col if @num_cols && col > @num_cols
128
128
  end
129
129
  end
130
130
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Ichikawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2017-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: 0.11.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: 0.13.0
42
+ version: 0.14.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: 0.11.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 0.13.0
52
+ version: 0.14.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: googleauth
55
55
  requirement: !ruby/object:Gem::Requirement