hook.io-feedsub
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -10,15 +10,15 @@ var Hook = require('hook.io').Hook, | ||
Hook.call(this, options); | ||
this._readers = []; | ||
this.on('hook::ready', function () { | ||
for (var key in self.feeds) { | ||
(function(feed) { | ||
var reader = new FeedSub(feed.url, feed); | ||
self.feeds.forEach(function(feed) { | ||
var reader = new FeedSub(feed.url, feed); | ||
reader.on('item', function(item) { | ||
self.emit(feed.name + '::item', item); | ||
}); | ||
reader.on('item', function(item) { | ||
self.emit(feed.name + '::item', item); | ||
}); | ||
reader.start(); | ||
})(self.feeds[key]); | ||
} | ||
reader.start(); | ||
self._readers.push(reader); | ||
}); | ||
@@ -25,0 +25,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["hook.io", "feed", "rss", "atom", "subscribe"], | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"repository": { | ||
@@ -17,3 +17,3 @@ "type": "git", | ||
"bin": { | ||
"hookio-feed": "./bin/feed" | ||
"hookio-feedsub": "./bin/feedsub" | ||
}, | ||
@@ -24,3 +24,3 @@ "engines": { | ||
"dependencies": { | ||
"hook.io": "0.7.x", | ||
"hook.io": ">=0.8.0", | ||
"feedsub": ">=0.0.5" | ||
@@ -27,0 +27,0 @@ }, |
@@ -0,1 +1,3 @@ | ||
# hook.io-feedsub [![Build Status](https://secure.travis-ci.org/fent/hook.io-feedsub.png)](http://travis-ci.org/fent/hook.io-feedsub) | ||
Will "subscribe" to a web RSS/Atom feed and emit any new items it reads from it. The events are in the form of | ||
@@ -33,4 +35,3 @@ | ||
Usage | ||
------------------ | ||
# Usage | ||
@@ -42,4 +43,3 @@ ```bash | ||
Install | ||
------------ | ||
# Install | ||
@@ -51,4 +51,4 @@ ```bash | ||
Tests | ||
--------- | ||
# Tests | ||
The single test is written with [vows](http://vowsjs.org/) | ||
@@ -59,1 +59,5 @@ | ||
``` | ||
# Licence | ||
MIT |
@@ -23,3 +23,2 @@ var assert = require('assert') | ||
name: 'feedsub', | ||
emitOnStart: true, | ||
"feeds": [ | ||
@@ -29,2 +28,3 @@ { | ||
"url": "http://rss.cnn.com/rss/cnn_latest.rss", | ||
"emitOnStart": true | ||
} | ||
@@ -31,0 +31,0 @@ ] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46397
11
60
+ Addedhook.io@1.0.0(transitive)
- Removedasync@0.1.22(transitive)
- Removedcolors@0.6.2(transitive)
- Removeddnode@0.8.2(transitive)
- Removeddnode-protocol@0.0.12(transitive)
- Removedeventemitter2@0.4.14(transitive)
- Removedhook.io@0.7.7(transitive)
- Removedini@1.3.8(transitive)
- Removedlazy@1.0.11(transitive)
- Removednconf@0.3.1(transitive)
- Removedoptimist@0.2.8(transitive)
- Removedpkginfo@0.2.3(transitive)
- Removedsocket.io@0.6.18(transitive)
- Removedtraverse@0.4.6(transitive)
- Removedwordwrap@0.0.3(transitive)
Updatedhook.io@>=0.8.0