You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2018/06/13 20:47:35 UTC

nifi-registry git commit: [NIFIREG-175] remove unused files and unessecary header from karma-test-shim.js [NIFIREG-175] update rat excludes This closes #126

Repository: nifi-registry
Updated Branches:
  refs/heads/master 646b8dc86 -> 78ef4cab2


[NIFIREG-175] remove unused files and unessecary header from karma-test-shim.js
[NIFIREG-175] update rat excludes
This closes #126


Project: http://git-wip-us.apache.org/repos/asf/nifi-registry/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-registry/commit/78ef4cab
Tree: http://git-wip-us.apache.org/repos/asf/nifi-registry/tree/78ef4cab
Diff: http://git-wip-us.apache.org/repos/asf/nifi-registry/diff/78ef4cab

Branch: refs/heads/master
Commit: 78ef4cab254cbe46dbec05583a6f57576f4213a2
Parents: 646b8dc
Author: Scott Aslan <sc...@gmail.com>
Authored: Wed Jun 13 14:58:10 2018 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Jun 13 16:45:54 2018 -0400

----------------------------------------------------------------------
 LICENSE                                         |   2 +-
 nifi-registry-web-ui/pom.xml                    |   2 +
 .../src/main/frontend/karma-test-shim.js        |  19 +-
 .../src/main/frontend/package.json              |   1 -
 .../src/main/frontend/protractor.config.js      | 201 -------------------
 .../src/main/webapp/systemjs.config.extras.js   |  27 ---
 6 files changed, 4 insertions(+), 248 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/78ef4cab/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index f259b82..01efe99 100644
--- a/LICENSE
+++ b/LICENSE
@@ -201,7 +201,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
-This product bundles 'Angular Quickstart' which is available under an MIT license.
+This product bundles karma-test-shim.js and systemjs-angular-loader.js from 'Angular Quickstart' which is available under an MIT license.
 
     Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
 

http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/78ef4cab/nifi-registry-web-ui/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-registry-web-ui/pom.xml b/nifi-registry-web-ui/pom.xml
index 5f09240..f4a0bea 100644
--- a/nifi-registry-web-ui/pom.xml
+++ b/nifi-registry-web-ui/pom.xml
@@ -411,6 +411,8 @@
                         <exclude>src/main/frontend/package.json</exclude>
                         <exclude>src/main/frontend/package-lock.json</exclude>
                         <exclude>src/main/platform/core/README.md</exclude>
+                        <exclude>src/main/frontend/karma-test-shim.js</exclude>
+                        <exclude>src/main/webapp/systemjs-angular-loader.js</exclude>
                     </excludes>
                 </configuration>
             </plugin>

http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/78ef4cab/nifi-registry-web-ui/src/main/frontend/karma-test-shim.js
----------------------------------------------------------------------
diff --git a/nifi-registry-web-ui/src/main/frontend/karma-test-shim.js b/nifi-registry-web-ui/src/main/frontend/karma-test-shim.js
index d0a524d..8b27f94 100644
--- a/nifi-registry-web-ui/src/main/frontend/karma-test-shim.js
+++ b/nifi-registry-web-ui/src/main/frontend/karma-test-shim.js
@@ -1,20 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-
 // /*global jasmine, __karma__, window*/
 Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing.
 
