-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new README for Storage samples with usage
- Loading branch information
remi Taylor
committed
Sep 29, 2016
1 parent
1197dd1
commit d56b912
Showing
1 changed file
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
# Google Cloud Storage Ruby samples | ||
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
|
||
# Google Cloud Storage Ruby Samples | ||
|
||
[Cloud Storage][storage_docs] allows world-wide storage and retrieval of any | ||
amount of data at any time. | ||
|
||
[storage_docs]: https://cloud.google.com/storage/docs/ | ||
|
||
## Run sample | ||
|
||
To run the sample, first install dependencies: | ||
|
||
bundle install | ||
|
||
Run the sample: | ||
|
||
bundle exec ruby buckets.rb | ||
bundle exec ruby files.rb | ||
|
||
## Samples | ||
|
||
### Buckets | ||
|
||
**Usage:** `bundle exec ruby buckets.rb [command] [arguments]` | ||
|
||
``` | ||
sage: bundle exec ruby buckets.rb [command] [arguments] | ||
Commands: | ||
list List all buckets in the authenticated project | ||
create <bucket> Create a new bucket with the provided name | ||
delete <bucket> Delete bucket with the provided name | ||
Environment variables: | ||
GCLOUD_PROJECT must be set to your Google Cloud project ID | ||
``` | ||
|
||
### Files | ||
|
||
**Usage:** `bundle exec ruby files.rb [command] [arguments]` | ||
|
||
``` | ||
Usage: bundle exec ruby files.rb [command] [arguments] | ||
Commands: | ||
list <bucket> List all files in the bucket | ||
upload <bucket> <file> Upload local file to a bucket | ||
download <bucket> <file> <path> Download a file from a bucket | ||
delete <bucket> <file> Delete a file from a bucket | ||
metadata <bucket> <file> Display metadata for a file in a bucket | ||
make_public <bucket> <file> Make a file in a bucket public | ||
rename <bucket> <file> <new> Rename a file in a bucket | ||
copy <srcBucket> <srcFile> <destBucket> <destFile> Copy file to other bucket | ||
Environment variables: | ||
GCLOUD_PROJECT must be set to your Google Cloud project ID | ||
``` |