Repository: cordova-lib
Updated Branches:
  refs/heads/master 75f4516d8 -> 05fa0fe93


CB-7091: Remove check_requirements() funcs from platform parsers

No longer used, removing. They were either:
1) Empty
2) Duplicating the chqck_reqs call that is also done by platform create scripts
3) In Ubuntu duplicated the code from check_reqs


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

Branch: refs/heads/master
Commit: 05fa0fe93bccc4b016e471a1b8bd40e5743f8767
Parents: 75f4516
Author: Josh Soref <[email protected]>
Authored: Wed Jul 30 16:32:34 2014 -0400
Committer: Josh Soref <[email protected]>
Committed: Wed Jul 30 16:34:03 2014 -0400

----------------------------------------------------------------------
 .../metadata/blackberry_parser.spec.js          | 15 --------------
 .../src/cordova/metadata/blackberry10_parser.js | 21 +-------------------
 2 files changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/05fa0fe9/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
index 9c43e59..db0c68d 100644
--- a/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
@@ -93,21 +93,6 @@ describe('blackberry10 project parser', function() {
         });
     });
 
-    describe('check_requirements', function() {
-        it('should fire a callback if the blackberry-deploy shell-out fails', 
function(done) {
-            sh.andCallFake(function(cmd, opts, cb) {
-                (cb || opts)(1, 'no bb-deploy dewd!');
-            });
-            
errorWrapper(platforms.blackberry10.parser.check_requirements(proj), done, 
function(err) {
-                expect(err).toContain('no bb-deploy dewd');
-            });
-        });
-        it('should fire a callback with no error if shell out is successful', 
function(done) {
-            wrapper(platforms.blackberry10.parser.check_requirements(proj), 
done, function() {
-                expect(1).toBe(1);
-            });
-        });
-    });
     describe('instance', function() {
         var p, cp, rm, mkdir, is_cordova, write, read;
         var bb_proj = path.join(proj, 'platforms', 'blackberry10');

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/05fa0fe9/cordova-lib/src/cordova/metadata/blackberry10_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/blackberry10_parser.js 
b/cordova-lib/src/cordova/metadata/blackberry10_parser.js
index 9535a4b..04a5cbf 100644
--- a/cordova-lib/src/cordova/metadata/blackberry10_parser.js
+++ b/cordova-lib/src/cordova/metadata/blackberry10_parser.js
@@ -29,8 +29,7 @@ var fs            = require('fs'),
     child_process = require('child_process'),
     ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError'),
-    events        = require('../../events'),
-    lazy_load     = require('../lazy_load');
+    events        = require('../../events');
 
 module.exports = function blackberry_parser(project) {
     if (!fs.existsSync(path.join(project, 'www'))) {
@@ -41,24 +40,6 @@ module.exports = function blackberry_parser(project) {
     this.xml = new ConfigParser(this.config_path);
 };
 
-// Returns a promise.
-module.exports.check_requirements = function(project_root, lib_path) {
-    if (lib_path === undefined) {
-        return lazy_load.based_on_config(project_root, 
'blackberry10').then(function (lib_path) {
-            return module.exports.check_requirements(project_root, lib_path);
-        });
-    }
-    var d = Q.defer();
-    child_process.exec('"' + path.join(lib_path, 'bin', 'check_reqs') + '"', 
function(err, output, stderr) {
-        if (err) {
-            d.reject(new CordovaError('Requirements check failed: ' + output + 
stderr));
-        } else {
-            d.resolve();
-        }
-    });
-    return d.promise;
-};
-
 module.exports.prototype = {
     update_from_config:function(config) {
         var projectRoot = util.isCordova(this.path),

Reply via email to