-
Notifications
You must be signed in to change notification settings - Fork 759
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
new feature: source_gist and source_https #49
Conversation
#' @importFrom RCurl getURL | ||
#' @export | ||
source_https <- function(url, ...) { | ||
message("Running: ", url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed for this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will remove.
#' | ||
#' @param entry either full url (character), gist ID (numeric or character of | ||
#' numeric). If only an entry ID is specified and the entry has multiple code | ||
#' block, the first entry is sourced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should source all files by default (if that's not too tricky) - that's why I suggested vectorising source_url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A problem is that a entry of the gist can contain different types of files, so maybe one is *.R, the other is *.txt.
But as the gist wisely identify the type of file, maybe we can wisely detect and source only *.R. I will check if it is possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One way is to download tar.gz that contains all entries, extract it, inspect the extension, and run the file if it is *.R.
Not sure which way is most convenient.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, good point. Let's leave it as is.
Could you please add a note to NEWS, and then I'll pull in. |
new feature: source_gist and source_https
No description provided.