cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [13/23] git commit: [CB-4128] Change blackberry platform label to blackberry10.
Date Wed, 24 Jul 2013 23:07:33 GMT
[CB-4128] Change blackberry platform label to blackberry10.


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

Branch: refs/heads/plugman-registry
Commit: aafe75b06f706dac69b6f49449b8d3ec2235b148
Parents: 9d5860f
Author: Fil Maj <maj.fil@gmail.com>
Authored: Tue Jul 16 16:44:42 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Tue Jul 16 16:44:42 2013 -0700

----------------------------------------------------------------------
 README.md                               |   4 +-
 platforms.js                            |   4 +-
 spec/metadata/blackberry_parser.spec.js |  24 ++---
 spec/platform.spec.js                   |   6 +-
 spec/serve.spec.js                      |   2 +-
 src/lazy_load.js                        |   2 +-
 src/metadata/blackberry10_parser.js     | 145 +++++++++++++++++++++++++++
 src/metadata/blackberry_parser.js       | 145 ---------------------------
 src/plugin.js                           |   5 +-
 src/prepare.js                          |   8 +-
 src/ripple.js                           |   2 +-
 11 files changed, 173 insertions(+), 174 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ec5b8ce..b0c34e9 100644
--- a/README.md
+++ b/README.md
@@ -57,13 +57,13 @@ A Cordova application built with cordova-cli will have the following directory
s
     |--.cordova/
     |-- merges/
     | | |-- android/
-    | | |-- blackberry/
+    | | |-- blackberry10/
     | | `-- ios/
     |-- www/
     | `-- config.xml
     |-- platforms/
     | |-- android/
-    | |-- blackberry/
+    | |-- blackberry10/
     | `-- ios/
     `-- plugins/
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
index a7966ca..12a5d14 100644
--- a/platforms.js
+++ b/platforms.js
@@ -38,8 +38,8 @@ module.exports = {
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
         version: '3.0.0rc1'
     },
