You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/11/28 18:40:22 UTC

ios commit: Updated bundled ios-sim to version 5.0.12

Repository: cordova-ios
Updated Branches:
  refs/heads/master 4b8646245 -> 923213f1a


Updated bundled ios-sim to version 5.0.12


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

Branch: refs/heads/master
Commit: 923213f1a78719a5d0428e3d6ec1082a5f09626d
Parents: 4b86462
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Nov 28 10:40:16 2016 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Nov 28 10:40:16 2016 -0800

----------------------------------------------------------------------
 node_modules/ios-sim/package.json | 37 +++++++++++++++++-----------------
 node_modules/ios-sim/src/lib.js   | 29 +++++++++++++-------------
 package.json                      |  2 +-
 3 files changed, 34 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/923213f1/node_modules/ios-sim/package.json
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/package.json b/node_modules/ios-sim/package.json
index 4698561..1fc773e 100644
--- a/node_modules/ios-sim/package.json
+++ b/node_modules/ios-sim/package.json
@@ -2,51 +2,50 @@
   "_args": [
     [
       {
-        "raw": "ios-sim@^5.0.9",
+        "raw": "ios-sim@^5.0.12",
         "scope": null,
         "escapedName": "ios-sim",
         "name": "ios-sim",
-        "rawSpec": "^5.0.9",
-        "spec": ">=5.0.9 <6.0.0",
+        "rawSpec": "^5.0.12",
+        "spec": ">=5.0.12 <6.0.0",
         "type": "range"
       },
       "/Users/shazron/Documents/git/apache/cordova-ios"
     ]
   ],
-  "_from": "ios-sim@>=5.0.9 <6.0.0",
-  "_id": "ios-sim@5.0.11",
+  "_from": "ios-sim@>=5.0.12 <6.0.0",
+  "_id": "ios-sim@5.0.12",
   "_inCache": true,
   "_location": "/ios-sim",
   "_nodeVersion": "6.7.0",
   "_npmOperationalInternal": {
-    "host": "packages-18-east.internal.npmjs.com",
-    "tmp": "tmp/ios-sim-5.0.11.tgz_1478726052548_0.9803785821422935"
+    "host": "packages-12-west.internal.npmjs.com",
+    "tmp": "tmp/ios-sim-5.0.12.tgz_1480357903209_0.8315212763845921"
   },
   "_npmUser": {
     "name": "shazron",
     "email": "shazron@gmail.com"
   },
-  "_npmVersion": "3.10.8",
+  "_npmVersion": "3.10.9",
   "_phantomChildren": {
     "abbrev": "1.0.9"
   },
   "_requested": {
-    "raw": "ios-sim@^5.0.9",
+    "raw": "ios-sim@^5.0.12",
     "scope": null,
     "escapedName": "ios-sim",
     "name": "ios-sim",
-    "rawSpec": "^5.0.9",
-    "spec": ">=5.0.9 <6.0.0",
+    "rawSpec": "^5.0.12",
+    "spec": ">=5.0.12 <6.0.0",
     "type": "range"
   },
   "_requiredBy": [
-    "#USER",
     "/"
   ],
-  "_resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.11.tgz",
-  "_shasum": "e2371fcd34f7c7a1fb3512ed8d55f92324ae83dd",
+  "_resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.12.tgz",
+  "_shasum": "0b07436ce1bf663bda9a3fb75412f41a1dec465b",
   "_shrinkwrap": null,
-  "_spec": "ios-sim@^5.0.9",
+  "_spec": "ios-sim@^5.0.12",
   "_where": "/Users/shazron/Documents/git/apache/cordova-ios",
   "author": {
     "name": "Shazron Abdullah"
@@ -71,13 +70,13 @@
   },
   "directories": {},
   "dist": {
-    "shasum": "e2371fcd34f7c7a1fb3512ed8d55f92324ae83dd",
-    "tarball": "https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.11.tgz"
+    "shasum": "0b07436ce1bf663bda9a3fb75412f41a1dec465b",
+    "tarball": "https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.12.tgz"
   },
   "engines": {
     "node": ">=0.10.0"
   },
