appium/appium — pull request #3065 by sebv (2014-07-06 18:52:51+00:00)
Title: Transparent response builder in uiauto.

see https://github.com/appium/appium-uiauto/commit/7286f4d75550383b74f30b0052752056c9afba52
This is a summary of changes:
- The response+error logic was moved to command.js, and cleaned up all the other files.
- Added an idempotent `$.smartWrap` method, which does what the mechanic constructor should do (but doesn't)
- If you want an array of elements the uiauto method need to return something like `$.smartWrap(elems)` or `$.smartWrap(elems).dedup()`
- If you want an element the uiauto method need to return something like `$.smartWrap(elems)[0]` or `$.smartWrap(elems).dedup()[0]`, or a UIAElement instance.
- For error just throw errors from ERROR, or whatever, this will be taken care of in command.js.