sendanor/node-crypt3 — pull request #6 by rlidwka (2014-09-07 15:55:16+00:00)
Title: add node 0.11 compatibility

Currently node 0.11 can't compile this, because they changed interfaces:

```
/home/alex/.node-gyp/0.11.13/deps/v8/include/v8.h: In function ‘v8::Handle Method(const int&)’:
/home/alex/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../crypt3.cc:11:14: error: within this context
HandleScope scope;
^
../crypt3.cc:13:11: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
if (args.Length() < 2) {
^
../crypt3.cc:14:39: error: ‘New’ is not a member of ‘v8::String’
ThrowException(Exception::TypeError(String::New("Wrong number of arguments")));
```

This patch should fix this, I tested on both `0.11.13` and `0.10.31`.

I'm using `nan` module for this, because manually supporting both versions looks too complex.

Also, added smoke tests, so you could this check automated with travis or something like that.