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 2013/07/28 03:06:02 UTC

[1/5] git commit: adding search and fetch

Updated Branches:
  refs/heads/master b857a49a7 -> 009e8c708


adding search and fetch


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

Branch: refs/heads/master
Commit: f5158ecbfe26917973df1b906b6754b201742c3a
Parents: 062849f
Author: Anis Kadri <an...@apache.org>
Authored: Mon Jul 15 17:34:17 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Jul 15 17:34:17 2013 -0700

----------------------------------------------------------------------
 package.json        |  2 +-
 spec/plugin.spec.js | 13 ++++++++++---
 src/plugin.js       | 26 +++++++++++++++++++++++++-
 3 files changed, 36 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f5158ecb/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 9b8ca88..103ef96 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
   "dependencies": {
     "colors":">=0.6.0",
     "elementtree":"0.1.3",
-    "plugman":"0.8.2",
+    "plugman":"git://github.com/apache/cordova-plugman.git#plugman-registry",
     "plist":"0.4.x",
     "xcode":"0.5.1",
     "express":"3.0.0",

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f5158ecb/spec/plugin.spec.js
----------------------------------------------------------------------
diff --git a/spec/plugin.spec.js b/spec/plugin.spec.js
index f340151..bdebf53 100644
--- a/spec/plugin.spec.js
+++ b/spec/plugin.spec.js
@@ -33,7 +33,7 @@ var project_dir = path.join('some','path');
 var plugins_dir = path.join(project_dir, 'plugins');
 
 describe('plugin command', function() {
-    var is_cordova, list_platforms, fire, find_plugins, rm, mkdir, existsSync, exec, prep_spy, plugman_install, plugman_fetch, parsers = {}, uninstall;
+    var is_cordova, list_platforms, fire, find_plugins, rm, mkdir, existsSync, exec, prep_spy, plugman_install, plugman_fetch, parsers = {}, plugman_uninstall;
     beforeEach(function() {
         is_cordova = spyOn(util, 'isCordova').andReturn(project_dir);
         fire = spyOn(hooker.prototype, 'fire').andCallFake(function(e, opts, cb) {
@@ -61,7 +61,8 @@ describe('plugin command', function() {
         });
         plugman_install = spyOn(plugman, 'install');
         plugman_fetch = spyOn(plugman, 'fetch').andCallFake(function(target, plugins_dir, opts, cb) { cb(false, path.join(plugins_dir, target)); });
-        uninstall = spyOn(plugman, 'uninstall');
+        plugman_uninstall = spyOn(plugman, 'uninstall');
+        plugman_search = spyOn(plugman, 'search');
     });
 
     describe('failure', function() {
@@ -127,6 +128,12 @@ describe('plugin command', function() {
                 });
             });
         });
+        describe('`search`', function() {
+            it('should call plugman.search', function() {
+                cordova.plugin('search', sample_plugins);
+                expect(plugman_search).toHaveBeenCalledWith(sample_plugins, jasmine.any(Function));
+            });
+        });
         describe('`remove`',function() {
             var plugin_parser;
             var subset = ['android', 'wp7'];
@@ -145,7 +152,7 @@ describe('plugin command', function() {
                 cordova.plugin('rm', sample_plugins);
                 sample_plugins.forEach(function(plug) {
                     subset.forEach(function(plat) {
-                        expect(uninstall).toHaveBeenCalledWith(plat, path.join(project_dir, 'platforms', plat), plug, plugins_dir, jasmine.any(Object));
+                        expect(plugman_uninstall).toHaveBeenCalledWith(plat, path.join(project_dir, 'platforms', plat), plug, plugins_dir, jasmine.any(Object));
                     });
                 });
             });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f5158ecb/src/plugin.js
----------------------------------------------------------------------
diff --git a/src/plugin.js b/src/plugin.js
index ca43e35..4926964 100644
--- a/src/plugin.js
+++ b/src/plugin.js
@@ -62,7 +62,7 @@ module.exports = function plugin(command, targets, callback) {
     };
 
     switch(command) {
-        case 'add':
+        case 'add': 
             var end = n(targets.length, function() {
                 hooks.fire('after_plugin_add', opts, function(err) {
                     if (err) {
@@ -159,6 +159,30 @@ module.exports = function plugin(command, targets, callback) {
                 }
             });
             break;
+        case 'search':
+            hooks.fire('before_plugin_search', function(err) {
+                if (err) {
+                    if(callback) callback(err);
+                    else throw err;
+                } else {
+                    plugman.search(targets, function(err, plugins) {
+                        if(err) return console.log(err);
+                        for(var plugin in plugins) {
+                            console.log();
+                            events.emit('results', plugins[plugin].name, '-', plugins[plugin].description || 'no description provided');
+                        }
+                        hooks.fire('after_plugin_search', function(err) {
+                            if(err) {
+                                if(callback) callback(err);
+                                else throw err;
+                            }
+                        });
+                    });
+
+                }
+
+            });
+            break;
         case 'ls':
         case 'list':
         default:


[4/5] git commit: adding fetch/search from registry and bumping version

Posted by an...@apache.org.
adding fetch/search from registry and bumping version


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

Branch: refs/heads/master
Commit: ba0fe0c739bc2e70fa1dfb2f5049033d9afca65c
Parents: d527cc8
Author: Anis Kadri <an...@apache.org>
Authored: Sat Jul 27 18:05:53 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Sat Jul 27 18:05:53 2013 -0700

----------------------------------------------------------------------
 package.json        | 4 ++--
 spec/plugin.spec.js | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ba0fe0c7/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 205a4b3..4a60e2f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova",
-  "version": "3.0.1",
+  "version": "3.0.2",
   "preferGlobal": "true",
   "description": "Cordova command line interface tool",
   "main": "cordova",
@@ -30,7 +30,7 @@
   "dependencies": {
     "colors":">=0.6.0",
     "elementtree":"0.1.3",
-    "plugman":"git://github.com/apache/cordova-plugman.git#plugman-registry",
+    "plugman":"0.9.20",
     "plist":"0.4.x",
     "xcode":"0.5.1",
     "express":"3.0.0",

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ba0fe0c7/spec/plugin.spec.js
----------------------------------------------------------------------
diff --git a/spec/plugin.spec.js b/spec/plugin.spec.js
index a1f64e3..f9265ce 100644
--- a/spec/plugin.spec.js
+++ b/spec/plugin.spec.js
@@ -61,6 +61,7 @@ describe('plugin command', function() {
         });
         plugman_install = spyOn(plugman, 'install');
         plugman_fetch = spyOn(plugman, 'fetch').andCallFake(function(target, plugins_dir, opts, cb) { cb(false, path.join(plugins_dir, target)); });
+        plugman_search = spyOn(plugman, 'search').andCallFake(function(params, cb) { cb(); });
         uninstallPlatform = spyOn(plugman.uninstall, 'uninstallPlatform');
         uninstallPlugin = spyOn(plugman.uninstall, 'uninstallPlugin').andCallFake(function(target, plugins_dir, cb) {
             cb && cb();


[3/5] git commit: Merge branch 'master' into plugman-registry

Posted by an...@apache.org.
Merge branch 'master' into plugman-registry

Conflicts:
	package.json


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

Branch: refs/heads/master
Commit: d527cc842138dbbd43128e5bd7b234c382aa9753
Parents: 745b0d8 1148e6f
Author: Anis Kadri <an...@apache.org>
Authored: Wed Jul 24 16:07:14 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Wed Jul 24 16:07:14 2013 -0700

----------------------------------------------------------------------
 README.md                               |  47 ++++++++-
 package.json                            |   5 +-
 platforms.js                            |  16 +--
 spec/emulate.spec.js                    |  21 ----
 spec/lazy_load.spec.js                  |  24 +++++
 spec/metadata/blackberry_parser.spec.js |  24 ++---
 spec/platform.spec.js                   |   6 +-
 spec/run.spec.js                        |  21 ----
 spec/serve.spec.js                      |   2 +-
 src/config.js                           |   1 +
 src/emulate.js                          |  14 ---
 src/lazy_load.js                        |  29 ++++--
 src/metadata/blackberry10_parser.js     | 145 +++++++++++++++++++++++++++
 src/metadata/blackberry_parser.js       | 144 --------------------------
 src/platform.js                         |   2 +-
 src/plugin.js                           |   5 +-
 src/prepare.js                          |   8 +-
 src/ripple.js                           |   2 +-
 src/run.js                              |   4 +-
 19 files changed, 274 insertions(+), 246 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d527cc84/package.json
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d527cc84/src/plugin.js
----------------------------------------------------------------------


[5/5] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-cli

Posted by an...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-cli


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

Branch: refs/heads/master
Commit: 009e8c7084543d139677f73365dbe65468cc1504
Parents: ba0fe0c b857a49
Author: Anis Kadri <an...@apache.org>
Authored: Sat Jul 27 18:05:59 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Sat Jul 27 18:05:59 2013 -0700

----------------------------------------------------------------------
 README.md            |  1 +
 package.json         |  3 ++-
 spec/prepare.spec.js | 20 +++++++++++++++++---
 src/prepare.js       |  2 +-
 4 files changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/009e8c70/package.json
----------------------------------------------------------------------


[2/5] git commit: merging latest

Posted by an...@apache.org.
merging latest


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

Branch: refs/heads/master
Commit: 745b0d809a18f912a5298f798beb9df1b8578d3e
Parents: f5158ec 8e57050
Author: Anis Kadri <an...@apache.org>
Authored: Mon Jul 15 17:37:35 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Jul 15 17:37:35 2013 -0700

----------------------------------------------------------------------
 cordova.js                 |  1 +
 package.json               |  5 ++-
 spec/lazy_load.spec.js     | 57 ++++++++------------------
 spec/plugin.spec.js        | 37 ++++++++++++++---
 src/lazy_load.js           | 91 +++++++++++------------------------------
 src/metadata/wp7_parser.js | 10 +++--
 src/metadata/wp8_parser.js | 10 +++--
 src/plugin.js              | 16 ++++----
 8 files changed, 100 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/745b0d80/package.json
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/745b0d80/spec/plugin.spec.js
----------------------------------------------------------------------
diff --cc spec/plugin.spec.js
index bdebf53,f20fd5d..a1f64e3
--- a/spec/plugin.spec.js
+++ b/spec/plugin.spec.js
@@@ -127,13 -135,13 +135,19 @@@ describe('plugin command', function() 
                      });
                  });
              });
+             it('should trigger callback without an error', function(done) {
+                 cordova.plugin('add', sample_plugins, function(e) {
+                     expect(e).not.toBeDefined();
+                     done();
+                 });
+             });
          });
 +        describe('`search`', function() {
 +            it('should call plugman.search', function() {
 +                cordova.plugin('search', sample_plugins);
 +                expect(plugman_search).toHaveBeenCalledWith(sample_plugins, jasmine.any(Function));
 +            });
 +        });
          describe('`remove`',function() {
              var plugin_parser;
              var subset = ['android', 'wp7'];

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/745b0d80/src/plugin.js
----------------------------------------------------------------------