Loren West
b124e24363
API command discovery and execution tests
2014-12-29 14:26:50 -08:00
Andrew Stewart
c9e16fe8c2
Use _.result to get commands from options.
2014-12-17 15:07:03 -08:00
Andrew Stewart
36d1505c2f
Add specs for new #connections/#devices behaviour
2014-12-15 13:17:04 -08:00
Andrew Stewart
e2bec78de7
Clean up specs for JSHint
2014-12-15 09:37:52 -08:00
Andrew Stewart
7f761c7268
WIP on cleaning up specs
2014-12-14 15:24:49 -08:00
Andrew Stewart
4f850d5e9e
Support passing config to Logger#setup again
2014-11-28 09:37:44 -08:00
Andrew Stewart
83153664f5
Remove deprecated syntax from robot spec
2014-11-26 09:42:09 -08:00
Andrew Stewart
ca8e22f1e2
Fluent #device/#connection update
...
Now pass name, then object of details
#device({ name: 'ping', driver: 'ping' });
// vs
#device('ping', { driver: 'ping' });
2014-11-26 09:33:19 -08:00
Andrew Stewart
15c9b96333
Extract out Connection/Device initialization
...
Simple extraction out of Connection/Device initialization code inside
Robot.
This yields an interesting boon, however - this is now a valid Cylon
program:
var Cylon = require('cylon');
Cylon
.robot()
.connection({ name: 'loopback', adaptor: 'loopback' })
.device({ name: 'ping', driver: 'ping' })
.on('ready', function(bot) {
console.log("Bot working!");
every(1000, function() {
console.log(bot.ping.ping());
})
});
Cylon.start();
For those that prefer imperative programs with Cylon, this is a nice
syntax addition.
2014-11-20 08:43:08 -08:00
Andrew Stewart
8da2a17929
Fix broken test
2014-11-14 11:01:57 -08:00
Andrew Stewart
38bf5fdfed
Refer to Adaptor instances as 'Connection'
2014-11-14 10:56:45 -08:00
Andrew Stewart
ce87a355f0
Modifications, fix test suite
2014-11-11 11:41:23 -08:00
Andrew Stewart
f1b982fedd
Support providing connections/devices as an object
...
Before:
connections: [
{ name: 'loopback', adaptor: 'loopback', port: 13 }
],
Now:
connections: {
loopback: { adaptor: 'loopback', port: 13 }
}
Array syntax still works, but has been marked as deprecated.
2014-11-10 10:52:55 -08:00
Andrew Stewart
4c539ab9d1
Better configuration for TDR test mode
2014-11-06 09:48:21 -08:00
Andrew Stewart
c43978bea2
Add logging for module registration
2014-11-05 14:26:18 -08:00
Andrew Stewart
966f8aa530
s/Repository/Registry/g
2014-10-31 14:14:02 -07:00
Andrew Stewart
d62673bc8a
Stop using extraParams
2014-10-31 13:50:22 -07:00
Andrew Stewart
1c922f02c1
Address bugs w/ connections
2014-10-31 13:48:05 -07:00
Andrew Stewart
44075a1a30
Hook Repository class up, change-up module loading
...
Cylon modules were previously styled something like this:
module.exports = {
adaptor: function(args) {
return new Adaptor(args);
},
register: function(robot) {
Cylon.Logger.debug("Registering Firmata adaptor for " + robot.name);
robot.registerAdaptor('cylon-firmata', 'firmata');
GPIO.register(robot);
I2C.register(robot);
}
};
Now, they should be something more like this:
module.exports = {
adaptors: ['firmata'],
dependencies: ['cylon-gpio', 'cylon-i2c'],
adaptor: function(args) {
return new Adaptor(args);
},
};
2014-10-30 13:29:06 -07:00
Andrew Stewart
63e43cc553
Repository module added, not integrated yet
2014-10-29 15:25:35 -07:00
Andrew Stewart
0f59645fd7
Move Logger configuration into Cylon#config
2014-10-28 15:53:03 -07:00
Ron Evans
903f8a9518
Merge pull request #235 from hybridgroup/add/log-levels
...
Add log levels
2014-10-28 17:38:00 +00:00
Andrew Stewart
a8b16a3469
Proxy all opts that aren't already used internally
2014-10-27 13:40:38 -07:00
Andrew Stewart
2cb2fc232d
Basic log level implementation
2014-10-27 08:59:36 -07:00
Andrew Stewart
f5de644af7
Not sure why these were classes to begin with
2014-10-24 14:02:03 -07:00
Andrew Stewart
bd95f9eb3c
Reorganize tests, under 'spec' directory now
2014-10-20 14:55:25 -07:00