{"action":"created","comment":{"url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments/34893523","id":34893523,"diff_hunk":"@@ -1,8 +1,21 @@\n-if Rails.env.development? || Rails.env.test?\n-  require 'rubocop/rake_task'\n-\n-  desc 'Execute rubocop -DR'\n-  RuboCop::RakeTask.new(:rubocop) do |t|\n-    t.options = ['-RDS'] # Rails, display cop name and styleguide link\n+begin\n+  require \"rubocop\"\n+  require \"rubocop/rake_task\"\n+rescue LoadError # rubocop:disable Lint/HandleExceptions\n+else\n+  Rake::Task[:rubocop].clear if Rake::Task.task_defined?(:rubocop)\n+  desc 'Execute rubocop'\n+  RuboCop::RakeTask.new(:rubocop) do |task|\n+    task.formatters = ['progress']\n+    task.options = ['--rails', '--display-cop-names', '--display-style-guide']\n+    task.patterns = [\n+      'Gemfile',\n+      'Rakefile',\n+      'lib/**/*.{rb,rake}',\n+      'config/**/*.rb',\n+      'app/**/*.rb',\n+      'test/**/*.rb'\n+    ]","path":"lib/tasks/rubocop.rake","position":24,"original_position":24,"commit_id":"68f635eb7a393156944af2193c253572d4f72aba","original_commit_id":"68f635eb7a393156944af2193c253572d4f72aba","user":{"login":"bf4","id":142914,"avatar_url":"https://avatars.githubusercontent.com/u/142914?v=3","gravatar_id":"","url":"https://api.github.com/users/bf4","html_url":"https://github.com/bf4","followers_url":"https://api.github.com/users/bf4/followers","following_url":"https://api.github.com/users/bf4/following{/other_user}","gists_url":"https://api.github.com/users/bf4/gists{/gist_id}","starred_url":"https://api.github.com/users/bf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bf4/subscriptions","organizations_url":"https://api.github.com/users/bf4/orgs","repos_url":"https://api.github.com/users/bf4/repos","events_url":"https://api.github.com/users/bf4/events{/privacy}","received_events_url":"https://api.github.com/users/bf4/received_events","type":"User","site_admin":false},"body":"these patterns overrides whatever's in the `.rubocop.yml`. I've found it convenient to do it this way in the past, but don't feel strongly about it if you'd prefer to only have one definition. As I wrote in one of the commits, we could have less strict Rubocop behavior on CI, e.g. we could have\r\n\r\n> bundle exec rake rubocop # won't run on test/\r\n> bundle exec rubocop         # will run on test/","created_at":"2015-07-17T14:25:24Z","updated_at":"2015-07-17T14:25:24Z","html_url":"https://github.com/rubygems/rubygems.org/pull/1024#discussion_r34893523","pull_request_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024","_links":{"self":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments/34893523"},"html":{"href":"https://github.com/rubygems/rubygems.org/pull/1024#discussion_r34893523"},"pull_request":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024"}}},"pull_request":{"url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024","id":40160515,"html_url":"https://github.com/rubygems/rubygems.org/pull/1024","diff_url":"https://github.com/rubygems/rubygems.org/pull/1024.diff","patch_url":"https://github.com/rubygems/rubygems.org/pull/1024.patch","issue_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/1024","number":1024,"state":"open","locked":false,"title":"Better Rubocop exludes patterns","user":{"login":"bf4","id":142914,"avatar_url":"https://avatars.githubusercontent.com/u/142914?v=3","gravatar_id":"","url":"https://api.github.com/users/bf4","html_url":"https://github.com/bf4","followers_url":"https://api.github.com/users/bf4/followers","following_url":"https://api.github.com/users/bf4/following{/other_user}","gists_url":"https://api.github.com/users/bf4/gists{/gist_id}","starred_url":"https://api.github.com/users/bf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bf4/subscriptions","organizations_url":"https://api.github.com/users/bf4/orgs","repos_url":"https://api.github.com/users/bf4/repos","events_url":"https://api.github.com/users/bf4/events{/privacy}","received_events_url":"https://api.github.com/users/bf4/received_events","type":"User","site_admin":false},"body":"Ref: https://github.com/rubygems/rubygems.org/pull/1019#discussion_r34818587\r\n\r\n@qrush \r\n\r\n> I'm not sure if it's worth it to apply rubocop rules to the db directory.\r\n\r\nNote, I also excluded `test/` since there were some style issues in there.","created_at":"2015-07-16T18:30:32Z","updated_at":"2015-07-17T14:25:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4414e42d7e3f4bf38ce4a7dbdd96f47857a85afe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024/commits","review_comments_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024/comments","review_comment_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/1024/comments","statuses_url":"https://api.github.com/repos/rubygems/rubygems.org/statuses/68f635eb7a393156944af2193c253572d4f72aba","head":{"label":"bf4:rubocop_exclusions","ref":"rubocop_exclusions","sha":"68f635eb7a393156944af2193c253572d4f72aba","user":{"login":"bf4","id":142914,"avatar_url":"https://avatars.githubusercontent.com/u/142914?v=3","gravatar_id":"","url":"https://api.github.com/users/bf4","html_url":"https://github.com/bf4","followers_url":"https://api.github.com/users/bf4/followers","following_url":"https://api.github.com/users/bf4/following{/other_user}","gists_url":"https://api.github.com/users/bf4/gists{/gist_id}","starred_url":"https://api.github.com/users/bf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bf4/subscriptions","organizations_url":"https://api.github.com/users/bf4/orgs","repos_url":"https://api.github.com/users/bf4/repos","events_url":"https://api.github.com/users/bf4/events{/privacy}","received_events_url":"https://api.github.com/users/bf4/received_events","type":"User","site_admin":false},"repo":{"id":25642634,"name":"rubygems.org","full_name":"bf4/rubygems.org","owner":{"login":"bf4","id":142914,"avatar_url":"https://avatars.githubusercontent.com/u/142914?v=3","gravatar_id":"","url":"https://api.github.com/users/bf4","html_url":"https://github.com/bf4","followers_url":"https://api.github.com/users/bf4/followers","following_url":"https://api.github.com/users/bf4/following{/other_user}","gists_url":"https://api.github.com/users/bf4/gists{/gist_id}","starred_url":"https://api.github.com/users/bf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bf4/subscriptions","organizations_url":"https://api.github.com/users/bf4/orgs","repos_url":"https://api.github.com/users/bf4/repos","events_url":"https://api.github.com/users/bf4/events{/privacy}","received_events_url":"https://api.github.com/users/bf4/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bf4/rubygems.org","description":"The Ruby community's gem hosting service.","fork":true,"url":"https://api.github.com/repos/bf4/rubygems.org","forks_url":"https://api.github.com/repos/bf4/rubygems.org/forks","keys_url":"https://api.github.com/repos/bf4/rubygems.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bf4/rubygems.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bf4/rubygems.org/teams","hooks_url":"https://api.github.com/repos/bf4/rubygems.org/hooks","issue_events_url":"https://api.github.com/repos/bf4/rubygems.org/issues/events{/number}","events_url":"https://api.github.com/repos/bf4/rubygems.org/events","assignees_url":"https://api.github.com/repos/bf4/rubygems.org/assignees{/user}","branches_url":"https://api.github.com/repos/bf4/rubygems.org/branches{/branch}","tags_url":"https://api.github.com/repos/bf4/rubygems.org/tags","blobs_url":"https://api.github.com/repos/bf4/rubygems.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bf4/rubygems.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bf4/rubygems.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/bf4/rubygems.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bf4/rubygems.org/statuses/{sha}","languages_url":"https://api.github.com/repos/bf4/rubygems.org/languages","stargazers_url":"https://api.github.com/repos/bf4/rubygems.org/stargazers","contributors_url":"https://api.github.com/repos/bf4/rubygems.org/contributors","subscribers_url":"https://api.github.com/repos/bf4/rubygems.org/subscribers","subscription_url":"https://api.github.com/repos/bf4/rubygems.org/subscription","commits_url":"https://api.github.com/repos/bf4/rubygems.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/bf4/rubygems.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/bf4/rubygems.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/bf4/rubygems.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/bf4/rubygems.org/contents/{+path}","compare_url":"https://api.github.com/repos/bf4/rubygems.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bf4/rubygems.org/merges","archive_url":"https://api.github.com/repos/bf4/rubygems.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bf4/rubygems.org/downloads","issues_url":"https://api.github.com/repos/bf4/rubygems.org/issues{/number}","pulls_url":"https://api.github.com/repos/bf4/rubygems.org/pulls{/number}","milestones_url":"https://api.github.com/repos/bf4/rubygems.org/milestones{/number}","notifications_url":"https://api.github.com/repos/bf4/rubygems.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bf4/rubygems.org/labels{/name}","releases_url":"https://api.github.com/repos/bf4/rubygems.org/releases{/id}","created_at":"2014-10-23T14:58:08Z","updated_at":"2014-10-22T00:55:47Z","pushed_at":"2015-07-17T14:04:34Z","git_url":"git://github.com/bf4/rubygems.org.git","ssh_url":"git@github.com:bf4/rubygems.org.git","clone_url":"https://github.com/bf4/rubygems.org.git","svn_url":"https://github.com/bf4/rubygems.org","homepage":"https://rubygems.org","size":482116,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rubygems:master","ref":"master","sha":"38be7bbbda8b2119c81a37520882dc1d8a412ee6","user":{"login":"rubygems","id":208761,"avatar_url":"https://avatars.githubusercontent.com/u/208761?v=3","gravatar_id":"","url":"https://api.github.com/users/rubygems","html_url":"https://github.com/rubygems","followers_url":"https://api.github.com/users/rubygems/followers","following_url":"https://api.github.com/users/rubygems/following{/other_user}","gists_url":"https://api.github.com/users/rubygems/gists{/gist_id}","starred_url":"https://api.github.com/users/rubygems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubygems/subscriptions","organizations_url":"https://api.github.com/users/rubygems/orgs","repos_url":"https://api.github.com/users/rubygems/repos","events_url":"https://api.github.com/users/rubygems/events{/privacy}","received_events_url":"https://api.github.com/users/rubygems/received_events","type":"Organization","site_admin":false},"repo":{"id":117646,"name":"rubygems.org","full_name":"rubygems/rubygems.org","owner":{"login":"rubygems","id":208761,"avatar_url":"https://avatars.githubusercontent.com/u/208761?v=3","gravatar_id":"","url":"https://api.github.com/users/rubygems","html_url":"https://github.com/rubygems","followers_url":"https://api.github.com/users/rubygems/followers","following_url":"https://api.github.com/users/rubygems/following{/other_user}","gists_url":"https://api.github.com/users/rubygems/gists{/gist_id}","starred_url":"https://api.github.com/users/rubygems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubygems/subscriptions","organizations_url":"https://api.github.com/users/rubygems/orgs","repos_url":"https://api.github.com/users/rubygems/repos","events_url":"https://api.github.com/users/rubygems/events{/privacy}","received_events_url":"https://api.github.com/users/rubygems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubygems/rubygems.org","description":"The Ruby community's gem hosting service.","fork":false,"url":"https://api.github.com/repos/rubygems/rubygems.org","forks_url":"https://api.github.com/repos/rubygems/rubygems.org/forks","keys_url":"https://api.github.com/repos/rubygems/rubygems.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubygems/rubygems.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubygems/rubygems.org/teams","hooks_url":"https://api.github.com/repos/rubygems/rubygems.org/hooks","issue_events_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/events{/number}","events_url":"https://api.github.com/repos/rubygems/rubygems.org/events","assignees_url":"https://api.github.com/repos/rubygems/rubygems.org/assignees{/user}","branches_url":"https://api.github.com/repos/rubygems/rubygems.org/branches{/branch}","tags_url":"https://api.github.com/repos/rubygems/rubygems.org/tags","blobs_url":"https://api.github.com/repos/rubygems/rubygems.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubygems/rubygems.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubygems/rubygems.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubygems/rubygems.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubygems/rubygems.org/statuses/{sha}","languages_url":"https://api.github.com/repos/rubygems/rubygems.org/languages","stargazers_url":"https://api.github.com/repos/rubygems/rubygems.org/stargazers","contributors_url":"https://api.github.com/repos/rubygems/rubygems.org/contributors","subscribers_url":"https://api.github.com/repos/rubygems/rubygems.org/subscribers","subscription_url":"https://api.github.com/repos/rubygems/rubygems.org/subscription","commits_url":"https://api.github.com/repos/rubygems/rubygems.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubygems/rubygems.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubygems/rubygems.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubygems/rubygems.org/contents/{+path}","compare_url":"https://api.github.com/repos/rubygems/rubygems.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubygems/rubygems.org/merges","archive_url":"https://api.github.com/repos/rubygems/rubygems.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubygems/rubygems.org/downloads","issues_url":"https://api.github.com/repos/rubygems/rubygems.org/issues{/number}","pulls_url":"https://api.github.com/repos/rubygems/rubygems.org/pulls{/number}","milestones_url":"https://api.github.com/repos/rubygems/rubygems.org/milestones{/number}","notifications_url":"https://api.github.com/repos/rubygems/rubygems.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubygems/rubygems.org/labels{/name}","releases_url":"https://api.github.com/repos/rubygems/rubygems.org/releases{/id}","created_at":"2009-01-29T22:30:46Z","updated_at":"2015-07-17T06:08:28Z","pushed_at":"2015-07-17T14:04:36Z","git_url":"git://github.com/rubygems/rubygems.org.git","ssh_url":"git@github.com:rubygems/rubygems.org.git","clone_url":"https://github.com/rubygems/rubygems.org.git","svn_url":"https://github.com/rubygems/rubygems.org","homepage":"https://rubygems.org","size":640540,"stargazers_count":1202,"watchers_count":1202,"language":"HTML","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":463,"mirror_url":null,"open_issues_count":49,"forks":463,"open_issues":49,"watchers":1202,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024"},"html":{"href":"https://github.com/rubygems/rubygems.org/pull/1024"},"issue":{"href":"https://api.github.com/repos/rubygems/rubygems.org/issues/1024"},"comments":{"href":"https://api.github.com/repos/rubygems/rubygems.org/issues/1024/comments"},"review_comments":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024/comments"},"review_comment":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubygems/rubygems.org/pulls/1024/commits"},"statuses":{"href":"https://api.github.com/repos/rubygems/rubygems.org/statuses/68f635eb7a393156944af2193c253572d4f72aba"}}}}