mirror of
https://github.com/amark/gun.git
synced 2025-10-14 00:59:35 +00:00
keys
This commit is contained in:
parent
370fcd7d8b
commit
509c1d5cfd
@ -4,20 +4,12 @@ module.exports=require('theory')
|
|||||||
, invincible: true
|
, invincible: true
|
||||||
, dep: ['../shots']
|
, dep: ['../shots']
|
||||||
, init: function(a){
|
, init: function(a){
|
||||||
console.log("ECHO");
|
|
||||||
var echo = {}, redis, client;
|
var echo = {}, redis, client;
|
||||||
echo.shot = a.shots();
|
echo.shot = a.shots();
|
||||||
echo.put = function(m){
|
echo.put = function(m){
|
||||||
console.log('stream', m);
|
console.log('stream', m);
|
||||||
}
|
}
|
||||||
echo.state = function(m){
|
echo.state = function(m){
|
||||||
redis = redis || require('redis')
|
|
||||||
, client = client || redis.createClient();
|
|
||||||
client.set("string key", "string val", redis.print);
|
|
||||||
client.get("string key", function(e,r){
|
|
||||||
console.log("WE DID IT!!!!");
|
|
||||||
console.log(e, r);
|
|
||||||
});
|
|
||||||
if(echo.shot.server(m,a.com.reply)){ return }
|
if(echo.shot.server(m,a.com.reply)){ return }
|
||||||
m.what.body = '';
|
m.what.body = '';
|
||||||
a.com.reply(m);
|
a.com.reply(m);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module.exports=require('theory')
|
module.exports=require('theory')
|
||||||
('tests',function(a){
|
('tests',function(a){
|
||||||
if(root.node){
|
if(root.node){
|
||||||
require('../../../lushly/keys');
|
|
||||||
var shot = require('../shots')({src: a.com}).pump(function(g, m, done){
|
var shot = require('../shots')({src: a.com}).pump(function(g, m, done){
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -93,7 +92,7 @@ module.exports=require('theory')
|
|||||||
it('tests',function(){
|
it('tests',function(){
|
||||||
//return;
|
//return;
|
||||||
//var s = theory.shot({src: '/test/server.js'})
|
//var s = theory.shot({src: '/test/server.js'})
|
||||||
var s = shot.shell('lushly.org/tests/package.json',function(g){
|
var s = shot.shell('gunjs.herokuapp.com/tests/package.json',function(g){
|
||||||
if(!g){ return }
|
if(!g){ return }
|
||||||
console.log('graph', g());
|
console.log('graph', g());
|
||||||
var p = g('packageson');
|
var p = g('packageson');
|
||||||
@ -103,7 +102,7 @@ module.exports=require('theory')
|
|||||||
console.log(val);
|
console.log(val);
|
||||||
p('version',val);
|
p('version',val);
|
||||||
a.time.wait(function(){
|
a.time.wait(function(){
|
||||||
shot.shell('lushly.org/tests/package.json',function(gg){
|
shot.shell('gunjs.herokuapp.com/tests/package.json',function(gg){
|
||||||
var pp = gg('packageson');
|
var pp = gg('packageson');
|
||||||
console.log('graph prime', gg());
|
console.log('graph prime', gg());
|
||||||
expect(val).to.be(pp('version'));
|
expect(val).to.be(pp('version'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user