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
25 changed files
with
848 additions
and
696 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
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 |
---|---|---|
@@ -1,23 +1,31 @@ | ||
{ | ||
"name": "ron", | ||
"description": "Redis ORM for NodeJs.", | ||
"keywords": ["redis", "orm", "database", "nosql"], | ||
"version": "0.0.3", | ||
"description": "Redis ORM for NodeJs", | ||
"homepage": "http://www.adaltas.com/projects/node-ron", | ||
"author": "David Worms <david@adaltas.com>", | ||
"contributors": [ | ||
{ "name": "David Worms", "email": "david@adaltas.com" } | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wdavidw/node-ron" | ||
}, | ||
"bugs": { | ||
"email": "open@adaltas.com", | ||
"url": "http://github.com/wdavidw/node-ron/issues" | ||
}, | ||
"dependencies": { | ||
"redis": "latest" | ||
}, | ||
"devDependencies": { | ||
"expresso": "latest" | ||
"mocha": "latest", | ||
"should": "latest" | ||
}, | ||
"engines": { | ||
"node": ">= 0.3.0" | ||
}, | ||
"keywords": ["redis", "orm", "database", "nosql"], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wdavidw/node-redis-orm.git" | ||
"contributors": [ | ||
{ "name": "David Worms", "email": "david@adaltas.com" } | ||
], | ||
"main": "index", | ||
"engines": { "node": ">= 0.4.0" }, | ||
"scripts": { | ||
"test": "mocha" | ||
} | ||
} |
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,42 @@ | ||
|
||
class Dog | ||
dogName: "fido" | ||
constructor: (@dogName) -> | ||
|
||
doStuff: -> | ||
console.log('the dog is walking'); | ||
sayHello.call(this); | ||
|
||
sayHello = -> | ||
console.log("Hi! I'm "+@dogName); | ||
|
||
ralph = new Dog("ralph"); | ||
ralph.doStuff(); | ||
|
||
peter = new Dog("peter"); | ||
ralph.doStuff(); | ||
peter.doStuff(); | ||
ralph.doStuff(); | ||
|
||
### | ||
class GetSet | ||
schema = {} | ||
constructor: (sch = {}) -> | ||
schema = sch | ||
set: (key, value) -> | ||
schema[key] = value | ||
get: (key) -> | ||
schema[key] | ||
gs1 = new GetSet | ||
gs2 = new GetSet | ||
gs1.set 'a', 'b' | ||
gs2.set 'a', 'c' | ||
console.log gs1.get 'a' | ||
### |
This file was deleted.
Oops, something went wrong.
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,19 +1,23 @@ | ||
|
||
assert = require 'assert' | ||
should = require 'should' | ||
|
||
config = require '../conf/test' | ||
Ron = require '../index' | ||
|
||
ron = Ron config | ||
|
||
module.exports = | ||
'init': (exit) -> | ||
exit() | ||
'Test hash # with string': (exit) -> | ||
assert.eql ron.hash('1'), '356a192b7913b04c54574d18c28d46e6395428ab' | ||
exit() | ||
'Test hash # with number': (exit) -> | ||
assert.eql ron.hash(1), '356a192b7913b04c54574d18c28d46e6395428ab' | ||
exit() | ||
'destroy': (exit) -> | ||
ron.quit exit | ||
describe 'client', -> | ||
|
||
ron = Ron config | ||
|
||
it 'init', (next) -> | ||
next() | ||
|
||
it 'Test hash # with string', (next) -> | ||
ron.hash('1').should.eql '356a192b7913b04c54574d18c28d46e6395428ab' | ||
next() | ||
|
||
it 'Test hash # with number', (next) -> | ||
ron.hash(1).should.eql '356a192b7913b04c54574d18c28d46e6395428ab' | ||
next() | ||
|
||
it 'destroy', (next) -> | ||
ron.quit next |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.