Commit Graph

873 Commits

Author SHA1 Message Date
Andrew Stewart 4e43483e9d Slightly refactor constructor 2014-06-09 13:41:46 -07:00
Andrew Stewart dbde3d5b7d Remove circular reference from Robot 2014-06-09 13:24:42 -07:00
Andrew Stewart b1d7dd8186 Generate BasicLogger methods, rather than duplicating code 2014-06-06 17:09:22 -07:00
Adrian Zankich 08c6b6e3dc Update README.markdown 2014-06-06 15:44:06 -07:00
Ron Evans 3717c4dc31 Merge pull request #195 from hybridgroup/refactor/robots-collection
Refactor Robots collection
2014-06-06 18:36:19 -04:00
Ron Evans de7b352077 Merge pull request #196 from chrisbodhi/patch-1
Update keyboard.markdown
2014-06-06 18:25:10 -04:00
Chris Boette 957ad1790a Update keyboard.markdown
Minor fixes from CoffeeScript to JavaScript.
2014-06-06 17:24:13 -05:00
Ron Evans 836b7938db Merge pull request #191 from hybridgroup/refactor/utils
Refactor Utils (mostly) out of global namespace
2014-06-06 18:21:46 -04:00
Andrew Stewart ebdeeccd12 Use implicit object conversion with #toJSON
JSON.stringify, if told to convert an object with a #toJSON method, will instead
stringify the result of the #toJSON method.
2014-06-06 14:15:43 -07:00
Andrew Stewart af4bbd963b Clean up API implementation using middleware 2014-06-06 13:52:55 -07:00
Andrew Stewart 5690d723fb Update examples that previously used findRobot 2014-06-06 11:53:54 -07:00
Andrew Stewart 81fa260963 Store robots in an dict, rather than array
Also removes the find{Robot,RobotConnection,RobotDevice} methods. Additionally,
stops passing the Master through to the Robot constructor, we can just
require('./cylon') if we need to access anything in there.
2014-06-06 11:36:22 -07:00
Andrew Stewart 2b5e991ef3 Clean up some of the utility functions 2014-06-05 16:30:05 -07:00
Andrew Stewart f91dd7d5c3 Refactor Utils (mostly) out of global namespace
This commit reframes the Utils module to be more self-contained, and now only
the Number prototype methods and the every/after/constantly methods are exposed
globally.

I'm unsure about whether these methods can be more scoped such that people can
turn them off if they want, but that's potentially something to look into in the
future.

This commit also updates most of the other source files in Cylon, requiring the
Utils module rather than assuming the methods are in the global namespace.

A similar batch of commits will need to be made for all other Cylon modules to
make sure they don't explode when they can't find #subclass or something like
that.

To make the previously-global methods available, both in submodules and for
people looking for them, all the utility functions are exported in Cylon.Utils.
2014-06-05 12:17:29 -07:00
Andrew Stewart 789347f6f8 Improve inline docs for Utils functions 2014-06-05 09:32:20 -07:00
Andrew Stewart a5241e57b5 All work and no play makes Jack a dull boy
Robots can now take a break and have #play functions instead of #work.
Internally they're treated the same, but it's a fun easter egg!

Example:

Cylon.robot({
  name: 'Jack',

  connections: [],
  devices: [],

  play: function play(my) {
    every((5).seconds(), function() {
      console.log("All work and no play makes %s a dull boy.", my.name);
    });
  }
});

I sincerely apologize for the repeated reference to The Shining, blame
@deadprogram.

Closes #189.
2014-06-04 16:33:20 -07:00
Andrew Stewart bc4a1f5cea Remove JSHint/Istanbul from package.json
JSHint is very rarely used, and Istanbul only on Travis to generate coverage
reports for CodeClimate.

So instead of bundling it with Cylon at all times, it will now be installed
globally by Travis prior to running tests.

