Skip to content

Commit

Permalink
Init project files
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Nov 20, 2013
1 parent 8ea8d97 commit a894874
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
*.swp
.DS_Store
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: node_js
node_js:
- "0.10"
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# v0.0.0 / 2013-11-21

* Initial project
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 Frapwings
Copyright (c) 2013 Frapwings & kazuya kawaguchi

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
21 changes: 21 additions & 0 deletions Makefile
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
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
fendjs-fetcher-mongo
====================
# fendjs-model-mongo

[![Build Status](https://travis-ci.org/Frapwings/fendjs-model-mongo.png?branch=master)](https://travis-ci.org/Frapwings/fendjs-model-mongo) [![Coverage Status](https://coveralls.io/repos/Frapwings/fendjs-model-mongo/badge.png)](https://coveralls.io/r/Frapwings/fendjs-model-mongo) [![NPM version](https://badge.fury.io/js/fendjs-model-mongo.png)](http://badge.fury.io/js/fendjs-model-mongo) [![Dependency Status](https://david-dm.org/Frapwings/fendjs-model-mongo.png)](https://david-dm.org/Frapwings/fendjs-model-mongo)

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/Frapwings/fendjs-model-mongo/trend.png)](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`.

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/Frapwings/fendjs-model-mongo/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Empty file added lib/index.js
Empty file.
38 changes: 38 additions & 0 deletions package.json
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"
}
}
14 changes: 14 additions & 0 deletions test/index.js
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 () {
});

0 comments on commit a894874

Please sign in to comment.