google_drive 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c5c48eb7ca964d785f598059fc72d726ffda920
|
4
|
+
data.tar.gz: b8009de5c8bf21ac394cacd34fd6c6bb78ee4ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
26
|
-
|
27
|
-
@drive.client_options.
|
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
|
|
data/lib/google_drive/session.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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.
|
52
|
+
version: 0.14.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: googleauth
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|