{"action":"created","issue":{"url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/issues/51","labels_url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/issues/51/comments","events_url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/issues/51/events","html_url":"https://github.com/WeAreFarmGeek/diplomat/pull/51","id":103559276,"number":51,"title":"Changed Kv.get to always return an array for recursive calls.","user":{"login":"PeterFCaswell","id":11891688,"avatar_url":"https://avatars.githubusercontent.com/u/11891688?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterFCaswell","html_url":"https://github.com/PeterFCaswell","followers_url":"https://api.github.com/users/PeterFCaswell/followers","following_url":"https://api.github.com/users/PeterFCaswell/following{/other_user}","gists_url":"https://api.github.com/users/PeterFCaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterFCaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterFCaswell/subscriptions","organizations_url":"https://api.github.com/users/PeterFCaswell/orgs","repos_url":"https://api.github.com/users/PeterFCaswell/repos","events_url":"https://api.github.com/users/PeterFCaswell/events{/privacy}","received_events_url":"https://api.github.com/users/PeterFCaswell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-27T17:40:51Z","updated_at":"2015-09-21T16:44:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/pulls/51","html_url":"https://github.com/WeAreFarmGeek/diplomat/pull/51","diff_url":"https://github.com/WeAreFarmGeek/diplomat/pull/51.diff","patch_url":"https://github.com/WeAreFarmGeek/diplomat/pull/51.patch"},"body":"When executing a recursive Kv.get, and there is only one item to\r\nreturn, Diplomat was returning a string instead of an array of\r\nkey/value pairs. This means the caller has no idea what the key\r\nis for the value returned.\r\n\r\nTo fix the problem, we've added a call to RestClient.return_value\r\nthat indicates that it whether this is a recurse get.\r\n\r\nI added a spec to test the above behavoir.\r\n\r\nOne worrisome behavoir remains: if you call Kv.get() with :return\r\nand there is no response, I'm not sure what is the proper response.\r\nFor recursive searches, I pretty sure we're still just returning an\r\nempty string. And I think that recursive searches should always\r\nreturn an array."},"comment":{"url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/issues/comments/142038723","html_url":"https://github.com/WeAreFarmGeek/diplomat/pull/51#issuecomment-142038723","issue_url":"https://api.github.com/repos/WeAreFarmGeek/diplomat/issues/51","id":142038723,"user":{"login":"PeterFCaswell","id":11891688,"avatar_url":"https://avatars.githubusercontent.com/u/11891688?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterFCaswell","html_url":"https://github.com/PeterFCaswell","followers_url":"https://api.github.com/users/PeterFCaswell/followers","following_url":"https://api.github.com/users/PeterFCaswell/following{/other_user}","gists_url":"https://api.github.com/users/PeterFCaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterFCaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterFCaswell/subscriptions","organizations_url":"https://api.github.com/users/PeterFCaswell/orgs","repos_url":"https://api.github.com/users/PeterFCaswell/repos","events_url":"https://api.github.com/users/PeterFCaswell/events{/privacy}","received_events_url":"https://api.github.com/users/PeterFCaswell/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T16:44:56Z","updated_at":"2015-09-21T16:44:56Z","body":"@scalp42 Would you do me a favor and do a close review of this code. I don't like to merge my own PR unless someone else takes a look at it."}}