google_drive 3.0.4 → 3.0.5

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
- SHA256:
3
- metadata.gz: 4058c1344a508194fb0dd57e58206b54469318b13139d9cdc8bd708afb4595b4
4
- data.tar.gz: 304898bca40cd8022a002e25335c6dc22fb333c7e67d4ba8d62ffe0817fbde75
2
+ SHA1:
3
+ metadata.gz: 71fe69bd1f6f33fc7bc16f567e044bd7e36411c4
4
+ data.tar.gz: c94e5ec66d46f6354e73a2a2a2fbad4bb62828a5
5
5
  SHA512:
6
- metadata.gz: 0a8bf859d820a2b4d12ea1017b69ef733b99f3ed5530271d4694170decd7e3132a938870317eb40bbbe9c6a2aa41877ab6e82ceb73b0861d9dd327f8e96f71b0
7
- data.tar.gz: b8dbadd5a9703ed7cd2f90a357393c81883a6304d40b5ae574f6149adb2cb9452ff6fe6613f339144431535c55a07afd5e22025affe952c57c46debe2aeb5b74
6
+ metadata.gz: d1cd95cecdecc769b3f0842540c1565581918f3aa69188d7f3a01c5116b35a3bebf5541f26709f24cd2dbc018862c3661d96d08ffc717ddc933cb1577c171c32
7
+ data.tar.gz: cd9b0137b9412501b43e402caf596103f36e76b4b2a17664e2e43582dbfee88269165d7c5942f1f6e0ac2ef43644199c08afd03f5e8702895e24c6381dac315d
@@ -22,7 +22,7 @@ module GoogleDrive
22
22
  @session = session
23
23
  @file = file
24
24
  api_permissions = @session.drive_service.list_permissions(
25
- @file.id, fields: '*', supports_team_drives: true
25
+ @file.id, fields: '*', supports_all_drives: true
26
26
  )
27
27
  @entries =
28
28
  api_permissions.permissions.map { |perm| AclEntry.new(perm, self) }
@@ -73,7 +73,7 @@ module GoogleDrive
73
73
  api_permission = @session.drive_service.create_permission(
74
74
  @file.id,
75
75
  entry.params,
76
- { fields: '*', supports_team_drives: true }.merge(options)
76
+ { fields: '*', supports_all_drives: true }.merge(options)
77
77
  )
78
78
  new_entry = AclEntry.new(api_permission, self)
79
79
  @entries.push(new_entry)
@@ -86,7 +86,7 @@ module GoogleDrive
86
86
  # spreadsheet.acl.delete(spreadsheet.acl[1])
87
87
  def delete(entry)
88
88
  @session.drive_service.delete_permission(
89
- @file.id, entry.id, supports_team_drives: true
89
+ @file.id, entry.id, supports_all_drives: true
90
90
  )
91
91
  @entries.delete(entry)
92
92
  end
@@ -98,7 +98,7 @@ module GoogleDrive
98
98
  entry.id,
99
99
  { role: entry.role },
100
100
  fields: '*',
101
- supports_team_drives: true
101
+ supports_all_drives: true
102
102
  )
103
103
  entry.api_permission = api_permission
104
104
  entry
@@ -20,7 +20,7 @@ module GoogleDrive
20
20
  # Adds the given GoogleDrive::File to the folder.
21
21
  def add(file)
22
22
  @session.drive_service.update_file(
23
- file.id, add_parents: id, fields: '', supports_team_drives: true
23
+ file.id, add_parents: id, fields: '', supports_all_drives: true
24
24
  )
25
25
  nil
26
26
  end
@@ -28,7 +28,7 @@ module GoogleDrive
28
28
  # Removes the given GoogleDrive::File from the folder.
29
29
  def remove(file)
30
30
  @session.drive_service.update_file(
31
- file.id, remove_parents: id, fields: '', supports_team_drives: true
31
+ file.id, remove_parents: id, fields: '', supports_all_drives: true
32
32
  )
33
33
  end
34
34
 
@@ -62,7 +62,7 @@ module GoogleDrive
62
62
  }.merge(file_properties)
63
63
 
64
64
  file = @session.drive_service.create_file(
65
- file_metadata, fields: '*', supports_team_drives: true
65
+ file_metadata, fields: '*', supports_all_drives: true
66
66
  )
67
67
 
68
68
  @session.wrap_api_file(file)
@@ -39,7 +39,7 @@ module GoogleDrive
39
39
  # Reloads file metadata such as title and acl.
40
40
  def reload_metadata
41
41
  @api_file = @session.drive_service.get_file(
42
- id, fields: '*', supports_team_drives: true
42
+ id, fields: '*', supports_all_drives: true
43
43
  )
44
44
  @acl = Acl.new(@session, self) if @acl
