Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requester pays samples #453

Merged
merged 7 commits into from
Aug 15, 2017
Merged

Add requester pays samples #453

merged 7 commits into from
Aug 15, 2017

Conversation

ace-n
Copy link
Contributor

@ace-n ace-n commented Aug 12, 2017

No description provided.

@ace-n ace-n requested review from jmdobry and frankyn August 12, 2017 03:11
@codecov
Copy link

codecov bot commented Aug 12, 2017

Codecov Report

Merging #453 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #453   +/-   ##
=======================================
  Coverage   83.84%   83.84%           
=======================================
  Files           4        4           
  Lines         421      421           
=======================================
  Hits          353      353           
  Misses         68       68

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e99370...37c1837. Read the comment docs.

Copy link
Member

@jmdobry jmdobry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you need to add the samples to package.json and then re-generate the readme

@ace-n
Copy link
Contributor Author

ace-n commented Aug 15, 2017

Done - FYI, I wasn't sure whether or not this sample warranted a README update since requesterPays.js seemed like a mix of stuff from other files.

Examples:
node requesterPays.js enable my-bucket Enables requester-pays requests on a bucket named
"my-bucket".
node requesterPays.js list Disables requester-pays requests on a bucket named
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be disable? I think the README didn't generate correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 😄 - good catch!

Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up Ace! I added two comments. I'll approve after the README is fixed.

let status;
const metadata = data[0];
if (metadata && metadata.billing && metadata.billing.requesterPays) {
status = `enabled`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this string use single-quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the other strings should use backticks. Will fix.

@@ -177,8 +177,8 @@ const cli = require(`yargs`)
(opts) => downloadFileUsingRequesterPays(opts.projectId, opts.bucketName, opts.srcFileName, opts.destFileName)
)
.example(`node $0 enable my-bucket`, `Enables requester-pays requests on a bucket named "my-bucket".`)
.example(`node $0 list`, `Disables requester-pays requests on a bucket named "my-bucket".`)
.example(`node $0 delete my-bucket`, `Determines whether requester-pays requests are enabled for a bucket named "my-bucket".`)
.example(`node $0 disable`, `Disables requester-pays requests on a bucket named "my-bucket".`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last nit, disable should accept a bucket id similar to enable.

@ace-n ace-n merged commit ffcba44 into master Aug 15, 2017
@ace-n ace-n deleted the requester-pays branch August 16, 2017 19:32
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* chore(main): release 3.0.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* chore(main): release 3.0.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 14, 2022
* chore(main): release 3.0.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 15, 2022
* chore(main): release 3.0.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants