Closed cwarden closed 9 years ago
If you have a preferred testing framework, I'd be happy to include tests for these changes.
I love this @cwarden! Very nice use some underscore methods. _.constant(project) is just the pattern I was looking for.
Tests are certainly on the todo list. Would you mind firing up a few for your great work? I'm super happy to pull these changes in.
Merged! I'll add tests eventually. Thanks for your contribution!
@danthareja, sorry for not getting back to this to add the tests. I started working on the tests for the download module, but put it aside when the changes started getting rather intrusive since none of the internal functions are exposed. Here's where I left off: e1eac802380f05213b34d6ca9c8794dc665b3287
Expose init, download, and upload functions so gaps can be used in other javascript programs.
Update clone and download functions to take an optional destination directory. Update download function to return the project object so the path to the actual project, based on the project's name, can be retrieved.
Update upload function to take an optional source directory. When uploading, set path in the manifest to the actual path in case the directory has been moved and the path inside the manifest file is no longer correct.