You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/07/09 08:58:27 UTC

git commit: 2.9.2. [CB-3931] Should ignore "CVS" folders for adding plugins.

Updated Branches:
  refs/heads/master ac0c95bec -> 6773ecd77


2.9.2. [CB-3931] Should ignore "CVS" folders for adding plugins.


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

Branch: refs/heads/master
Commit: 6773ecd778f8d5a3c5233c238cbdc9dd4dc72ecb
Parents: ac0c95b
Author: Fil Maj <ma...@gmail.com>
Authored: Mon Jul 8 23:58:17 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Mon Jul 8 23:58:17 2013 -0700

----------------------------------------------------------------------
 package.json      |  2 +-
 spec/util.spec.js | 12 ++++++++++++
 src/util.js       |  2 +-
 3 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6773ecd7/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 253f9d7..9b8ca88 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova",
-  "version": "2.9.1",
+  "version": "2.9.2",
   "preferGlobal": "true",
   "description": "Cordova command line interface tool",
   "main": "cordova",

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6773ecd7/spec/util.spec.js
----------------------------------------------------------------------
diff --git a/spec/util.spec.js b/spec/util.spec.js
index f5dbe36..b4354d4 100644
--- a/spec/util.spec.js
+++ b/spec/util.spec.js
@@ -98,5 +98,17 @@ describe('util module', function() {
             expect(res.length).toEqual(2);
             expect(res.indexOf('.svn')).toEqual(-1);
         });
+        it('should not return "CVS" directories', function() {
+            var plugins = path.join(temp, 'plugins');
+            var android = path.join(plugins, 'android');
+            var ios = path.join(plugins, 'ios');
+            var cvs = path.join(plugins, 'CVS');
+            shell.mkdir('-p', android);
+            shell.mkdir('-p', ios);
+            shell.mkdir('-p', cvs);
+            var res = util.findPlugins(plugins);
+            expect(res.length).toEqual(2);
+            expect(res.indexOf('CVS')).toEqual(-1);
+        });
     });
 });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6773ecd7/src/util.js
----------------------------------------------------------------------
diff --git a/src/util.js b/src/util.js
index 7ae9dfe..8b843c2 100644
--- a/src/util.js
+++ b/src/util.js
@@ -80,7 +80,7 @@ module.exports = {
         if (fs.existsSync(pluginPath)) {
             plugins = fs.readdirSync(pluginPath).filter(function (fileName) {
                stats = fs.statSync(path.join(pluginPath, fileName));
-               return fileName != '.svn' && stats.isDirectory();
+               return fileName != '.svn' && fileName != 'CVS' && stats.isDirectory();
             });
         }