sproutcore/sproutcore — pull request #658 by publickeating (2011-12-19 20:13:16+00:00)
Title: Bring standardization to the growing list of detected browsers, layout engines, devices and os's. 

- Standardized set of properties on SC.browser:
device, name, version, engine, engineVersion, os, osVersion.
This will make it easier to match a specific browser (ex. Chrome), specific engine (ex. Webkit), a specific browser version (ex. Safari 5.0.5) or a specific engine version (ex. Webkit 533.16).
- Added constants for comparison: SC.BROWSER, SC.DEVICE, SC.ENGINE & SC.OS
- Better detection of browser version vs. layout engine version.
- Detecting blackberry browser/device/os.
- Detecting presto engine/version.
- Detecting gecko engine/version.
- Detecting android device/os.
- Several new user agents in unit tests.
- Added ISO 639-1 country code support and unit test: SC.browser.countryCode.
- Prevent bugs that exist when blindly transforming version Strings into Numbers for comparison. For example, Version strings may have multiple sub-versions and may include letters like 'b' for beta. Use SC.browser.versionMajor(), SC.browser.versionMinor() or SC.browser.versionFloat() to correctly transform a version into a comparable Version. (Not flawless, but much safer).
- Deprecated the multiple SC.browser properties, since there is no clear rule for what becomes a property (device vs. browser vs. engine vs. browser version vs. engine version) and it will be easy for future user agents to introduce bugs in any one of the properties since they are all calculated somewhat independently.

There's a lot of code here, see the updated unit tests for example results.