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

Fix bug #10

Merged
merged 2 commits into from
Sep 19, 2021
Merged

Fix bug #10

merged 2 commits into from
Sep 19, 2021

Conversation

maelle
Copy link
Contributor

@maelle maelle commented Sep 3, 2021

As suggested by @bcheggeseth

@maelle
Copy link
Contributor Author

maelle commented Sep 3, 2021

It also seems

if(!preview && !confirm) {
should be if(!preview && confirm) I think?

I was also wondering whether the default value of confirm should be rlang::is_interactive().

Lastly, I think it'd make sense to add a test that'd have caught the bug (i.e. with confirmation, and send equal to e.g. draft). If not with stubbing I can recommend https://books.ropensci.org/http-testing/ 😁

Thanks again for your work on this useful package @andrie! (and thanks @bcheggeseth for the bug fix).

@andrie
Copy link
Owner

andrie commented Sep 19, 2021

should be if(!preview && confirm) I think?
I was also wondering whether the default value of confirm should be rlang::is_interactive().

No, I think the current logic is correct, since confirm is defined as :

If FALSE asks for confirmation before sending.

Also, I don't think the default should depend on interactivity. IMO it's safer when using this in production (i.e. non-interactively) to fail if confirm == FALSE.

@andrie
Copy link
Owner

andrie commented Sep 19, 2021

Lastly, I think it'd make sense to add a test that'd have caught the bug (i.e. with confirmation, and send equal to e.g. draft). If not with stubbing I can recommend https://books.ropensci.org/http-testing/ 😁

Yes, this makes sense. If I can add a test in less than 30 minutes I'll add it to the package, otherwise leave this part for a future date.

@andrie andrie merged commit 86246ed into andrie:master Sep 19, 2021
@andrie
Copy link
Owner

andrie commented Sep 19, 2021

Thank you :-)

@andrie andrie mentioned this pull request Sep 19, 2021
@andrie
Copy link
Owner

andrie commented Sep 19, 2021

I've submitted a new version to CRAN.

Also note that the new default branch is main (renamed from master)

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.

2 participants