From ae97126b32d956242c9b022a97ff14bc8dcc2689 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 29 May 2018 17:04:28 +0200 Subject: [PATCH] Grabbing config and files from github eliminated --- Server/BotsScripts.js | 5 +---- Server/CloudScripts.js | 5 +---- Server/ConfigReader.js | 5 +---- server.js | 12 +++--------- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/Server/BotsScripts.js b/Server/BotsScripts.js index ce25ee1b5..675644152 100644 --- a/Server/BotsScripts.js +++ b/Server/BotsScripts.js @@ -12,7 +12,6 @@ let storage = STORAGE.newStorage(); let serverConfig; - let githubData; let storageData; let fileSystemData; let ecosystem; @@ -20,16 +19,14 @@ return thisObject; - function initialize(pEcosystem, pEcosystemObject, pServerConfig, pGithubData, pStorageData, pFileSystemData, callBackFunction) { + function initialize(pEcosystem, pEcosystemObject, pServerConfig, pStorageData, pFileSystemData, callBackFunction) { serverConfig = pServerConfig; - githubData = pGithubData; fileSystemData = pFileSystemData; storageData = pStorageData; ecosystem = pEcosystem; ecosystemObject = pEcosystemObject; - github.initialize(githubData); storage.initialize(storageData, serverConfig); callBackFunction(); diff --git a/Server/CloudScripts.js b/Server/CloudScripts.js index 60a44e7a1..2d54844ce 100644 --- a/Server/CloudScripts.js +++ b/Server/CloudScripts.js @@ -12,7 +12,6 @@ let storage = STORAGE.newStorage(); let serverConfig; - let githubData; let storageData; let fileSystemData; let ecosystem; @@ -20,16 +19,14 @@ return thisObject; - function initialize(pEcosystem, pEcosystemObject, pServerConfig, pGithubData, pStorageData, pFileSystemData, callBackFunction) { + function initialize(pEcosystem, pEcosystemObject, pServerConfig, pStorageData, pFileSystemData, callBackFunction) { serverConfig = pServerConfig; - githubData = pGithubData; fileSystemData = pFileSystemData; storageData = pStorageData; ecosystem = pEcosystem; ecosystemObject = pEcosystemObject; - github.initialize(githubData); storage.initialize(storageData, serverConfig); callBackFunction(); diff --git a/Server/ConfigReader.js b/Server/ConfigReader.js index 02db9727e..dd9d9dec9 100644 --- a/Server/ConfigReader.js +++ b/Server/ConfigReader.js @@ -12,17 +12,15 @@ let storage = STORAGE.newStorage(); let serverConfig; - let githubData; let storageData; let ecosystem; let ecosystemObject; return thisObject; - function initialize(pEcosystem, pEcosystemObject, pServerConfig, pGithubData, pStorageData, callBackFunction) { + function initialize(pEcosystem, pEcosystemObject, pServerConfig, pStorageData, callBackFunction) { serverConfig = pServerConfig; - githubData = pGithubData; storageData = pStorageData; ecosystem = pEcosystem; ecosystemObject = pEcosystemObject; @@ -60,7 +58,6 @@ /* Finalize initializations. */ - github.initialize(githubData); storage.initialize(storageData, serverConfig); callBackFunction(serverConfig); diff --git a/server.js b/server.js index 62756f3bd..f020d50ae 100644 --- a/server.js +++ b/server.js @@ -32,7 +32,6 @@ global.CUSTOM_FAIL_RESPONSE = { message: "Custom Message" }; -let githubData = new Map; let storageData = new Map; let fileSystemData = new Map; @@ -47,9 +46,6 @@ let port = process.env.PORT || 1337; let isHttpServerStarted = false; -const GITHUB = require('./Server/Github'); -let github = GITHUB.newGithub(); - const STORAGE = require('./Server/Storage'); let storage = STORAGE.newStorage(); @@ -61,14 +57,13 @@ function initialize() { /* Clear all cached information. */ - githubData = new Map; storageData = new Map; fileSystemData = new Map; const CONFIG_READER = require('./Server/ConfigReader'); let configReader = CONFIG_READER.newConfigReader(); - configReader.initialize(ecosystem, ecosystemObject, serverConfig, githubData, storageData, onInitialized); + configReader.initialize(ecosystem, ecosystemObject, serverConfig, storageData, onInitialized); function onInitialized(pServerConfig) { @@ -81,13 +76,12 @@ function initialize() { ecosystem = pEcosystem; ecosystemObject = pEcosystemObject; - github.initialize(githubData); storage.initialize(storageData, serverConfig) const CLOUD_SCRIPTS = require('./Server/CloudScripts'); let cloudScripts = CLOUD_SCRIPTS.newCloudScripts(); - cloudScripts.initialize(ecosystem, ecosystemObject, serverConfig, githubData, storageData, fileSystemData, onInitialized); + cloudScripts.initialize(ecosystem, ecosystemObject, serverConfig, storageData, fileSystemData, onInitialized); function onInitialized() { @@ -105,7 +99,7 @@ function initialize() { const BOT_SCRIPTS = require('./Server/BotsScripts'); let botScripts = BOT_SCRIPTS.newBotScripts(); - botScripts.initialize(ecosystem, ecosystemObject, serverConfig, githubData, storageData, fileSystemData, onInitialized); + botScripts.initialize(ecosystem, ecosystemObject, serverConfig, storageData, fileSystemData, onInitialized); function onInitialized() {