You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/10/07 13:10:45 UTC

cordova-lib git commit: CB-9598 Fixies broken require calls that aren't covered by tests

Repository: cordova-lib
Updated Branches:
  refs/heads/master 3e3d4c60b -> cc1ab409f


CB-9598 Fixies broken require calls that aren't covered by tests


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

Branch: refs/heads/master
Commit: cc1ab409f64e16a06b5b495dd7b5bdfac37acda7
Parents: 3e3d4c6
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Wed Oct 7 14:10:52 2015 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Wed Oct 7 14:10:52 2015 +0300

----------------------------------------------------------------------
 .../src/plugman/platforms/amazon-fireos.js      |   2 +-
 cordova-lib/src/plugman/platforms/browser.js    | 192 +++++++++----------
 cordova-lib/src/plugman/platforms/ubuntu.js     |   2 +-
 cordova-lib/src/plugman/platforms/webos.js      |   2 +-
 4 files changed, 99 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc1ab409/cordova-lib/src/plugman/platforms/amazon-fireos.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/amazon-fireos.js b/cordova-lib/src/plugman/platforms/amazon-fireos.js
index a38d087..d994474 100644
--- a/cordova-lib/src/plugman/platforms/amazon-fireos.js
+++ b/cordova-lib/src/plugman/platforms/amazon-fireos.js
@@ -22,7 +22,7 @@
 var path = require('path')
    , common = require('./common')
    , events = require('cordova-common').events
