A Google Drive shell in Ruby.
Installation
Add this line to your application's Gemfile:
gem 'gdsh'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gdsh
Usage
(adapted from https://developers.google.com/drive/web/quickstart/quickstart-ruby)
- Set up a project in Google.
- Select the created project and select APIs & auth and make sure the status is ON for the Drive API.
- In the sidebar on the left, select Credentials and set up new credentials for this project.
- Download (as JSON) or save the client id and client secret.
-
bundle exec ruby gdsh.rb <credentials_json>
orbundle exec ruby gdsh.rb
. In the former, credentials will be automatically retrieved from JSON; in the latter, you will need to copy and paste theclient_id
andclient_secret
from the credentials above.