-  "gitHead": "2a42ca18280aeb9919fda3983f1bb7065541afd9",
+  "gitHead": "0e0cafacca40434702a53538b11169a345070495",
   "homepage": "https://github.com/phonegap/ios-sim#readme",
   "keywords": [
     "ios-sim",
@@ -119,5 +118,5 @@
     "posttest": "npm run jshint",
     "test": "npm run jasmine"
   },
-  "version": "5.0.11"
+  "version": "5.0.12"
 }

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/923213f1/node_modules/ios-sim/src/lib.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/src/lib.js b/node_modules/ios-sim/src/lib.js
index 499003c..c7fcba2 100644
--- a/node_modules/ios-sim/src/lib.js
+++ b/node_modules/ios-sim/src/lib.js
@@ -115,7 +115,7 @@ function findRuntimesGroupByDeviceProperty(list, deviceProperty, availableOnly)
 function findAvailableRuntime(list, device_name) {
 
     var all_druntimes = findRuntimesGroupByDeviceProperty(list, 'name', true);
-    var druntime = all_druntimes[device_name];
+    var druntime = all_druntimes[ filterDeviceName(device_name) ];
     var runtime_found = druntime && druntime.length > 0;
 
     if (!runtime_found) {
@@ -203,7 +203,7 @@ function getDeviceFromDeviceTypeId(devicetypeid) {
         // found the runtime, now find the actual device matching devicename
         if (deviceGroup.runtime === ret_obj.runtime) {
             return deviceGroup.devices.some(function(device) {
-                if (device.name === ret_obj.name) {
+                if (filterDeviceName(device.name) === filterDeviceName(ret_obj.name)) {
                     ret_obj.id = device.id;
                     return true;
                 }
@@ -223,6 +223,15 @@ function getDeviceFromDeviceTypeId(devicetypeid) {
     return ret_obj;
 }
 
+// replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices'
+function filterDeviceName(deviceName) {
+    // replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices'
+    if (deviceName.indexOf('iPad Pro') === 0) {
+        return deviceName.replace(/\-/g, ' ').trim();
+    }
+    return deviceName;
+}
+
 var lib = {
 
     init: function() {
@@ -264,11 +273,7 @@ var lib = {
         var name_id_map = {};
 
         list.devicetypes.forEach(function(device) {
-            // replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices'
-            if (device.name.indexOf('iPad Pro') === 0) {
-                device.name = device.name.replace(/\-/g, ' ').trim();
-            }
-            name_id_map[ device.name ] = device.id;
+            name_id_map[ filterDeviceName(device.name) ] = device.id;
         });
 
         list = [];
@@ -279,13 +284,9 @@ var lib = {
 
         for (var deviceName in druntimes) {
             var runtimes = druntimes[ deviceName ];
+            var dname = filterDeviceName(deviceName);
 
-            // replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices'
-            if (deviceName.indexOf('iPad Pro') === 0) {
-                deviceName = deviceName.replace(/\-/g, ' ').trim();
-            }
-
-            if (!(deviceName in name_id_map)) {
+            if (!(dname in name_id_map)) {
                 continue;
             }
             runtimes.forEach(remove);
@@ -296,7 +297,7 @@ var lib = {
 
     //jscs:disable disallowUnusedParams
     showdevicetypes: function(args) {
-        this.getdevicetypes().forEach(function(device){
+        this.getdevicetypes().forEach(function(device) {
             console.log(device);
         });
     },

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/923213f1/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 52b580d..3f703ca 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
   },
   "dependencies": {
     "cordova-common": "^1.5.0",
-    "ios-sim": "^5.0.9",
+    "ios-sim": "^5.0.12",
     "nopt": "^3.0.6",
     "plist": "^1.2.0",
     "q": "^1.4.1",


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