Skip to content

Commit

Permalink
move files to new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Feb 17, 2014
1 parent 38c09d0 commit bf9e382
Show file tree
Hide file tree
Showing 50 changed files with 392 additions and 392 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/iframely.js → lib/_old/iframely.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function(proxy) {

if (!GLOBAL.CONFIG) {
GLOBAL.CONFIG = require('../config');
GLOBAL.CONFIG = require('../../config');
}

var fs = require('fs'),
Expand Down
8 changes: 4 additions & 4 deletions lib/new/iframely2.js → lib/_old/iframely2_prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ GLOBAL.CONFIG = require('../../config');
var url = require("url");
var _ = require("underscore");

var utils = require('./utils');
var utils = require('./../utils');

var getUrl = utils.getUrl;

var oembedDataPlugin = require('./plugins/custom/oembed/oembedData');
var oembedLinksFromUriPlugin = require('./plugins/custom/oembed/oembedLinksFromUri');
var oembedLinksFromMetaPlugin = require('./plugins/custom/oembed/oembedLinksFromMeta');
var htmlMetaPlugin = require('./plugins/htmlMeta');
var cheerioPlugin = require('./plugins/custom/cheerio');
var readabilityPlugin = require('./plugins/generic/readability');
var htmlparserPlugin = require('./plugins/custom/htmlparser');
var cheerioPlugin = require('././custom/cheerio');
var readabilityPlugin = require('././generic/readability');
var htmlparserPlugin = require('././custom/htmlparser');

var getUri = function(uri, settings, cb){
if(typeof settings === "function"){
Expand Down
File renamed without changes.
46 changes: 46 additions & 0 deletions lib/_old/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
exports.createTimer = function() {

var timer = new Date().getTime();

return function() {
return new Date().getTime() - timer;
};
};

var disposeObject = exports.disposeObject = function(o) {

if (o) {

if (o && o.hasOwnProperty && (
o.hasOwnProperty('plugins')
|| o.hasOwnProperty('whitelistRecord')
|| o.hasOwnProperty('whitelist'))) {
delete o.plugins;
delete o.whitelistRecord;
delete o.whitelist;
}

if (o instanceof Array) {

for(var i = 0; i < o.length; i++) {

disposeObject(o[i]);

o[i] = null;
}

o.length = 0;

} else if (typeof o === "object") {

for(var key in o) {
if (o.hasOwnProperty(key)) {
disposeObject(o[key]);
o[key] = null;
delete o[key];
}
}

}
}
};
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions lib/new/core/pluginLoader.js → lib/core/pluginLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@
}
}

loadPlugins('lib', 'new', 'plugins', 'generic');
loadPlugins('lib', 'new', 'plugins', 'custom');
loadPlugins('lib', 'new', 'plugins', 'post');
loadPlugins('lib', 'new', 'plugin-tests', 'domains');
loadPlugins('lib', 'plugins', 'generic');
loadPlugins('lib', 'plugins', 'custom');
loadPlugins('lib', 'plugins', 'post');
loadPlugins('lib', 'plugin-tests', 'domains');

/*
var modulePluginsPath = path.resolve(modulePath, 'lib', 'new', 'plugins');
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bf9e382

Please sign in to comment.