cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sarangan12 <...@git.apache.org>
Subject [GitHub] cordova-paramedic pull request: Choose Target and use it for loggi...
Date Wed, 11 May 2016 18:30:09 GMT
Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-paramedic/pull/5#discussion_r62901242
  
    --- Diff: lib/ParamedicTargetChooser.js ---
    @@ -0,0 +1,127 @@
    +var Q       = require('q');
    +var shelljs = require('shelljs');
    +var path    = require("path-extra");
    +var logger  = require('./utils').logger;
    +var util    = require('./utils').utilities;
    +var spawn   = require('child_process').spawn;
    +var ParamedicKill   = require('./ParamedicKill');
    +
    +var ANDROID_RETRY_TIMES = 3;
    +var ANDROID_TIME_OUT    = 300000; //5 Minutes
    +
    +function ParamedicTargetChooser(appPath, platform) {
    +    this.appPath  = appPath;
    +    this.platform = platform;
    +}
    +
    +ParamedicTargetChooser.prototype.chooseTarget = function(emulator) {
    +    var targetObj = "";
    +    switch(this.platform) {
    +        case util.ANDROID:
    +            targetObj = this.chooseTargetForAndroid(emulator);
    +            break;
    +        case util.IOS:
    +            targetObj = this.chooseTargetForIOS(emulator);
    +            break;
    +        case util.WINDOWS:
    +            targetObj = this.chooseTargetForWindows(emulator);
    +            break;
    +        default:
    +            break;
    +    }
    +    return targetObj;
    +}
    +
    +ParamedicTargetChooser.prototype.chooseTargetForAndroid = function(emulator) {
    +    logger.info("cordova-paramedic: Choosing Target for Android");
    +    var self = this;
    +    return this.startAnAndroidEmulator().then(function(){
    +        var obj = {};
    +        obj.target = self.getRunningDeviceForAndroid();
    --- End diff --
    
    Good catch.. Changed the logic to use the same id.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message