fastlane-old / scan

The easiest way to run tests of your iOS and Mac app
https://fastlane.tools
221 stars 25 forks source link

Consider both major and minor versions when looking for compatible simulators #61

Closed mpirri closed 8 years ago

mpirri commented 8 years ago

This fixes an issue where if the project specifies a deployment target of, for example, "9.2", scan may attempt to run the tests using the 9.0 simulator (because 9.2 and 9.0 have the same major versions).

KrauseFx commented 8 years ago

This is great, I added one comment, everything else looks perfect :+1:

KrauseFx commented 8 years ago

Any updates on this?

mpirri commented 8 years ago

Regarding your comment about the volume of code required to compare version numbers, do you have any advice about how I can make this code more concise? The code compares both minor and major version numbers, and I wanted to be sure to handle unexpected values in the strings, but I'm not enough of a Ruby guru to know how to do this in less code while still maintaining readability and resiliency.

mfurtak commented 8 years ago

@mpirri When complete, would this help #40?

mpirri commented 8 years ago

I believe so, yes. It will also fix https://github.com/fastlane/scan/issues/17.

mpirri commented 8 years ago

@mfurtak Updated! Doing a full version comparison since it seems that's what xcode does when determining simulator compatibility. Also: all current simulators only have major/minor version numbers.

mfurtak commented 8 years ago

Looks good to me! Feel free to ignore my nitpicks if you'd rather not do another CI cycle :smile:

mfurtak commented 8 years ago

Of course, one of the builds failed and the restart buttons are not currently working on Travis :cry:

mpirri commented 8 years ago

@mfurtak Changed to one-line closure for detect. Hopefully Travis is on-board with this change...

mfurtak commented 8 years ago

:gem: :ship: it!