{"action":"created","comment":{"url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/comments/50937783","id":50937783,"diff_hunk":"@@ -1323,4 +1317,17 @@ def new_connection\n     }\n     raise e\n   end\n+\n+  # Normalize encryption parameter the constructor accepts, expands a few\n+  # convenience symbols into recognizable hashes\n+  def normalize_encryption(args)\n+    return if args.nil?\n+    return args if args.is_a? Hash\n+\n+    case method = args.to_sym\n+    when :simple_tls, :start_tls\n+      { :method => method, :tls_options => {} }\n+    end\n+  end","path":"lib/net/ldap.rb","position":39,"original_position":39,"commit_id":"8aaa96b552bcbd559ec6bd88846ccbba7b589db9","original_commit_id":"8aaa96b552bcbd559ec6bd88846ccbba7b589db9","user":{"login":"satoryu","id":124871,"avatar_url":"https://avatars.githubusercontent.com/u/124871?v=3","gravatar_id":"","url":"https://api.github.com/users/satoryu","html_url":"https://github.com/satoryu","followers_url":"https://api.github.com/users/satoryu/followers","following_url":"https://api.github.com/users/satoryu/following{/other_user}","gists_url":"https://api.github.com/users/satoryu/gists{/gist_id}","starred_url":"https://api.github.com/users/satoryu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satoryu/subscriptions","organizations_url":"https://api.github.com/users/satoryu/orgs","repos_url":"https://api.github.com/users/satoryu/repos","events_url":"https://api.github.com/users/satoryu/events{/privacy}","received_events_url":"https://api.github.com/users/satoryu/received_events","type":"User","site_admin":false},"body":"Looks good! \r\nCould you make `normalize_encryption` do what #257 does? ","created_at":"2016-01-27T03:36:11Z","updated_at":"2016-01-27T03:36:11Z","html_url":"https://github.com/ruby-ldap/ruby-net-ldap/pull/264#discussion_r50937783","pull_request_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264","_links":{"self":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/comments/50937783"},"html":{"href":"https://github.com/ruby-ldap/ruby-net-ldap/pull/264#discussion_r50937783"},"pull_request":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264"}}},"pull_request":{"url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264","id":57297060,"html_url":"https://github.com/ruby-ldap/ruby-net-ldap/pull/264","diff_url":"https://github.com/ruby-ldap/ruby-net-ldap/pull/264.diff","patch_url":"https://github.com/ruby-ldap/ruby-net-ldap/pull/264.patch","issue_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues/264","number":264,"state":"open","locked":false,"title":"Normalize the encryption parameter passed to the LDAP constructor","user":{"login":"ryanshow","id":333500,"avatar_url":"https://avatars.githubusercontent.com/u/333500?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanshow","html_url":"https://github.com/ryanshow","followers_url":"https://api.github.com/users/ryanshow/followers","following_url":"https://api.github.com/users/ryanshow/following{/other_user}","gists_url":"https://api.github.com/users/ryanshow/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanshow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanshow/subscriptions","organizations_url":"https://api.github.com/users/ryanshow/orgs","repos_url":"https://api.github.com/users/ryanshow/repos","events_url":"https://api.github.com/users/ryanshow/events{/privacy}","received_events_url":"https://api.github.com/users/ryanshow/received_events","type":"User","site_admin":false},"body":"This PR restores API functionality that was broken on 0.13, the encryption parameter can again be specified as a symbol and will be normalized to the expected hash.\r\n\r\nThis is in reference to ruby-ldap/ruby-net-ldap#250","created_at":"2016-01-27T00:38:47Z","updated_at":"2016-01-27T03:36:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"102d0bc4294a9099ad8fd749060decf0130bd387","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264/commits","review_comments_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264/comments","review_comment_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues/264/comments","statuses_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/statuses/8aaa96b552bcbd559ec6bd88846ccbba7b589db9","head":{"label":"ryanshow:master","ref":"master","sha":"8aaa96b552bcbd559ec6bd88846ccbba7b589db9","user":{"login":"ryanshow","id":333500,"avatar_url":"https://avatars.githubusercontent.com/u/333500?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanshow","html_url":"https://github.com/ryanshow","followers_url":"https://api.github.com/users/ryanshow/followers","following_url":"https://api.github.com/users/ryanshow/following{/other_user}","gists_url":"https://api.github.com/users/ryanshow/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanshow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanshow/subscriptions","organizations_url":"https://api.github.com/users/ryanshow/orgs","repos_url":"https://api.github.com/users/ryanshow/repos","events_url":"https://api.github.com/users/ryanshow/events{/privacy}","received_events_url":"https://api.github.com/users/ryanshow/received_events","type":"User","site_admin":false},"repo":{"id":50468411,"name":"ruby-net-ldap","full_name":"ryanshow/ruby-net-ldap","owner":{"login":"ryanshow","id":333500,"avatar_url":"https://avatars.githubusercontent.com/u/333500?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanshow","html_url":"https://github.com/ryanshow","followers_url":"https://api.github.com/users/ryanshow/followers","following_url":"https://api.github.com/users/ryanshow/following{/other_user}","gists_url":"https://api.github.com/users/ryanshow/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanshow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanshow/subscriptions","organizations_url":"https://api.github.com/users/ryanshow/orgs","repos_url":"https://api.github.com/users/ryanshow/repos","events_url":"https://api.github.com/users/ryanshow/events{/privacy}","received_events_url":"https://api.github.com/users/ryanshow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryanshow/ruby-net-ldap","description":"Pure Ruby LDAP library ","fork":true,"url":"https://api.github.com/repos/ryanshow/ruby-net-ldap","forks_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/forks","keys_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/teams","hooks_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/hooks","issue_events_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/issues/events{/number}","events_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/events","assignees_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/assignees{/user}","branches_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/branches{/branch}","tags_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/tags","blobs_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/languages","stargazers_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/stargazers","contributors_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/contributors","subscribers_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/subscribers","subscription_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/subscription","commits_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/contents/{+path}","compare_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/merges","archive_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/downloads","issues_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/issues{/number}","pulls_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/labels{/name}","releases_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/releases{/id}","deployments_url":"https://api.github.com/repos/ryanshow/ruby-net-ldap/deployments","created_at":"2016-01-27T00:05:52Z","updated_at":"2016-01-27T00:05:53Z","pushed_at":"2016-01-27T00:33:54Z","git_url":"git://github.com/ryanshow/ruby-net-ldap.git","ssh_url":"git@github.com:ryanshow/ruby-net-ldap.git","clone_url":"https://github.com/ryanshow/ruby-net-ldap.git","svn_url":"https://github.com/ryanshow/ruby-net-ldap","homepage":"https://github.com/ruby-ldap/ruby-net-ldap","size":1131,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ruby-ldap:master","ref":"master","sha":"771e11c710be8d4a591dd3d59f4957e8ef13d404","user":{"login":"ruby-ldap","id":676122,"avatar_url":"https://avatars.githubusercontent.com/u/676122?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-ldap","html_url":"https://github.com/ruby-ldap","followers_url":"https://api.github.com/users/ruby-ldap/followers","following_url":"https://api.github.com/users/ruby-ldap/following{/other_user}","gists_url":"https://api.github.com/users/ruby-ldap/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-ldap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-ldap/subscriptions","organizations_url":"https://api.github.com/users/ruby-ldap/orgs","repos_url":"https://api.github.com/users/ruby-ldap/repos","events_url":"https://api.github.com/users/ruby-ldap/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-ldap/received_events","type":"Organization","site_admin":false},"repo":{"id":1509861,"name":"ruby-net-ldap","full_name":"ruby-ldap/ruby-net-ldap","owner":{"login":"ruby-ldap","id":676122,"avatar_url":"https://avatars.githubusercontent.com/u/676122?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-ldap","html_url":"https://github.com/ruby-ldap","followers_url":"https://api.github.com/users/ruby-ldap/followers","following_url":"https://api.github.com/users/ruby-ldap/following{/other_user}","gists_url":"https://api.github.com/users/ruby-ldap/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-ldap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-ldap/subscriptions","organizations_url":"https://api.github.com/users/ruby-ldap/orgs","repos_url":"https://api.github.com/users/ruby-ldap/repos","events_url":"https://api.github.com/users/ruby-ldap/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-ldap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ruby-ldap/ruby-net-ldap","description":"Pure Ruby LDAP library ","fork":false,"url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap","forks_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/forks","keys_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/teams","hooks_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/hooks","issue_events_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues/events{/number}","events_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/events","assignees_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/assignees{/user}","branches_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/branches{/branch}","tags_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/tags","blobs_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/languages","stargazers_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/stargazers","contributors_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/contributors","subscribers_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/subscribers","subscription_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/subscription","commits_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/contents/{+path}","compare_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/merges","archive_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/downloads","issues_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues{/number}","pulls_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/labels{/name}","releases_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/releases{/id}","deployments_url":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/deployments","created_at":"2011-03-22T03:52:14Z","updated_at":"2016-01-20T04:30:40Z","pushed_at":"2016-01-27T00:38:47Z","git_url":"git://github.com/ruby-ldap/ruby-net-ldap.git","ssh_url":"git@github.com:ruby-ldap/ruby-net-ldap.git","clone_url":"https://github.com/ruby-ldap/ruby-net-ldap.git","svn_url":"https://github.com/ruby-ldap/ruby-net-ldap","homepage":"https://github.com/ruby-ldap/ruby-net-ldap","size":1238,"stargazers_count":250,"watchers_count":250,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":176,"mirror_url":null,"open_issues_count":41,"forks":176,"open_issues":41,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264"},"html":{"href":"https://github.com/ruby-ldap/ruby-net-ldap/pull/264"},"issue":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues/264"},"comments":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/ruby-ldap/ruby-net-ldap/statuses/8aaa96b552bcbd559ec6bd88846ccbba7b589db9"}}}}