Updated Branches:
  refs/heads/master 0e5abe816 -> b414d28ba

minor tweaks to common specs


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

Branch: refs/heads/master
Commit: b414d28ba55c4327a01dc6c21514999cc5d0f1a4
Parents: 0e5abe8
Author: Fil Maj <[email protected]>
Authored: Wed Apr 24 16:16:43 2013 -0700
Committer: Fil Maj <[email protected]>
Committed: Wed Apr 24 16:16:43 2013 -0700

----------------------------------------------------------------------
 spec/platforms/common.spec.js |    6 ++++--
 src/platforms/ios.js          |    3 +--
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b414d28b/spec/platforms/common.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/common.spec.js b/spec/platforms/common.spec.js
index a09fd4c..337d9b4 100644
--- a/spec/platforms/common.spec.js
+++ b/spec/platforms/common.spec.js
@@ -35,7 +35,9 @@ describe('common platform handler', function() {
         
         it('should not throw if path exists', function(){
             shell.mkdir('-p', test_dir);
-            expect(function(){common.resolveSrcPath(test_dir)}).not.toThrow();
+            var target = path.join(test_dir, 'somefile');
+            fs.writeFileSync(target, '80085', 'utf-8');
+            expect(function(){common.resolveSrcPath(test_dir, 
'somefile')}).not.toThrow();
             shell.rm('-rf', test_dir);
         });
     });
@@ -48,7 +50,7 @@ describe('common platform handler', function() {
         });
         
         it('should not throw if path cannot be resolved', function(){
-            
expect(function(){common.resolveTargetPath(test_dir)}).not.toThrow();
+            expect(function(){common.resolveTargetPath(test_dir, 
'somefile')}).not.toThrow();
         });
     });
 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b414d28b/src/platforms/ios.js
----------------------------------------------------------------------
diff --git a/src/platforms/ios.js b/src/platforms/ios.js
index ac326af..3f854c2 100644
--- a/src/platforms/ios.js
+++ b/src/platforms/ios.js
@@ -161,13 +161,12 @@ function handlePlugin(action, plugin_id, txs, 
project_dir, plugin_dir, variables
                     if (mod.attrib['target'] == config_filename) {
                         // edit configuration files
                         var xmlDoc = 
xml_helpers.parseElementtreeSync(config_file);
-                        
 
                         var selector = mod.attrib["parent"],
                             children = mod.findall('*');
                         if( action == 'install') {
                             if (!xml_helpers.graftXML(xmlDoc, children, 
selector)) {
-                                throw new Error('failed to add config-file 
children to "' + selector + '" to "' + config_file + '"');
+                                throw new Error('failed to add config-file 
children to xpath "' + selector + '" in "' + config_file + '" because xpath 
selector could not be resolved.');
                             }
                         } else {
                             if (!xml_helpers.pruneXML(xmlDoc, children, 
selector)) {

Reply via email to