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

Rework box-auth functions #109

Merged
merged 2 commits into from
Jul 21, 2019
Merged

Rework box-auth functions #109

merged 2 commits into from
Jul 21, 2019

Conversation

ijlyttle
Copy link
Member

This will fix #96

  • deprecate box_attach_on_auth()
  • deprecate write.Renv arg to box_auth()
    • write environment variables to console instead
  • refactor box_auth(), box_fresh_auth():
    • import glue and fs (both low depencency)

Also, fix typo in box_read() documentation

- deprecate box_attach_on_auth()
- deprecate write.Renv arg to box_auth()
  - write environment variables to console instead
- refactor box_auth(), box_fresh_auth():
  - import glue and fs (both low depencency)

Also, fix typo in box_read() documentation
@ijlyttle
Copy link
Member Author

Hi @nathancday -

I don't know how much of an issue this may cause your JWT PR - please let me know if you think there will be an interference.

As well, in the context of #96, I have proposed bigger changes rather than smaller changes. From the users' perpsective the biggest change will be that they will have to update their .Renviron file themselves.

@codecov-io
Copy link

codecov-io commented Jul 21, 2019

Codecov Report

Merging #109 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #109      +/-   ##
=========================================
- Coverage    1.73%   1.67%   -0.06%     
=========================================
  Files          22      22              
  Lines        1500    1552      +52     
=========================================
  Hits           26      26              
- Misses       1474    1526      +52
Impacted Files Coverage Δ
R/boxr_read.R 0% <ø> (ø) ⬆️
R/boxr__internal_misc.R 18.75% <0%> (-0.15%) ⬇️
R/boxr_auth.R 0% <0%> (ø) ⬆️

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 d220622...aad5768. Read the comment docs.

@nathancday
Copy link
Member

Looks good! I can mirror the new .Renviron behavior in box_auth_jwt() and don't foresee any issues. I think the bigger changes are good for getting boxr behavior to sync with usethis standards.

Two small questions:

  • I think is_void() will be useful in box_auth_jwt() and maybe else where. Should it be moved to boxr__internal_misc.R?
  • Before I've used readline("something") and I see here you are using message("something") / readline(). Is there was a reason to prefer one over the other?

@ijlyttle
Copy link
Member Author

I'll be happy to move is_void() to boxr__internal_misc.R.

As for the readline() vs. message()/readline(), I (think) I was just using the existing code as a template. Looking at the documentation the prompt for readline cuts off at 256 characters.

I can adapt my code to use only readline() - in the longer run, I understand usethis will be spinning off the ui_*() functions to its own package, which I think could be useful to us.

Thanks!

@nathancday
Copy link
Member

nathancday commented Jul 21, 2019 via email

@ijlyttle
Copy link
Member Author

ijlyttle commented Jul 21, 2019

Just to note, the message()/readline() pattern is used for multiline prompts, so leaving it as it was...

Will merge once checks pass, thanks!

@ijlyttle ijlyttle merged commit 971144b into master Jul 21, 2019
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.

functions that write to the filesystem
3 participants