Version 1.0 of fivebeans #10

merged 21 commits into from May 6, 2013
Commits on May 4, 2013
  1. Begin bringing this module up to my current standards for node modules.

    committed May 4, 2013
    - main is now index.js
    - each submodule in lib now exports one item
    - fixed some small style things
    - added code coverage tools to the test harness
    Pre-bumped the version number because this will be an API-breaking release.
    Next up: removing logging.
  2. The worker now emits 'log' events instead of attempting to log all by…

    committed May 4, 2013
    … itself.
    Documentation to follow in the readme once I'm happy with the format of the
    objects passed to the event.
  3. The client now emits errors on interesting events like connect, close…

    committed May 4, 2013
    …, and error.
    You are expected to listen for those events and act upon them. In particular, the
    API has changed to that connect no longer takes a callback.
    worker.start() no longer takes a flag to ignore the default tube. Instead you
    can set 'ignoreDefault' in the options hash you pass to the worker constructor.
    The worker no longer attempts to ignore the default tube if it's not watching
    anything else.
    Started implementing tests for the worker. This brings coverage up over
    50% (which is pathetic, but it's a start) so I added coverage checking
    to the test targets run by Travis CI.
Commits on May 5, 2013
  1. More logger expungement.

    committed May 5, 2013
    I just invented that word.
  2. Some style tightening.

    committed May 5, 2013
    More worker tests.
  3. The worker is now restartable.

    committed May 5, 2013
    That is, you can call stop() and then start() on it without needing to
    create a new one. You'll still need to re-watch any tubes you were
    watching. (Going to rework that, at which point this client will be far
    divorced from the original project.)
    Implemented more worker tests. Client test coverage is now at 91% and
    worker coverage at 92%.
  4. Added two more worker job-handling tests.

    committed May 5, 2013
    The bad json test exposed a bug, which I fixed: we would cheerfully go
    on to try to use a bad job payload. Yay integration tests.
  5. Travis test timings are much slower than on my MacBook.

    committed May 5, 2013
    I read that virtualization means I'm running these tests on the
    equivalent of a RaspberryPI, which is awesome. Anyway, try to work
    around the timing differences while maintaining the usefulness of the
  6. The worker emits many more events to make processing jobs a little ni…

    committed May 5, 2013
    Well, as scientifically measured, about a million times nicer.
    Here is a list of events emitted and some notes on what they mean. This
    will turn into documentation eventually:
    error: payload is error; cannot be recovered from
    close: worker got a close event from its client; no payload
    warning: payload is object with error information; execution continues
    info: the equivalent of info-level logging; payload is object with
    action info
    started: worker has started processing jobs; no payload
    stopped: worker has stopped processing jobs; no payload
    job.reserved: payload is jobid
    job.handled: payload is object with job info
    job.deleted: payload is jobid
    job.destroyed: payload is jobid
    job.buried: payload is jobid
    Rewrote the tests to use the events, which should make them less
    timing-dependent. I might still not be allowing enough slop for the
    slowness of TravisCI.
  7. Bump up the timeout on two worker tests.

    committed May 5, 2013
    These are consistently passing for me, so perhaps it's just that the
    tests are running on a RaspberryPI hosted at Amazon.
  8. Don't test kick-job if the version of beanstalkd doesn't support it.

    committed May 5, 2013
    kick-job was introduced in 1.8 in Nov 2012. Apparently the package
    Travis installs is older than that.
    Used semver to compare versions because I am very lazy.
  9. Resequence some tests.

    committed May 5, 2013
  10. You can now specify a delay of 0 when releasing jobs.

    committed May 5, 2013
    And use that in the worker release test, to completely removing timing
    issues from the test. This should fix Travis. Famous last words.
  11. Added basic tests for the runner.

    committed May 5, 2013
    Code coverage is now up over 90%, so I set the travis-cov threshold to
    90. Next up: documentation.
  12. Brought documentation up to date.

    committed May 5, 2013
    Documented the new client.connect() behavior.
    Documented the new worker events. Improved worker documentation overall.
  13. Brought examples up to date.

    committed May 5, 2013
    They all run.