@@ -77,7 +60,7 @@ System.import('webapp/systemjs.spec.config.js')
 
 /** Optional SystemJS configuration extras. Keep going w/o it */
 function importSystemJsExtras() {
-    return System.import('webapp/systemjs.config.extras.js')
+    return System.import('systemjs.config.extras.js')
         .catch(function (reason) {
             console.log(
                 'Warning: System.import could not load the optional "systemjs.config.extras.js". Did you omit it by accident? Continuing without it.'

http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/78ef4cab/nifi-registry-web-ui/src/main/frontend/package.json
----------------------------------------------------------------------
diff --git a/nifi-registry-web-ui/src/main/frontend/package.json b/nifi-registry-web-ui/src/main/frontend/package.json
index ee60590..8964397 100644
--- a/nifi-registry-web-ui/src/main/frontend/package.json
+++ b/nifi-registry-web-ui/src/main/frontend/package.json
@@ -3,7 +3,6 @@
   "version": "0.0.1",
   "description": "",
   "scripts": {
-    "protractor": "protractor protractor.config.js",
     "test": "./node_modules/protractor/bin/webdriver-manager update --gecko false && karma start karma.conf.js --single-run",
     "test:dev": "./node_modules/protractor/bin/webdriver-manager update --gecko false && karma start karma.conf.js"
   },

http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/78ef4cab/nifi-registry-web-ui/src/main/frontend/protractor.config.js
----------------------------------------------------------------------
diff --git a/nifi-registry-web-ui/src/main/frontend/protractor.config.js b/nifi-registry-web-ui/src/main/frontend/protractor.config.js
deleted file mode 100644
index d3604cc..0000000
--- a/nifi-registry-web-ui/src/main/frontend/protractor.config.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-
-var fs = require('fs');
-var path = require('canonical-path');
-var _ = require('lodash');
-
-exports.config = {
-    directConnect: true,
-
-    // Capabilities to be passed to the webdriver instance.
-    capabilities: {
-        'browserName': 'chrome'
-    },
-
-    // Framework to use. Jasmine is recommended.
-    framework: 'jasmine',
-
-    // Spec patterns are relative to this config file
-    specs: ['**/*e2e-spec.js'],
-
-    // For angular tests
-    useAllAngular2AppRoots: true,
-
-    // Base URL for application server
-    baseUrl: 'http://localhost:18080/nifi-registry',
-
-    // See https://github.com/angular/protractor/blob/master/docs/server-setup.md for the various protractor
-    // browser driver setup. Here we directly use Chrome or Firefox drivers. If Chrome or Firefox are not
-    // available an error will be thrown and a Selenium Server needs to be installed and started.
-    directConnect: true,
-
-    //OR
-
-    // The address of a running selenium server.
-    // seleniumAddress: 'http://localhost:4444/wd/hub',
-
-    // OR
-
-    // The location of the selenium standalone server .jar file, relative
-    // to the location of this config. If no other method of starting selenium
-    // is found, this will default to
-    // node_modules/protractor/selenium/selenium-server...
-    // seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.41.0.jar',
-
-    // The port to start the selenium server on, or null if the server should
-    // find its own unused port.
-    // seleniumPort: 4444,
-
-    onPrepare: function () {
-        // debugging
-        console.log('browser.params:' + JSON.stringify(browser.params));
-        jasmine.getEnv().addReporter(new Reporter(browser.params));
-
-        // Allow changing bootstrap mode to NG1 for upgrade tests
-        global.setProtractorToNg1Mode = function () {
-            browser.useAllAngular2AppRoots = false;
-            browser.rootEl = 'body';
-        };
-    },
-
-    jasmineNodeOpts: {
-        defaultTimeoutInterval: 10000,
-        showTiming: true,
-        print: function () {
-        }
-    }
-};
-
-// Custom reporter
-function Reporter(options) {
-    var _defaultOutputFile = path.resolve(process.cwd(), './_test-output', 'protractor-results.txt');
-    options.outputFile = options.outputFile || _defaultOutputFile;
-
-    initOutputFile(options.outputFile);
-    options.appDir = options.appDir || './';
-    var _root = {appDir: options.appDir, suites: []};
-    log('AppDir: ' + options.appDir, +1);
-    var _currentSuite;
-
-    this.suiteStarted = function (suite) {
-        _currentSuite = {description: suite.description, status: null, specs: []};
-        _root.suites.push(_currentSuite);
-        log('Suite: ' + suite.description, +1);
-    };
-
-    this.suiteDone = function (suite) {
-        var statuses = _currentSuite.specs.map(function (spec) {
-            return spec.status;
-        });
-        statuses = _.uniq(statuses);
-        var status = statuses.indexOf('failed') >= 0 ? 'failed' : statuses.join(', ');
-        _currentSuite.status = status;
-        log('Suite ' + _currentSuite.status + ': ' + suite.description, -1);
-    };
-
-    this.specStarted = function (spec) {
-
-    };
-
-    this.specDone = function (spec) {
-        var currentSpec = {
-            description: spec.description,
-            status: spec.status
-        };
-        if (spec.failedExpectations.length > 0) {
-            currentSpec.failedExpectations = spec.failedExpectations;
-        }
-
-        _currentSuite.specs.push(currentSpec);
-        log(spec.status + ' - ' + spec.description);
-    };
-
-    this.jasmineDone = function () {
-        outputFile = options.outputFile;
-        //// Alternate approach - just stringify the _root - not as pretty
-        //// but might be more useful for automation.
-        // var output = JSON.stringify(_root, null, 2);
-        var output = formatOutput(_root);
-        fs.appendFileSync(outputFile, output);
-    };
-
-    function ensureDirectoryExistence(filePath) {
-        var dirname = path.dirname(filePath);
-        if (directoryExists(dirname)) {
-            return true;
-        }
-        ensureDirectoryExistence(dirname);
-        fs.mkdirSync(dirname);
-    }
-
-    function directoryExists(path) {
-        try {
-            return fs.statSync(path).isDirectory();
-        }
-        catch (err) {
-            return false;
-        }
-    }
-
-    function initOutputFile(outputFile) {
-        ensureDirectoryExistence(outputFile);
-        var header = "Protractor results for: " + (new Date()).toLocaleString() + "\n\n";
-        fs.writeFileSync(outputFile, header);
-    }
-
-    // for output file output
-    function formatOutput(output) {
-        var indent = '  ';
-        var pad = '  ';
-        var results = [];
-        results.push('AppDir:' + output.appDir);
-        output.suites.forEach(function (suite) {
-            results.push(pad + 'Suite: ' + suite.description + ' -- ' + suite.status);
-            pad += indent;
-            suite.specs.forEach(function (spec) {
-                results.push(pad + spec.status + ' - ' + spec.description);
-                if (spec.failedExpectations) {
-                    pad += indent;
-                    spec.failedExpectations.forEach(function (fe) {
-                        results.push(pad + 'message: ' + fe.message);
-                    });
-                    pad = pad.substr(2);
-                }
-            });
-            pad = pad.substr(2);
-            results.push('');
-        });
-        results.push('');
-        return results.join('\n');
-    }
-
-    // for console output
-    var _pad;
-
-    function log(str, indent) {
-        _pad = _pad || '';
-        if (indent == -1) {
-            _pad = _pad.substr(2);
-        }
-        console.log(_pad + str);
-        if (indent == 1) {
-            _pad = _pad + '  ';
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/78ef4cab/nifi-registry-web-ui/src/main/webapp/systemjs.config.extras.js
----------------------------------------------------------------------
diff --git a/nifi-registry-web-ui/src/main/webapp/systemjs.config.extras.js b/nifi-registry-web-ui/src/main/webapp/systemjs.config.extras.js
deleted file mode 100644
index e2a256a..0000000
--- a/nifi-registry-web-ui/src/main/webapp/systemjs.config.extras.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-
-/**
- * Add barrels and stuff
- */
-(function (global) {
-    System.config({
-        packages: {
-            // add packages here
-        }
-    });
-})(this);