{"action":"closed","number":32,"pull_request":{"url":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/32","id":55483089,"html_url":"https://github.com/checkiz/elixir-mongo/pull/32","diff_url":"https://github.com/checkiz/elixir-mongo/pull/32.diff","patch_url":"https://github.com/checkiz/elixir-mongo/pull/32.patch","issue_url":"https://api.github.com/repos/checkiz/elixir-mongo/issues/32","number":32,"state":"closed","locked":false,"title":"Fix auth to send db's name to Mongo.Request.cmd","user":{"login":"localshred","id":47752,"avatar_url":"https://avatars.githubusercontent.com/u/47752?v=3","gravatar_id":"","url":"https://api.github.com/users/localshred","html_url":"https://github.com/localshred","followers_url":"https://api.github.com/users/localshred/followers","following_url":"https://api.github.com/users/localshred/following{/other_user}","gists_url":"https://api.github.com/users/localshred/gists{/gist_id}","starred_url":"https://api.github.com/users/localshred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localshred/subscriptions","organizations_url":"https://api.github.com/users/localshred/orgs","repos_url":"https://api.github.com/users/localshred/repos","events_url":"https://api.github.com/users/localshred/events{/privacy}","received_events_url":"https://api.github.com/users/localshred/received_events","type":"User","site_admin":false},"body":"When attempting to use the `Mongo.Db.auth/3` command I ran into an issue where the underying `Mongo.Request.cmd` was expecting the first argument to be the name of the database as a string, but was instead receiving the entire `%Mongo.Db{}` struct.\r\n\r\nThe relevant parts of my stacktrace:\r\n\r\n```\r\n** (exit) an exception was raised:\r\n    ** (ArgumentError) argument error\r\n        :erlang.byte_size(%Mongo.Db{auth: {\"myuser\", \"4f75033e39d8b884aa7d88e2fadfe2cb\"}, mongo: %Mongo.Server{host: 'localhost', id_prefix: 8457, mode: :passive, opts: %{}, port: 27017, socket: #Port<0.6963>, timeout: 6000}, name: \"gretel_dev\", opts: %{mode: :passive, timeout: 6000}})\r\n        lib/mongo_request.ex:41: Mongo.Request.cmd/3\r\n        lib/mongo_db.ex:44: Mongo.Db.auth/1\r\n```\r\n\r\nThe fix is simple enough, though I didn't see any tests that would need to be modified. Let me know if I missed any of that.","created_at":"2016-01-08T16:47:46Z","updated_at":"2016-03-16T16:53:24Z","closed_at":"2016-03-16T16:53:24Z","merged_at":null,"merge_commit_sha":"69f3408fb0b1fc7f08b30672399d557fd01ec576","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/32/commits","review_comments_url":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/32/comments","review_comment_url":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/checkiz/elixir-mongo/issues/32/comments","statuses_url":"https://api.github.com/repos/checkiz/elixir-mongo/statuses/af41a4a39cbc48e77be5347119038df3118f0387","head":{"label":"localshred:master","ref":"master","sha":"af41a4a39cbc48e77be5347119038df3118f0387","user":{"login":"localshred","id":47752,"avatar_url":"https://avatars.githubusercontent.com/u/47752?v=3","gravatar_id":"","url":"https://api.github.com/users/localshred","html_url":"https://github.com/localshred","followers_url":"https://api.github.com/users/localshred/followers","following_url":"https://api.github.com/users/localshred/following{/other_user}","gists_url":"https://api.github.com/users/localshred/gists{/gist_id}","starred_url":"https://api.github.com/users/localshred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localshred/subscriptions","organizations_url":"https://api.github.com/users/localshred/orgs","repos_url":"https://api.github.com/users/localshred/repos","events_url":"https://api.github.com/users/localshred/events{/privacy}","received_events_url":"https://api.github.com/users/localshred/received_events","type":"User","site_admin":false},"repo":{"id":49283793,"name":"elixir-mongo","full_name":"localshred/elixir-mongo","owner":{"login":"localshred","id":47752,"avatar_url":"https://avatars.githubusercontent.com/u/47752?v=3","gravatar_id":"","url":"https://api.github.com/users/localshred","html_url":"https://github.com/localshred","followers_url":"https://api.github.com/users/localshred/followers","following_url":"https://api.github.com/users/localshred/following{/other_user}","gists_url":"https://api.github.com/users/localshred/gists{/gist_id}","starred_url":"https://api.github.com/users/localshred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localshred/subscriptions","organizations_url":"https://api.github.com/users/localshred/orgs","repos_url":"https://api.github.com/users/localshred/repos","events_url":"https://api.github.com/users/localshred/events{/privacy}","received_events_url":"https://api.github.com/users/localshred/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/localshred/elixir-mongo","description":"MongoDB driver for Elixir","fork":true,"url":"https://api.github.com/repos/localshred/elixir-mongo","forks_url":"https://api.github.com/repos/localshred/elixir-mongo/forks","keys_url":"https://api.github.com/repos/localshred/elixir-mongo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/localshred/elixir-mongo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/localshred/elixir-mongo/teams","hooks_url":"https://api.github.com/repos/localshred/elixir-mongo/hooks","issue_events_url":"https://api.github.com/repos/localshred/elixir-mongo/issues/events{/number}","events_url":"https://api.github.com/repos/localshred/elixir-mongo/events","assignees_url":"https://api.github.com/repos/localshred/elixir-mongo/assignees{/user}","branches_url":"https://api.github.com/repos/localshred/elixir-mongo/branches{/branch}","tags_url":"https://api.github.com/repos/localshred/elixir-mongo/tags","blobs_url":"https://api.github.com/repos/localshred/elixir-mongo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/localshred/elixir-mongo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/localshred/elixir-mongo/git/refs{/sha}","trees_url":"https://api.github.com/repos/localshred/elixir-mongo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/localshred/elixir-mongo/statuses/{sha}","languages_url":"https://api.github.com/repos/localshred/elixir-mongo/languages","stargazers_url":"https://api.github.com/repos/localshred/elixir-mongo/stargazers","contributors_url":"https://api.github.com/repos/localshred/elixir-mongo/contributors","subscribers_url":"https://api.github.com/repos/localshred/elixir-mongo/subscribers","subscription_url":"https://api.github.com/repos/localshred/elixir-mongo/subscription","commits_url":"https://api.github.com/repos/localshred/elixir-mongo/commits{/sha}","git_commits_url":"https://api.github.com/repos/localshred/elixir-mongo/git/commits{/sha}","comments_url":"https://api.github.com/repos/localshred/elixir-mongo/comments{/number}","issue_comment_url":"https://api.github.com/repos/localshred/elixir-mongo/issues/comments{/number}","contents_url":"https://api.github.com/repos/localshred/elixir-mongo/contents/{+path}","compare_url":"https://api.github.com/repos/localshred/elixir-mongo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/localshred/elixir-mongo/merges","archive_url":"https://api.github.com/repos/localshred/elixir-mongo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/localshred/elixir-mongo/downloads","issues_url":"https://api.github.com/repos/localshred/elixir-mongo/issues{/number}","pulls_url":"https://api.github.com/repos/localshred/elixir-mongo/pulls{/number}","milestones_url":"https://api.github.com/repos/localshred/elixir-mongo/milestones{/number}","notifications_url":"https://api.github.com/repos/localshred/elixir-mongo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/localshred/elixir-mongo/labels{/name}","releases_url":"https://api.github.com/repos/localshred/elixir-mongo/releases{/id}","deployments_url":"https://api.github.com/repos/localshred/elixir-mongo/deployments","created_at":"2016-01-08T16:41:09Z","updated_at":"2016-01-08T16:41:10Z","pushed_at":"2016-01-08T16:45:10Z","git_url":"git://github.com/localshred/elixir-mongo.git","ssh_url":"git@github.com:localshred/elixir-mongo.git","clone_url":"https://github.com/localshred/elixir-mongo.git","svn_url":"https://github.com/localshred/elixir-mongo","homepage":"","size":268,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"checkiz:master","ref":"master","sha":"a99527ba555f115b8b2db69192b5ab592b463475","user":{"login":"checkiz","id":6484284,"avatar_url":"https://avatars.githubusercontent.com/u/6484284?v=3","gravatar_id":"","url":"https://api.github.com/users/checkiz","html_url":"https://github.com/checkiz","followers_url":"https://api.github.com/users/checkiz/followers","following_url":"https://api.github.com/users/checkiz/following{/other_user}","gists_url":"https://api.github.com/users/checkiz/gists{/gist_id}","starred_url":"https://api.github.com/users/checkiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkiz/subscriptions","organizations_url":"https://api.github.com/users/checkiz/orgs","repos_url":"https://api.github.com/users/checkiz/repos","events_url":"https://api.github.com/users/checkiz/events{/privacy}","received_events_url":"https://api.github.com/users/checkiz/received_events","type":"Organization","site_admin":false},"repo":{"id":16183059,"name":"elixir-mongo","full_name":"checkiz/elixir-mongo","owner":{"login":"checkiz","id":6484284,"avatar_url":"https://avatars.githubusercontent.com/u/6484284?v=3","gravatar_id":"","url":"https://api.github.com/users/checkiz","html_url":"https://github.com/checkiz","followers_url":"https://api.github.com/users/checkiz/followers","following_url":"https://api.github.com/users/checkiz/following{/other_user}","gists_url":"https://api.github.com/users/checkiz/gists{/gist_id}","starred_url":"https://api.github.com/users/checkiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkiz/subscriptions","organizations_url":"https://api.github.com/users/checkiz/orgs","repos_url":"https://api.github.com/users/checkiz/repos","events_url":"https://api.github.com/users/checkiz/events{/privacy}","received_events_url":"https://api.github.com/users/checkiz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/checkiz/elixir-mongo","description":"MongoDB driver for Elixir","fork":false,"url":"https://api.github.com/repos/checkiz/elixir-mongo","forks_url":"https://api.github.com/repos/checkiz/elixir-mongo/forks","keys_url":"https://api.github.com/repos/checkiz/elixir-mongo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/checkiz/elixir-mongo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/checkiz/elixir-mongo/teams","hooks_url":"https://api.github.com/repos/checkiz/elixir-mongo/hooks","issue_events_url":"https://api.github.com/repos/checkiz/elixir-mongo/issues/events{/number}","events_url":"https://api.github.com/repos/checkiz/elixir-mongo/events","assignees_url":"https://api.github.com/repos/checkiz/elixir-mongo/assignees{/user}","branches_url":"https://api.github.com/repos/checkiz/elixir-mongo/branches{/branch}","tags_url":"https://api.github.com/repos/checkiz/elixir-mongo/tags","blobs_url":"https://api.github.com/repos/checkiz/elixir-mongo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/checkiz/elixir-mongo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/checkiz/elixir-mongo/git/refs{/sha}","trees_url":"https://api.github.com/repos/checkiz/elixir-mongo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/checkiz/elixir-mongo/statuses/{sha}","languages_url":"https://api.github.com/repos/checkiz/elixir-mongo/languages","stargazers_url":"https://api.github.com/repos/checkiz/elixir-mongo/stargazers","contributors_url":"https://api.github.com/repos/checkiz/elixir-mongo/contributors","subscribers_url":"https://api.github.com/repos/checkiz/elixir-mongo/subscribers","subscription_url":"https://api.github.com/repos/checkiz/elixir-mongo/subscription","commits_url":"https://api.github.com/repos/checkiz/elixir-mongo/commits{/sha}","git_commits_url":"https://api.github.com/repos/checkiz/elixir-mongo/git/commits{/sha}","comments_url":"https://api.github.com/repos/checkiz/elixir-mongo/comments{/number}","issue_comment_url":"https://api.github.com/repos/checkiz/elixir-mongo/issues/comments{/number}","contents_url":"https://api.github.com/repos/checkiz/elixir-mongo/contents/{+path}","compare_url":"https://api.github.com/repos/checkiz/elixir-mongo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/checkiz/elixir-mongo/merges","archive_url":"https://api.github.com/repos/checkiz/elixir-mongo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/checkiz/elixir-mongo/downloads","issues_url":"https://api.github.com/repos/checkiz/elixir-mongo/issues{/number}","pulls_url":"https://api.github.com/repos/checkiz/elixir-mongo/pulls{/number}","milestones_url":"https://api.github.com/repos/checkiz/elixir-mongo/milestones{/number}","notifications_url":"https://api.github.com/repos/checkiz/elixir-mongo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/checkiz/elixir-mongo/labels{/name}","releases_url":"https://api.github.com/repos/checkiz/elixir-mongo/releases{/id}","deployments_url":"https://api.github.com/repos/checkiz/elixir-mongo/deployments","created_at":"2014-01-23T19:30:48Z","updated_at":"2016-03-10T19:08:27Z","pushed_at":"2016-02-20T13:24:26Z","git_url":"git://github.com/checkiz/elixir-mongo.git","ssh_url":"git@github.com:checkiz/elixir-mongo.git","clone_url":"https://github.com/checkiz/elixir-mongo.git","svn_url":"https://github.com/checkiz/elixir-mongo","homepage":"","size":280,"stargazers_count":80,"watchers_count":80,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":26,"mirror_url":null,"open_issues_count":7,"forks":26,"open_issues":7,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/32"},"html":{"href":"https://github.com/checkiz/elixir-mongo/pull/32"},"issue":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/issues/32"},"comments":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/checkiz/elixir-mongo/statuses/af41a4a39cbc48e77be5347119038df3118f0387"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}