Skip to content

Commit

Permalink
Change accepts_stream to accept_stream and fix docs (no options to su…
Browse files Browse the repository at this point in the history
…bscribe)
  • Loading branch information
davedoesdev committed Aug 2, 2014
1 parent ef0069e commit 95f2cf7
Show file tree
Hide file tree
Showing 12 changed files with 1,014 additions and 1,012 deletions.
18 changes: 6 additions & 12 deletions README.md
Expand Up @@ -67,7 +67,7 @@ function handler(stream, info)
assert.equal(str, 'hello');
});
}
handler.accepts_stream = true;
handler.accept_stream = true;
fsq.subscribe('foo.*', handler);
fsq.on('start', function ()
{
Expand Down Expand Up @@ -187,7 +187,7 @@ grunt lint
## Code Coverage

```shell
grunt coverage
grunt coverage [--fsq-dir <path>]
```

[Instanbul](http://gotwarlost.github.io/istanbul/) results are available [here](http://githubraw.herokuapp.com/davedoesdev/qlobber-fsq/master/coverage/lcov-report/index.html).
Expand Down Expand Up @@ -223,7 +223,7 @@ If you provide at least one `--remote <host>` argument then the benchmark will b
- <a name="toc_qlobberfsqoptions"></a>[QlobberFSQ](#qlobberfsqoptions)

## Publish and subscribe
- <a name="toc_qlobberfsqprototypesubscribetopic-options-handler-cb"></a><a name="toc_qlobberfsqprototype"></a>[QlobberFSQ.prototype.subscribe](#qlobberfsqprototypesubscribetopic-options-handler-cb)
- <a name="toc_qlobberfsqprototypesubscribetopic-handler-cb"></a><a name="toc_qlobberfsqprototype"></a>[QlobberFSQ.prototype.subscribe](#qlobberfsqprototypesubscribetopic-handler-cb)
- <a name="toc_qlobberfsqprototypeunsubscribetopic-handler-cb"></a>[QlobberFSQ.prototype.unsubscribe](#qlobberfsqprototypeunsubscribetopic-handler-cb)
- <a name="toc_qlobberfsqprototypepublishtopic-payload-options-cb"></a>[QlobberFSQ.prototype.publish](#qlobberfsqprototypepublishtopic-payload-options-cb)

Expand Down Expand Up @@ -287,7 +287,7 @@ If you provide at least one `--remote <host>` argument then the benchmark will b

<a name="qlobberfsqprototype"></a>

## QlobberFSQ.prototype.subscribe(topic, [options], handler, cb)
## QlobberFSQ.prototype.subscribe(topic, handler, cb)

> Subscribe to messages in the file system queue.
Expand All @@ -297,12 +297,6 @@ If you provide at least one `--remote <host>` argument then the benchmark will b



- `{Object} [options]` Optional settings for this subscription:


- `{Boolean} stream` Whether `handler` should receive a message stream or the message contents as its first argument. Defaults to `false` (the message contents).


- `{Function} handler` Function to call when a new message is received on the file system queue and its topic matches against `topic`. `handler` will be passed the following arguments:


Expand Down Expand Up @@ -337,11 +331,11 @@ If you provide at least one `--remote <host>` argument then the benchmark will b
**Parameters:**

- `{String} [topic]` Which messages you're no longer interested in receiving via the `handler` function. This should be a topic you've previously passed to [`subscribe`](#qlobberfsqprototypesubscribetopic-options-handler-cb). If topic is `undefined` then all handlers for all topics are unsubscribed.
- `{String} [topic]` Which messages you're no longer interested in receiving via the `handler` function. This should be a topic you've previously passed to [`subscribe`](#qlobberfsqprototypesubscribetopic-handler-cb). If topic is `undefined` then all handlers for all topics are unsubscribed.



- `{Function} [handler]` The function you no longer want to be called with messages published to the topic `topic`. This should be a function you've previously passed to [`subscribe`](#qlobberfsqprototypesubscribetopic-options-handler-cb). If you subscribed `handler` to a different topic then it will still be called for messages which match that topic. If `handler` is undefined, all handlers for the topic `topic` are unsubscribed.
- `{Function} [handler]` The function you no longer want to be called with messages published to the topic `topic`. This should be a function you've previously passed to [`subscribe`](#qlobberfsqprototypesubscribetopic-handler-cb). If you subscribed `handler` to a different topic then it will still be called for messages which match that topic. If `handler` is undefined, all handlers for the topic `topic` are unsubscribed.



Expand Down
2 changes: 1 addition & 1 deletion coverage/coverage.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coverage/lcov-report/index.html
Expand Up @@ -262,7 +262,7 @@ <h2>
</div>
</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Jun 03 2014 09:30:39 GMT+0100 (BST)</div>
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Aug 02 2014 07:23:33 GMT+0100 (BST)</div>
</div>

<script src="prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/qlobber-fsq/Gruntfile.js.html
Expand Up @@ -473,7 +473,7 @@ <h2>

</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Jun 03 2014 09:30:39 GMT+0100 (BST)</div>
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Aug 02 2014 07:23:33 GMT+0100 (BST)</div>
</div>

<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/qlobber-fsq/index.html
Expand Up @@ -262,7 +262,7 @@ <h2>
</div>
</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Jun 03 2014 09:30:39 GMT+0100 (BST)</div>
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Aug 02 2014 07:23:33 GMT+0100 (BST)</div>
</div>

<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/qlobber-fsq/index.js.html
Expand Up @@ -230,7 +230,7 @@ <h2>

</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Jun 03 2014 09:30:39 GMT+0100 (BST)</div>
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Aug 02 2014 07:23:33 GMT+0100 (BST)</div>
</div>

<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/qlobber-fsq/lib/index.html
Expand Up @@ -249,7 +249,7 @@ <h2>
</div>
</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Jun 03 2014 09:30:39 GMT+0100 (BST)</div>
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Aug 02 2014 07:23:33 GMT+0100 (BST)</div>
</div>

<script src="../../prettify.js"></script>
Expand Down

0 comments on commit 95f2cf7

Please sign in to comment.