Skip to content

careerbuilder/pencilblue_rssfeeder

Repository files navigation

PencilBlue RSS Plugin

Code Climate Test Coverage

Codeship Status for silverelizard/pencilblue_rssfeeder

An RSS service for PencilBlue. In order to use the plugin, please fill in the feed_url setting in the plugin's settings to use.

The main use case for the plugin is setting up the parameters and then calling the RSSService in a template in order to gain access to the tweet data for display. For example, the following code snippet checks if the plugin is installed and then accesses the service:

if(pb.PluginService.isActivePlugin('rssfeeder')) { //checks if the rssfeeder plugin is installed
  var RSSService = pb.PluginService.getService('rssFeederService', 'rssfeeder'); //gets the rssfeeder service from the plugin
  var rssService = new RSSService(); //creates a new instance of the rss service
  rssService.getFeed(function(feed) { //calls the getFeed method from the rss service with a callback
    pb.log.info(feed); //logs feed object from service to console
  });
}

###Running Tests

The plugin uses the Mocha, Sinon, Chai stack for testing. Included in the repo is a Makefile setting up both testing and code coverage. To run tests, simply type make test into the console while in the root directory of the plugin. Code coverage is similar, simply run make coverage to generate an lcov report. Be sure you have lcov installed first. More information on lcov can be found here. You can cleanup the report folders by running the make clean command.

About

A PencilBlue plugin to consume rss feeds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published