{"action":"closed","number":907,"pull_request":{"url":"https://api.github.com/repos/ndlib/sipity/pulls/907","id":48073288,"html_url":"https://github.com/ndlib/sipity/pull/907","diff_url":"https://github.com/ndlib/sipity/pull/907.diff","patch_url":"https://github.com/ndlib/sipity/pull/907.patch","issue_url":"https://api.github.com/repos/ndlib/sipity/issues/907","number":907,"state":"closed","locked":false,"title":"Updating according to reek","user":{"login":"jeremyf","id":2130,"avatar_url":"https://avatars.githubusercontent.com/u/2130?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyf","html_url":"https://github.com/jeremyf","followers_url":"https://api.github.com/users/jeremyf/followers","following_url":"https://api.github.com/users/jeremyf/following{/other_user}","gists_url":"https://api.github.com/users/jeremyf/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyf/subscriptions","organizations_url":"https://api.github.com/users/jeremyf/orgs","repos_url":"https://api.github.com/users/jeremyf/repos","events_url":"https://api.github.com/users/jeremyf/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyf/received_events","type":"User","site_admin":false},"body":"## Adding reek for finding code smells\r\n\r\n@887cd145504e20ca2c7cd5aa5370063f48e94f7f\r\n\r\nWhy:\r\n\r\n* Because we want to avoid smelly code.\r\n\r\nThis change addresses the need by:\r\n\r\n* `$ reek app/` to see what Reek identifies as possible code smells.\r\n\r\n## Adding a .reek.config file\r\n\r\n@0a2a11c29a5189f540fa2525ba160155e315179f\r\n\r\nIn addition to leveraging Rubocop, I want to explore the automation\r\nand analysis provided by [reek](https://github.com/troessner/reek).\r\n\r\nThere is some overlap between what Rubocop detects and checks for,\r\nversus what reek looks for.\r\n\r\n```console\r\n$ bundle exec reek -c .reek.config app/\r\n```\r\n\r\n## Updating code based on Reek\r\n\r\n@c88e862215e5d8f557a759174514426aa29affc0\r\n\r\nResponding to the following message:\r\n\r\n```console\r\nSipity::Controllers::WorkAreasController#query_or_command_attributes\r\ncalls Kaminari.config 2 times (DuplicateMethodCall)\r\n```\r\n\r\n## Fixing a code smell found by Reek\r\n\r\n@bd03772fa55a5a57372d6dfd10f5827ae48aa6ea\r\n\r\n```console\r\n[17]:Sipity::Services::ApplyAccessPoliciesTo#access_policies is a\r\n     writable attribute (Attribute)\r\n[17]:Sipity::Services::ApplyAccessPoliciesTo#user is a writable\r\n     attribute (Attribute)\r\n[17]:Sipity::Services::ApplyAccessPoliciesTo#work is a writable\r\n     attribute (Attribute)\r\n```\r\n\r\n## Removing duplicate method call\r\n\r\n@ff2d6c7d086effe0b79fecbf408ca67b629a692a\r\n\r\n```console\r\n[13, 14, 15]:Sipity::Services::NoidMinter#connection calls Figaro.env 3\r\n             times (DuplicateMethodCall)\r\n```\r\n\r\n## Updating method as per Reek\r\n\r\n@39579c35a110707e1ddae94be674d4fc4fda733d\r\n\r\n```console\r\n[63, 65]:Sipity::Services::NetidQueryService#url calls Figaro.env 2\r\n         times (DuplicateMethodCall)\r\n```\r\n","created_at":"2015-10-19T13:46:12Z","updated_at":"2015-10-19T13:50:29Z","closed_at":"2015-10-19T13:50:29Z","merged_at":"2015-10-19T13:50:29Z","merge_commit_sha":"16ea4b3d1e39ee3ebfa473ef45ff929457b845fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ndlib/sipity/pulls/907/commits","review_comments_url":"https://api.github.com/repos/ndlib/sipity/pulls/907/comments","review_comment_url":"https://api.github.com/repos/ndlib/sipity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ndlib/sipity/issues/907/comments","statuses_url":"https://api.github.com/repos/ndlib/sipity/statuses/39579c35a110707e1ddae94be674d4fc4fda733d","head":{"label":"ndlib:updating-according-to-reek","ref":"updating-according-to-reek","sha":"39579c35a110707e1ddae94be674d4fc4fda733d","user":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"repo":{"id":26916085,"name":"sipity","full_name":"ndlib/sipity","owner":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ndlib/sipity","description":"Sipity is a patron-oriented workflow application.","fork":false,"url":"https://api.github.com/repos/ndlib/sipity","forks_url":"https://api.github.com/repos/ndlib/sipity/forks","keys_url":"https://api.github.com/repos/ndlib/sipity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndlib/sipity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndlib/sipity/teams","hooks_url":"https://api.github.com/repos/ndlib/sipity/hooks","issue_events_url":"https://api.github.com/repos/ndlib/sipity/issues/events{/number}","events_url":"https://api.github.com/repos/ndlib/sipity/events","assignees_url":"https://api.github.com/repos/ndlib/sipity/assignees{/user}","branches_url":"https://api.github.com/repos/ndlib/sipity/branches{/branch}","tags_url":"https://api.github.com/repos/ndlib/sipity/tags","blobs_url":"https://api.github.com/repos/ndlib/sipity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndlib/sipity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndlib/sipity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndlib/sipity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndlib/sipity/statuses/{sha}","languages_url":"https://api.github.com/repos/ndlib/sipity/languages","stargazers_url":"https://api.github.com/repos/ndlib/sipity/stargazers","contributors_url":"https://api.github.com/repos/ndlib/sipity/contributors","subscribers_url":"https://api.github.com/repos/ndlib/sipity/subscribers","subscription_url":"https://api.github.com/repos/ndlib/sipity/subscription","commits_url":"https://api.github.com/repos/ndlib/sipity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndlib/sipity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndlib/sipity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndlib/sipity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndlib/sipity/contents/{+path}","compare_url":"https://api.github.com/repos/ndlib/sipity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndlib/sipity/merges","archive_url":"https://api.github.com/repos/ndlib/sipity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndlib/sipity/downloads","issues_url":"https://api.github.com/repos/ndlib/sipity/issues{/number}","pulls_url":"https://api.github.com/repos/ndlib/sipity/pulls{/number}","milestones_url":"https://api.github.com/repos/ndlib/sipity/milestones{/number}","notifications_url":"https://api.github.com/repos/ndlib/sipity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndlib/sipity/labels{/name}","releases_url":"https://api.github.com/repos/ndlib/sipity/releases{/id}","created_at":"2014-11-20T14:31:53Z","updated_at":"2015-10-13T17:43:04Z","pushed_at":"2015-10-19T13:50:29Z","git_url":"git://github.com/ndlib/sipity.git","ssh_url":"git@github.com:ndlib/sipity.git","clone_url":"https://github.com/ndlib/sipity.git","svn_url":"https://github.com/ndlib/sipity","homepage":"https://github.com/ndlib/sipity","size":17929,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":38,"forks":2,"open_issues":38,"watchers":6,"default_branch":"master"}},"base":{"label":"ndlib:master","ref":"master","sha":"1548fdb324c132534e2deb3963f47d3a9982a70d","user":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"repo":{"id":26916085,"name":"sipity","full_name":"ndlib/sipity","owner":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ndlib/sipity","description":"Sipity is a patron-oriented workflow application.","fork":false,"url":"https://api.github.com/repos/ndlib/sipity","forks_url":"https://api.github.com/repos/ndlib/sipity/forks","keys_url":"https://api.github.com/repos/ndlib/sipity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndlib/sipity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndlib/sipity/teams","hooks_url":"https://api.github.com/repos/ndlib/sipity/hooks","issue_events_url":"https://api.github.com/repos/ndlib/sipity/issues/events{/number}","events_url":"https://api.github.com/repos/ndlib/sipity/events","assignees_url":"https://api.github.com/repos/ndlib/sipity/assignees{/user}","branches_url":"https://api.github.com/repos/ndlib/sipity/branches{/branch}","tags_url":"https://api.github.com/repos/ndlib/sipity/tags","blobs_url":"https://api.github.com/repos/ndlib/sipity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndlib/sipity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndlib/sipity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndlib/sipity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndlib/sipity/statuses/{sha}","languages_url":"https://api.github.com/repos/ndlib/sipity/languages","stargazers_url":"https://api.github.com/repos/ndlib/sipity/stargazers","contributors_url":"https://api.github.com/repos/ndlib/sipity/contributors","subscribers_url":"https://api.github.com/repos/ndlib/sipity/subscribers","subscription_url":"https://api.github.com/repos/ndlib/sipity/subscription","commits_url":"https://api.github.com/repos/ndlib/sipity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndlib/sipity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndlib/sipity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndlib/sipity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndlib/sipity/contents/{+path}","compare_url":"https://api.github.com/repos/ndlib/sipity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndlib/sipity/merges","archive_url":"https://api.github.com/repos/ndlib/sipity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndlib/sipity/downloads","issues_url":"https://api.github.com/repos/ndlib/sipity/issues{/number}","pulls_url":"https://api.github.com/repos/ndlib/sipity/pulls{/number}","milestones_url":"https://api.github.com/repos/ndlib/sipity/milestones{/number}","notifications_url":"https://api.github.com/repos/ndlib/sipity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndlib/sipity/labels{/name}","releases_url":"https://api.github.com/repos/ndlib/sipity/releases{/id}","created_at":"2014-11-20T14:31:53Z","updated_at":"2015-10-13T17:43:04Z","pushed_at":"2015-10-19T13:50:29Z","git_url":"git://github.com/ndlib/sipity.git","ssh_url":"git@github.com:ndlib/sipity.git","clone_url":"https://github.com/ndlib/sipity.git","svn_url":"https://github.com/ndlib/sipity","homepage":"https://github.com/ndlib/sipity","size":17929,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":38,"forks":2,"open_issues":38,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ndlib/sipity/pulls/907"},"html":{"href":"https://github.com/ndlib/sipity/pull/907"},"issue":{"href":"https://api.github.com/repos/ndlib/sipity/issues/907"},"comments":{"href":"https://api.github.com/repos/ndlib/sipity/issues/907/comments"},"review_comments":{"href":"https://api.github.com/repos/ndlib/sipity/pulls/907/comments"},"review_comment":{"href":"https://api.github.com/repos/ndlib/sipity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ndlib/sipity/pulls/907/commits"},"statuses":{"href":"https://api.github.com/repos/ndlib/sipity/statuses/39579c35a110707e1ddae94be674d4fc4fda733d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jeremyf","id":2130,"avatar_url":"https://avatars.githubusercontent.com/u/2130?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyf","html_url":"https://github.com/jeremyf","followers_url":"https://api.github.com/users/jeremyf/followers","following_url":"https://api.github.com/users/jeremyf/following{/other_user}","gists_url":"https://api.github.com/users/jeremyf/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyf/subscriptions","organizations_url":"https://api.github.com/users/jeremyf/orgs","repos_url":"https://api.github.com/users/jeremyf/repos","events_url":"https://api.github.com/users/jeremyf/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyf/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":6,"additions":58,"deletions":10,"changed_files":7}}