-   , xml_helpers = require(path.join(__dirname, '..', '..', 'util', 'xml-helpers'))
+   , xml_helpers = require('cordova-common').xmlHelpers
    , properties_parser = require('properties-parser')
    , android_project = require('../util/android-project')
    , CordovaError = require('cordova-common').CordovaError

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc1ab409/cordova-lib/src/plugman/platforms/browser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/browser.js b/cordova-lib/src/plugman/platforms/browser.js
index 9a7e5e4..b9cb54f 100644
--- a/cordova-lib/src/plugman/platforms/browser.js
+++ b/cordova-lib/src/plugman/platforms/browser.js
@@ -1,96 +1,96 @@
-/**
-    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.
-*/
-
-/* jshint laxcomma:true, sub:true */
-
-var path = require('path')
-    , fs = require('fs')
-    , common = require('./common')
-    , events = require('cordova-common').events
-    , xml_helpers = require(path.join(__dirname, '..', '..', 'util', 'xml-helpers'))
-    ;
-
-module.exports = {
-    www_dir: function(project_dir) {
-        return path.join(project_dir, 'www');
-    },
-    package_name:function(project_dir) {
-        // preferred location if cordova >= 3.4
-        var preferred_path = path.join(project_dir, 'config.xml');
-        var config_path;
-
-        if (!fs.existsSync(preferred_path)) {
-            // older location
-            var old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
-            if (!fs.existsSync(old_config_path)) {
-                // output newer location and fail reading
-                config_path = preferred_path;
-                events.emit('verbose', 'unable to find '+config_path);
-            } else {
-                config_path = old_config_path;
-            }
-        } else {
-            config_path = preferred_path;
-        }
-        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-        return widget_doc._root.attrib['id'];
-    },
-    'source-file':{
-        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
-            var dest = path.join(obj.targetDir, path.basename(obj.src));
-            common.copyFile(plugin_dir, obj.src, project_dir, dest);
-        },
-        uninstall:function(obj, project_dir, plugin_id, options) {
-            var dest = path.join(obj.targetDir, path.basename(obj.src));
-            common.removeFile(project_dir, dest);
-        }
-    },
-    'header-file': {
-        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
-            events.emit('verbose', 'header-fileinstall is not supported for browser');
-        },
-        uninstall:function(obj, project_dir, plugin_id, options) {
-            events.emit('verbose', 'header-file.uninstall is not supported for browser');
-        }
-    },
-    'resource-file':{
-        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
-            events.emit('verbose', 'resource-file.install is not supported for browser');
-        },
-        uninstall:function(obj, project_dir, plugin_id, options) {
-            events.emit('verbose', 'resource-file.uninstall is not supported for browser');
-        }
-    },
-    'framework': {
-        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
-            events.emit('verbose', 'framework.install is not supported for browser');
-        },
-        uninstall:function(obj, project_dir, plugin_id, options) {
-            events.emit('verbose', 'framework.uninstall is not supported for browser');
-        }
-    },
-    'lib-file': {
-        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
-            events.emit('verbose', 'lib-file.install is not supported for browser');
-        },
-        uninstall:function(obj, project_dir, plugin_id, options) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for browser');
-        }
-    }
-};
+/**
+    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.
+*/
+
+/* jshint laxcomma:true, sub:true */
+
+var path = require('path')
+    , fs = require('fs')
+    , common = require('./common')
+    , events = require('cordova-common').events
+    , xml_helpers = require('cordova-common').xmlHelpers
+    ;
+
+module.exports = {
+    www_dir: function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        // preferred location if cordova >= 3.4
+        var preferred_path = path.join(project_dir, 'config.xml');
+        var config_path;
+
+        if (!fs.existsSync(preferred_path)) {
+            // older location
+            var old_config_path = path.join(module.exports.www_dir(project_dir), 'config.xml');
+            if (!fs.existsSync(old_config_path)) {
+                // output newer location and fail reading
+                config_path = preferred_path;
+                events.emit('verbose', 'unable to find '+config_path);
+            } else {
+                config_path = old_config_path;
+            }
+        } else {
+            config_path = preferred_path;
+        }
+        var widget_doc = xml_helpers.parseElementtreeSync(config_path);
+        return widget_doc._root.attrib['id'];
+    },
+    'source-file':{
+        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
+            var dest = path.join(obj.targetDir, path.basename(obj.src));
+            common.copyFile(plugin_dir, obj.src, project_dir, dest);
+        },
+        uninstall:function(obj, project_dir, plugin_id, options) {
+            var dest = path.join(obj.targetDir, path.basename(obj.src));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    'header-file': {
+        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
+            events.emit('verbose', 'header-fileinstall is not supported for browser');
+        },
+        uninstall:function(obj, project_dir, plugin_id, options) {
+            events.emit('verbose', 'header-file.uninstall is not supported for browser');
+        }
+    },
+    'resource-file':{
+        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
+            events.emit('verbose', 'resource-file.install is not supported for browser');
+        },
+        uninstall:function(obj, project_dir, plugin_id, options) {
+            events.emit('verbose', 'resource-file.uninstall is not supported for browser');
+        }
+    },
+    'framework': {
+        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
+            events.emit('verbose', 'framework.install is not supported for browser');
+        },
+        uninstall:function(obj, project_dir, plugin_id, options) {
+            events.emit('verbose', 'framework.uninstall is not supported for browser');
+        }
+    },
+    'lib-file': {
+        install:function(obj, plugin_dir, project_dir, plugin_id, options) {
+            events.emit('verbose', 'lib-file.install is not supported for browser');
+        },
+        uninstall:function(obj, project_dir, plugin_id, options) {
+            events.emit('verbose', 'lib-file.uninstall is not supported for browser');
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc1ab409/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js b/cordova-lib/src/plugman/platforms/ubuntu.js
index d3db7ae..acf3212 100644
--- a/cordova-lib/src/plugman/platforms/ubuntu.js
+++ b/cordova-lib/src/plugman/platforms/ubuntu.js
@@ -34,7 +34,7 @@ var shell = require('shelljs')
    , path = require('path')
    , common = require('./common')
    , events = require('cordova-common').events
-   , xml_helpers = require(path.join(__dirname, '..', '..', 'util', 'xml-helpers'));
+   , xml_helpers = require('cordova-common').xmlHelpers;
 
 module.exports = {
     www_dir:function(project_dir) {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc1ab409/cordova-lib/src/plugman/platforms/webos.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/webos.js b/cordova-lib/src/plugman/platforms/webos.js
index 2f91a49..ca2f94b 100755
--- a/cordova-lib/src/plugman/platforms/webos.js
+++ b/cordova-lib/src/plugman/platforms/webos.js
@@ -26,7 +26,7 @@ var path = require('path')
     , fs = require('fs')
     , common = require('./common')
     , events = require('cordova-common').events
-    , xml_helpers = require(path.join(__dirname, '..', '..', 'util', 'xml-helpers'))
+    , xml_helpers = require('cordova-common').xmlHelpers
     ;
 
 module.exports = {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org