Skip to content
GitLab
Next
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zoom Sync
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GitLab.com
Zoom Sync
Commits
4b9f4313
Commit
4b9f4313
authored
Jul 10, 2020
by
Muhammad Dewji
🐴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update load_gdrive_config to look for GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY env var
parent
ace99628
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
zoom-sync.rb
zoom-sync.rb
+7
-7
No files found.
zoom-sync.rb
View file @
4b9f4313
...
...
@@ -109,8 +109,8 @@ class GoogleDriveClient
attr_reader
:session
def
initialize
()
@session
=
GoogleDrive
::
Session
.
from_service_account_key
(
StringIO
.
new
(
ENV
[
'GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY'
])
)
def
initialize
(
config
)
@session
=
GoogleDrive
::
Session
.
from_service_account_key
(
config
)
end
def
valid_file?
(
folders
,
filename
,
file_size
)
...
...
@@ -186,8 +186,7 @@ class ZoomSyncher
def
initialize
@client
=
ZoomClient
.
new
(
load_zoom_config
)
#@gdrive_client = GoogleDriveClient.new(load_gdrive_config)
@gdrive_client
=
GoogleDriveClient
.
new
()
@gdrive_client
=
GoogleDriveClient
.
new
(
load_gdrive_config
)
end
def
sync
...
...
@@ -289,14 +288,15 @@ class ZoomSyncher
# Returns a config object that responds to client_id, etc.:
# https://www.rubydoc.info/gems/google_drive/2.1.1/GoogleDrive%2FSession.from_config
def
load_gdrive_config
data
=
if
ENV
[
'GOOGLE_DRIVE_
CONFIG
'
]
ENV
[
'GOOGLE_DRIVE_
CONFIG
'
]
if
ENV
[
'GOOGLE_DRIVE_
SERVICE_ACCOUNT_KEY
'
]
ENV
[
'GOOGLE_DRIVE_
SERVICE_ACCOUNT_KEY
'
]
else
File
.
read
(
'config.json'
)
end
JSON
.
parse
(
data
,
object_class:
OpenStruct
)
StringIO
.
new
(
data
)
end
# Discard any audio or videos that aren't longer than 30 seconds
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment