{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/comments/34054754","id":34054754,"diff_hunk":"@@ -28,36 +31,72 @@ public class JacocoCoverageExtension {\n     def LINE = CoverageType.LINE\n     def METHOD = CoverageType.METHOD\n \n-    public List<Closure<Double>> coverage = new ArrayList<>()\n+    public Multimap<CoverageRealm, Closure<Double>> coverage = ArrayListMultimap.create();\n+\n+    public JacocoCoverageExtension() {\n+        def mc = new ExpandoMetaClass(JacocoCoverageExtension, false, true)\n+        mc.initialize()\n+        this.metaClass = mc\n+\n+        // For each realm, add configuration specifiers (file, _class, etc) to the extension.\n+        CoverageRealm.values().each { realm ->\n+            mc.\"${realm.realmName}\" = { double value ->\n+                threshold(realm, value)\n+            }\n+\n+            mc.\"${realm.realmName}\" = { double value, CoverageType coverageType ->\n+                threshold(realm, value, coverageType)\n+            }\n+\n+            mc.\"${realm.realmName}\" = { double value, String scope ->\n+                threshold(realm, value, scope)\n+            }\n+\n+            mc.\"${realm.realmName}\" = { double value, CoverageType coverageType, String scope ->\n+                threshold(realm, value, coverageType, scope)\n+            }\n+\n+            mc.\"${realm.realmName}\" = { double value, Pattern scopePattern ->","path":"src/main/groovy/com/palantir/jacoco/JacocoCoverageExtension.groovy","position":40,"original_position":40,"commit_id":"143316cbeb208f3d358cbc4f1a6204b862d152a0","original_commit_id":"143316cbeb208f3d358cbc4f1a6204b862d152a0","user":{"login":"uschi2000","id":6528449,"avatar_url":"https://avatars.githubusercontent.com/u/6528449?v=3","gravatar_id":"","url":"https://api.github.com/users/uschi2000","html_url":"https://github.com/uschi2000","followers_url":"https://api.github.com/users/uschi2000/followers","following_url":"https://api.github.com/users/uschi2000/following{/other_user}","gists_url":"https://api.github.com/users/uschi2000/gists{/gist_id}","starred_url":"https://api.github.com/users/uschi2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uschi2000/subscriptions","organizations_url":"https://api.github.com/users/uschi2000/orgs","repos_url":"https://api.github.com/users/uschi2000/repos","events_url":"https://api.github.com/users/uschi2000/events{/privacy}","received_events_url":"https://api.github.com/users/uschi2000/received_events","type":"User","site_admin":false},"body":"love-hate?","created_at":"2015-07-07T15:42:06Z","updated_at":"2015-07-07T15:42:06Z","html_url":"https://github.com/palantir/gradle-jacoco-coverage/pull/5#discussion_r34054754","pull_request_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/comments/34054754"},"html":{"href":"https://github.com/palantir/gradle-jacoco-coverage/pull/5#discussion_r34054754"},"pull_request":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5","id":39320804,"html_url":"https://github.com/palantir/gradle-jacoco-coverage/pull/5","diff_url":"https://github.com/palantir/gradle-jacoco-coverage/pull/5.diff","patch_url":"https://github.com/palantir/gradle-jacoco-coverage/pull/5.patch","issue_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/5","number":5,"state":"open","locked":false,"title":"Replace threshold/whitelist keywords by realms file/_class/_package/report","user":{"login":"uschi2000","id":6528449,"avatar_url":"https://avatars.githubusercontent.com/u/6528449?v=3","gravatar_id":"","url":"https://api.github.com/users/uschi2000","html_url":"https://github.com/uschi2000","followers_url":"https://api.github.com/users/uschi2000/followers","following_url":"https://api.github.com/users/uschi2000/following{/other_user}","gists_url":"https://api.github.com/users/uschi2000/gists{/gist_id}","starred_url":"https://api.github.com/users/uschi2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uschi2000/subscriptions","organizations_url":"https://api.github.com/users/uschi2000/orgs","repos_url":"https://api.github.com/users/uschi2000/repos","events_url":"https://api.github.com/users/uschi2000/events{/privacy}","received_events_url":"https://api.github.com/users/uschi2000/received_events","type":"User","site_admin":false},"body":"@jmcampanini @zoubeiri could you take a look at this please?","created_at":"2015-07-06T23:14:18Z","updated_at":"2015-07-07T15:42:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"285270e140038361de9f0eec6767cf66ce94ea9b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5/commits","review_comments_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5/comments","review_comment_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/5/comments","statuses_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/statuses/143316cbeb208f3d358cbc4f1a6204b862d152a0","head":{"label":"palantir:feature/rule-rewrite","ref":"feature/rule-rewrite","sha":"143316cbeb208f3d358cbc4f1a6204b862d152a0","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":37288092,"name":"gradle-jacoco-coverage","full_name":"palantir/gradle-jacoco-coverage","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/gradle-jacoco-coverage","description":"","fork":false,"url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage","forks_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/forks","keys_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/teams","hooks_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/hooks","issue_events_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/events","assignees_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/tags","blobs_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/languages","stargazers_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/stargazers","contributors_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/contributors","subscribers_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/subscribers","subscription_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/subscription","commits_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/merges","archive_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/downloads","issues_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/labels{/name}","releases_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/releases{/id}","created_at":"2015-06-11T21:52:14Z","updated_at":"2015-06-12T06:20:57Z","pushed_at":"2015-07-06T23:14:19Z","git_url":"git://github.com/palantir/gradle-jacoco-coverage.git","ssh_url":"git@github.com:palantir/gradle-jacoco-coverage.git","clone_url":"https://github.com/palantir/gradle-jacoco-coverage.git","svn_url":"https://github.com/palantir/gradle-jacoco-coverage","homepage":null,"size":284,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"palantir:develop","ref":"develop","sha":"ca82dd9084f1bb1688d6f7a9e3a4242fa9e25583","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":37288092,"name":"gradle-jacoco-coverage","full_name":"palantir/gradle-jacoco-coverage","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/gradle-jacoco-coverage","description":"","fork":false,"url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage","forks_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/forks","keys_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/teams","hooks_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/hooks","issue_events_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/events","assignees_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/tags","blobs_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/languages","stargazers_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/stargazers","contributors_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/contributors","subscribers_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/subscribers","subscription_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/subscription","commits_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/merges","archive_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/downloads","issues_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/labels{/name}","releases_url":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/releases{/id}","created_at":"2015-06-11T21:52:14Z","updated_at":"2015-06-12T06:20:57Z","pushed_at":"2015-07-06T23:14:19Z","git_url":"git://github.com/palantir/gradle-jacoco-coverage.git","ssh_url":"git@github.com:palantir/gradle-jacoco-coverage.git","clone_url":"https://github.com/palantir/gradle-jacoco-coverage.git","svn_url":"https://github.com/palantir/gradle-jacoco-coverage","homepage":null,"size":284,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5"},"html":{"href":"https://github.com/palantir/gradle-jacoco-coverage/pull/5"},"issue":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/5"},"comments":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/gradle-jacoco-coverage/statuses/143316cbeb208f3d358cbc4f1a6204b862d152a0"}}}}