arangamani/jenkins_api_client — pull request #98 by dougforpres (2013-08-01 22:54:28+00:00)
Title: Add (basic) User retrieval subclass

This new class extends upon the system.list_users method.
There is a new user.list_users that returns full user details for each user.
There is also a new user.get_user(name_or_id) that returns full details for a named user (name or id - exact match)

Jenkins auto-creates users, so if there is a user with "fullName" == "Bilbo Baggins" and someone calls 'user.get_user("bilbo baggins")' Jenkins will helpfully (not) create a user for you.

We needed this functionality so we can look up user-email addresses from all those places where Jenkins just gives you "fullName" or "id".

Tests attached.

Note: Fixed a test in system.list_users where it was missing the ".should" qualifier, meaning the test never failed.
Now it will fail if the returned user could != 1

Thanks
Doug