{"action":"created","comment":{"url":"https://api.github.com/repos/rspec/rspec-core/pulls/comments/69502082","id":69502082,"diff_hunk":"@@ -2027,9 +2031,18 @@ def configure_group_with(group, module_list, application_method)\n         end\n       end\n \n-      def on_existing_matching_groups(meta)\n-        world.all_example_groups.each do |group|\n-          yield group if meta.empty? || MetadataFilter.apply?(:any?, meta, group.metadata)\n+      def on_existing_matching_groups(meta, scope=:ignore)","path":"lib/rspec/core/configuration.rb","position":58,"original_position":58,"commit_id":"7e1799da15e21ca160da17f41482b646179c2e8d","original_commit_id":"7e1799da15e21ca160da17f41482b646179c2e8d","user":{"login":"eugeneius","id":432189,"avatar_url":"https://avatars.githubusercontent.com/u/432189?v=3","gravatar_id":"","url":"https://api.github.com/users/eugeneius","html_url":"https://github.com/eugeneius","followers_url":"https://api.github.com/users/eugeneius/followers","following_url":"https://api.github.com/users/eugeneius/following{/other_user}","gists_url":"https://api.github.com/users/eugeneius/gists{/gist_id}","starred_url":"https://api.github.com/users/eugeneius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugeneius/subscriptions","organizations_url":"https://api.github.com/users/eugeneius/orgs","repos_url":"https://api.github.com/users/eugeneius/repos","events_url":"https://api.github.com/users/eugeneius/events{/privacy}","received_events_url":"https://api.github.com/users/eugeneius/received_events","type":"User","site_admin":false},"body":"Hooks have some scope-specific behaviour, but helper modules don't have a scope - the optional argument feels ugly.","created_at":"2016-07-05T02:50:35Z","updated_at":"2016-07-05T02:50:35Z","html_url":"https://github.com/rspec/rspec-core/pull/2280#discussion_r69502082","pull_request_url":"https://api.github.com/repos/rspec/rspec-core/pulls/2280","_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/comments/69502082"},"html":{"href":"https://github.com/rspec/rspec-core/pull/2280#discussion_r69502082"},"pull_request":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2280"}}},"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-core/pulls/2280","id":76103776,"html_url":"https://github.com/rspec/rspec-core/pull/2280","diff_url":"https://github.com/rspec/rspec-core/pull/2280.diff","patch_url":"https://github.com/rspec/rspec-core/pull/2280.patch","issue_url":"https://api.github.com/repos/rspec/rspec-core/issues/2280","number":2280,"state":"open","locked":false,"title":"Fix adding config hooks to existing example groups","user":{"login":"eugeneius","id":432189,"avatar_url":"https://avatars.githubusercontent.com/u/432189?v=3","gravatar_id":"","url":"https://api.github.com/users/eugeneius","html_url":"https://github.com/eugeneius","followers_url":"https://api.github.com/users/eugeneius/followers","following_url":"https://api.github.com/users/eugeneius/following{/other_user}","gists_url":"https://api.github.com/users/eugeneius/gists{/gist_id}","starred_url":"https://api.github.com/users/eugeneius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugeneius/subscriptions","organizations_url":"https://api.github.com/users/eugeneius/orgs","repos_url":"https://api.github.com/users/eugeneius/repos","events_url":"https://api.github.com/users/eugeneius/events{/privacy}","received_events_url":"https://api.github.com/users/eugeneius/received_events","type":"User","site_admin":false},"body":"Followup to https://github.com/rspec/rspec-core/pull/2189.\r\n\r\nWhen an example group is created, the existing config hooks are added to it if their metadata filters match and none of the new example group's parent groups already have the hook added.\r\n\r\nThe current implementation adds new config hooks to all existing example groups, which means they can be run multiple times if several nested example groups all match their metadata filters, which doesn't happen if the config hook is defined first.\r\n\r\nTo get the same behaviour regardless of the order in which hooks and groups are defined, we can walk the inheritance hierarchy starting from the top level example groups, and only add the new hook to the first matching group on each branch.","created_at":"2016-07-04T01:14:11Z","updated_at":"2016-07-05T02:50:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f482263f72c201e162327473783a77d83f1a18ff","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rspec/rspec-core/pulls/2280/commits","review_comments_url":"https://api.github.com/repos/rspec/rspec-core/pulls/2280/comments","review_comment_url":"https://api.github.com/repos/rspec/rspec-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rspec/rspec-core/issues/2280/comments","statuses_url":"https://api.github.com/repos/rspec/rspec-core/statuses/7e1799da15e21ca160da17f41482b646179c2e8d","head":{"label":"eugeneius:fix_adding_hooks_to_existing_groups","ref":"fix_adding_hooks_to_existing_groups","sha":"7e1799da15e21ca160da17f41482b646179c2e8d","user":{"login":"eugeneius","id":432189,"avatar_url":"https://avatars.githubusercontent.com/u/432189?v=3","gravatar_id":"","url":"https://api.github.com/users/eugeneius","html_url":"https://github.com/eugeneius","followers_url":"https://api.github.com/users/eugeneius/followers","following_url":"https://api.github.com/users/eugeneius/following{/other_user}","gists_url":"https://api.github.com/users/eugeneius/gists{/gist_id}","starred_url":"https://api.github.com/users/eugeneius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugeneius/subscriptions","organizations_url":"https://api.github.com/users/eugeneius/orgs","repos_url":"https://api.github.com/users/eugeneius/repos","events_url":"https://api.github.com/users/eugeneius/events{/privacy}","received_events_url":"https://api.github.com/users/eugeneius/received_events","type":"User","site_admin":false},"repo":{"id":33900496,"name":"rspec-core","full_name":"eugeneius/rspec-core","owner":{"login":"eugeneius","id":432189,"avatar_url":"https://avatars.githubusercontent.com/u/432189?v=3","gravatar_id":"","url":"https://api.github.com/users/eugeneius","html_url":"https://github.com/eugeneius","followers_url":"https://api.github.com/users/eugeneius/followers","following_url":"https://api.github.com/users/eugeneius/following{/other_user}","gists_url":"https://api.github.com/users/eugeneius/gists{/gist_id}","starred_url":"https://api.github.com/users/eugeneius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugeneius/subscriptions","organizations_url":"https://api.github.com/users/eugeneius/orgs","repos_url":"https://api.github.com/users/eugeneius/repos","events_url":"https://api.github.com/users/eugeneius/events{/privacy}","received_events_url":"https://api.github.com/users/eugeneius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eugeneius/rspec-core","description":"RSpec runner and formatters","fork":true,"url":"https://api.github.com/repos/eugeneius/rspec-core","forks_url":"https://api.github.com/repos/eugeneius/rspec-core/forks","keys_url":"https://api.github.com/repos/eugeneius/rspec-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eugeneius/rspec-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eugeneius/rspec-core/teams","hooks_url":"https://api.github.com/repos/eugeneius/rspec-core/hooks","issue_events_url":"https://api.github.com/repos/eugeneius/rspec-core/issues/events{/number}","events_url":"https://api.github.com/repos/eugeneius/rspec-core/events","assignees_url":"https://api.github.com/repos/eugeneius/rspec-core/assignees{/user}","branches_url":"https://api.github.com/repos/eugeneius/rspec-core/branches{/branch}","tags_url":"https://api.github.com/repos/eugeneius/rspec-core/tags","blobs_url":"https://api.github.com/repos/eugeneius/rspec-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eugeneius/rspec-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eugeneius/rspec-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/eugeneius/rspec-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eugeneius/rspec-core/statuses/{sha}","languages_url":"https://api.github.com/repos/eugeneius/rspec-core/languages","stargazers_url":"https://api.github.com/repos/eugeneius/rspec-core/stargazers","contributors_url":"https://api.github.com/repos/eugeneius/rspec-core/contributors","subscribers_url":"https://api.github.com/repos/eugeneius/rspec-core/subscribers","subscription_url":"https://api.github.com/repos/eugeneius/rspec-core/subscription","commits_url":"https://api.github.com/repos/eugeneius/rspec-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/eugeneius/rspec-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/eugeneius/rspec-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/eugeneius/rspec-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/eugeneius/rspec-core/contents/{+path}","compare_url":"https://api.github.com/repos/eugeneius/rspec-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eugeneius/rspec-core/merges","archive_url":"https://api.github.com/repos/eugeneius/rspec-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eugeneius/rspec-core/downloads","issues_url":"https://api.github.com/repos/eugeneius/rspec-core/issues{/number}","pulls_url":"https://api.github.com/repos/eugeneius/rspec-core/pulls{/number}","milestones_url":"https://api.github.com/repos/eugeneius/rspec-core/milestones{/number}","notifications_url":"https://api.github.com/repos/eugeneius/rspec-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eugeneius/rspec-core/labels{/name}","releases_url":"https://api.github.com/repos/eugeneius/rspec-core/releases{/id}","deployments_url":"https://api.github.com/repos/eugeneius/rspec-core/deployments","created_at":"2015-04-13T23:53:46Z","updated_at":"2015-04-13T23:53:48Z","pushed_at":"2016-07-05T02:16:19Z","git_url":"git://github.com/eugeneius/rspec-core.git","ssh_url":"git@github.com:eugeneius/rspec-core.git","clone_url":"https://github.com/eugeneius/rspec-core.git","svn_url":"https://github.com/eugeneius/rspec-core","homepage":"http://relishapp.com/rspec/rspec-core","size":11232,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rspec:master","ref":"master","sha":"9b84b78a6fd9cd5960b4c4b3df350b4740620b62","user":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"repo":{"id":238972,"name":"rspec-core","full_name":"rspec/rspec-core","owner":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rspec/rspec-core","description":"RSpec runner and formatters","fork":false,"url":"https://api.github.com/repos/rspec/rspec-core","forks_url":"https://api.github.com/repos/rspec/rspec-core/forks","keys_url":"https://api.github.com/repos/rspec/rspec-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-core/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-core/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-core/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-core/events","assignees_url":"https://api.github.com/repos/rspec/rspec-core/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-core/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-core/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-core/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-core/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-core/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-core/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-core/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-core/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-core/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-core/merges","archive_url":"https://api.github.com/repos/rspec/rspec-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-core/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-core/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-core/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-core/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-core/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-core/releases{/id}","deployments_url":"https://api.github.com/repos/rspec/rspec-core/deployments","created_at":"2009-06-29T15:41:05Z","updated_at":"2016-06-30T20:08:35Z","pushed_at":"2016-07-05T02:16:19Z","git_url":"git://github.com/rspec/rspec-core.git","ssh_url":"git@github.com:rspec/rspec-core.git","clone_url":"https://github.com/rspec/rspec-core.git","svn_url":"https://github.com/rspec/rspec-core","homepage":"http://relishapp.com/rspec/rspec-core","size":17963,"stargazers_count":759,"watchers_count":759,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":548,"mirror_url":null,"open_issues_count":41,"forks":548,"open_issues":41,"watchers":759,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2280"},"html":{"href":"https://github.com/rspec/rspec-core/pull/2280"},"issue":{"href":"https://api.github.com/repos/rspec/rspec-core/issues/2280"},"comments":{"href":"https://api.github.com/repos/rspec/rspec-core/issues/2280/comments"},"review_comments":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2280/comments"},"review_comment":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2280/commits"},"statuses":{"href":"https://api.github.com/repos/rspec/rspec-core/statuses/7e1799da15e21ca160da17f41482b646179c2e8d"}}}}
{"actor":{"display_login":"eugeneius"}}