/tcejdb/testejdb/t3
/node/nbproject/private
-/node/build
+/build
+/var
<option name="referencePos" value="0" />
<option name="showLabels" value="true" />
</component>
+ <component name="UnicodeBrowser">
+ <option name="fontName" value="Lucida Sans Typewriter" />
+ </component>
<component name="WebServicesPlugin" addRequiredLibraries="true" />
</project>
--- /dev/null
+{
+ 'variables' : {
+
+ },
+
+ 'target_defaults': {
+ 'configurations': {
+ 'Debug': {
+ },
+ 'Release':{
+ 'defines': [ 'NDEBUG' ],
+ }
+ },
+ 'conditions': [
+ ['OS == "win"', {
+
+ }, {
+ 'defines': [
+ '_LARGEFILE_SOURCE',
+ '_FILE_OFFSET_BITS=64',
+ '_GNU_SOURCE',
+ ],
+ }],
+ [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
+ 'cflags': [ '-Wall', '-pedantic', '-fsigned-char', '-pthread', '-Wno-variadic-macros'],
+ 'cflags_cc!' : [ '-fno-exceptions' ],
+ 'libraries' : [
+ '-L../tcejdb',
+ '-Wl,-Bstatic -ltcejdb',
+ '-Wl,-Bdynamic',
+ '-lbz2 -lz -lrt -lpthread -lm -lc'
+ ]
+ }],
+ ],
+ 'include_dirs' : ['tcejdb'],
+ },
+
+ 'targets' : [
+ {
+ 'target_name' : 'ejdb_native',
+ 'sources' : [
+ 'node/ejdb_native.cc',
+ 'node/ejdb_logging.cc'
+ ]
+ },
+ ]
+}
\ No newline at end of file
+++ /dev/null
-{
- 'targets': [
- {
- 'target_name' : 'ejdb_native',
- 'sources' : [
- 'ejdb_native.cc',
- 'ejdb_logging.cc'
- ],
- 'include_dirs': ['../tcejdb'],
- 'libraries' : [
- '-L../../tcejdb',
- '-Wl,-Bstatic -ltcejdb',
- '-Wl,-Bdynamic',
- '-lbz2 -lz -lrt -lpthread -lm -lc'
- ],
- 'cflags': [
- '-g',
- '-O0',
- '-fPIC',
- '-pedantic',
- '-Wno-variadic-macros',
- '-D_GNU_SOURCE',
- '-D_FILE_OFFSET_BITS=64',
- '-D_LARGEFILE_SOURCE'
- ],
- 'cflags!': [ '-fno-exceptions' ],
- 'cflags_cc!': [ '-fno-exceptions' ]
- }
- ]
-}
\ No newline at end of file
-var ejdblib = require("./build/Release/ejdb_native");
-var EJDBImpl = ejdblib.NodeEJDB
+var ejdblib;
+try {
+ ejdblib = require("../build/Release/ejdb_native.node");
+} catch(e) {
+ console.error("Warning: Using the DEBUG version of EJDB nodejs binding");
+ ejdblib = require("../build/Debug/ejdb_native.node");
+}
+var EJDBImpl = ejdblib.NodeEJDB;
const DEFAULT_OPEN_MODE = (ejdblib.JBOWRITER | ejdblib.JBOCREAT);
var EJDB = function(dbFile, openMode) {
EJDB.prototype.close = function() {
return this._impl.close();
-}
+};
module.exports = EJDB;
</df>
</df>
</df>
- <in>Makefile</in>
- <in>binding.Makefile</in>
- <in>config.gypi</in>
- <in>ejdb_native.target.mk</in>
</df>
<df name="build">
<df name="Release">
+++ /dev/null
-{
- "name": "ejdb",
- "version": "1.0.0",
- "main": "./ejdb.js"
-}
\ No newline at end of file
var EJDB = require("../ejdb.js");
module.exports.testOpenClose = function(test) {
- var jb = EJDB.open("tdb1");
+ var jb = EJDB.open("var/tdb1");
test.done();
}
\ No newline at end of file
--- /dev/null
+{
+ "name" : "ejdb",
+ "version" : "1.0.0",
+ "main" : "node/ejdb.js",
+ "description" : "EJDB - Embedded JSON Database engine",
+ "homepage" : "https://github.com/Softmotions/ejdb",
+ "author" : {
+ "name" : "Anton Adamansky",
+ "email" : "adamansky@gmail.com"
+ },
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/Softmotions/ejdb.git"
+ },
+ "engines" : {
+ "node" : "0.8.x"
+ },
+ "dependencies" : {
+ "async" : "latest"
+ },
+ "devDependencies": {
+ "nodeunit" : ">=0.7.0"
+ },
+ "scripts": {
+ "test" : "make -f tests.mk"
+ }
+}
\ No newline at end of file
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
- <content url="file://$MODULE_DIR$/../docs" />
+ <content url="file://$MODULE_DIR$/../node" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/nbproject" />
</content>
--- /dev/null
+
+test :
+ - mkdir -p var
+ make -C ./tcejdb check-ejdb
+ nodeunit ./node/tests
\ No newline at end of file