Skip to content

Commit

Permalink
Fix to config instance vs library on calipso.config
Browse files Browse the repository at this point in the history
  • Loading branch information
cliftonc committed Apr 21, 2012
1 parent ca2b092 commit 312d904
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 347 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function bootApplication(next) {
app.isCluster = false;

// Load configuration
var Config = calipso.config; //require(path + "/lib/core/Config").Config;
var Config = calipso.configuration; //require(path + "/lib/core/Config").Config;
app.config = new Config();
app.config.init(function(err) {

Expand Down
1 change: 1 addition & 0 deletions lib/calipso.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function init(app, initCallback) {
// Load the calipso package.json into app.about
calipso.module.loadAbout(app, rootpath, 'package.json');

// config is the actual instance of loaded config, configuration is the library.
calipso.config = app.config;

// Store the callback function for later
Expand Down
160 changes: 0 additions & 160 deletions lib/core/Config.js

This file was deleted.

3 changes: 1 addition & 2 deletions test/helpers/calipsoHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var calipso = require('./require')('calipso'),
fs = require('fs'),
colors = require('colors'),
rootpath = process.cwd() + '/',
Config = require('./require')('core/Config'),
Config = require('./require')('core/Configuration'),
http = require('http'),
mochaConfig = path.join(rootpath,'tmp','mocha.json');

Expand All @@ -23,7 +23,6 @@ function MockApp(next) {
// Configuration - always start with default
var defaultConfig = path.join(rootpath, 'test', 'helpers', 'defaultConfig.json');


var statusMsg = '\r\nBase path: '.grey + rootpath.cyan + '\r\nUsing config: '.grey + defaultConfig.cyan + '\r\nIn environment: '.grey + (process.env.NODE_ENV || 'development').cyan;
if(!process.env.CALIPSO_COV) console.log(statusMsg);

Expand Down
182 changes: 0 additions & 182 deletions test/lib.core.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions test/lib.core.storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ var should = require('should'),
describe('Storage', function(){

before(function(done) {
// Initialise calipso, set installed to false
calipsoHelper.calipso.loaded.should.equal(true);
done();
});

Expand Down

0 comments on commit 312d904

Please sign in to comment.