Fix ecosystem loading

This commit is contained in:
Girish Ramakrishnan 2015-07-27 13:31:50 -07:00
parent 9e23339346
commit 964e688ac8
2 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,7 @@
'use strict';
var path = require('path');
var path = require('path'),
safe = require('safetydance');
exports = module.exports = {
TESTAPP_ID: 'io.cloudron.testapp',
@ -13,11 +14,9 @@ exports = module.exports = {
};
var gNow = ((new Date()).getTime() / 1000).toFixed();
var gEcosystem = null;
try {
gEcosystem = require(path.join(__dirname, '../keys/appstore/ecosystem-staging.json'));
} catch (e) {
}
var gEcosystem = safe.require(path.join(__dirname, '../keys/ci/ecosystem-prod.json'));
console.dir(gEcosystem);
function cloudronDomain(filename) {
return 't-' + path.basename(filename, '-test.js') + '-' + gNow + '.smartserver.io';
@ -33,12 +32,12 @@ function verifyResponse(res, errorMessage) {
function getOwner() {
return {
username: process.env.APPSTORE_USERNAME || gEcosystem.APPSTORE_USERNAME,
password: process.env.APPSTORE_PASSWORD || gEcosystem.APPSTORE_PASSWORD,
email: process.env.APPSTORE_EMAIL || gEcosystem.APPSTORE_EMAIL
username: process.env.APPSTORE_USERNAME || gEcosystem.env.APPSTORE_USERNAME,
password: process.env.APPSTORE_PASSWORD || gEcosystem.env.APPSTORE_PASSWORD,
email: process.env.APPSTORE_EMAIL || gEcosystem.env.APPSTORE_EMAIL
};
}
function stripeSecret() {
return process.env.STRIPE_SECRET;
return process.env.STRIPE_SECRET || gEcosystem.env.STRIPE_SECRET;
}

View File

@ -23,6 +23,7 @@
"parallel-mocha": "0.0.7",
"postmark": "^1.0.0",
"readline-sync": "^1.2.19",
"safetydance": "0.0.17",
"semver": "^4.3.6",
"should": "^6.0.3",
"sleep": "^2.0.0",