Rename jugglingdb to loopback-data

This commit is contained in:
Raymond Feng 2013-07-16 11:48:37 -07:00
parent b920b7fe3b
commit be21815e7b
25 changed files with 203 additions and 254 deletions

View File

@ -1,5 +0,0 @@
language: node_js
node_js:
- 0.6
- 0.8
- 0.10

View File

@ -34,7 +34,7 @@ docs/man/%.3: docs/%.md scripts/doc.sh
docs/html/%.3.html: docs/%.md scripts/doc.sh docs/footer.html
scripts/doc.sh $< $@
docs/html/index.html: docs/jugglingdb.md scripts/doc.sh docs/footer.html
docs/html/index.html: docs/loopback-data.md scripts/doc.sh docs/footer.html
scripts/doc.sh $< $@
man: $(MAN_DOCS)
@ -42,14 +42,10 @@ html: $(HTML_DOCS)
build: man
web: html
rsync ./docs/html/* jugglingdb.co:/var/www/apps/jugglingdb.co/public
about-docs:
@echo "\n## DOCS\n"
@echo " make man # Create docs for man"
@echo " make html # Create docs in html"
@echo " make web # Publish docs to jugglingdb.co"
## WORKFLOW

View File

@ -31,3 +31,4 @@ check following list of available connectors
</tbody>
</table>

View File

@ -1,2 +1,2 @@
jugglingdb-adapter(3) - Adapter API explained.
loopback-data-adapter(3) - Adapter API explained.
====================

View File

@ -1,4 +1,4 @@
jugglingdb-changelog(3) - The History of JugglingDB
loopback-connector-changelog(3) - The History of LoopbackData
===================================================
## HISTORY
@ -6,7 +6,7 @@ jugglingdb-changelog(3) - The History of JugglingDB
### upcoming release 0.3.0
* Documentation:
Available in [web](http://jugglingdb.co) and man [jugglingdb(3)]
Available in [web](http://www.strongloop.com/products/loopback) and man [loopback-data(3)]
* **Hooks**:
Changed format of update and save hooks. Hook accept data as second argument.
@ -30,8 +30,8 @@ jugglingdb-changelog(3) - The History of JugglingDB
### 0.2.0
* Namespace adapter packages (should start with "jugglingdb-")
* Added [nano][jugglingdb-nano] adapter
* Namespace adapter packages (should start with "loopback-connector-")
* Added [nano][loopback-connector-nano] adapter
* Adapters removed from core to separate packages
### 0.1.27
@ -50,9 +50,9 @@ jugglingdb-changelog(3) - The History of JugglingDB
* DB sync: autoupdate/automigrate
* Ability to overwrite getters/setters
* Resig-style model constructors
* Added [postgres][jugglingdb-postgres] adapter
* Added [sqlite3][jugglingdb-postgres] adapter
* Added [mongodb][jugglingdb-mongodb] adapter
* Added [postgres][loopback-connector-postgres] adapter
* Added [sqlite3][loopback-connector-postgres] adapter
* Added [mongodb][loopback-connector-mongodb] adapter
* Redis adapter filter/sort rewriting
* Added `findOne` method
* Custom table names in sqlite, mysql and postgres
@ -73,7 +73,7 @@ jugglingdb-changelog(3) - The History of JugglingDB
### 0.0.2 (16 Oct 2011)
* Built-in adapters: [redis][jugglingdb-redis], mongoose, sequelize, neo4j
* Built-in adapters: [redis][loopback-connector-redis], mongoose, sequelize, neo4j
* Scopes
* Conditional validations, null checks everywhere
* Defaults applied on create
@ -84,4 +84,4 @@ Package extracted from [RailwayJS MVC](http://railwayjs.com)
## SEE ALSO
jugglingdb-roadmap(3)
loopback-connector-roadmap(3)

View File

@ -1,7 +1,7 @@
<script>
var filename = location.href.match(/([^\/]+)?\.3.html(#.*?)?$/);
if (!filename) {
filename = [null, 'jugglingdb'];
filename = [null, 'loopback-data'];
}
var div = document.createElement('div');
div.innerHTML = 'Found a typo? ' +
@ -14,7 +14,7 @@
document.getElementById('man').appendChild(div);
function linkTo(text, dir) {
return '<a href="https://github.com/1602/jugglingdb/' +
return '<a href="https://github.com/1602/loopback-data/' +
dir + '/master/docs/' + filename[1] + '.md">' + text + '</a>';
}

View File

@ -4,7 +4,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-39555551-1', 'jugglingdb.co');
ga('create', 'UA-39555551-1', 'loopback-data.co');
ga('send', 'pageview');
</script>

View File

@ -1,4 +1,4 @@
jugglingdb-hooks(3) - Hooks and object lifecycle.
loopback-connector-hooks(3) - Hooks and object lifecycle.
===================
## DESCRIPTION
@ -126,9 +126,9 @@ Hook is destroyed once `model.destroy()` is called. Please note that
Validate hooks called before and after validation and should be used for data
modification and not for validation. Use custom validation described in
jugglingdb-validations(3) man section.
loopback-connector-validations(3) man section.
## SEE ALSO
jugglingdb-model(3)
jugglingdb-validations(3)
loopback-connector-model(3)
loopback-connector-validations(3)

View File

@ -1,33 +1,33 @@
# man pages
jugglingdb(3) index
jugglingdb-changelog(3) changelog.3
jugglingdb-roadmap(3) roadmap.3
jugglingdb-validations(3) validations.3
jugglingdb-hooks(3) hooks.3
jugglingdb-schema(3) schema.3
jugglingdb-model(3) model.3
jugglingdb-adapter(3) adapter.3
loopback-data(3) index
loopback-connector-changelog(3) changelog.3
loopback-connector-roadmap(3) roadmap.3
loopback-connector-validations(3) validations.3
loopback-connector-hooks(3) hooks.3
loopback-connector-schema(3) schema.3
loopback-connector-model(3) model.3
loopback-connector-adapter(3) adapter.3
# adapters github
jugglingdb-nano https://github.com/jugglingdb/nano-adapter
jugglingdb-mysql https://github.com/jugglingdb/mysql-adapter
jugglingdb-firebird https://github.com/jugglingdb/firebird-adapter
jugglingdb-sqlite3 https://github.com/jugglingdb/sqlite3-adapter
jugglingdb-postgres https://github.com/jugglingdb/postgres-adapter
jugglingdb-redis https://github.com/jugglingdb/redis-adapter
jugglingdb-mongodb https://github.com/jugglingdb/mongodb-adapter
loopback-connector-nano https://github.com/loopback-data/nano-adapter
loopback-connector-mysql https://github.com/loopback-data/mysql-adapter
loopback-connector-firebird https://github.com/loopback-data/firebird-adapter
loopback-connector-sqlite3 https://github.com/loopback-data/sqlite3-adapter
loopback-connector-postgres https://github.com/loopback-data/postgres-adapter
loopback-connector-redis https://github.com/loopback-data/redis-adapter
loopback-connector-mongodb https://github.com/loopback-data/mongodb-adapter
# adapters npm
nano-adapter-npm https://npmjs.org/package/jugglingdb-nano
mysql-adapter-npm https://npmjs.org/package/jugglingdb-mysql
firebird-adapter-npm https://npmjs.org/package/jugglingdb-firebird
sqlite3-adapter-npm https://npmjs.org/package/jugglingdb-sqlite3
postgres-adapter-npm https://npmjs.org/package/jugglingdb-postgres
redis-adapter-npm https://npmjs.org/package/jugglingdb-redis
mongodb-adapter-npm https://npmjs.org/package/jugglingdb-mongodb
nano-adapter-npm https://npmjs.org/package/loopback-connector-nano
mysql-adapter-npm https://npmjs.org/package/loopback-connector-mysql
firebird-adapter-npm https://npmjs.org/package/loopback-connector-firebird
sqlite3-adapter-npm https://npmjs.org/package/loopback-connector-sqlite3
postgres-adapter-npm https://npmjs.org/package/loopback-connector-postgres
redis-adapter-npm https://npmjs.org/package/loopback-connector-redis
mongodb-adapter-npm https://npmjs.org/package/loopback-connector-mongodb
# external resources
github.com/jugglingdb https://github.com/jugglingdb
github.com/1602/jugglingdb https://github.com/1602/jugglingdb
issues https://github.com/1602/jugglingdb/issues?state=open
jsdoc.info/1602/jugglingdb http://jsdoc.info/1602/jugglingdb
github.com/loopback-data https://github.com/loopback-data
github.com/1602/loopback-data https://github.com/1602/loopback-data
issues https://github.com/1602/loopback-data/issues?state=open
jsdoc.info/1602/loopback-data http://jsdoc.info/1602/loopback-data

View File

@ -1,124 +0,0 @@
JugglingDB(3) - cross-database ORM for nodejs and browser
=========================================================
## DESCRIPTION
JugglingDB is a cross-db ORM for nodejs, providing **common interface** to access
most popular database formats. Currently supported db formats are: mysql, sqlite3,
postgres, couchdb, mongodb, redis, neo4j and in-memory-storage.
JugglingDB also works on client-side (using WebService and Memory adapters),
which allow to write rich client-side apps talking to server using JSON API.
## INSTALLATION
Use npm to install core package:
npm install jugglingdb --save
Alternatively you can install jugglingdb core from github:
npm install 1602/jugglingdb
Then install adapter for specific database, for example `jugglingdb-redis`:
npm install jugglingdb-redis
See [ADAPTERS][] for list of available adapters.
## DOCUMENTATION
Autogenerated documentation available at [jsdoc.info/1602/jugglingdb].
Human-written manual sections are:
* jugglingdb-schema(3):
Everything about schema, data types and model definition.
* jugglingdb-model(3):
Model methods, features and internals.
* jugglingdb-validations(3):
Built-in validators, creating custom validations, syncronous and asyncronous
object validation.
* jugglingdb-hooks(3):
Hooks and object lifecycle.
* jugglingdb-adapter(3):
Adapter API explained.
## ADAPTERS
All adapters available as separate packages at
[github.com/jugglingdb] and published in npm.
* MySQL: [github][jugglingdb-mysql] [npm][mysql-adapter-npm]
* SQLite3: [github][jugglingdb-sqlite3] [npm][sqlite3-adapter-npm]
* Postgres: [github][jugglingdb-postgres] [npm][postgres-adapter-npm]
* Redis: [github][jugglingdb-redis] [npm][redis-adapter-npm]
* MongoDB: [github][jugglingdb-mongodb] [npm][mongodb-adapter-npm]
* CouchDB/nano: [github][jugglingdb-nano] [npm][nano-adapter-npm]
* Firebird: [github][jugglingdb-firebird] [npm][firebird-adapter-npm]
## CONTRIBUTION
You can take part in improvement of jugglingdb codebase and documents. If you see that some improvements can be done to jugglingdb, then fork repository, make proposed changes and then create new pull request.
Please remember that your contribution is highly supported. Be sure to follow the discussion in google group and see [github issues][issues] before you make changes. It preferable that you post new comment in google group or in github before you make changes and create pull request.
## FUTURE
See jugglingdb-roadmap(3) and [github issues][issues] to catch up current
development and see how you can help jugglingdb to grow up.
## BUGS
When you find issues, please report them:
* github/core:
<https://github.com/1602/jugglingdb/issues>
* github/adapters:
<https://github.com/jugglingdb>
* email:
<compoundjs@googlegroups.com>
Provide test case for reproducing error. When reporting issue to core mention
adapter where problem could be reproduced.
## HISTORY
See jugglingdb-changelog(3)
## COPYRIGHT
JugglingDB is Copyright (C) 2011 Anatoliy Chakkaev http://anatoliy.in
## AUTHOR
* [blog](http://anatoliy.in/)
* [github/1602](https://github.com/1602/)
* [github/anatoliychakkaev](https://github.com/anatoliychakkaev/)
* [twitter@1602](http://twitter.com/1602)
* <mail@anatoliy.in>
## CONTRIBUTORS
### core contributors (more than 1%)
410 Anatoliy Chakkaev 73.9%
31 Sebastien Drouyer 5.6%
25 1602 4.5%
9 Muneeb Samuels 1.6%
6 Henri Bergius 1.1%
### adapters maintainers
* [jugglingdb-nano] - [Nicholas Westlake](https://github.com/nrw)
* [jugglingdb-mysql] - [dgsan](https://github.com/dgsan)
* [jugglingdb-firebird] - [Henri Gourvest](https://github.com/hgourvest)
*NOTE:* Other adapters waits for their maintainers, drop a line to
<mail@anatoliy.in> if you want to maintain some adapter on regular basis.
## SEE ALSO
jugglingdb-schema(3)

124
docs/loopback-data.md Normal file
View File

@ -0,0 +1,124 @@
LoopbackData(3) - cross-database ORM for nodejs and browser
=========================================================
## DESCRIPTION
LoopbackData is a cross-db ORM for nodejs, providing **common interface** to access
most popular database formats. Currently supported db formats are: mysql, sqlite3,
postgres, couchdb, mongodb, redis, neo4j and in-memory-storage.
LoopbackData also works on client-side (using WebService and Memory adapters),
which allow to write rich client-side apps talking to server using JSON API.
## INSTALLATION
Use npm to install core package:
npm install loopback-data --save
Alternatively you can install loopback-data core from github:
npm install 1602/loopback-data
Then install adapter for specific database, for example `loopback-connector-redis`:
npm install loopback-connector-redis
See [ADAPTERS][] for list of available adapters.
## DOCUMENTATION
Autogenerated documentation available at [jsdoc.info/1602/loopback-data].
Human-written manual sections are:
* loopback-connector-schema(3):
Everything about schema, data types and model definition.
* loopback-connector-model(3):
Model methods, features and internals.
* loopback-connector-validations(3):
Built-in validators, creating custom validations, syncronous and asyncronous
object validation.
* loopback-connector-hooks(3):
Hooks and object lifecycle.
* loopback-connector-adapter(3):
Adapter API explained.
## ADAPTERS
All adapters available as separate packages at
[github.com/loopback-data] and published in npm.
* MySQL: [github][loopback-connector-mysql] [npm][mysql-adapter-npm]
* SQLite3: [github][loopback-connector-sqlite3] [npm][sqlite3-adapter-npm]
* Postgres: [github][loopback-connector-postgres] [npm][postgres-adapter-npm]
* Redis: [github][loopback-connector-redis] [npm][redis-adapter-npm]
* MongoDB: [github][loopback-connector-mongodb] [npm][mongodb-adapter-npm]
* CouchDB/nano: [github][loopback-connector-nano] [npm][nano-adapter-npm]
* Firebird: [github][loopback-connector-firebird] [npm][firebird-adapter-npm]
## CONTRIBUTION
You can take part in improvement of loopback-data codebase and documents. If you see that some improvements can be done to loopback-data, then fork repository, make proposed changes and then create new pull request.
Please remember that your contribution is highly supported. Be sure to follow the discussion in google group and see [github issues][issues] before you make changes. It preferable that you post new comment in google group or in github before you make changes and create pull request.
## FUTURE
See loopback-connector-roadmap(3) and [github issues][issues] to catch up current
development and see how you can help loopback-data to grow up.
## BUGS
When you find issues, please report them:
* github/core:
<https://github.com/1602/loopback-data/issues>
* github/adapters:
<https://github.com/loopback-data>
* email:
<compoundjs@googlegroups.com>
Provide test case for reproducing error. When reporting issue to core mention
adapter where problem could be reproduced.
## HISTORY
See loopback-connector-changelog(3)
## COPYRIGHT
LoopbackData is Copyright (C) 2011 Anatoliy Chakkaev http://anatoliy.in
## AUTHOR
* [blog](http://anatoliy.in/)
* [github/1602](https://github.com/1602/)
* [github/anatoliychakkaev](https://github.com/anatoliychakkaev/)
* [twitter@1602](http://twitter.com/1602)
* <mail@anatoliy.in>
## CONTRIBUTORS
### core contributors (more than 1%)
410 Anatoliy Chakkaev 73.9%
31 Sebastien Drouyer 5.6%
25 1602 4.5%
9 Muneeb Samuels 1.6%
6 Henri Bergius 1.1%
### adapters maintainers
* [loopback-connector-nano] - [Nicholas Westlake](https://github.com/nrw)
* [loopback-connector-mysql] - [dgsan](https://github.com/dgsan)
* [loopback-connector-firebird] - [Henri Gourvest](https://github.com/hgourvest)
*NOTE:* Other adapters waits for their maintainers, drop a line to
<mail@anatoliy.in> if you want to maintain some adapter on regular basis.
## SEE ALSO
loopback-connector-schema(3)

View File

@ -1,16 +1,16 @@
jugglingdb-model(3) - Model methods, features and internals
loopback-connector-model(3) - Model methods, features and internals
===================
## DESCRIPTION
This section describes common methods of models managed by jugglingdb and
This section describes common methods of models managed by loopback-data and
explains some model internals, such as data representation, setters, getters and
virtual attributes.
## DB WRITE METHODS
Database write methods performs hooks and validations. See jugglingdb-hooks(3)
and jugglingdb-validations(3) to learn how hooks and validations works.
Database write methods performs hooks and validations. See loopback-connector-hooks(3)
and loopback-connector-validations(3) to learn how hooks and validations works.
### Model.create([data[, callback]]);
@ -143,7 +143,7 @@ Syntax 1 and 2 does same things in different ways: adds `chapters` method to
Book.hasMany('chapters', {foreignKey: `chapter_id`});
When using syntax 2 jugglingdb looking for model with singularized name:
When using syntax 2 loopback-data looking for model with singularized name:
'chapters' => 'chapter' => 'Chapter'
@ -185,7 +185,7 @@ TODO: document
## SEE ALSO
jugglingdb-schema(3)
jugglingdb-validations(3)
jugglingdb-hooks(3)
jugglingdb-adapter(3)
loopback-connector-schema(3)
loopback-connector-validations(3)
loopback-connector-hooks(3)
loopback-connector-adapter(3)

View File

@ -1,4 +1,4 @@
jugglingdb-roadmap - The Future of JugglingDB
loopback-connector-roadmap - The Future of LoopbackData
=============================================
## DOCUMENTATION

View File

@ -1,4 +1,4 @@
jugglingdb-schema(3) - Everything about schema, data types and model definition.
loopback-connector-schema(3) - Everything about schema, data types and model definition.
====================
## DESCRIPTION
@ -23,9 +23,9 @@ Instances of Schema are event emitters, events supported by default:
### Creating schema
`Schema` constructor available on `jugglingdb` module:
`Schema` constructor available on `loopback-data` module:
var Schema = require('jugglingdb').Schema;
var Schema = require('loopback-data').Schema;
Schema constructor accepts two arguments. First argument is adapter. It could be
adapter name or adapter package:
@ -122,5 +122,5 @@ db structure outdated, true when schema and db is in sync:
## SEE ALSO
jugglingdb-model(3)
jugglingdb-adapter(3)
loopback-connector-model(3)
loopback-connector-adapter(3)

View File

@ -1,2 +1,2 @@
jugglingdb-validations(3) - Built-in validators, creating custom validations, syncronous and asyncronous object validation.
loopback-connector-validations(3) - Built-in validators, creating custom validations, syncronous and asyncronous object validation.
========================

View File

@ -1,4 +1,4 @@
var ModelBuilder = require('../../jugglingdb').ModelBuilder;
var ModelBuilder = require('../../loopback-data').ModelBuilder;
var modelBuilder = new ModelBuilder();
// define models
var Post = modelBuilder.define('Post', {

View File

@ -1,5 +1,5 @@
var DataSource = require('../../jugglingdb').DataSource;
var ModelBuilder = require('../../jugglingdb').ModelBuilder;
var DataSource = require('../../loopback-data').DataSource;
var ModelBuilder = require('../../loopback-data').ModelBuilder;
var ds = new DataSource('memory');
// define models

View File

@ -1,4 +1,4 @@
var ModelBuilder = require('../../jugglingdb').ModelBuilder;
var ModelBuilder = require('../../loopback-data').ModelBuilder;
var modelBuilder = new ModelBuilder();
// simplier way to describe model

View File

@ -161,7 +161,7 @@ exports.initialize = function(schema, callback) {
options.auth.password = schema.settings.password;
}
}
var database = schema.settings.database || 'jugglingdb';
var database = schema.settings.database || 'loopback-data';
schema.settings.host = host;
schema.settings.port = port;

View File

@ -162,9 +162,9 @@ DataSource.prototype.setup = function(name, settings) {
} else {
// try foreign adapter
try {
adapter = require('jugglingdb-' + name);
adapter = require('loopback-connector-' + name);
} catch (e) {
return console.log('\nWARNING: JugglingDB adapter "' + name + '" is not installed,\nso your models would not work, to fix run:\n\n npm install jugglingdb-' + name, '\n');
return console.log('\nWARNING: LoopbackData adapter "' + name + '" is not installed,\nso your models would not work, to fix run:\n\n npm install loopback-connector-' + name, '\n');
}
}
}

View File

@ -4,7 +4,7 @@ function safeRequire(module) {
try {
return require(module);
} catch (e) {
console.log('Run "npm install jugglingdb ' + module + '" command to use jugglingdb using ' + module + ' database engine');
console.log('Run "npm install loopback-data ' + module + '" command to use loopback-data using ' + module + ' database engine');
process.exit(1);
}
}

View File

@ -1,53 +1,10 @@
{
"name": "jugglingdb",
"name": "loopback-data",
"description": "ORM for every database: redis, mysql, neo4j, mongodb, couchdb, postgres, sqlite",
"version": "0.2.0-33",
"author": "Anatoliy Chakkaev <rpm1602@gmail.com>",
"contributors": [
{
"name": "Anatoliy Chakkaev",
"email": "rpm1602@gmail.com"
},
{
"name": "Julien Guimont",
"email": "julien.guimont@gmail.com"
},
{
"name": "Joseph Junker",
"email": "joseph.jnk@gmail.com"
},
{
"name": "Henri Bergius",
"email": "henri.bergius@iki.fi"
},
{
"name": "redvulps",
"email": "fabopereira@gmail.com"
},
{
"name": "Felipe Sateler",
"email": "fsateler@gmail.com"
},
{
"name": "Amir M. Mahmoudi",
"email": "a@geeknux.com"
},
{
"name": "Justinas Stankevičius",
"email": "justinas@justinas.me"
},
{
"name": "Rick O'Toole",
"email": "patrick.n.otoole@gmail.com"
},
{
"name": "Nicholas Westlake",
"email": "nicholasredlin@gmail.com"
}
],
"version": "0.0.1",
"repository": {
"type": "git",
"url": "https://github.com/1602/jugglingdb"
"url": "https://github.com/strongloop/loopback-data"
},
"main": "index.js",
"scripts": {
@ -55,7 +12,7 @@
"prepublish": "make build"
},
"man": [
"./docs/man/jugglingdb.3",
"./docs/man/loopback-data.3",
"./docs/man/schema.3",
"./docs/man/model.3",
"./docs/man/hooks.3",

View File

@ -14,7 +14,7 @@ mkdir -p $(dirname $dest)
case $dest in
*.[13])
ronn --roff $1 --pipe --organization=1602\ Software --manual=JugglingDB > $2
ronn --roff $1 --pipe --organization=1602\ Software --manual=LoopbackData > $2
exit $?
;;
@ -22,7 +22,7 @@ case $dest in
(ronn -5 $1 --pipe\
--style='print toc'\
--organization=1602\ Software\
--manual=JugglingDB &&\
--manual=LoopbackData &&\
cat docs/ga.html &&\
cat docs/footer.html) > $2
exit $?

View File

@ -1,10 +1,10 @@
// This test written in mocha+should.js
var should = require('./init.js');
var jugglingdb = require('../');
var loopbackData = require('../');
describe('jugglingdb', function() {
describe('loopback-data', function() {
it('should expose version', function () {
jugglingdb.version.should.equal(require('../package.json').version);
loopbackData.version.should.equal(require('../package.json').version);
});
});

View File

@ -1,6 +1,6 @@
if (!process.env.TRAVIS) {
var semicov = require('semicov');
semicov.init('lib', 'JugglingDB');
semicov.init('lib', 'LoopbackData');
process.on('exit', semicov.report);
}