Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSuggested new functions #40
Comments
|
I think these are all good. Maybe split into two PRs? I also realized that my conf is probably different from your as I have a test-channel in there. Happy to share that one if you want to see if you can blast messages at it. I can twitter-DM you the name. Or maybe send a pushbullet message to you :) |
|
WRT test-channel, i actually set one up after looking over simpleTests.R after starting on this. So i think that's okay unless we need to coordinate some testing effort in the future. |
|
code for public functions is now set to go:
I wrote the 2nd and 3rd functions because once i looked up the API for the |
|
If you feel super-adventurous, I think some folks (Jenny Bryan and others) figured out how to test token based web apis from Travis without spilling the token. But I can't remember where that was. :-/ It would be sweet if we could actually hit some tests as the code base it getting better and bigger. Not urgent, obviously. |
|
I did look into this some. The general approach seems like we encrypt the info with our public keys and travis's public key. something like: conf <- readLines("~/.rpushbullet.json")
save(list(dirk=openssl::rsa_encrypt(conf, dirks_key),
seth=openssl::rsa_encrypt(conf, seths_key),
travis=openssl::rsa_encrypt(conf, traviss_key)),
file="conf.RData")conf.RData is then added to the repo and somehow we tell travis to use it. We'd still have to setup a throw-away gmail account but maybe that's ok. I don't have my notes in front of me, but i actually started to do that previously. Also, we'd have to convert simpleTests.R to a proper test framework which checks return codes. Not sure how to test for the issue we had in #39, however. |
|
Well put, that's the way to do it. I actually do have a throw-away gmail account for the work I do with Philippe on his/our gtrendsR package. That is definitely worth playing with, and as you say once we have it we may as well switch to proper tests. I know RUnit pretty well (include setup/teardown) and testthat not at all :) |
Public versus private indicate by leading dot, though any of these could go either way.
Thoughts? Additional functions?