{"action":"created","comment":{"url":"https://api.github.com/repos/troessner/reek/pulls/comments/53837570","id":53837570,"diff_hunk":"@@ -19,4 +19,21 @@\n       expect(smell_types).to eq(smell_types.sort_by(&:name))\n     end\n   end\n+\n+  describe '.eligible_smell_types' do\n+    it 'returns all smell detectors by default' do\n+      expect(described_class.eligible_smell_types).to eq described_class.smell_types\n+    end\n+\n+    it 'returns smell detectors specified by type' do\n+      result = described_class.eligible_smell_types(['IrresponsibleModule', 'TooManyStatements'])\n+      expect(result).to eq [Reek::Smells::IrresponsibleModule,\n+                            Reek::Smells::TooManyStatements]\n+    end\n+\n+    it 'returns smell detectors specified by category' do\n+      result = described_class.eligible_smell_types(['Duplication'])\n+      expect(result).to eq [Reek::Smells::DuplicateMethodCall]\n+    end","path":"spec/reek/smells/smell_repository_spec.rb","position":19,"original_position":19,"commit_id":"b12218a24c118c675e777eff2937047ec8d320a8","original_commit_id":"b12218a24c118c675e777eff2937047ec8d320a8","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"body":"Nice specs, clean and concise.","created_at":"2016-02-23T19:43:28Z","updated_at":"2016-02-23T19:43:28Z","html_url":"https://github.com/troessner/reek/pull/864#discussion_r53837570","pull_request_url":"https://api.github.com/repos/troessner/reek/pulls/864","_links":{"self":{"href":"https://api.github.com/repos/troessner/reek/pulls/comments/53837570"},"html":{"href":"https://github.com/troessner/reek/pull/864#discussion_r53837570"},"pull_request":{"href":"https://api.github.com/repos/troessner/reek/pulls/864"}}},"pull_request":{"url":"https://api.github.com/repos/troessner/reek/pulls/864","id":60395158,"html_url":"https://github.com/troessner/reek/pull/864","diff_url":"https://github.com/troessner/reek/pull/864.diff","patch_url":"https://github.com/troessner/reek/pull/864.patch","issue_url":"https://api.github.com/repos/troessner/reek/issues/864","number":864,"state":"open","locked":false,"title":"Allow smell detectors to be specified by category","user":{"login":"mvz","id":10898,"avatar_url":"https://avatars.githubusercontent.com/u/10898?v=3","gravatar_id":"","url":"https://api.github.com/users/mvz","html_url":"https://github.com/mvz","followers_url":"https://api.github.com/users/mvz/followers","following_url":"https://api.github.com/users/mvz/following{/other_user}","gists_url":"https://api.github.com/users/mvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvz/subscriptions","organizations_url":"https://api.github.com/users/mvz/orgs","repos_url":"https://api.github.com/users/mvz/repos","events_url":"https://api.github.com/users/mvz/events{/privacy}","received_events_url":"https://api.github.com/users/mvz/received_events","type":"User","site_admin":false},"body":"#863 ","created_at":"2016-02-23T19:29:12Z","updated_at":"2016-02-23T19:43:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb76a46f78af0e2109d910b9c5d6b17d1dd5deef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/troessner/reek/pulls/864/commits","review_comments_url":"https://api.github.com/repos/troessner/reek/pulls/864/comments","review_comment_url":"https://api.github.com/repos/troessner/reek/pulls/comments{/number}","comments_url":"https://api.github.com/repos/troessner/reek/issues/864/comments","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/b12218a24c118c675e777eff2937047ec8d320a8","head":{"label":"troessner:select-smells-by-category","ref":"select-smells-by-category","sha":"b12218a24c118c675e777eff2937047ec8d320a8","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"repo":{"id":49515,"name":"reek","full_name":"troessner/reek","owner":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troessner/reek","description":"Code smell detector for Ruby","fork":false,"url":"https://api.github.com/repos/troessner/reek","forks_url":"https://api.github.com/repos/troessner/reek/forks","keys_url":"https://api.github.com/repos/troessner/reek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troessner/reek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troessner/reek/teams","hooks_url":"https://api.github.com/repos/troessner/reek/hooks","issue_events_url":"https://api.github.com/repos/troessner/reek/issues/events{/number}","events_url":"https://api.github.com/repos/troessner/reek/events","assignees_url":"https://api.github.com/repos/troessner/reek/assignees{/user}","branches_url":"https://api.github.com/repos/troessner/reek/branches{/branch}","tags_url":"https://api.github.com/repos/troessner/reek/tags","blobs_url":"https://api.github.com/repos/troessner/reek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troessner/reek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troessner/reek/git/refs{/sha}","trees_url":"https://api.github.com/repos/troessner/reek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/{sha}","languages_url":"https://api.github.com/repos/troessner/reek/languages","stargazers_url":"https://api.github.com/repos/troessner/reek/stargazers","contributors_url":"https://api.github.com/repos/troessner/reek/contributors","subscribers_url":"https://api.github.com/repos/troessner/reek/subscribers","subscription_url":"https://api.github.com/repos/troessner/reek/subscription","commits_url":"https://api.github.com/repos/troessner/reek/commits{/sha}","git_commits_url":"https://api.github.com/repos/troessner/reek/git/commits{/sha}","comments_url":"https://api.github.com/repos/troessner/reek/comments{/number}","issue_comment_url":"https://api.github.com/repos/troessner/reek/issues/comments{/number}","contents_url":"https://api.github.com/repos/troessner/reek/contents/{+path}","compare_url":"https://api.github.com/repos/troessner/reek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troessner/reek/merges","archive_url":"https://api.github.com/repos/troessner/reek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troessner/reek/downloads","issues_url":"https://api.github.com/repos/troessner/reek/issues{/number}","pulls_url":"https://api.github.com/repos/troessner/reek/pulls{/number}","milestones_url":"https://api.github.com/repos/troessner/reek/milestones{/number}","notifications_url":"https://api.github.com/repos/troessner/reek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troessner/reek/labels{/name}","releases_url":"https://api.github.com/repos/troessner/reek/releases{/id}","deployments_url":"https://api.github.com/repos/troessner/reek/deployments","created_at":"2008-09-05T10:48:33Z","updated_at":"2016-02-23T19:15:10Z","pushed_at":"2016-02-23T19:32:34Z","git_url":"git://github.com/troessner/reek.git","ssh_url":"git@github.com:troessner/reek.git","clone_url":"https://github.com/troessner/reek.git","svn_url":"https://github.com/troessner/reek","homepage":"https://github.com/troessner/reek/wiki","size":4692,"stargazers_count":1748,"watchers_count":1748,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":29,"forks":119,"open_issues":29,"watchers":1748,"default_branch":"master"}},"base":{"label":"troessner:master","ref":"master","sha":"99a983adccf67b89ddccb5af1cb2b934cfa51537","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"repo":{"id":49515,"name":"reek","full_name":"troessner/reek","owner":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troessner/reek","description":"Code smell detector for Ruby","fork":false,"url":"https://api.github.com/repos/troessner/reek","forks_url":"https://api.github.com/repos/troessner/reek/forks","keys_url":"https://api.github.com/repos/troessner/reek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troessner/reek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troessner/reek/teams","hooks_url":"https://api.github.com/repos/troessner/reek/hooks","issue_events_url":"https://api.github.com/repos/troessner/reek/issues/events{/number}","events_url":"https://api.github.com/repos/troessner/reek/events","assignees_url":"https://api.github.com/repos/troessner/reek/assignees{/user}","branches_url":"https://api.github.com/repos/troessner/reek/branches{/branch}","tags_url":"https://api.github.com/repos/troessner/reek/tags","blobs_url":"https://api.github.com/repos/troessner/reek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troessner/reek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troessner/reek/git/refs{/sha}","trees_url":"https://api.github.com/repos/troessner/reek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/{sha}","languages_url":"https://api.github.com/repos/troessner/reek/languages","stargazers_url":"https://api.github.com/repos/troessner/reek/stargazers","contributors_url":"https://api.github.com/repos/troessner/reek/contributors","subscribers_url":"https://api.github.com/repos/troessner/reek/subscribers","subscription_url":"https://api.github.com/repos/troessner/reek/subscription","commits_url":"https://api.github.com/repos/troessner/reek/commits{/sha}","git_commits_url":"https://api.github.com/repos/troessner/reek/git/commits{/sha}","comments_url":"https://api.github.com/repos/troessner/reek/comments{/number}","issue_comment_url":"https://api.github.com/repos/troessner/reek/issues/comments{/number}","contents_url":"https://api.github.com/repos/troessner/reek/contents/{+path}","compare_url":"https://api.github.com/repos/troessner/reek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troessner/reek/merges","archive_url":"https://api.github.com/repos/troessner/reek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troessner/reek/downloads","issues_url":"https://api.github.com/repos/troessner/reek/issues{/number}","pulls_url":"https://api.github.com/repos/troessner/reek/pulls{/number}","milestones_url":"https://api.github.com/repos/troessner/reek/milestones{/number}","notifications_url":"https://api.github.com/repos/troessner/reek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troessner/reek/labels{/name}","releases_url":"https://api.github.com/repos/troessner/reek/releases{/id}","deployments_url":"https://api.github.com/repos/troessner/reek/deployments","created_at":"2008-09-05T10:48:33Z","updated_at":"2016-02-23T19:15:10Z","pushed_at":"2016-02-23T19:32:34Z","git_url":"git://github.com/troessner/reek.git","ssh_url":"git@github.com:troessner/reek.git","clone_url":"https://github.com/troessner/reek.git","svn_url":"https://github.com/troessner/reek","homepage":"https://github.com/troessner/reek/wiki","size":4692,"stargazers_count":1748,"watchers_count":1748,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":29,"forks":119,"open_issues":29,"watchers":1748,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/troessner/reek/pulls/864"},"html":{"href":"https://github.com/troessner/reek/pull/864"},"issue":{"href":"https://api.github.com/repos/troessner/reek/issues/864"},"comments":{"href":"https://api.github.com/repos/troessner/reek/issues/864/comments"},"review_comments":{"href":"https://api.github.com/repos/troessner/reek/pulls/864/comments"},"review_comment":{"href":"https://api.github.com/repos/troessner/reek/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/troessner/reek/pulls/864/commits"},"statuses":{"href":"https://api.github.com/repos/troessner/reek/statuses/b12218a24c118c675e777eff2937047ec8d320a8"}}}}