-    blackberry : {
-        parser : require('./src/metadata/blackberry_parser'),
+    blackberry10 : {
+        parser : require('./src/metadata/blackberry10_parser'),
         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
         version: '3.0.0rc1'
     },

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/spec/metadata/blackberry_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/blackberry_parser.spec.js b/spec/metadata/blackberry_parser.spec.js
index 0581920..7a86f78 100644
--- a/spec/metadata/blackberry_parser.spec.js
+++ b/spec/metadata/blackberry_parser.spec.js
@@ -28,7 +28,7 @@ var platforms = require('../../platforms'),
     config_parser = require('../../src/config_parser'),
     cordova = require('../../cordova');
 
-describe('blackberry project parser', function() {
+describe('blackberry10 project parser', function() {
     var proj = '/some/path';
     var exists, custom, config_p, sh;
     beforeEach(function() {
@@ -44,13 +44,13 @@ describe('blackberry project parser', function() {
         it('should throw an exception with a path that is not a native blackberry project',
function() {
             exists.andReturn(false);
             expect(function() {
-                new platforms.blackberry.parser(proj);
+                new platforms.blackberry10.parser(proj);
             }).toThrow('The provided path "/some/path" is not a Cordova BlackBerry10 project.');
         });
         it('should accept a proper native blackberry project path as construction parameter',
function() {
             var project;
             expect(function() {
-                project = new platforms.blackberry.parser(proj);
+                project = new platforms.blackberry10.parser(proj);
             }).not.toThrow();
             expect(project).toBeDefined();
         });
@@ -61,13 +61,13 @@ describe('blackberry project parser', function() {
             sh.andCallFake(function(cmd, opts, cb) {
                 cb(1, 'no bb-deploy dewd!');
             });
-            platforms.blackberry.parser.check_requirements(proj, function(err) {
+            platforms.blackberry10.parser.check_requirements(proj, function(err) {
                 expect(err).toContain('no bb-deploy dewd');
                 done();
             });
         });
         it('should fire a callback with no error if shell out is successful', function(done)
{
-            platforms.blackberry.parser.check_requirements(proj, function(err) {
+            platforms.blackberry10.parser.check_requirements(proj, function(err) {
                 expect(err).toEqual(false);
                 done();
             });
@@ -75,9 +75,9 @@ describe('blackberry project parser', function() {
     });
     describe('instance', function() {
         var p, cp, rm, is_cordova, write, read;
-        var bb_proj = path.join(proj, 'platforms', 'blackberry');
+        var bb_proj = path.join(proj, 'platforms', 'blackberry10');
         beforeEach(function() {
-            p = new platforms.blackberry.parser(bb_proj);
+            p = new platforms.blackberry10.parser(bb_proj);
             cp = spyOn(shell, 'cp');
             rm = spyOn(shell, 'rm');
             is_cordova = spyOn(util, 'isCordova').andReturn(proj);
@@ -164,7 +164,7 @@ describe('blackberry project parser', function() {
         });
         describe('config_xml method', function() {
             it('should return the location of the config.xml', function() {
-                expect(p.config_xml()).toEqual(path.join(proj, 'platforms', 'blackberry',
'www', 'config.xml'));
+                expect(p.config_xml()).toEqual(path.join(proj, 'platforms', 'blackberry10',
'www', 'config.xml'));
             });
         });
         describe('update_www method', function() {
@@ -175,13 +175,13 @@ describe('blackberry project parser', function() {
             });
             it('should copy in a fresh cordova.js from stock cordova lib if no custom lib
is specified', function() {
                 p.update_www();
-                expect(cp).toHaveBeenCalledWith('-f', path.join(util.libDirectory, 'blackberry',
'cordova', platforms.blackberry.version, 'javascript', 'cordova.blackberry10.js'), path.join(proj,
'platforms', 'blackberry', 'www', 'cordova.js'));
+                expect(cp).toHaveBeenCalledWith('-f', path.join(util.libDirectory, 'blackberry10',
'cordova', platforms.blackberry10.version, 'javascript', 'cordova.blackberry10.js'), path.join(proj,
'platforms', 'blackberry10', 'www', 'cordova.js'));
             });
             it('should copy in a fresh cordova.js from custom cordova lib if custom lib is
specified', function() {
                 var custom_path = '/custom/path';
                 custom.andReturn(custom_path);
                 p.update_www();
-                expect(cp).toHaveBeenCalledWith('-f', path.join(custom_path, 'javascript',
'cordova.blackberry10.js'), path.join(proj, 'platforms', 'blackberry', 'www', 'cordova.js'));
+                expect(cp).toHaveBeenCalledWith('-f', path.join(custom_path, 'javascript',
'cordova.blackberry10.js'), path.join(proj, 'platforms', 'blackberry10', 'www', 'cordova.js'));
             });
         });
         describe('update_overrides method', function() {
@@ -192,7 +192,7 @@ describe('blackberry project parser', function() {
             });
             it('should copy merges path into www', function() {
                 p.update_overrides();
-                expect(cp).toHaveBeenCalledWith('-rf', path.join(proj, 'merges', 'blackberry',
'*'), path.join(proj, 'platforms', 'blackberry', 'www'));
+                expect(cp).toHaveBeenCalledWith('-rf', path.join(proj, 'merges', 'blackberry10',
'*'), path.join(proj, 'platforms', 'blackberry10', 'www'));
             });
         });
         describe('update_staging method', function() {
@@ -203,7 +203,7 @@ describe('blackberry project parser', function() {
             });
             it('should copy the staging dir into www if staging dir exists', function() {
                 p.update_staging();
-                expect(cp).toHaveBeenCalledWith('-rf', path.join(proj, 'platforms', 'blackberry',
'.staging', 'www', '*'), path.join(proj, 'platforms', 'blackberry', 'www'));
+                expect(cp).toHaveBeenCalledWith('-rf', path.join(proj, 'platforms', 'blackberry10',
'.staging', 'www', '*'), path.join(proj, 'platforms', 'blackberry10', 'www'));
             });
         });
         describe('update_project method', function() {

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index b4595d5..a2b65fc 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -156,11 +156,11 @@ describe('platform command', function() {
             });
 
             it('should be able to remove multiple platforms', function() {
-                cordova.platform('remove', ['android', 'blackberry']);
+                cordova.platform('remove', ['android', 'blackberry10']);
                 expect(rm).toHaveBeenCalledWith('-rf', path.join(project_dir, 'platforms',
'android'));
                 expect(rm).toHaveBeenCalledWith('-rf', path.join(project_dir, 'merges', 'android'));
-                expect(rm).toHaveBeenCalledWith('-rf', path.join(project_dir, 'platforms',
'blackberry'));
-                expect(rm).toHaveBeenCalledWith('-rf', path.join(project_dir, 'merges', 'blackberry'));
+                expect(rm).toHaveBeenCalledWith('-rf', path.join(project_dir, 'platforms',
'blackberry10'));
+                expect(rm).toHaveBeenCalledWith('-rf', path.join(project_dir, 'merges', 'blackberry10'));
             });
         });
     });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/spec/serve.spec.js
----------------------------------------------------------------------
diff --git a/spec/serve.spec.js b/spec/serve.spec.js
index e01e46f..aab1e43 100644
--- a/spec/serve.spec.js
+++ b/spec/serve.spec.js
@@ -27,7 +27,7 @@ var cordova = require('../cordova'),
     http = require('http'),
     android_parser = require('../src/metadata/android_parser'),
     ios_parser = require('../src/metadata/ios_parser'),
-    blackberry_parser = require('../src/metadata/blackberry_parser'),
+    blackberry_parser = require('../src/metadata/blackberry10_parser'),
     wp7_parser        = require('../src/metadata/wp7_parser'),
     wp8_parser        = require('../src/metadata/wp8_parser');
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/src/lazy_load.js
----------------------------------------------------------------------
diff --git a/src/lazy_load.js b/src/lazy_load.js
index 8566514..193f895 100644
--- a/src/lazy_load.js
+++ b/src/lazy_load.js
@@ -78,7 +78,7 @@ module.exports = {
                         events.emit('log', 'Downloaded, unzipped and extracted ' + size +
' byte response.');
                         var entries = fs.readdirSync(download_dir);
                         var entry = path.join(download_dir, entries[0]);
-                        shell.mv('-f', path.join(entry, (platform=='blackberry'?'blackberry10':''),
'*'), download_dir);
+                        shell.mv('-f', path.join(entry, (platform=='blackberry10'?'blackberry10':''),
'*'), download_dir);
                         shell.rm('-rf', entry);
                         hooker.fire('after_library_download', {
                             platform:platform,

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/src/metadata/blackberry10_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/blackberry10_parser.js b/src/metadata/blackberry10_parser.js
new file mode 100644
index 0000000..dc0f632
--- /dev/null
+++ b/src/metadata/blackberry10_parser.js
@@ -0,0 +1,145 @@
+/**
+    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.
+*/
+var fs            = require('fs'),
+    path          = require('path'),
+    et            = require('elementtree'),
+    shell         = require('shelljs'),
+    util          = require('../util'),
+    config_parser = require('../config_parser'),
+    events        = require('../events'),
+    config        = require('../config');
+
+module.exports = function blackberry_parser(project) {
+    if (!fs.existsSync(path.join(project, 'www'))) {
+        throw new Error('The provided path "' + project + '" is not a Cordova BlackBerry10
project.');
+    }
+    this.path = project;
+    this.config_path = path.join(this.path, 'www', 'config.xml');
+    this.xml = new util.config_parser(this.config_path);
+};
+
+module.exports.check_requirements = function(project_root, callback) {
+    var lib_path = path.join(util.libDirectory, 'blackberry10', 'cordova', require('../../platforms').blackberry10.version);
+    shell.exec(path.join(lib_path, 'bin', 'check_reqs'), {silent:true, async:true}, function(code,
output) {
+        if (code != 0) {
+            callback(output);
+        } else {
+            callback(false);
+        }
+    });
+};
+
+module.exports.prototype = {
+    update_from_config:function(config) {
+        if (config instanceof config_parser) {
+        } else throw new Error('update_from_config requires a config_parser object');
+
+        this.xml.name(config.name());
+        events.emit('log', 'Wrote out BlackBerry application name to "' + config.name() +
'"');
+        this.xml.packageName(config.packageName());
+        events.emit('log', 'Wrote out BlackBerry package name to "' + config.packageName()
+ '"');
+        this.xml.version(config.version());
+        events.emit('log', 'Wrote out BlackBerry version to "' + config.version() + '"');
+        this.xml.access.remove();
+        var self = this;
+        config.access.get().forEach(function(uri) {
+            var el = new et.Element('access');
+            el.attrib.uri = uri;
+            el.attrib.subdomains = 'true';
+            self.xml.doc.getroot().append(el);
+        });
+        this.xml.update();
+    },
+    update_project:function(cfg, callback) {
+        var self = this;
+
+        try {
+            self.update_from_config(cfg);
+        } catch(e) {
+            if (callback) callback(e);
+            else throw e;
+            return;
+        }
+        self.update_www();
+        self.update_overrides();
+        self.update_staging();
+        util.deleteSvnFolders(this.www_dir());
+        if (callback) callback();
+    },
+
+    // Returns the platform-specific www directory.
+    www_dir:function() {
+        return path.join(this.path, 'www');
+    },
+
+    staging_dir: function() {
+        return path.join(this.path, '.staging', 'www');
+    },
+
+    config_xml:function(){
+        return this.config_path;
+    },
+
+    update_www:function() {
+        var projectRoot = util.isCordova(this.path);
+        var www = util.projectWww(projectRoot);
+        var platformWww = this.www_dir();
+        // remove the stock www folder
+        shell.rm('-rf', this.www_dir());
+
+        // copy over project www assets
+        shell.cp('-rf', www, this.path);
+
+        var custom_path = config.has_custom_path(projectRoot, 'blackberry10');
+        var lib_path = path.join(util.libDirectory, 'blackberry10', 'cordova', require('../../platforms').blackberry10.version);
+        if (custom_path) lib_path = custom_path;
+        // add cordova.js
+        shell.cp('-f', path.join(lib_path, 'javascript', 'cordova.blackberry10.js'), path.join(this.www_dir(),
'cordova.js'));
+
+        // add webworks ext directories
+        shell.cp('-rf', path.join(lib_path, 'framework', 'ext*'), this.www_dir());
+
+        // add config.xml
+        // @TODO should use project www/config.xml but it must use BBWP elements
+        shell.cp('-f', path.join(lib_path, 'bin', 'templates', 'project', 'www', 'config.xml'),
this.www_dir());
+
+        // add res/
+        // @TODO remove this when config.xml is generalized
+        shell.cp('-rf', path.join(lib_path, 'bin', 'templates', 'project', 'www', 'res'),
this.www_dir());
+    },
+
+    // update the overrides folder into the www folder
+    update_overrides:function() {
+        var projectRoot = util.isCordova(this.path);
+        var merges_path = path.join(util.appDir(projectRoot), 'merges', 'blackberry10');
+        if (fs.existsSync(merges_path)) {
+            var overrides = path.join(merges_path, '*');
+            shell.cp('-rf', overrides, this.www_dir());
+        }
+    },
+
+    // update the overrides folder into the www folder
+    update_staging:function() {
+        var projectRoot = util.isCordova(this.path);
+        if (fs.existsSync(this.staging_dir())) {
+            var staging = path.join(this.staging_dir(), '*');
+            shell.cp('-rf', staging, this.www_dir());
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/src/metadata/blackberry_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/blackberry_parser.js b/src/metadata/blackberry_parser.js
deleted file mode 100644
index 5fb91a1..0000000
--- a/src/metadata/blackberry_parser.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
-    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.
-*/
-var fs            = require('fs'),
-    path          = require('path'),
-    et            = require('elementtree'),
-    shell         = require('shelljs'),
-    util          = require('../util'),
-    config_parser = require('../config_parser'),
-    events        = require('../events'),
-    config        = require('../config');
-
-module.exports = function blackberry_parser(project) {
-    if (!fs.existsSync(path.join(project, 'www'))) {
-        throw new Error('The provided path "' + project + '" is not a Cordova BlackBerry10
project.');
-    }
-    this.path = project;
-    this.config_path = path.join(this.path, 'www', 'config.xml');
-    this.xml = new util.config_parser(this.config_path);
-};
-
-module.exports.check_requirements = function(project_root, callback) {
-    var lib_path = path.join(util.libDirectory, 'blackberry', 'cordova', require('../../platforms').blackberry.version);
-    shell.exec(path.join(lib_path, 'bin', 'check_reqs'), {silent:true, async:true}, function(code,
output) {
-        if (code != 0) {
-            callback(output);
-        } else {
-            callback(false);
-        }
-    });
-};
-
-module.exports.prototype = {
-    update_from_config:function(config) {
-        if (config instanceof config_parser) {
-        } else throw new Error('update_from_config requires a config_parser object');
-
-        this.xml.name(config.name());
-        events.emit('log', 'Wrote out BlackBerry application name to "' + config.name() +
'"');
-        this.xml.packageName(config.packageName());
-        events.emit('log', 'Wrote out BlackBerry package name to "' + config.packageName()
+ '"');
-        this.xml.version(config.version());
-        events.emit('log', 'Wrote out BlackBerry version to "' + config.version() + '"');
-        this.xml.access.remove();
-        var self = this;
-        config.access.get().forEach(function(uri) {
-            var el = new et.Element('access');
-            el.attrib.uri = uri;
-            el.attrib.subdomains = 'true';
-            self.xml.doc.getroot().append(el);
-        });
-        this.xml.update();
-    },
-    update_project:function(cfg, callback) {
-        var self = this;
-
-        try {
-            self.update_from_config(cfg);
-        } catch(e) {
-            if (callback) callback(e);
-            else throw e;
-            return;
-        }
-        self.update_www();
-        self.update_overrides();
-        self.update_staging();
-        util.deleteSvnFolders(this.www_dir());
-        if (callback) callback();
-    },
-
-    // Returns the platform-specific www directory.
-    www_dir:function() {
-        return path.join(this.path, 'www');
-    },
-
-    staging_dir: function() {
-        return path.join(this.path, '.staging', 'www');
-    },
-
-    config_xml:function(){
-        return this.config_path;
-    },
-
-    update_www:function() {
-        var projectRoot = util.isCordova(this.path);
-        var www = util.projectWww(projectRoot);
-        var platformWww = this.www_dir();
-        // remove the stock www folder
-        shell.rm('-rf', this.www_dir());
-
-        // copy over project www assets
-        shell.cp('-rf', www, this.path);
-
-        var custom_path = config.has_custom_path(projectRoot, 'blackberry');
-        var lib_path = path.join(util.libDirectory, 'blackberry', 'cordova', require('../../platforms').blackberry.version);
-        if (custom_path) lib_path = custom_path;
-        // add cordova.js
-        shell.cp('-f', path.join(lib_path, 'javascript', 'cordova.blackberry10.js'), path.join(this.www_dir(),
'cordova.js'));
-
-        // add webworks ext directories
-        shell.cp('-rf', path.join(lib_path, 'framework', 'ext*'), this.www_dir());
-
-        // add config.xml
-        // @TODO should use project www/config.xml but it must use BBWP elements
-        shell.cp('-f', path.join(lib_path, 'bin', 'templates', 'project', 'www', 'config.xml'),
this.www_dir());
-
-        // add res/
-        // @TODO remove this when config.xml is generalized
-        shell.cp('-rf', path.join(lib_path, 'bin', 'templates', 'project', 'www', 'res'),
this.www_dir());
-    },
-
-    // update the overrides folder into the www folder
-    update_overrides:function() {
-        var projectRoot = util.isCordova(this.path);
-        var merges_path = path.join(util.appDir(projectRoot), 'merges', 'blackberry');
-        if (fs.existsSync(merges_path)) {
-            var overrides = path.join(merges_path, '*');
-            shell.cp('-rf', overrides, this.www_dir());
-        }
-    },
-
-    // update the overrides folder into the www folder
-    update_staging:function() {
-        var projectRoot = util.isCordova(this.path);
-        if (fs.existsSync(this.staging_dir())) {
-            var staging = path.join(this.staging_dir(), '*');
-            shell.cp('-rf', staging, this.www_dir());
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/src/plugin.js
----------------------------------------------------------------------
diff --git a/src/plugin.js b/src/plugin.js
index 839314f..3649980 100644
--- a/src/plugin.js
+++ b/src/plugin.js
@@ -97,9 +97,8 @@ module.exports = function plugin(command, targets, callback) {
                                 platformList.forEach(function(platform) {
                                     var platformRoot = path.join(projectRoot, 'platforms',
platform);
                                     var parser = new platforms[platform].parser(platformRoot);
-                                    // TODO: unify use of blackberry in cli vs blackberry10
in plugman
                                     events.emit('log', 'Calling plugman.install on plugin
"' + dir + '" for platform "' + platform + '"');
-                                    plugman.install((platform=='blackberry'?'blackberry10':platform),
platformRoot,
+                                    plugman.install(platform, platformRoot,
                                                     path.basename(dir), pluginsDir, { www_dir:
parser.staging_dir() });
                                 });
                                 end();
@@ -146,7 +145,7 @@ module.exports = function plugin(command, targets, callback) {
                                 var platformRoot = path.join(projectRoot, 'platforms', platform);
                                 var parser = new platforms[platform].parser(platformRoot);
                                 events.emit('log', 'Calling plugman.uninstall on plugin "'
+ target + '" for platform "' + platform + '"');
-                                plugman.uninstall.uninstallPlatform((platform=='blackberry'?'blackberry10':platform),
platformRoot, target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() });
+                                plugman.uninstall.uninstallPlatform(platform, platformRoot,
target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() });
                             });
                             plugman.uninstall.uninstallPlugin(target, path.join(projectRoot,
'plugins'), end);
                         } else {

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/src/prepare.js
----------------------------------------------------------------------
diff --git a/src/prepare.js b/src/prepare.js
index fd134a9..5f80b27 100644
--- a/src/prepare.js
+++ b/src/prepare.js
@@ -99,17 +99,17 @@ module.exports = function prepare(platformList, callback) {
                             // Call plugman --prepare for this platform. sets up js-modules
appropriately.
                             var plugins_dir = path.join(projectRoot, 'plugins');
                             events.emit('log', 'Calling plugman.prepare for platform "' +
platform + '"');
-                            plugman.prepare(platformPath, (platform=='blackberry'?'blackberry10':platform),
plugins_dir);
+                            plugman.prepare(platformPath, platform, plugins_dir);
                             // Make sure that config changes for each existing plugin is
in place
                             var plugins = cordova_util.findPlugins(plugins_dir);
-                            var platform_json = plugman.config_changes.get_platform_json(plugins_dir,
(platform=='blackberry'?'blackberry10':platform));
+                            var platform_json = plugman.config_changes.get_platform_json(plugins_dir,
platform);
                             plugins && plugins.forEach(function(plugin_id) {
                                 if (platform_json.installed_plugins[plugin_id]) {
                                     events.emit('log', 'Ensuring plugin "' + plugin_id +
'" is installed correctly...');
-                                    plugman.config_changes.add_plugin_changes((platform=='blackberry'?'blackberry10':platform),
platformPath, plugins_dir, plugin_id, /* variables for plugin */ platform_json.installed_plugins[plugin_id],
/* top level plugin? */ true, /* should increment config munge? cordova-cli never should,
only plugman */ false);
+                                    plugman.config_changes.add_plugin_changes(platform, platformPath,
plugins_dir, plugin_id, /* variables for plugin */ platform_json.installed_plugins[plugin_id],
/* top level plugin? */ true, /* should increment config munge? cordova-cli never should,
only plugman */ false);
                                 } else if (platform_json.dependent_plugins[plugin_id]) {
                                     events.emit('log', 'Ensuring plugin "' + plugin_id +
'" is installed correctly...');
-                                    plugman.config_changes.add_plugin_changes((platform=='blackberry'?'blackberry10':platform),
platformPath, plugins_dir, plugin_id, /* variables for plugin */ platform_json.dependent_plugins[plugin_id],
/* top level plugin? */ false, /* should increment config munge? cordova-cli never should,
only plugman */ false);
+                                    plugman.config_changes.add_plugin_changes(platform, platformPath,
plugins_dir, plugin_id, /* variables for plugin */ platform_json.dependent_plugins[plugin_id],
/* top level plugin? */ false, /* should increment config munge? cordova-cli never should,
only plugman */ false);
                                 }
                                 events.emit('log', 'Plugin "' + plugin_id + '" is good to
go.');
                             });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/aafe75b0/src/ripple.js
----------------------------------------------------------------------
diff --git a/src/ripple.js b/src/ripple.js
index 9be7752..d576d58 100644
--- a/src/ripple.js
+++ b/src/ripple.js
@@ -32,7 +32,7 @@ module.exports = function (platform, port) {
         var device;
 
         switch (platform) {
-        case "blackberry":
+        case "blackberry10":
             device = "Z10";
             break;
         case "ios":


Mime
View raw message