From e7e79f41a73a4527f2e1a00c8b669efa4a750e3a Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 21 Jul 2015 14:24:17 -0700 Subject: [PATCH 01/16] [Packaging] Create NPM Package Create NPM package for OpenMCTWeb. Includes scripts for hosting, running tests, and building documentation. --- .gitignore | 1 - jsdoc.json | 10 +++++++++ karma.conf.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 33 ++++++++++++++++++++++++++++++ test-main.js | 40 ++++++++++++++++++++++++++++++++++++ 5 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 jsdoc.json create mode 100644 karma.conf.js create mode 100644 package.json create mode 100644 test-main.js diff --git a/.gitignore b/.gitignore index 4c2c6ce8a0..3188d5fa38 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,3 @@ closed-lib # Node dependencies node_modules - diff --git a/jsdoc.json b/jsdoc.json new file mode 100644 index 0000000000..ed0fddcf31 --- /dev/null +++ b/jsdoc.json @@ -0,0 +1,10 @@ +{ + "source": { + "include": [ + "example/", + "platform/" + ], + "includePattern": "(example|platform)/.+\\.js$", + "excludePattern": ".+\\Spec\\.js$|lib/.+" + } +} \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000000..b47841019e --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,56 @@ +module.exports = function(config) { + config.set({ + + // Base path that will be used to resolve all file patterns. + basePath: '', + + // Frameworks to use + // Available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['jasmine', 'requirejs'], + + // List of files / patterns to load in the browser. + // By default, files are also included in a script tag. + files: [ + '**/moment*', + {pattern: 'example/**/*.js', included: false}, + {pattern: 'platform/**/*.js', included: false}, + {pattern: 'warp/**/*.js', included: false}, + 'test-main.js' + ], + + // List of files to exclude. + exclude: [ + 'platform/framework/src/Main.js' + ], + + // Preprocess matching files before serving them to the browser. + // https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: {}, + + // Test results reporter to use + // Possible values: 'dots', 'progress' + // Available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + // Web server port. + port: 9876, + + // Wnable / disable colors in the output (reporters and logs). + colors: true, + + logLevel: config.LOG_INFO, + + // Rerun tests when any file changes. + autoWatch: true, + + // Specify browsers to run tests in. + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: [ + 'Chrome' + ], + + // Continuous Integration mode. + // If true, Karma captures browsers, runs the tests and exits. + singleRun: false + }); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000000..1216935f21 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "open-mct-web", + "version": "0.7.2", + "description": "The OpenMCTWeb core platform", + "dependencies": { + "express": "^4.13.1", + "minimist": "^1.1.1" + }, + "devDependencies": { + "jasmine-core": "^2.3.0", + "jsdoc": "^3.3.2", + "jshint": "^2.7.0", + "karma": "^0.12.31", + "karma-chrome-launcher": "^0.1.8", + "karma-cli": "0.0.4", + "karma-jasmine": "^0.1.5", + "karma-phantomjs-launcher": "^0.1.4", + "karma-requirejs": "^0.2.2", + "requirejs": "^2.1.17" + }, + "scripts": { + "start": "node app.js", + "test": "karma start --single-run", + "jshint": "jshint platform example || exit 0", + "jsdoc": "jsdoc -c jsdoc.json -r -d docs" + }, + "repository": { + "type": "git", + "url": "https://github.com/nasa/openmctweb.git" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/test-main.js b/test-main.js new file mode 100644 index 0000000000..d687656e68 --- /dev/null +++ b/test-main.js @@ -0,0 +1,40 @@ +var allTestFiles = []; +var TEST_REGEXP = /(Spec)\.js$/; + +var pathToModule = function(path) { + return path.replace(/^\/base\//, '').replace(/\.js$/, ''); +}; + +Object.keys(window.__karma__.files).forEach(function(file) { + if (TEST_REGEXP.test(file)) { + // Normalize paths to RequireJS module names. + allTestFiles.push(pathToModule(file)); + } +}); + +// We will be handling es6-promise loading with a shim. +allTestFiles.unshift('es6-promise'); + +require.config({ + // Karma serves files from the basePath defined in karma.conf.js + baseUrl: '/base', + + paths: { + 'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min', + 'moment-duration-format': 'warp/clock/lib/moment-duration-format' + }, + shim: { + 'es6-promise': { + init: function () { + console.log('I was inited!'); + window.Promise = window.Promise || ES6Promise.Promise; + } + } + }, + + // dynamically load all test files + deps: allTestFiles, + + // we have to kickoff jasmine, as it is asynchronous + callback: window.__karma__.start +}); From cb56bbe5695cd7410ae7e176d7cf58ebea37b620 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 21 Jul 2015 14:30:00 -0700 Subject: [PATCH 02/16] [Documentation] Fix JSDoc syntax errors --- platform/core/src/objects/DomainObject.js | 2 +- platform/framework/src/resolve/BundleResolver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/core/src/objects/DomainObject.js b/platform/core/src/objects/DomainObject.js index 7bc31666de..e3a10160a5 100644 --- a/platform/core/src/objects/DomainObject.js +++ b/platform/core/src/objects/DomainObject.js @@ -35,7 +35,7 @@ define( * * @param {string} id the object's unique identifier * @param {object} model the "JSONifiable" state of the object - * @param {Object.|function} capabilities all * capabilities to be exposed by this object * @constructor */ diff --git a/platform/framework/src/resolve/BundleResolver.js b/platform/framework/src/resolve/BundleResolver.js index d26ee60271..5c8216da94 100644 --- a/platform/framework/src/resolve/BundleResolver.js +++ b/platform/framework/src/resolve/BundleResolver.js @@ -45,7 +45,7 @@ define( * into one large object containing resolved extensions from * all bundles (in the same form.) * - * @param {Object.[]} resolvedBundles + * @param {Object.|Array} resolvedBundles * @returns {Object.} */ function mergeResolvedBundles(resolvedBundles) { From 808a79178ba10593deaad892e1ebd4e01d23f891 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 21 Jul 2015 14:34:40 -0700 Subject: [PATCH 03/16] [Continous] Build and publish documentation --- build-docs.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ circle.yml | 5 +++++ 2 files changed, 47 insertions(+) create mode 100755 build-docs.sh create mode 100644 circle.yml diff --git a/build-docs.sh b/build-docs.sh new file mode 100755 index 0000000000..510de0041d --- /dev/null +++ b/build-docs.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Script to build and deploy docs to github pages. + +# Any Content currently visible on the website will be replaced by +# this process. + +OUTPUT_DIRECTORY="docs" +REPOSITORY_URL="git@github.com:larkin/openmctweb.git" + +BUILD_SHA=`git rev-parse head` + +# A remote will be created for the git repository we are pushing to. +# Don't change the name. +REMOTE_NAME="documentation" +WEBSITE_BRANCH="gh-pages" + +# Configure github for CircleCI user. +git config --global user.email "buildbot@circleci.com" +git config --global user.name "BuildBot" + +# clean output directory +if [ -d $OUTPUT_DIRECTORY ]; then + rm -rf $OUTPUT_DIRECTORY || exit 1 +fi + +npm run-script jsdoc +cd $OUTPUT_DIRECTORY || exit 1 + +echo "git init" +git init +echo "git remote add $REMOTE_NAME $REPOSITORY_URL" +git remote add $REMOTE_NAME $REPOSITORY_URL +echo "git add ." +git add . +echo "git commit -m \"Generate docs from build $BUILD_SHA\"" +git commit -m "Generate docs from build $BUILD_SHA" + +echo "git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f" +git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f + +echo "Documentation pushed gh-pages branch." \ No newline at end of file diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000000..9981ef249a --- /dev/null +++ b/circle.yml @@ -0,0 +1,5 @@ +deployment: + production: + branch: continuous-deployment + commands: + - ./build-docs.sh From 19b0b1aa66b767e4579d2bd5fa43bd1f77023466 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 21 Jul 2015 17:27:17 -0700 Subject: [PATCH 04/16] [Continuous] Run via Procfile binds port --- Procfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000000..659947f3b8 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: node app.js --port $PORT \ No newline at end of file From 01a52b8af886ae91ff4003bb2ea62306a08dd300 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 21 Jul 2015 17:29:25 -0700 Subject: [PATCH 05/16] [Continuous] Deploy to heroku --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index 9981ef249a..36c7c9b0b8 100644 --- a/circle.yml +++ b/circle.yml @@ -3,3 +3,4 @@ deployment: branch: continuous-deployment commands: - ./build-docs.sh + - git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master From 919ef2f991edfb6f9a75e0d5a55ae22e0165ae82 Mon Sep 17 00:00:00 2001 From: larkin Date: Wed, 22 Jul 2015 10:58:28 -0700 Subject: [PATCH 06/16] [Persistence] Add localstorage persistence --- example/localstorage/bundle.json | 18 ++++++ .../src/LocalStoragePersistenceProvider.js | 62 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 example/localstorage/bundle.json create mode 100644 example/localstorage/src/LocalStoragePersistenceProvider.js diff --git a/example/localstorage/bundle.json b/example/localstorage/bundle.json new file mode 100644 index 0000000000..b164f9aaa9 --- /dev/null +++ b/example/localstorage/bundle.json @@ -0,0 +1,18 @@ +{ + "extensions": { + "components": [ + { + "provides": "persistenceService", + "type": "provider", + "implementation": "LocalStoragePersistenceProvider.js", + "depends": [ "$q", "PERSISTENCE_SPACE" ] + } + ], + "constants": [ + { + "key": "PERSISTENCE_SPACE", + "value": "mct" + } + ] + } +} \ No newline at end of file diff --git a/example/localstorage/src/LocalStoragePersistenceProvider.js b/example/localstorage/src/LocalStoragePersistenceProvider.js new file mode 100644 index 0000000000..b01e6a569b --- /dev/null +++ b/example/localstorage/src/LocalStoragePersistenceProvider.js @@ -0,0 +1,62 @@ +/** + * Stubbed implementation of a persistence provider, + * to permit objects to be created, saved, etc. + */ +define( + [], + function () { + 'use strict'; + + function BrowserPersistenceProvider($q, SPACE) { + var spaces = SPACE ? [SPACE] : [], + promises = { + as: function (value) { + return $q.when(value); + } + }; + + var setValue = function(key, value) { + localStorage[key] = JSON.stringify(value); + }; + + var getValue = function(key) { + if (localStorage[key]) { + return JSON.parse(localStorage[key]); + } + return {}; + }; + + var provider = { + listSpaces: function () { + return promises.as(spaces); + }, + listObjects: function (space) { + var space_obj = getValue(space); + return promises.as(Object.keys(space_obj)); + }, + createObject: function (space, key, value) { + var space_obj = getValue(space); + space_obj[key] = value; + setValue(space, space_obj); + return promises.as(true); + }, + readObject: function (space, key) { + var space_obj = getValue(space); + return promises.as(space_obj[key]); + }, + deleteObject: function (space, key, value) { + var space_obj = getValue(space); + delete space_obj[key]; + return promises.as(true); + } + }; + + provider.updateObject = provider.createObject; + + return provider; + + } + + return BrowserPersistenceProvider; + } +); From 0fde10a818f0716af3f5ef7956ad6bbafa2b3ca1 Mon Sep 17 00:00:00 2001 From: larkin Date: Wed, 22 Jul 2015 11:00:18 -0700 Subject: [PATCH 07/16] [Continuous] Procfile uses localstorage --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 659947f3b8..aa6094edfe 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: node app.js --port $PORT \ No newline at end of file +web: node app.js --port $PORT --include example/localstorage \ No newline at end of file From 12b8408bca9e9be926e4dedef2ca9d9a5a12e09b Mon Sep 17 00:00:00 2001 From: larkin Date: Wed, 22 Jul 2015 15:32:20 -0700 Subject: [PATCH 08/16] [Entanglement] Enable Entanglement --- bundles.json | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles.json b/bundles.json index f69e127eec..0b97f1abab 100644 --- a/bundles.json +++ b/bundles.json @@ -20,6 +20,7 @@ "platform/forms", "platform/persistence/queue", "platform/policy", + "platform/entanglement", "example/imagery", "example/persistence", From 3fe9170c7def84f1f39a7fdd0b062a2b2d516e95 Mon Sep 17 00:00:00 2001 From: larkin Date: Fri, 24 Jul 2015 15:34:26 -0700 Subject: [PATCH 09/16] [Gitignore] Ignore jsdoc output --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3188d5fa38..16b1dbfdac 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ closed-lib # Node dependencies node_modules + +# Build documentation +docs From ee34b74ca11ddc42d7ab1dc2026f0f000f5bdc06 Mon Sep 17 00:00:00 2001 From: larkin Date: Fri, 24 Jul 2015 16:21:15 -0700 Subject: [PATCH 10/16] [Style] Test config is JSLint approved --- karma.conf.js | 1 + test-main.js | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index b47841019e..c8a25ba2eb 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,3 +1,4 @@ +/*global module*/ module.exports = function(config) { config.set({ diff --git a/test-main.js b/test-main.js index d687656e68..141d216fc8 100644 --- a/test-main.js +++ b/test-main.js @@ -1,3 +1,4 @@ +/*global require,window*/ var allTestFiles = []; var TEST_REGEXP = /(Spec)\.js$/; @@ -12,7 +13,7 @@ Object.keys(window.__karma__.files).forEach(function(file) { } }); -// We will be handling es6-promise loading with a shim. +// Force es6-promise to load. allTestFiles.unshift('es6-promise'); require.config({ @@ -23,14 +24,6 @@ require.config({ 'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min', 'moment-duration-format': 'warp/clock/lib/moment-duration-format' }, - shim: { - 'es6-promise': { - init: function () { - console.log('I was inited!'); - window.Promise = window.Promise || ES6Promise.Promise; - } - } - }, // dynamically load all test files deps: allTestFiles, From 44ee21d61315eddaea1f75fa01be84e3187d989a Mon Sep 17 00:00:00 2001 From: larkin Date: Fri, 24 Jul 2015 16:41:10 -0700 Subject: [PATCH 11/16] [Continuous] Push docs to correct repository --- build-docs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index 510de0041d..bbb6d866af 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -2,11 +2,11 @@ # Script to build and deploy docs to github pages. -# Any Content currently visible on the website will be replaced by +# Any Content currently visible on the website will be replaced by # this process. OUTPUT_DIRECTORY="docs" -REPOSITORY_URL="git@github.com:larkin/openmctweb.git" +REPOSITORY_URL="git@github.com:nasa/openmctweb.git" BUILD_SHA=`git rev-parse head` From 09519cf6d47832447b2bce2dc212fe36554833a9 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Fri, 24 Jul 2015 17:07:49 -0700 Subject: [PATCH 12/16] [Continuous] Set commit author, fix grammar --- build-docs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index bbb6d866af..ae47035f41 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -16,8 +16,8 @@ REMOTE_NAME="documentation" WEBSITE_BRANCH="gh-pages" # Configure github for CircleCI user. -git config --global user.email "buildbot@circleci.com" -git config --global user.name "BuildBot" +git config user.email "buildbot@circleci.com" +git config user.name "BuildBot" # clean output directory if [ -d $OUTPUT_DIRECTORY ]; then @@ -39,4 +39,4 @@ git commit -m "Generate docs from build $BUILD_SHA" echo "git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f" git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f -echo "Documentation pushed gh-pages branch." \ No newline at end of file +echo "Documentation pushed to gh-pages branch." From 36ac5aa4de2e8f4e496d9a251f3dec16907487f5 Mon Sep 17 00:00:00 2001 From: larkin Date: Fri, 24 Jul 2015 16:47:31 -0700 Subject: [PATCH 13/16] [Style] JSLint compliance --- .../src/LocalStoragePersistenceProvider.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/example/localstorage/src/LocalStoragePersistenceProvider.js b/example/localstorage/src/LocalStoragePersistenceProvider.js index b01e6a569b..e8b1493b29 100644 --- a/example/localstorage/src/LocalStoragePersistenceProvider.js +++ b/example/localstorage/src/LocalStoragePersistenceProvider.js @@ -1,3 +1,4 @@ +/*global define,localStorage*/ /** * Stubbed implementation of a persistence provider, * to permit objects to be created, saved, etc. @@ -13,20 +14,21 @@ define( as: function (value) { return $q.when(value); } - }; + }, + provider; - var setValue = function(key, value) { + function setValue(key, value) { localStorage[key] = JSON.stringify(value); - }; + } - var getValue = function(key) { + function getValue(key) { if (localStorage[key]) { return JSON.parse(localStorage[key]); } return {}; - }; + } - var provider = { + provider = { listSpaces: function () { return promises.as(spaces); }, From 60cdc0eb6d73ed2af585d775cd74dd86cb9bc7c8 Mon Sep 17 00:00:00 2001 From: larkin Date: Fri, 24 Jul 2015 16:50:49 -0700 Subject: [PATCH 14/16] [Licensing] Add license header to applicable files --- build-docs.sh | 29 +++++++++++++++---- .../src/LocalStoragePersistenceProvider.js | 22 ++++++++++++++ karma.conf.js | 22 ++++++++++++++ test-main.js | 22 ++++++++++++++ 4 files changed, 90 insertions(+), 5 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index ae47035f41..a2494cb9bb 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -1,9 +1,28 @@ #!/bin/bash -# Script to build and deploy docs to github pages. +#***************************************************************************** +#* Open MCT Web, Copyright (c) 2014-2015, United States Government +#* as represented by the Administrator of the National Aeronautics and Space +#* Administration. All rights reserved. +#* +#* Open MCT Web is licensed under the Apache License, Version 2.0 (the +#* "License"); you may not use this file except in compliance with the License. +#* You may obtain a copy of the License at +#* http://www.apache.org/licenses/LICENSE-2.0. +#* +#* Unless required by applicable law or agreed to in writing, software +#* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +#* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +#* License for the specific language governing permissions and limitations +#* under the License. +#* +#* Open MCT Web includes source code licensed under additional open source +#* licenses. See the Open Source Licenses file (LICENSES.md) included with +#* this source code distribution or the Licensing information page available +#* at runtime from the About dialog for additional information. +#***************************************************************************** -# Any Content currently visible on the website will be replaced by -# this process. +# Script to build and deploy docs to github pages. OUTPUT_DIRECTORY="docs" REPOSITORY_URL="git@github.com:nasa/openmctweb.git" @@ -11,7 +30,7 @@ REPOSITORY_URL="git@github.com:nasa/openmctweb.git" BUILD_SHA=`git rev-parse head` # A remote will be created for the git repository we are pushing to. -# Don't change the name. +# Don't worry, as this entire directory will get trashed inbetween builds. REMOTE_NAME="documentation" WEBSITE_BRANCH="gh-pages" @@ -19,7 +38,7 @@ WEBSITE_BRANCH="gh-pages" git config user.email "buildbot@circleci.com" git config user.name "BuildBot" -# clean output directory +# Clean output directory, JSDOC will recreate if [ -d $OUTPUT_DIRECTORY ]; then rm -rf $OUTPUT_DIRECTORY || exit 1 fi diff --git a/example/localstorage/src/LocalStoragePersistenceProvider.js b/example/localstorage/src/LocalStoragePersistenceProvider.js index e8b1493b29..8a367ca333 100644 --- a/example/localstorage/src/LocalStoragePersistenceProvider.js +++ b/example/localstorage/src/LocalStoragePersistenceProvider.js @@ -1,3 +1,25 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT Web includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + /*global define,localStorage*/ /** * Stubbed implementation of a persistence provider, diff --git a/karma.conf.js b/karma.conf.js index c8a25ba2eb..47aa3f059b 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,3 +1,25 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT Web includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + /*global module*/ module.exports = function(config) { config.set({ diff --git a/test-main.js b/test-main.js index 141d216fc8..46740a93b2 100644 --- a/test-main.js +++ b/test-main.js @@ -1,3 +1,25 @@ +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT Web includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + /*global require,window*/ var allTestFiles = []; var TEST_REGEXP = /(Spec)\.js$/; From c6b0e4bf6f940c327fd4854a6b6f99112cf59ca1 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Fri, 24 Jul 2015 17:13:19 -0700 Subject: [PATCH 15/16] [Continuous] Set author after repo is initialized --- build-docs.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index a2494cb9bb..dd62c5ec41 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -34,10 +34,6 @@ BUILD_SHA=`git rev-parse head` REMOTE_NAME="documentation" WEBSITE_BRANCH="gh-pages" -# Configure github for CircleCI user. -git config user.email "buildbot@circleci.com" -git config user.name "BuildBot" - # Clean output directory, JSDOC will recreate if [ -d $OUTPUT_DIRECTORY ]; then rm -rf $OUTPUT_DIRECTORY || exit 1 @@ -48,6 +44,11 @@ cd $OUTPUT_DIRECTORY || exit 1 echo "git init" git init + +# Configure github for CircleCI user. +git config user.email "buildbot@circleci.com" +git config user.name "BuildBot" + echo "git remote add $REMOTE_NAME $REPOSITORY_URL" git remote add $REMOTE_NAME $REPOSITORY_URL echo "git add ." From e639d9ba8fc0e29f79ffeea657af0aee0badc080 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Fri, 24 Jul 2015 17:32:49 -0700 Subject: [PATCH 16/16] [Continuous] Only deploy from master branch --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 36c7c9b0b8..b8f367a604 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ deployment: production: - branch: continuous-deployment + branch: master commands: - ./build-docs.sh - git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master