{"action":"closed","number":70,"pull_request":{"url":"https://api.github.com/repos/tapajos/highrise/pulls/70","id":16337561,"html_url":"https://github.com/tapajos/highrise/pull/70","diff_url":"https://github.com/tapajos/highrise/pull/70.diff","patch_url":"https://github.com/tapajos/highrise/pull/70.patch","issue_url":"https://api.github.com/repos/tapajos/highrise/issues/70","number":70,"state":"closed","locked":false,"title":"Changed tags to return ActiveResource objects rather than arrays","user":{"login":"basvodde","id":509919,"avatar_url":"https://avatars.githubusercontent.com/u/509919?v=3","gravatar_id":"","url":"https://api.github.com/users/basvodde","html_url":"https://github.com/basvodde","followers_url":"https://api.github.com/users/basvodde/followers","following_url":"https://api.github.com/users/basvodde/following{/other_user}","gists_url":"https://api.github.com/users/basvodde/gists{/gist_id}","starred_url":"https://api.github.com/users/basvodde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basvodde/subscriptions","organizations_url":"https://api.github.com/users/basvodde/orgs","repos_url":"https://api.github.com/users/basvodde/repos","events_url":"https://api.github.com/users/basvodde/events{/privacy}","received_events_url":"https://api.github.com/users/basvodde/received_events","type":"User","site_admin":false},"body":"This pull request is a bit harder than the previous ones (actually delayed this one for a while to think about the specs). The essence is simple. The tags method should return ActiveResource objects (in this case Highrise::Tag) rather than Hash. If it doesn't, then it causes different behavior between dealing with an existing Person or with a new Person. (It was actually quite hard to figure this one out when I got a failure thrown at me when running in production).\r\n\r\nEarlier version used get(:tags) which returns an unprocessed Hash. It was hard (stackoverflow said impossible) to change that in a Highrise::Tag object. Now it uses the normal find interface to find 'itself' when the tags attribute do not exist yet and then it will copy the tags from that object into itself. This ensures the objects are of the right type.\r\n\r\nInitially, I had only fixed this for Person and removed it out of the Taggable mixin. I was able to generate the implementation to also work for Company (using self.class instead of Highrise::Person) but the specs are more difficult to generalize, so I left them in Person for now.\r\n\r\nThe pull request is important as without it I can't run my code in production. However, would be open for discussion on solving this in a different way. It works but I'm not incredibly happy with it. (in fact, I'm not happy that Highrise does as if people and companies are the same thing! but that is a different story)","created_at":"2014-05-26T14:01:12Z","updated_at":"2016-03-04T17:41:56Z","closed_at":"2016-03-04T17:41:56Z","merged_at":"2016-03-04T17:41:56Z","merge_commit_sha":"1539457b588aec3ae1a8d40c28b22209847ec0a1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tapajos/highrise/pulls/70/commits","review_comments_url":"https://api.github.com/repos/tapajos/highrise/pulls/70/comments","review_comment_url":"https://api.github.com/repos/tapajos/highrise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tapajos/highrise/issues/70/comments","statuses_url":"https://api.github.com/repos/tapajos/highrise/statuses/4392da0700f7f1f979975e0bbe17d7d8da795343","head":{"label":"basvodde:master","ref":"master","sha":"4392da0700f7f1f979975e0bbe17d7d8da795343","user":{"login":"basvodde","id":509919,"avatar_url":"https://avatars.githubusercontent.com/u/509919?v=3","gravatar_id":"","url":"https://api.github.com/users/basvodde","html_url":"https://github.com/basvodde","followers_url":"https://api.github.com/users/basvodde/followers","following_url":"https://api.github.com/users/basvodde/following{/other_user}","gists_url":"https://api.github.com/users/basvodde/gists{/gist_id}","starred_url":"https://api.github.com/users/basvodde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basvodde/subscriptions","organizations_url":"https://api.github.com/users/basvodde/orgs","repos_url":"https://api.github.com/users/basvodde/repos","events_url":"https://api.github.com/users/basvodde/events{/privacy}","received_events_url":"https://api.github.com/users/basvodde/received_events","type":"User","site_admin":false},"repo":{"id":18504116,"name":"highrise","full_name":"basvodde/highrise","owner":{"login":"basvodde","id":509919,"avatar_url":"https://avatars.githubusercontent.com/u/509919?v=3","gravatar_id":"","url":"https://api.github.com/users/basvodde","html_url":"https://github.com/basvodde","followers_url":"https://api.github.com/users/basvodde/followers","following_url":"https://api.github.com/users/basvodde/following{/other_user}","gists_url":"https://api.github.com/users/basvodde/gists{/gist_id}","starred_url":"https://api.github.com/users/basvodde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basvodde/subscriptions","organizations_url":"https://api.github.com/users/basvodde/orgs","repos_url":"https://api.github.com/users/basvodde/repos","events_url":"https://api.github.com/users/basvodde/events{/privacy}","received_events_url":"https://api.github.com/users/basvodde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/basvodde/highrise","description":"Ruby wrapper around Highrise API.","fork":true,"url":"https://api.github.com/repos/basvodde/highrise","forks_url":"https://api.github.com/repos/basvodde/highrise/forks","keys_url":"https://api.github.com/repos/basvodde/highrise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basvodde/highrise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basvodde/highrise/teams","hooks_url":"https://api.github.com/repos/basvodde/highrise/hooks","issue_events_url":"https://api.github.com/repos/basvodde/highrise/issues/events{/number}","events_url":"https://api.github.com/repos/basvodde/highrise/events","assignees_url":"https://api.github.com/repos/basvodde/highrise/assignees{/user}","branches_url":"https://api.github.com/repos/basvodde/highrise/branches{/branch}","tags_url":"https://api.github.com/repos/basvodde/highrise/tags","blobs_url":"https://api.github.com/repos/basvodde/highrise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basvodde/highrise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basvodde/highrise/git/refs{/sha}","trees_url":"https://api.github.com/repos/basvodde/highrise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basvodde/highrise/statuses/{sha}","languages_url":"https://api.github.com/repos/basvodde/highrise/languages","stargazers_url":"https://api.github.com/repos/basvodde/highrise/stargazers","contributors_url":"https://api.github.com/repos/basvodde/highrise/contributors","subscribers_url":"https://api.github.com/repos/basvodde/highrise/subscribers","subscription_url":"https://api.github.com/repos/basvodde/highrise/subscription","commits_url":"https://api.github.com/repos/basvodde/highrise/commits{/sha}","git_commits_url":"https://api.github.com/repos/basvodde/highrise/git/commits{/sha}","comments_url":"https://api.github.com/repos/basvodde/highrise/comments{/number}","issue_comment_url":"https://api.github.com/repos/basvodde/highrise/issues/comments{/number}","contents_url":"https://api.github.com/repos/basvodde/highrise/contents/{+path}","compare_url":"https://api.github.com/repos/basvodde/highrise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basvodde/highrise/merges","archive_url":"https://api.github.com/repos/basvodde/highrise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basvodde/highrise/downloads","issues_url":"https://api.github.com/repos/basvodde/highrise/issues{/number}","pulls_url":"https://api.github.com/repos/basvodde/highrise/pulls{/number}","milestones_url":"https://api.github.com/repos/basvodde/highrise/milestones{/number}","notifications_url":"https://api.github.com/repos/basvodde/highrise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basvodde/highrise/labels{/name}","releases_url":"https://api.github.com/repos/basvodde/highrise/releases{/id}","deployments_url":"https://api.github.com/repos/basvodde/highrise/deployments","created_at":"2014-04-07T02:01:17Z","updated_at":"2014-05-26T14:01:12Z","pushed_at":"2014-05-26T13:47:18Z","git_url":"git://github.com/basvodde/highrise.git","ssh_url":"git@github.com:basvodde/highrise.git","clone_url":"https://github.com/basvodde/highrise.git","svn_url":"https://github.com/basvodde/highrise","homepage":"","size":692,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tapajos:master","ref":"master","sha":"f44cb3212c6d49549330c46454fe440ac117fa1b","user":{"login":"tapajos","id":3357,"avatar_url":"https://avatars.githubusercontent.com/u/3357?v=3","gravatar_id":"","url":"https://api.github.com/users/tapajos","html_url":"https://github.com/tapajos","followers_url":"https://api.github.com/users/tapajos/followers","following_url":"https://api.github.com/users/tapajos/following{/other_user}","gists_url":"https://api.github.com/users/tapajos/gists{/gist_id}","starred_url":"https://api.github.com/users/tapajos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tapajos/subscriptions","organizations_url":"https://api.github.com/users/tapajos/orgs","repos_url":"https://api.github.com/users/tapajos/repos","events_url":"https://api.github.com/users/tapajos/events{/privacy}","received_events_url":"https://api.github.com/users/tapajos/received_events","type":"User","site_admin":false},"repo":{"id":107634,"name":"highrise","full_name":"tapajos/highrise","owner":{"login":"tapajos","id":3357,"avatar_url":"https://avatars.githubusercontent.com/u/3357?v=3","gravatar_id":"","url":"https://api.github.com/users/tapajos","html_url":"https://github.com/tapajos","followers_url":"https://api.github.com/users/tapajos/followers","following_url":"https://api.github.com/users/tapajos/following{/other_user}","gists_url":"https://api.github.com/users/tapajos/gists{/gist_id}","starred_url":"https://api.github.com/users/tapajos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tapajos/subscriptions","organizations_url":"https://api.github.com/users/tapajos/orgs","repos_url":"https://api.github.com/users/tapajos/repos","events_url":"https://api.github.com/users/tapajos/events{/privacy}","received_events_url":"https://api.github.com/users/tapajos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tapajos/highrise","description":"Ruby wrapper around Highrise API.","fork":false,"url":"https://api.github.com/repos/tapajos/highrise","forks_url":"https://api.github.com/repos/tapajos/highrise/forks","keys_url":"https://api.github.com/repos/tapajos/highrise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tapajos/highrise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tapajos/highrise/teams","hooks_url":"https://api.github.com/repos/tapajos/highrise/hooks","issue_events_url":"https://api.github.com/repos/tapajos/highrise/issues/events{/number}","events_url":"https://api.github.com/repos/tapajos/highrise/events","assignees_url":"https://api.github.com/repos/tapajos/highrise/assignees{/user}","branches_url":"https://api.github.com/repos/tapajos/highrise/branches{/branch}","tags_url":"https://api.github.com/repos/tapajos/highrise/tags","blobs_url":"https://api.github.com/repos/tapajos/highrise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tapajos/highrise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tapajos/highrise/git/refs{/sha}","trees_url":"https://api.github.com/repos/tapajos/highrise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tapajos/highrise/statuses/{sha}","languages_url":"https://api.github.com/repos/tapajos/highrise/languages","stargazers_url":"https://api.github.com/repos/tapajos/highrise/stargazers","contributors_url":"https://api.github.com/repos/tapajos/highrise/contributors","subscribers_url":"https://api.github.com/repos/tapajos/highrise/subscribers","subscription_url":"https://api.github.com/repos/tapajos/highrise/subscription","commits_url":"https://api.github.com/repos/tapajos/highrise/commits{/sha}","git_commits_url":"https://api.github.com/repos/tapajos/highrise/git/commits{/sha}","comments_url":"https://api.github.com/repos/tapajos/highrise/comments{/number}","issue_comment_url":"https://api.github.com/repos/tapajos/highrise/issues/comments{/number}","contents_url":"https://api.github.com/repos/tapajos/highrise/contents/{+path}","compare_url":"https://api.github.com/repos/tapajos/highrise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tapajos/highrise/merges","archive_url":"https://api.github.com/repos/tapajos/highrise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tapajos/highrise/downloads","issues_url":"https://api.github.com/repos/tapajos/highrise/issues{/number}","pulls_url":"https://api.github.com/repos/tapajos/highrise/pulls{/number}","milestones_url":"https://api.github.com/repos/tapajos/highrise/milestones{/number}","notifications_url":"https://api.github.com/repos/tapajos/highrise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tapajos/highrise/labels{/name}","releases_url":"https://api.github.com/repos/tapajos/highrise/releases{/id}","deployments_url":"https://api.github.com/repos/tapajos/highrise/deployments","created_at":"2009-01-14T23:23:05Z","updated_at":"2016-02-07T10:54:15Z","pushed_at":"2016-03-04T17:41:56Z","git_url":"git://github.com/tapajos/highrise.git","ssh_url":"git@github.com:tapajos/highrise.git","clone_url":"https://github.com/tapajos/highrise.git","svn_url":"https://github.com/tapajos/highrise","homepage":"","size":260,"stargazers_count":117,"watchers_count":117,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":11,"forks":75,"open_issues":11,"watchers":117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tapajos/highrise/pulls/70"},"html":{"href":"https://github.com/tapajos/highrise/pull/70"},"issue":{"href":"https://api.github.com/repos/tapajos/highrise/issues/70"},"comments":{"href":"https://api.github.com/repos/tapajos/highrise/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/tapajos/highrise/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/tapajos/highrise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tapajos/highrise/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/tapajos/highrise/statuses/4392da0700f7f1f979975e0bbe17d7d8da795343"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"lucasmartins","id":32857,"avatar_url":"https://avatars.githubusercontent.com/u/32857?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasmartins","html_url":"https://github.com/lucasmartins","followers_url":"https://api.github.com/users/lucasmartins/followers","following_url":"https://api.github.com/users/lucasmartins/following{/other_user}","gists_url":"https://api.github.com/users/lucasmartins/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasmartins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasmartins/subscriptions","organizations_url":"https://api.github.com/users/lucasmartins/orgs","repos_url":"https://api.github.com/users/lucasmartins/repos","events_url":"https://api.github.com/users/lucasmartins/events{/privacy}","received_events_url":"https://api.github.com/users/lucasmartins/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":1,"additions":38,"deletions":12,"changed_files":3}}