-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
*.swp | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# v0.0.0 / 2013-11-21 | ||
|
||
* Initial project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
REPORTER = spec | ||
|
||
test: | ||
@NODE_ENV=test ./node_modules/.bin/mocha --reporter $(REPORTER) ./test/*.js | ||
|
||
test-cov: lib-cov | ||
@FENDJS_MODEL_MONGO_COV=1 $(MAKE) test REPORTER=html-cov > ./coverage.html | ||
@rm -rf ./lib-cov | ||
|
||
test-coveralls: lib-cov | ||
echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID) | ||
@FENDJS_MODEL_MONGO_COV=1 $(MAKE) test REPORTER=mocha-lcov-reporter | ./node_modules/.bin/coveralls | ||
@rm -rf ./lib-cov | ||
|
||
lib-cov: | ||
@./node_modules/.bin/jscoverage ./index.js ./lib-cov/index.js | ||
|
||
clean: | ||
@rm ./coverage.html | ||
|
||
.PHONY: test test-cov test-coveralls lib-cov clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,46 @@ | ||
fendjs-fetcher-mongo | ||
==================== | ||
# fendjs-model-mongo | ||
|
||
[](https://travis-ci.org/Frapwings/fendjs-model-mongo) [](https://coveralls.io/r/Frapwings/fendjs-model-mongo) [](http://badge.fury.io/js/fendjs-model-mongo) [](https://david-dm.org/Frapwings/fendjs-model-mongo) | ||
|
||
[](https://bitdeli.com/free "Bitdeli Badge") | ||
MongoDB model plugin for Fend.js | ||
|
||
# Usage | ||
|
||
```js | ||
var Modeler = require('fendjs-model'); | ||
var Mongorable = require('fendjs-model-mongo'); | ||
|
||
Modeler.use(Mongorable('mongodb://localhost/test')); | ||
|
||
var Pet = Modeler('Pet') | ||
.attr('id') | ||
.attr('name'); | ||
|
||
var pet = new Pet({ name: 'Tobi', species: 'Ferret' }); | ||
pet.save(function (err, res) { | ||
if (err) { | ||
// Error something todo ... | ||
return; | ||
} | ||
// Something todo ... | ||
}); | ||
``` | ||
|
||
# API | ||
|
||
TODO: | ||
|
||
# Testing | ||
|
||
``` | ||
$ npm install | ||
$ make test | ||
``` | ||
|
||
# License | ||
|
||
[MIT license](http://www.opensource.org/licenses/mit-license.php). | ||
|
||
See the `LICENSE`. | ||
|
||
[](https://bitdeli.com/free "Bitdeli Badge") |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "fendjs-model-mongo", | ||
"version": "0.0.0", | ||
"description": "MongoDB model plugin for Fend.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/Frapwings/fendjs-model-mongo.git" | ||
}, | ||
"author": "kazupon (kazuya kawaguchi) <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Frapwings/fendjs-model-mongo/issues" | ||
}, | ||
"keywords": [ | ||
"fend.js", | ||
"model", | ||
"orm", | ||
"db", | ||
"database" | ||
], | ||
"dependencies": { | ||
"fendjs-collection": "~0.0.3", | ||
"mongodb": "~1.3.19" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.14.0", | ||
"mocha-lcov-reporter": "0.0.1", | ||
"jscoverage": "~0.3.8", | ||
"coveralls": "~2.3.0" | ||
}, | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "make test-coveralls" | ||
}, | ||
"engines": { | ||
"node": ">= 0.10.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Module(s) | ||
*/ | ||
var plugin = require(process.env.FENDJS_MODEL_MONGO_COV ? '../lib-cov/' : '../'); | ||
|
||
|
||
/** | ||
* Test(s) | ||
*/ | ||
|
||
describe('fendjs-model-mongo', function () { | ||
}); |