Skip to content
Browse files

Merge pull request #14 from wlaurance/plugins

  • Loading branch information...
2 parents 98a9701 + f73e1ae commit 536ba561bdc7b5663e848b5a9ad21611ca364874 @guyht committed
Showing with 7 additions and 5 deletions.
  1. +0 −3 lib/glog.js
  2. +7 −2 test/glog_tests.js
View
3 lib/glog.js
@@ -90,9 +90,6 @@ Glog.prototype.load_configs = function(cb) {
Glog.prototype.load_plugins = function(options, cb) {
var fn = this, i;
- this.articlePrePlugins = [{}];
- this.articlePostPlugins = [{}];
-
var GlogPlugin = {
registerPreArticleHook : function(hook) {
fn.articlePrePlugins.push(hook);
View
9 test/glog_tests.js
@@ -1,5 +1,4 @@
-var glog = require('../lib/glog'),
- assert = require('assert'),
+var assert = require('assert'),
exec = require('child_process').exec;
describe('Glog', function() {
@@ -11,6 +10,7 @@ describe('Glog', function() {
});
it('should load configs from a JSON file', function(done) {
+ var glog = require('../lib/glog');
glog.load_configs(function(options) {
assert.equal(options.blog_title, 'The Glog Blog');
assert.equal(options.port, 8080);
@@ -21,6 +21,7 @@ describe('Glog', function() {
it('should be cloned from a remote repository', function(done) {
+ var glog = require('../lib/glog');
glog.load_configs(function(options) {
glog.get_repo(options.blog_repository, function(err) {
console .log('err ' + err);
@@ -32,6 +33,7 @@ describe('Glog', function() {
it('should be pulled from a remote repository', function(done) {
+ var glog = require('../lib/glog');
glog.load_configs(function(options) {
glog.update_repo(options.blog_repository, function(err) {
assert.ok(err);
@@ -42,6 +44,7 @@ describe('Glog', function() {
it('should load articles from the cloned repository', function(done) {
+ var glog = require('../lib/glog');
glog.load_configs(function(options) {
glog.load_plugins(options, function(err) {
glog.load_articles(options, function(articles) {
@@ -53,6 +56,7 @@ describe('Glog', function() {
});
it('should render the articles', function(done) {
+ var glog = require('../lib/glog');
glog.load_configs(function(options) {
glog.load_articles(options, function(articles) {
glog.render_blog(options, articles, function() {
@@ -64,6 +68,7 @@ describe('Glog', function() {
});
it('should handle plugins', function(done) {
+ var glog = require('../lib/glog');
glog.load_configs(function(options) {
options.plugins.push("example");
glog.load_plugins(options, function(){

0 comments on commit 536ba56

Please sign in to comment.
Something went wrong with that request. Please try again.