The Make tasks for JSHint/Istanbul now also assume both packages are installed
globally, rather than in the local node_modules directory.
2014-06-04 16:01:47 -07:00
Andrew Stewart 9b352feeae Move API command param parsing to middleware 2014-06-04 15:54:23 -07:00
Ron Evans 0e019f1151 Merge pull request #190 from hybridgroup/refactor/api
Bump Express version, refactor API
2014-06-04 17:06:46 -04:00
Andrew Stewart 38ad5eae78 Remove unnecessary/broken tests 2014-06-04 13:41:42 -07:00
Andrew Stewart ac0a69e63f Move API routes to their own file 2014-06-04 13:39:30 -07:00
Andrew Stewart 789ce02ad0 Organize server creation into new function 2014-06-04 13:21:15 -07:00
Andrew Stewart a4cfc4b8ec Improve authentication middleware mounting 2014-06-04 13:17:17 -07:00
Andrew Stewart 5e21c52b95 Add mock request/response classes for testing 2014-06-04 12:51:35 -07:00
Andrew Stewart cae754672e Add mock request/response classes for testing 2014-06-04 12:48:20 -07:00
Andrew Stewart 014574a545 Move SSL certs to live under api dir 2014-06-04 11:58:54 -07:00
Andrew Stewart 6bc1e9d944 Move configuration to API class 2014-06-04 11:51:07 -07:00
Andrew Stewart e08a5df88b Bump Express version to 4.4.1 2014-06-04 11:06:02 -07:00
Javier Cervantes b33f64e320 Updating annotated code in example to show properly on website 2014-06-02 11:05:19 -05:00
Ron Evans 736fe03e88 Merge pull request #185 from ciandt-dev/master
Robot example integrating leap motion and ARDrone
2014-06-02 11:30:50 -04:00
fabito 0302a78294 finished markdown documentation 2014-06-01 17:38:00 -03:00
fabito 31635b1940 finished markdown documentation 2014-06-01 12:01:30 -03:00
fabito 930b182275 finished markdown documentation 2014-06-01 12:00:19 -03:00
fabito 8afe35b4c9 started code explanation in markdown 2014-06-01 11:51:42 -03:00
fabito adda142d8e Merge branch 'master' of https://github.com/ciandt-dev/cylon 2014-06-01 11:12:02 -03:00
fabito 52211db1af cleaning up code 2014-06-01 11:11:29 -03:00
Fábio Franco Uechi cef5a85310 Update leap_ardrone.markdown 2014-05-28 17:47:32 -03:00
fabito 0c8412fe40 Sample robot integrating leap motion and Parrot ARDrone 2.0 through cylon 2014-05-28 17:34:27 -03:00
Andrew Stewart 92fea6225b Bump version to 0.14.0 2014-05-26 15:35:48 -07:00
Andrew Stewart 838fdc7046 Correct references to Logger in tests 2014-05-24 10:34:19 -07:00
Andrew Stewart e27aa46f07 Move test support file into test/support dir 2014-05-24 10:34:09 -07:00
Andrew Stewart 774171db71 Make 'test' default task, remove comments 2014-05-24 10:19:52 -07:00
Ron Evans 66d76b8aa3 Merge pull request #179 from hybridgroup/remove-node-namespace
Remove node-namespace and class cruft
2014-05-24 18:09:24 +01:00
deadprogram b5c1a54971 Add istanbul back for code coverage reporting 2014-05-24 10:06:39 -07:00
deadprogram ebdac95a7d Resolve merge conflicts 2014-05-24 10:02:48 -07:00
deadprogram 69cc76b6a6 Ability to pass the name of module to use for an adaptor. Specifically for case where a module contains multiple adaptors 2014-05-23 18:42:29 -07:00
Adrian Zankich c851809bc2 Add coverage badge 2014-05-21 19:46:10 -07:00
Adrian Zankich 9c392121a1 Fix travis.yml 2014-05-21 19:36:45 -07:00
Adrian Zankich 41b5e576ca Add CodeClimate coverage 2014-05-21 19:35:09 -07:00
Andrew Stewart 34e562207d Tidy up Cylon specs, add specs for exports 2014-05-13 19:48:50 -07:00