easy-google-drive 0.0.1 → 0.0.3
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 +4 -4
- data/lib/easy-google-drive/file_api.rb +1 -1
- data/lib/easy-google-drive/file_base.rb +8 -4
- data/lib/easy-google-drive/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51351ad9730a05bc279008331617e32e4b7c629f
|
|
4
|
+
data.tar.gz: 25ef2b0be8101a6cd0b6daf23b20d64ca9b658d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca00a05b29a61262c6e6ecf002801baebf3893018973ff1aff8ae8c674ce7d1c4fd1d2dfd7863b3049177e5170b300d89695c5606bab69059e268957cb49db23
|
|
7
|
+
data.tar.gz: d8171a735f371c52a270e3b59289f679e4b6c83f7c901d16ca937485556cfa211bfe51920744a4de506ff8e28898cbf58b81a3aeafb43e1bb2ed5a649dbe464b
|
|
@@ -83,7 +83,7 @@ class EasyGoogleDrive::Drive
|
|
|
83
83
|
list.each do |folder|
|
|
84
84
|
list2=[]
|
|
85
85
|
tmp_path2 = []
|
|
86
|
-
tmp_path2.push({
|
|
86
|
+
tmp_path2.push({name:folder.name,id:folder.id})
|
|
87
87
|
list(tmp_path2,list2)
|
|
88
88
|
if list2 == [] then
|
|
89
89
|
@service.delete_file(folder[:id])
|
|
@@ -87,7 +87,11 @@ class EasyGoogleDrive::Drive
|
|
|
87
87
|
current_folder_id = ref_file[0].parents
|
|
88
88
|
else
|
|
89
89
|
puts "ref file not found"
|
|
90
|
-
|
|
90
|
+
file_metadata = Google::Apis::DriveV3::File.new(
|
|
91
|
+
name: "gdrive.dat",
|
|
92
|
+
mine_type: 'application/vnd.google-apps.unknown',
|
|
93
|
+
)
|
|
94
|
+
@service.create_file(file_metadata, fields:'id')
|
|
91
95
|
begin
|
|
92
96
|
response = @service.list_files(
|
|
93
97
|
q: "name='gdrive.dat'",
|
|
@@ -103,7 +107,7 @@ class EasyGoogleDrive::Drive
|
|
|
103
107
|
end
|
|
104
108
|
|
|
105
109
|
path.clear
|
|
106
|
-
path.push({
|
|
110
|
+
path.push({name:"root",id:current_folder_id[0]})
|
|
107
111
|
list(path,file_list)
|
|
108
112
|
return
|
|
109
113
|
end
|
|
@@ -180,7 +184,7 @@ class EasyGoogleDrive::Drive
|
|
|
180
184
|
end
|
|
181
185
|
page_token = response.next_page_token
|
|
182
186
|
end while !page_token.nil?
|
|
183
|
-
path.push({
|
|
187
|
+
path.push({name:"shared",id:nil})
|
|
184
188
|
return
|
|
185
189
|
end
|
|
186
190
|
|
|
@@ -233,7 +237,7 @@ class EasyGoogleDrive::Drive
|
|
|
233
237
|
end
|
|
234
238
|
newfolder = get_folderid(target,list)
|
|
235
239
|
if newfolder != nil then
|
|
236
|
-
path.push({
|
|
240
|
+
path.push({name:newfolder.name,id:newfolder.id})
|
|
237
241
|
list(path,list)
|
|
238
242
|
else
|
|
239
243
|
puts "folder not find:: "+target
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy-google-drive
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NaotakaSaito
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-05-
|
|
11
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
128
|
version: '0'
|
|
129
129
|
requirements: []
|
|
130
130
|
rubyforge_project:
|
|
131
|
-
rubygems_version: 2.
|
|
131
|
+
rubygems_version: 2.2.2
|
|
132
132
|
signing_key:
|
|
133
133
|
specification_version: 4
|
|
134
134
|
summary: '"ruby library to use google drive simply and easily."'
|