Commit Graph

318 Commits

Author SHA1 Message Date
Andrew Stewart 62cbae7cff Switch to ESLint for linting 2015-04-15 08:59:34 -07:00
Andrew Stewart cccb376679 Consistent top-of-file doc blocks 2015-04-15 08:59:12 -07:00
Andrew Stewart 4791fa72a9 Throw error instead of continuing when #api fails 2015-04-02 14:10:22 -07:00
Andrew Stewart 9b04a4ed15 Add basic DSL error checks 2015-04-02 12:22:19 -07:00
Andrew Stewart eb5090e9e9 Remove accidentally committed swap file 2015-03-31 18:01:26 -07:00
Edgar Silva 287b4205dd Offering to the lint godsgit add .! 2015-03-27 15:36:24 -06:00
Edgar Silva ec4dde7448 Adds error handling to basetar#respond. 2015-03-27 15:18:45 -06:00
Andrew Stewart 2ed5fcf64e Add CLI flag for enabling debug logging 2015-03-22 17:07:25 -07:00
Andrew Stewart 82ef3d31a2 Add exploding interface functions for Driver/Adaptor
Explicit is better than implicit, and this causes errors to be more
specific
2015-03-19 17:47:15 -07:00
Andrew Stewart c0a3a9439e Add #respond method to work with events/callbacks 2015-03-19 10:48:45 -07:00
Andrew Stewart a17c70a18b Bind passed function to Robot by default 2015-03-17 14:22:14 -07:00
Andrew Stewart 28415f0b74 Add basic #includes helper for arrays 2015-03-11 12:31:45 -07:00
Andrew Stewart 6c5208577a Correct bug in Registry#findBy, add spec 2015-03-09 21:26:45 -07:00
Andrew Stewart cb492c0747 Remove deprecated Connection / Device syntaxes
Removes deprecation warnings + support for single-object + array
syntaxes.

The array syntax will likely continue to work due to the `_.each`
abstraction, but since we don't use it anywhere, the requisite specs
have been removed.
2015-03-04 09:27:33 -08:00
Adrian Zankich 3e65e2027e Merge pull request #271 from hybridgroup/feature/replace-lodash
Replace Lodash
2015-02-24 10:08:06 -08:00
Andrew Stewart 4e363e7930 Add a basic reduce implementation 2015-02-23 15:22:45 -08:00
Andrew Stewart 2eaea42a72 Add helpers for partial application 2015-02-23 14:31:52 -08:00
Andrew Stewart 372c384b11 Fully iterate over objects, rather than just props 2015-02-23 12:57:57 -08:00
Andrew Stewart 6e3d7c6667 Add helpers to replace some lodash functionality
Not a 1:1, and probably much slower than Lodash's ultra-optimised
implementations, but we do enough I/O that it's not really relevant,
is it?
2015-02-23 08:38:12 -08:00
Daniel Lamb ccebab4cc2 The register method should return existing modules 2015-02-20 11:25:31 -08:00
Andrew Stewart 618aa8212d Remove lodash 2015-02-20 11:15:34 -08:00
Andrew Stewart b17542061b Extract monkey-patches 2015-02-20 11:12:26 -08:00
Andrew Stewart 5ac95161e2 Correct edge case with 'module' key 2015-02-19 12:44:35 -08:00
edgarsilva 3d2842567b User API#start instead of API#listen in cylon#api 2015-01-30 14:45:50 -06:00
edgarsilva cfd37e9621 Updated README with cylon-api-socketio plugin reference. 2015-01-30 13:56:14 -06:00
edgarsilva e2f617c995 Fixes validation issue in initializer constructor, `!module` should be `mod` 2015-01-29 13:51:05 -06:00
deadprogram 64a0d76af1 Extract deprecation warning into separate function 2015-01-22 19:25:45 -08:00
Andrew Stewart 147816b366 First crack at removing seperate Device/Connection initialization 2015-01-22 14:41:58 -08:00
Andrew Stewart d56f9bc53f Add better error checking for Robot#halt 2015-01-21 08:56:13 -08:00
Andrew Stewart 8272efe060 Robot log messages should contain the bot name 2015-01-20 19:29:40 -08:00
Andrew Stewart 5354102c2e If bad start detected, shut down the Robot 2015-01-20 19:18:52 -08:00
deadprogram 6ac3cad7c1 Extract even more of function to DRY up code 2015-01-17 21:35:40 -08:00
deadprogram 5cea07602a Extract function to DRY up code 2015-01-17 21:29:07 -08:00
deadprogram a7e8caf19d Extract robot var init into separate function 2015-01-17 15:48:45 -08:00
Andrew Stewart 8fd6f8a99e Generate lodash script for only methods we use 2015-01-15 09:33:18 -08:00
Andrew Stewart 4b377b2e65 Streamline Logger a bit 2015-01-13 10:43:20 -08:00
Andrew Stewart b72864ca75 More specific log message for missing HTTP API 2015-01-13 10:13:16 -08:00
Andrew Stewart b8766c4607 Add custom Lo-Dash build, remove from dependencies 2015-01-08 12:04:52 -08:00
Andrew Stewart 9165ab36b4 Extract API from core 2015-01-08 10:02:14 -08:00
Andrew Stewart eccdde81a9 Update copyright years 2015-01-07 12:58:50 -08:00
Andrew Stewart 8065644b4e Add support for nested device details inside conn
e.g.
    connections: {
      loopback: {
        adaptor: "loopback",
        devices: {
          ping: { driver: "ping", pin: 1 }
        }
      }
    }

In the event of a name collision between the `devices` hash and a nested
device, the nested device will 'win'.
2015-01-07 10:21:51 -08:00
Andrew Stewart cf0d24f785 Add API event publication
This update gives Cylon support for the latest changes to the CPPP-IO
spec.
2015-01-05 12:20:53 -08:00
Loren West 34ba1fedc5 Fixed lint issues 2014-12-31 13:29:23 -08:00
Loren West 5d2fc21fab Support asynchronous commands 2014-12-31 13:29:23 -08:00
Andrew Stewart 13c388fbf7 Simplify path for method proxying in drivers 2014-12-18 13:19:58 -08:00
Andrew Stewart 280687099c Revert change to direct method binding, breaks stuff
This is Probably Bad and should be revisited in the future.
2014-12-18 13:15:30 -08:00
Andrew Stewart 7109a9d303 Fix API errors, add slight simplifications 2014-12-17 16:51:48 -08:00
Andrew Stewart b5907ccd36 Correct iteration key issue 2014-12-17 16:36:48 -08:00
Andrew Stewart 6ebbdf0eab Use forIn to ensure Object iteration is performed 2014-12-17 16:31:26 -08:00
Andrew Stewart c9e16fe8c2 Use _.result to get commands from options. 2014-12-17 15:07:03 -08:00