Skip to content
Browse files

added /Config stuff

  • Loading branch information...
1 parent 859b91f commit 875f7839bf2eb035577bc8d0d1de456393cf15d2 @smurthas smurthas committed Aug 16, 2011
View
1 .gitignore
@@ -11,3 +11,4 @@ node_modules
scheduler.json
tests/Data/
lockerbox*
+Config/apikeys.json
View
2 Apps/BackMeUp/bmu.js
@@ -14,7 +14,7 @@ var app = express.createServer(connect.bodyParser());
var locker = require('../../Common/node/locker.js');
var lfs = require('../../Common/node/lfs.js');
var lconfig = require('../../Common/node/lconfig.js');
-lconfig.load('../../config.json');
+lconfig.load('../../Config/config.json');
var exec = require('child_process').exec;
var util = require('util');
var request = require('request');
View
2 Apps/Reminisce/app.js
@@ -18,7 +18,7 @@ var nodemailer = require('nodemailer');
var lcrypto = require('lcrypto');
var lconfig = require('lconfig');
//TODO: fix lconfig and remove this! I need it for lcrypto?!
-lconfig.load('../../config.json');
+lconfig.load('../../Config/config.json');
var me;
var auth=false;
View
2 Collections/Contacts/contacts.js
@@ -10,7 +10,7 @@
// merge contacts from connectors
require.paths.push(__dirname + "/../../Common/node");
var lconfig = require('lconfig');
-lconfig.load('../../config.json');
+lconfig.load('../../Config/config.json');
var fs = require('fs'),
locker = require('locker.js');
View
2 Collections/Contacts/sync.js
@@ -21,7 +21,7 @@ exports.init = function(theLockerUrl, mongoCollection) {
}
exports.gatherContacts = function() {
- lconfig.load('../../config.json');
+ lconfig.load('../../Config/config.json');
dataStore.clear(function(err) {
// This should really be timered, triggered, something else
locker.providers(['contact/facebook', 'contact/twitter',
View
2 Collections/Links/sync.js
@@ -21,7 +21,7 @@ exports.init = function(theLockerUrl, mongoCollection) {
}
exports.gatherLinks = function() {
- lconfig.load('../../config.json');
+ lconfig.load('../../Config/config.json');
dataStore.clear(function(err) {
// This should really be timered, triggered, something else
locker.providers(['link/facebook', 'status/twitter'], function(err, services) {
View
2 Collections/Photos/sync.js
@@ -28,7 +28,7 @@ var photoGatherers = {
};
exports.gatherPhotos = function() {
- lconfig.load('../../config.json');
+ lconfig.load('../../Config/config.json');
dataStore.clear(function(err) {
locker.providers('photo', function(err, services) {
if (!services) return;
View
0 config.json → Config/config.json
File renamed without changes.
View
2 Connectors/IMAP/auth.js
@@ -14,7 +14,7 @@ var request = require('request'),
var lconfig = require('lconfig');
//TODO: fix lconfig and remove this!
-lconfig.load('../../config.json');
+lconfig.load('../../Config/config.json');
//TODO: this is almost definitely a race condition!
lcrypto.loadKeys(function(){});
View
2 Ops/dashboard.js
@@ -11,7 +11,7 @@ var spawn = require('child_process').spawn;
var lconfig = require('../Common/node/lconfig.js');
var dashboard;
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
exports.instance = dashboard;
exports.start = function(port) {
View
2 lockerd.js
@@ -31,7 +31,7 @@ npm.load(conf, function(er) {
// This lconfig stuff has to come before and other locker modules are loaded!!
var lconfig = require('lconfig');
- lconfig.load((process.argv[2] == '--config'? process.argv[3] : 'config.json'));
+ lconfig.load((process.argv[2] == '--config'? process.argv[3] : 'Config/config.json'));
var logger = require("logger");
//var crypto = require('crypto');
View
2 searcher.js
@@ -1,7 +1,7 @@
var repl = require('repl');
require.paths.push('./Common/node');
var lconfig = require('lconfig');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var lsearch = require('lsearch');
lsearch.setIndexPath('./Me/search/search.index');
View
4 tests/config.json → tests/Config/config.json
@@ -12,7 +12,6 @@
"lpquery-test-local.js",
"mongo-test.js",
"lscheduler-test-local.js",
- "lsearch-test-local.js",
"deepCompare-test.js"],
"client-api" : ["locker-client-test.js"],
"connectors-local" : ["connector-local-google-contacts-test.js",
@@ -26,8 +25,7 @@
"synclet-local-twitter.js",
"synclet-local-facebook.js",
"synclet-local-googleContacts.js"],
- "connectors" : ["connector-IMAP-test.js",
- "connector-flickr-test.js"],
+ "connectors" : ["connector-flickr-test.js"],
"collections" : ["sync-contacts-test.js",
"sync-links-test.js"],
"issues" : ["locker-issues-test.js"]
View
2 tests/connector-IMAP-test.js
@@ -30,7 +30,7 @@ var svcId = 'imap';
var thecollections = ['messages'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, svcId, thecollections);
var mongoCollections;
var mePath = lconfig.me + "/" + svcId;
View
2 tests/connector-flickr-test.js
@@ -23,7 +23,7 @@ var suite = RESTeasy.describe("Flickr Connector");
var id = '9fdfb7e5c6551dc45300aeb0d21fdff4';
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
locker.initClient({lockerUrl:lconfig.lockerBase, workingDirectory:lconfig.me + "/flickr-event-collector"});
locker.listen('photo/flickr', 'event');
View
2 tests/connector-local-XMPP-test.js
@@ -34,7 +34,7 @@ var suite = RESTeasy.describe("XMPP Connector")
var svcId = "xmpp-test";
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var mePath = '/Me/' + svcId;
View
2 tests/connector-local-facebook-test.js
@@ -26,7 +26,7 @@ var RESTeasy = require('api-easy');
var suite = RESTeasy.describe('Facebook Connector');
var vows = require('vows');
var lconfig = require('../Common/node/lconfig');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var utils = require('./test-utils');
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, svcId, thecollections);
var locker = require('../Common/node/locker');
View
2 tests/connector-local-foursquare-test.js
@@ -22,7 +22,7 @@ var mePath = '/Data/' + svcId;
var thecollections = ['friends', 'places'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var locker = require('../Common/node/locker');
var request = require('request');
var levents = require('../Common/node/levents');
View
2 tests/connector-local-github-test.js
@@ -20,7 +20,7 @@ var mePath = '/Data/' + svcId;
var thecollections = ['repos', 'followers', 'following'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var locker = require('../Common/node/locker');
var levents = require('../Common/node/levents');
var request = require('request');
View
2 tests/connector-local-google-contacts-test.js
@@ -31,7 +31,7 @@ var mePath = '/Data/' + svcId;
var thecollections = ['contacts', 'groups'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var locker = require('../Common/node/locker');
var request = require('request');
var levents = require('../Common/node/levents');
View
2 tests/connector-local-twitter-test.js
@@ -20,7 +20,7 @@ var mePath = '/Data/' + svcId;
var thecollections = ['friends', 'followers', 'home_timeline', 'user_timeline', 'mentions'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, svcId, thecollections);
var mongoCollections;
View
2 tests/connector-local-wordpress-test.js
@@ -15,7 +15,7 @@ var suite = RESTeasy.describe("Wordpress Connector");
var svcId = "wordpress-test";
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var mePath = '/Me/' + svcId;
View
2 tests/lconfig-test-local.js
@@ -58,7 +58,7 @@ vows.describe("Locker Config").addBatch({
}).addBatch({
"Can reload original config" : {
topic: function() {
- lconfig.load("config.json");
+ lconfig.load("Config/config.json");
this.callback();
},
"loads expected values" : function() {
View
2 tests/lcrypto-test-local.js
@@ -16,7 +16,7 @@ var lcrypto = require("lcrypto");
var request = require("request");
var lconfig = require("lconfig");
var querystring = require("querystring");
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
vows.describe("Crypto Wrapper").addBatch({
"lcrypto" : {
View
2 tests/locker-client-test.js
@@ -17,7 +17,7 @@ var lconfig = require("../Common/node/lconfig.js");
var request = require('request');
var testUtils = require('./test-utils');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
vows.describe("Locker Client API").addBatch({
"Initialization" : {
View
2 tests/locker-core-api-test.js
@@ -17,7 +17,7 @@ var events = require("events");
var fs = require("fs");
var lconfig = require('../Common/node/lconfig.js');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var tests = RESTeasy.describe("Locker core API");
View
2 tests/locker-issues-test.js
@@ -12,7 +12,7 @@ var events = require("events");
var fs = require("fs");
var lconfig = require('../Common/node/lconfig.js');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var tests = RESTeasy.describe("Locker Core Issues");
View
2 tests/lscheduler-test-local.js
@@ -16,7 +16,7 @@ var fs = require('fs');
var locker = require('locker');
var events = require('events');
var lconfig = require('lconfig');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
vows.describe("Locker Scheduling System").addBatch({
"Scheduler": {
View
2 tests/lservicemanager-test-local.js
@@ -21,7 +21,7 @@ var testUtils = require(__dirname + "/test-utils.js");
require.paths.push(__dirname + "/../Common/node");
var serviceManager = require("lservicemanager.js");
var lconfig = require("lconfig");
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var path = require('path');
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, 'disabletest', ['thing1','thing2']);
View
2 tests/lsyncmanager-test-local.js
@@ -22,7 +22,7 @@ var vows = require("vows")
, nsEventCount = 0
, nsEvents = []
;
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var syncManager = require("lsyncmanager.js");
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, 'synclets', ['testSynclet_testSync', 'testSynclet_dataStore']);
View
2 tests/mongo-test.js
@@ -12,7 +12,7 @@ var vows = require("vows");
var RESTeasy = require("api-easy");
var lconfig = require('../Common/node/lconfig.js');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, 'lmongoclient-test', ['one']);
var mongo;
View
8 tests/runTests.js
@@ -3,7 +3,7 @@ var net = require("net");
require.paths.push(__dirname + "/../Common/node");
process.env["NODE_PATH"]=__dirname + "/../Common/node"; // for spawn'd nodelings
var lconfig = require("lconfig");
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var lconsole = require("lconsole");
var wrench = require("wrench");
@@ -55,15 +55,15 @@ if (process.argv.length > 2) {
process.stdout.write(" -f The remaining arguments are treated as files to run\n");
process.stdout.write(" -x Output tests in xUnit format for CI reporting\n");
process.stdout.write("\n");
- process.stdout.write("The list of groups are loaded from the config.json and by default all\n");
+ process.stdout.write("The list of groups are loaded from the Config/config.json and by default all\n");
process.stdout.write("of them are ran. A list of the groups to run can be specified as an\n");
process.stdout.write("argument to the script. If -f is used the list of arguments are\n");
process.stdout.write("treated as individual files, not groups.\n");
process.exit(0);
}
if (process.argv[2] == "-l") {
- var testGroups = JSON.parse(fs.readFileSync("config.json")).testGroups;
+ var testGroups = JSON.parse(fs.readFileSync("Config/config.json")).testGroups;
if (process.argv.length > 3) {
if (testGroups.hasOwnProperty(process.argv[3])) {
process.stdout.write("Files in group " + process.argv[3] + ":\n");
@@ -97,7 +97,7 @@ if (process.argv.length > 2) {
// If they have specified any groups or defaulting to all we need to process this
if (runGroups.length > 0 || (runFiles.length === 0 && runGroups.length === 0)) {
- var testGroups = JSON.parse(fs.readFileSync("config.json")).testGroups;
+ var testGroups = JSON.parse(fs.readFileSync("Config/config.json")).testGroups;
if (runGroups.length === 0) {
for (var key in testGroups) {
if (testGroups.hasOwnProperty(key)) {
View
4 tests/sync-contacts-test.js
@@ -10,7 +10,7 @@ var mongoCollections;
var svcId = 'contacts';
var lconfig = require('lconfig');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var request = require('request');
@@ -21,7 +21,7 @@ var friend;
var thecollections = ['contacts'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, svcId, thecollections);
View
4 tests/sync-links-test.js
@@ -10,7 +10,7 @@ var mongoCollections;
var svcId = 'links';
var lconfig = require('lconfig');
-lconfig.load('config.json');
+lconfig.load('Config/config.json');
var request = require('request');
@@ -21,7 +21,7 @@ var link;
var thecollections = ['links'];
var lconfig = require('../Common/node/lconfig');
-lconfig.load("config.json");
+lconfig.load("Config/config.json");
var lmongoclient = require('../Common/node/lmongoclient.js')(lconfig.mongo.host, lconfig.mongo.port, svcId, thecollections);

0 comments on commit 875f783

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