{"action":"created","comment":{"url":"https://api.github.com/repos/github/github-ldap/pulls/comments/73622517","id":73622517,"diff_hunk":"@@ -1,4 +1,5 @@\n require_relative 'test_helper'\n+require 'mocha/mini_test'","path":"test/domain_test.rb","position":2,"original_position":2,"commit_id":"3bc3979429160847dd16ae6d92bf5eb096aff6d9","original_commit_id":"1ab77c0e0b84b79668d47ad1b03b4613914c9997","user":{"login":"mtodd","id":182,"avatar_url":"https://avatars.githubusercontent.com/u/182?v=3","gravatar_id":"","url":"https://api.github.com/users/mtodd","html_url":"https://github.com/mtodd","followers_url":"https://api.github.com/users/mtodd/followers","following_url":"https://api.github.com/users/mtodd/following{/other_user}","gists_url":"https://api.github.com/users/mtodd/gists{/gist_id}","starred_url":"https://api.github.com/users/mtodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtodd/subscriptions","organizations_url":"https://api.github.com/users/mtodd/orgs","repos_url":"https://api.github.com/users/mtodd/repos","events_url":"https://api.github.com/users/mtodd/events{/privacy}","received_events_url":"https://api.github.com/users/mtodd/received_events","type":"User","site_admin":true},"body":"@davesims you missed moving these requires to `test_helper` to consolidate them.","created_at":"2016-08-04T23:49:39Z","updated_at":"2016-08-04T23:49:39Z","html_url":"https://github.com/github/github-ldap/pull/94#discussion_r73622517","pull_request_url":"https://api.github.com/repos/github/github-ldap/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/github/github-ldap/pulls/comments/73622517"},"html":{"href":"https://github.com/github/github-ldap/pull/94#discussion_r73622517"},"pull_request":{"href":"https://api.github.com/repos/github/github-ldap/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/github/github-ldap/pulls/94","id":78711730,"html_url":"https://github.com/github/github-ldap/pull/94","diff_url":"https://github.com/github/github-ldap/pull/94.diff","patch_url":"https://github.com/github/github-ldap/pull/94.patch","issue_url":"https://api.github.com/repos/github/github-ldap/issues/94","number":94,"state":"open","locked":false,"title":"Support querying Active Directory Global Catalog","user":{"login":"davesims","id":122950,"avatar_url":"https://avatars.githubusercontent.com/u/122950?v=3","gravatar_id":"","url":"https://api.github.com/users/davesims","html_url":"https://github.com/davesims","followers_url":"https://api.github.com/users/davesims/followers","following_url":"https://api.github.com/users/davesims/following{/other_user}","gists_url":"https://api.github.com/users/davesims/gists{/gist_id}","starred_url":"https://api.github.com/users/davesims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davesims/subscriptions","organizations_url":"https://api.github.com/users/davesims/orgs","repos_url":"https://api.github.com/users/davesims/repos","events_url":"https://api.github.com/users/davesims/events{/privacy}","received_events_url":"https://api.github.com/users/davesims/received_events","type":"User","site_admin":true},"body":"For Active Directory deployments, in some cases, like authentication or simple entry searches, it will make sense to search the [Global Catalog](https://technet.microsoft.com/en-us/library/cc728188(v=ws.10).aspx) rather than the default configured Domain Controller. This PR will initialize a Global Catalog connection object when requested, and provides an interface to directly query the catalog. `GitHub::Ldap::Domain` will now use the Global Catalog for `user?`, if the server is an Active Directory, and the configured Domain Controller is a Global Catalog, or if the user has provided global catalog settings in the initializer options.\r\n\r\n##### TODO:\r\n- [x] Initialize global catalog connection\r\n- [x] Make interface to query the catalog\r\n- [x] Have `GitHub::Ldap::Domain#user?` use the catalog if server is AD & catalog is present\r\n- [x] Allow user to provide Global Catalog host & port, otherwise default to the given Domain Controller\r\n\r\nThis begins an alternative approach to https://github.com/github/github-ldap/pull/91. To fully replace that, we'll have to also implement referral chasing to be able to search for groups that aren't configured to be Active Directory \"universal\" groups. I'll do that in a separate PR.\r\n\r\n/cc @mtodd @jch @sbryant @lildude @timmjd\r\n/cc @github/ldap","created_at":"2016-07-25T16:28:47Z","updated_at":"2016-08-04T23:49:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fcc486443adc97e153024e819f922bc4e7e02ec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/github/github-ldap/pulls/94/commits","review_comments_url":"https://api.github.com/repos/github/github-ldap/pulls/94/comments","review_comment_url":"https://api.github.com/repos/github/github-ldap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/github-ldap/issues/94/comments","statuses_url":"https://api.github.com/repos/github/github-ldap/statuses/3bc3979429160847dd16ae6d92bf5eb096aff6d9","head":{"label":"github:use_global_catalog_for_auth","ref":"use_global_catalog_for_auth","sha":"3bc3979429160847dd16ae6d92bf5eb096aff6d9","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":11240782,"name":"github-ldap","full_name":"github/github-ldap","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/github-ldap","description":"LDAP client for humans. Part of GitHub Enterprise.","fork":false,"url":"https://api.github.com/repos/github/github-ldap","forks_url":"https://api.github.com/repos/github/github-ldap/forks","keys_url":"https://api.github.com/repos/github/github-ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/github-ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/github-ldap/teams","hooks_url":"https://api.github.com/repos/github/github-ldap/hooks","issue_events_url":"https://api.github.com/repos/github/github-ldap/issues/events{/number}","events_url":"https://api.github.com/repos/github/github-ldap/events","assignees_url":"https://api.github.com/repos/github/github-ldap/assignees{/user}","branches_url":"https://api.github.com/repos/github/github-ldap/branches{/branch}","tags_url":"https://api.github.com/repos/github/github-ldap/tags","blobs_url":"https://api.github.com/repos/github/github-ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/github-ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/github-ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/github-ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/github-ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/github/github-ldap/languages","stargazers_url":"https://api.github.com/repos/github/github-ldap/stargazers","contributors_url":"https://api.github.com/repos/github/github-ldap/contributors","subscribers_url":"https://api.github.com/repos/github/github-ldap/subscribers","subscription_url":"https://api.github.com/repos/github/github-ldap/subscription","commits_url":"https://api.github.com/repos/github/github-ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/github-ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/github-ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/github-ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/github-ldap/contents/{+path}","compare_url":"https://api.github.com/repos/github/github-ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/github-ldap/merges","archive_url":"https://api.github.com/repos/github/github-ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/github-ldap/downloads","issues_url":"https://api.github.com/repos/github/github-ldap/issues{/number}","pulls_url":"https://api.github.com/repos/github/github-ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/github/github-ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/github/github-ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/github-ldap/labels{/name}","releases_url":"https://api.github.com/repos/github/github-ldap/releases{/id}","deployments_url":"https://api.github.com/repos/github/github-ldap/deployments","created_at":"2013-07-07T21:50:26Z","updated_at":"2016-08-04T19:22:03Z","pushed_at":"2016-08-04T23:31:00Z","git_url":"git://github.com/github/github-ldap.git","ssh_url":"git@github.com:github/github-ldap.git","clone_url":"https://github.com/github/github-ldap.git","svn_url":"https://github.com/github/github-ldap","homepage":"","size":438,"stargazers_count":116,"watchers_count":116,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":9,"forks":22,"open_issues":9,"watchers":116,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"8d66502d246cc5ecbe246b0b06fd69c172020d40","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":11240782,"name":"github-ldap","full_name":"github/github-ldap","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/github-ldap","description":"LDAP client for humans. Part of GitHub Enterprise.","fork":false,"url":"https://api.github.com/repos/github/github-ldap","forks_url":"https://api.github.com/repos/github/github-ldap/forks","keys_url":"https://api.github.com/repos/github/github-ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/github-ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/github-ldap/teams","hooks_url":"https://api.github.com/repos/github/github-ldap/hooks","issue_events_url":"https://api.github.com/repos/github/github-ldap/issues/events{/number}","events_url":"https://api.github.com/repos/github/github-ldap/events","assignees_url":"https://api.github.com/repos/github/github-ldap/assignees{/user}","branches_url":"https://api.github.com/repos/github/github-ldap/branches{/branch}","tags_url":"https://api.github.com/repos/github/github-ldap/tags","blobs_url":"https://api.github.com/repos/github/github-ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/github-ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/github-ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/github-ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/github-ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/github/github-ldap/languages","stargazers_url":"https://api.github.com/repos/github/github-ldap/stargazers","contributors_url":"https://api.github.com/repos/github/github-ldap/contributors","subscribers_url":"https://api.github.com/repos/github/github-ldap/subscribers","subscription_url":"https://api.github.com/repos/github/github-ldap/subscription","commits_url":"https://api.github.com/repos/github/github-ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/github-ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/github-ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/github-ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/github-ldap/contents/{+path}","compare_url":"https://api.github.com/repos/github/github-ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/github-ldap/merges","archive_url":"https://api.github.com/repos/github/github-ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/github-ldap/downloads","issues_url":"https://api.github.com/repos/github/github-ldap/issues{/number}","pulls_url":"https://api.github.com/repos/github/github-ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/github/github-ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/github/github-ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/github-ldap/labels{/name}","releases_url":"https://api.github.com/repos/github/github-ldap/releases{/id}","deployments_url":"https://api.github.com/repos/github/github-ldap/deployments","created_at":"2013-07-07T21:50:26Z","updated_at":"2016-08-04T19:22:03Z","pushed_at":"2016-08-04T23:31:00Z","git_url":"git://github.com/github/github-ldap.git","ssh_url":"git@github.com:github/github-ldap.git","clone_url":"https://github.com/github/github-ldap.git","svn_url":"https://github.com/github/github-ldap","homepage":"","size":438,"stargazers_count":116,"watchers_count":116,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":9,"forks":22,"open_issues":9,"watchers":116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/github-ldap/pulls/94"},"html":{"href":"https://github.com/github/github-ldap/pull/94"},"issue":{"href":"https://api.github.com/repos/github/github-ldap/issues/94"},"comments":{"href":"https://api.github.com/repos/github/github-ldap/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/github/github-ldap/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/github/github-ldap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/github-ldap/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/github/github-ldap/statuses/3bc3979429160847dd16ae6d92bf5eb096aff6d9"}}}}
{"actor":{"display_login":"mtodd"}}