45
45
  end
@@ -96,7 +96,7 @@ module GoogleDrive
96
96
  def download_to_file(path, params = {})
97
97
  @session.drive_service.get_file(
98
98
  id,
99
- { download_dest: path, supports_team_drives: true }.merge(params)
99
+ { download_dest: path, supports_all_drives: true }.merge(params)
100
100
  )
101
101
  end
102
102
 
@@ -115,7 +115,7 @@ module GoogleDrive
115
115
  def download_to_io(io, params = {})
116
116
  @session.drive_service.get_file(
117
117
  id,
118
- { download_dest: io, supports_team_drives: true }.merge(params)
118
+ { download_dest: io, supports_all_drives: true }.merge(params)
119
119
  )
120
120
  end
121
121
 
@@ -184,7 +184,7 @@ module GoogleDrive
184
184
 
185
185
  # Reads content from +io+ and updates the file with the content.
186
186
  def update_from_io(io, params = {})
187
- params = { upload_source: io, supports_team_drives: true }.merge(params)
187
+ params = { upload_source: io, supports_all_drives: true }.merge(params)
188
188
  @session.drive_service.update_file(id, nil, params)
189
189
  nil
190
190
  end
@@ -193,10 +193,10 @@ module GoogleDrive
193
193
  # If +permanent+ is +true+, deletes the file permanently.
194
194
  def delete(permanent = false)
195
195
  if permanent
196
- @session.drive_service.delete_file(id, supports_team_drives: true)
196
+ @session.drive_service.delete_file(id, supports_all_drives: true)
197
197
  else
198
198
  @session.drive_service.update_file(
199
- id, { trashed: true }, supports_team_drives: true
199
+ id, { trashed: true }, supports_all_drives: true
200
200
  )
201
201
  end
202
202
  nil
@@ -205,7 +205,7 @@ module GoogleDrive
205
205
  # Renames title of the file.
206
206
  def rename(title)
207
207
  @session.drive_service.update_file(
208
- id, { name: title }, supports_team_drives: true
208
+ id, { name: title }, supports_all_drives: true
209
209
  )
210
210
  nil
211
211
  end
@@ -215,7 +215,7 @@ module GoogleDrive
215
215
  # Creates copy of this file with the given title.
216
216
  def copy(title, file_properties = {})
217
217
  api_file = @session.drive_service.copy_file(
218
- id, { name: title }.merge(file_properties), fields: '*', supports_team_drives: true
218
+ id, { name: title }.merge(file_properties), fields: '*', supports_all_drives: true
219
219
  )
220
220
  @session.wrap_api_file(api_file)
221
221
  end
@@ -253,7 +253,7 @@ module GoogleDrive
253
253
  params = convert_params(params)
254
254
  execute_paged!(
255
255
  method: drive_service.method(:list_files),
256
- parameters: { fields: '*', supports_team_drives: true }.merge(params),
256
+ parameters: { fields: '*', supports_all_drives: true, include_items_from_all_drives: true }.merge(params),
257
257
  items_method_name: :files,
258
258
  converter: proc { |af| wrap_api_file(af) },
259
259
  &block
@@ -285,7 +285,7 @@ module GoogleDrive
285
285
  # Returns an instance of GoogleDrive::File or its subclass
286
286
  # (GoogleDrive::Spreadsheet, GoogleDrive::Collection).
287
287
  def file_by_id(id)
288
- api_file = drive_service.get_file(id, fields: '*', supports_team_drives: true)
288
+ api_file = drive_service.get_file(id, fields: '*', supports_all_drives: true)
289
289
  wrap_api_file(api_file)
290
290
  end
291
291
 
@@ -508,7 +508,7 @@ module GoogleDrive
508
508
  }.merge(file_properties)
509
509
 
510
510
  file = drive_service.create_file(
511
- file_metadata, fields: '*', supports_team_drives: true
511
+ file_metadata, fields: '*', supports_all_drives: true
512
512
  )
513
513
 
514
514
  wrap_api_file(file)
@@ -654,7 +654,7 @@ module GoogleDrive
654
654
  upload_source: source,
655
655
  content_type: 'application/octet-stream',
656
656
  fields: '*',
657
- supports_team_drives: true
657
+ supports_all_drives: true
658
658
  }
659
659
  for k, v in params
660
660
  unless %i[convert convert_mime_type parents].include?(k)
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: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Ichikawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2020-05-31 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.37.0
42
+ version: 1.0.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.37.0
52
+ version: 1.0.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: googleauth
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -168,7 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
170
  requirements: []
171
- rubygems_version: 3.0.6
171
+ rubyforge_project:
172
+ rubygems_version: 2.6.14
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: A library to read/write files/spreadsheets in Google Drive/Docs.