cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject [1/2] webworks commit: CB-6440 Remove scripts/lib dir
Date Sun, 13 Apr 2014 01:41:22 GMT
Repository: cordova-blackberry
Updated Branches:
  refs/heads/master 942b81e70 -> 5967290ab


CB-6440 Remove scripts/lib dir


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/47a79d63
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/47a79d63
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/47a79d63

Branch: refs/heads/master
Commit: 47a79d63c2f257c7770c55439d238308738c9213
Parents: 942b81e
Author: Bryan Higgins <bhiggins@blackberry.com>
Authored: Sat Apr 12 21:29:20 2014 -0400
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Sat Apr 12 21:29:20 2014 -0400

----------------------------------------------------------------------
 blackberry10/scripts/lib/conf.js  |  21 ------
 blackberry10/scripts/lib/utils.js | 127 ---------------------------------
 blackberry10/scripts/test.js      |   1 -
 3 files changed, 149 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/47a79d63/blackberry10/scripts/lib/conf.js
----------------------------------------------------------------------
diff --git a/blackberry10/scripts/lib/conf.js b/blackberry10/scripts/lib/conf.js
deleted file mode 100644
index 625964d..0000000
--- a/blackberry10/scripts/lib/conf.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-* Copyright 2011 Research In Motion Limited.
-*
-* 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.
-*/
-var path = require("path");
-
-module.exports = {
-    ROOT: path.normalize(__dirname + "/../../"),
-    TEMP: path.normalize(__dirname + "/../../temp/"),
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/47a79d63/blackberry10/scripts/lib/utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/scripts/lib/utils.js b/blackberry10/scripts/lib/utils.js
deleted file mode 100644
index 28624a8..0000000
--- a/blackberry10/scripts/lib/utils.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-* Copyright 2011 Research In Motion Limited.
-*
-* 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.
-*/
-var os = require("os"),
-    fs = require('fs'),
-    wrench = require("wrench"),
-    path = require('path'),
-    childProcess = require("child_process");
-
-module.exports = {
-    isWindows : function () {
-        return os.type().toLowerCase().indexOf("windows") >= 0;
-    },
-
-    copyFile: function (srcFile, destDir, baseDir, shouldNotOverwrite) {
-        var filename = path.basename(srcFile),
-            fileBuffer,
-            fileLocation = path.join(destDir, filename);
-
-        //if a base directory was provided, determine
-        //folder structure from the relative path of the base folder
-        if (baseDir && srcFile.indexOf(baseDir) === 0) {
-            fileLocation = srcFile.replace(baseDir, destDir);
-            wrench.mkdirSyncRecursive(path.dirname(fileLocation), "0755");
-        }
-
-        //By default we should copy
-        //ONLY if we should NOT overwrite && the file exists will we skip copying
-        if (!shouldNotOverwrite || !path.existsSync(fileLocation)) {
-            fileBuffer = fs.readFileSync(srcFile);
-            fs.writeFileSync(fileLocation, fileBuffer);
-        }
-
-    },
-
-    listFiles: function (directory, filter) {
-        var files = wrench.readdirSyncRecursive(directory),
-            filteredFiles = [];
-
-        files.forEach(function (file) {
-            //On mac wrench.readdirSyncRecursive does not return absolute paths, so resolve
one.
-            file = path.resolve(directory, file);
-
-            if (filter(file)) {
-                filteredFiles.push(file);
-            }
-        });
-
-        return filteredFiles;
-    },
-
-    arrayContains: function (array, obj) {
-        var i = array.length;
-        while (i--) {
-            if (array[i] === obj) {
-                return true;
-            }
-        }
-        return false;
-    },
-
-    isValidIPAddress: function (ip) {
-        var regex = new RegExp("(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
-        return regex.test(ip);
-    },
-
-    trim: function (str) {
-        return str.replace(/^\s+|\s+$/g, "");
-    },
-
-    displayOutput: function (data) {
-        data = data.replace(/^\s+|\s+$/g, "");
-        if (data !== "") {
-            console.log(data);
-        }
-    },
-
-    execCommandWithJWorkflow: function (command, options, neverDrop) {
-        var displayOutput = this.displayOutput;
-        return function (prev, baton) {
-            baton.take();
-            console.log("EXECUTING " + command);
-            options = options || {};
-            options.maxBuffer = 1024 * 1024;
-            var c = childProcess.exec(command, options, function (error, stdout, stderr)
{
-                if (error && !neverDrop) {
-                    baton.drop(error.code);
-                } else {
-                    baton.pass(prev);
-                }
-            });
-
-            c.stdout.on('data', function (data) {
-                displayOutput(data);
-            });
-
-            c.stderr.on('data', function (data) {
-                displayOutput(data);
-            });
-        };
-    },
-
-    copyFolder: function (source, destination) {
-        //create the destination folder if it does not exist
-        if (!path.existsSync(destination)) {
-            wrench.mkdirSyncRecursive(destination, "0755");
-        }
-
-        wrench.copyDirSyncRecursive(source, destination);
-    },
-
-    isDirectory: function (source) {
-        return fs.statSync(source).isDirectory();
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/47a79d63/blackberry10/scripts/test.js
----------------------------------------------------------------------
diff --git a/blackberry10/scripts/test.js b/blackberry10/scripts/test.js
index a50e34e..5f44c5b 100644
--- a/blackberry10/scripts/test.js
+++ b/blackberry10/scripts/test.js
@@ -17,7 +17,6 @@
 module.exports = function (done, custom) {
     var jasmine = require('jasmine-node'),
         fs = require('fs'),
-        utils = require('./lib/utils'),
         specs = (custom !== null && fs.existsSync(custom)) ? [custom]  :
             [
                 "framework/test",


Mime
View raw message