{"action":"created","issue":{"url":"https://api.github.com/repos/education/classroom/issues/545","repository_url":"https://api.github.com/repos/education/classroom","labels_url":"https://api.github.com/repos/education/classroom/issues/545/labels{/name}","comments_url":"https://api.github.com/repos/education/classroom/issues/545/comments","events_url":"https://api.github.com/repos/education/classroom/issues/545/events","html_url":"https://github.com/education/classroom/pull/545","id":145540342,"number":545,"title":"[WIP] Kill decorators in Classroom","user":{"login":"tarebyte","id":564113,"avatar_url":"https://avatars.githubusercontent.com/u/564113?v=3","gravatar_id":"","url":"https://api.github.com/users/tarebyte","html_url":"https://github.com/tarebyte","followers_url":"https://api.github.com/users/tarebyte/followers","following_url":"https://api.github.com/users/tarebyte/following{/other_user}","gists_url":"https://api.github.com/users/tarebyte/gists{/gist_id}","starred_url":"https://api.github.com/users/tarebyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarebyte/subscriptions","organizations_url":"https://api.github.com/users/tarebyte/orgs","repos_url":"https://api.github.com/users/tarebyte/repos","events_url":"https://api.github.com/users/tarebyte/events{/privacy}","received_events_url":"https://api.github.com/users/tarebyte/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-03T21:05:21Z","updated_at":"2016-04-08T19:34:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/education/classroom/pulls/545","html_url":"https://github.com/education/classroom/pull/545","diff_url":"https://github.com/education/classroom/pull/545.diff","patch_url":"https://github.com/education/classroom/pull/545.patch"},"body":"This PR removes the draper gem and the decorator pattern in Classroom.\r\n\r\nSome things to note here:\r\n\r\n- [ ] `GitHubResource` objects now use keyword arguments\r\n- [ ] We now pass tokens instead of `GitHubClient` objects\r\n- [ ] If we cannot find a resource with a users key we fallback on the Application client id and secrert. If that fails we fall back on the `NullGitHubResource`\r\n- [ ] GitHubResource attributes are created on the creation of the object.\r\n- [ ] Improved the speed of getting a users token for an organization\r\n- [ ] Test coverage is up to 90% :tada: \r\n\r\n/cc @johndbritton @mkcode for thoughts\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/education/classroom/issues/comments/207571400","html_url":"https://github.com/education/classroom/pull/545#issuecomment-207571400","issue_url":"https://api.github.com/repos/education/classroom/issues/545","id":207571400,"user":{"login":"mkcode","id":283496,"avatar_url":"https://avatars.githubusercontent.com/u/283496?v=3","gravatar_id":"","url":"https://api.github.com/users/mkcode","html_url":"https://github.com/mkcode","followers_url":"https://api.github.com/users/mkcode/followers","following_url":"https://api.github.com/users/mkcode/following{/other_user}","gists_url":"https://api.github.com/users/mkcode/gists{/gist_id}","starred_url":"https://api.github.com/users/mkcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkcode/subscriptions","organizations_url":"https://api.github.com/users/mkcode/orgs","repos_url":"https://api.github.com/users/mkcode/repos","events_url":"https://api.github.com/users/mkcode/events{/privacy}","received_events_url":"https://api.github.com/users/mkcode/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T19:34:23Z","updated_at":"2016-04-08T19:34:23Z","body":"Ok. It was goal of mine to make remote-resource work for classroom as well as edu-web. To that end, I would have preferred that feedback was provided to improve remote-resource, rather than doing some redundant work, such as the attributes handling in `GitHubUserResource`.\r\n\r\nPerhaps this can still happen in the future. This PR does give me clear picture of what is missing from it. Though I do see your point about changing the caching. There is also a benefit in this PR being more simple than the remote-resource gem. Maybe we can revisit this in the future, after it becomes more mature from use in edu-web. It would be great if at some point we could get classroom and edu-web running on the same set of GitHub API resources."}}