drudge/node-keychain — pull request #2 by mvhaen (2013-03-08 13:20:43+00:00)
Title: Adding cross-platform support.

Hi,

I've been working on adding cross-platform support to this module. The keychain.js file is now just a loader that checks for the os and the loads the actual keychain implementation file.

I've already added support for linux using gkeyring, and it passes the tests, as does OS X. Windows is next on my list. At the moment I've added the python script from https://github.com/kparal/gkeyring to the repository, to avoid problems with dependencies, but I'm not sure if this is the best way or if this doesn't cause a problem with the license.

Also, I slightly modified the test:

- I added a require for 'should' as else the test would not work with mocha. Maybe I was doing something wrong there.
- If fs.existsSync is undefined, fall back to using path instead. Assuming that in that case the node version is < 0.8 (see https://github.com/kamicane/wrapup/pull/8).