{"action":"created","comment":{"url":"https://api.github.com/repos/mileszim/documentcloud/pulls/comments/53264501","id":53264501,"diff_hunk":"@@ -0,0 +1,20 @@\n+require 'spec_helper'\n+\n+describe DocumentCloud do\n+  it 'has a version number' do\n+    expect(DocumentCloud::Version).not_to be nil\n+  end\n+\n+  it 'escapes characters in email addresses and passwords' do\n+    email = 'test@example.com'\n+    password = 'abc123$@#^&*%'\n+\n+    DocumentCloud.configure do |config|\n+      config.email = email\n+      config.password = password\n+    end\n+\n+    expect(DocumentCloud.client.instance_variable_get(:@email)).to eq CGI.escape(email)","path":"spec/document_cloud_spec.rb","position":17,"original_position":17,"commit_id":"dc24aacca4adabd5fed9619d5784583e1714e360","original_commit_id":"dc24aacca4adabd5fed9619d5784583e1714e360","user":{"login":"tuttinator","id":386191,"avatar_url":"https://avatars.githubusercontent.com/u/386191?v=3","gravatar_id":"","url":"https://api.github.com/users/tuttinator","html_url":"https://github.com/tuttinator","followers_url":"https://api.github.com/users/tuttinator/followers","following_url":"https://api.github.com/users/tuttinator/following{/other_user}","gists_url":"https://api.github.com/users/tuttinator/gists{/gist_id}","starred_url":"https://api.github.com/users/tuttinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuttinator/subscriptions","organizations_url":"https://api.github.com/users/tuttinator/orgs","repos_url":"https://api.github.com/users/tuttinator/repos","events_url":"https://api.github.com/users/tuttinator/events{/privacy}","received_events_url":"https://api.github.com/users/tuttinator/received_events","type":"User","site_admin":false},"body":"This isn't necessarily the nicest way to test this. Reaching in with `instance_variable_get` is something of an antipattern, and I'll try other approaches.","created_at":"2016-02-18T02:28:08Z","updated_at":"2016-02-18T02:28:08Z","html_url":"https://github.com/mileszim/documentcloud/pull/7#discussion_r53264501","pull_request_url":"https://api.github.com/repos/mileszim/documentcloud/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/mileszim/documentcloud/pulls/comments/53264501"},"html":{"href":"https://github.com/mileszim/documentcloud/pull/7#discussion_r53264501"},"pull_request":{"href":"https://api.github.com/repos/mileszim/documentcloud/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/mileszim/documentcloud/pulls/7","id":59740940,"html_url":"https://github.com/mileszim/documentcloud/pull/7","diff_url":"https://github.com/mileszim/documentcloud/pull/7.diff","patch_url":"https://github.com/mileszim/documentcloud/pull/7.patch","issue_url":"https://api.github.com/repos/mileszim/documentcloud/issues/7","number":7,"state":"open","locked":false,"title":"Tests","user":{"login":"tuttinator","id":386191,"avatar_url":"https://avatars.githubusercontent.com/u/386191?v=3","gravatar_id":"","url":"https://api.github.com/users/tuttinator","html_url":"https://github.com/tuttinator","followers_url":"https://api.github.com/users/tuttinator/followers","following_url":"https://api.github.com/users/tuttinator/following{/other_user}","gists_url":"https://api.github.com/users/tuttinator/gists{/gist_id}","starred_url":"https://api.github.com/users/tuttinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuttinator/subscriptions","organizations_url":"https://api.github.com/users/tuttinator/orgs","repos_url":"https://api.github.com/users/tuttinator/repos","events_url":"https://api.github.com/users/tuttinator/events{/privacy}","received_events_url":"https://api.github.com/users/tuttinator/received_events","type":"User","site_admin":false},"body":"Referencing to #6\r\n\r\nThis is my first approach at adding some tests. Not ready to merge yet, and I'll keep adding to this PR as I go - but I thought I'd open it early to allow you to provide feedback instead of one large PR all at once.\r\n\r\nI've added a `Rakefile` as Travis CI will just run `rake` by default.\r\n\r\nI've also thought about using [VCR](https://github.com/vcr/vcr) to stub HTTP requests - so that testing API calls don't hit real servers.\r\n\r\nFeel free to let me know if there are any stylistic changes you prefer.\r\n","created_at":"2016-02-18T02:11:00Z","updated_at":"2016-02-18T02:28:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d8ded26930408dc06ce92e1a7986f24d9b08085","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mileszim/documentcloud/pulls/7/commits","review_comments_url":"https://api.github.com/repos/mileszim/documentcloud/pulls/7/comments","review_comment_url":"https://api.github.com/repos/mileszim/documentcloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mileszim/documentcloud/issues/7/comments","statuses_url":"https://api.github.com/repos/mileszim/documentcloud/statuses/dc24aacca4adabd5fed9619d5784583e1714e360","head":{"label":"nzherald:tests","ref":"tests","sha":"dc24aacca4adabd5fed9619d5784583e1714e360","user":{"login":"nzherald","id":9732993,"avatar_url":"https://avatars.githubusercontent.com/u/9732993?v=3","gravatar_id":"","url":"https://api.github.com/users/nzherald","html_url":"https://github.com/nzherald","followers_url":"https://api.github.com/users/nzherald/followers","following_url":"https://api.github.com/users/nzherald/following{/other_user}","gists_url":"https://api.github.com/users/nzherald/gists{/gist_id}","starred_url":"https://api.github.com/users/nzherald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzherald/subscriptions","organizations_url":"https://api.github.com/users/nzherald/orgs","repos_url":"https://api.github.com/users/nzherald/repos","events_url":"https://api.github.com/users/nzherald/events{/privacy}","received_events_url":"https://api.github.com/users/nzherald/received_events","type":"Organization","site_admin":false},"repo":{"id":31194882,"name":"documentcloud","full_name":"nzherald/documentcloud","owner":{"login":"nzherald","id":9732993,"avatar_url":"https://avatars.githubusercontent.com/u/9732993?v=3","gravatar_id":"","url":"https://api.github.com/users/nzherald","html_url":"https://github.com/nzherald","followers_url":"https://api.github.com/users/nzherald/followers","following_url":"https://api.github.com/users/nzherald/following{/other_user}","gists_url":"https://api.github.com/users/nzherald/gists{/gist_id}","starred_url":"https://api.github.com/users/nzherald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzherald/subscriptions","organizations_url":"https://api.github.com/users/nzherald/orgs","repos_url":"https://api.github.com/users/nzherald/repos","events_url":"https://api.github.com/users/nzherald/events{/privacy}","received_events_url":"https://api.github.com/users/nzherald/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nzherald/documentcloud","description":"Rubygem for interacting with the DocumentCloud API","fork":true,"url":"https://api.github.com/repos/nzherald/documentcloud","forks_url":"https://api.github.com/repos/nzherald/documentcloud/forks","keys_url":"https://api.github.com/repos/nzherald/documentcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nzherald/documentcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nzherald/documentcloud/teams","hooks_url":"https://api.github.com/repos/nzherald/documentcloud/hooks","issue_events_url":"https://api.github.com/repos/nzherald/documentcloud/issues/events{/number}","events_url":"https://api.github.com/repos/nzherald/documentcloud/events","assignees_url":"https://api.github.com/repos/nzherald/documentcloud/assignees{/user}","branches_url":"https://api.github.com/repos/nzherald/documentcloud/branches{/branch}","tags_url":"https://api.github.com/repos/nzherald/documentcloud/tags","blobs_url":"https://api.github.com/repos/nzherald/documentcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nzherald/documentcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nzherald/documentcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/nzherald/documentcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nzherald/documentcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/nzherald/documentcloud/languages","stargazers_url":"https://api.github.com/repos/nzherald/documentcloud/stargazers","contributors_url":"https://api.github.com/repos/nzherald/documentcloud/contributors","subscribers_url":"https://api.github.com/repos/nzherald/documentcloud/subscribers","subscription_url":"https://api.github.com/repos/nzherald/documentcloud/subscription","commits_url":"https://api.github.com/repos/nzherald/documentcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/nzherald/documentcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/nzherald/documentcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/nzherald/documentcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/nzherald/documentcloud/contents/{+path}","compare_url":"https://api.github.com/repos/nzherald/documentcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nzherald/documentcloud/merges","archive_url":"https://api.github.com/repos/nzherald/documentcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nzherald/documentcloud/downloads","issues_url":"https://api.github.com/repos/nzherald/documentcloud/issues{/number}","pulls_url":"https://api.github.com/repos/nzherald/documentcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/nzherald/documentcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/nzherald/documentcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nzherald/documentcloud/labels{/name}","releases_url":"https://api.github.com/repos/nzherald/documentcloud/releases{/id}","deployments_url":"https://api.github.com/repos/nzherald/documentcloud/deployments","created_at":"2015-02-23T05:10:26Z","updated_at":"2016-02-17T04:43:08Z","pushed_at":"2016-02-18T02:25:29Z","git_url":"git://github.com/nzherald/documentcloud.git","ssh_url":"git@github.com:nzherald/documentcloud.git","clone_url":"https://github.com/nzherald/documentcloud.git","svn_url":"https://github.com/nzherald/documentcloud","homepage":null,"size":28,"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":"mileszim:master","ref":"master","sha":"7e35d4a7d9f55d5f63a60e08a8758626e2106671","user":{"login":"mileszim","id":1849508,"avatar_url":"https://avatars.githubusercontent.com/u/1849508?v=3","gravatar_id":"","url":"https://api.github.com/users/mileszim","html_url":"https://github.com/mileszim","followers_url":"https://api.github.com/users/mileszim/followers","following_url":"https://api.github.com/users/mileszim/following{/other_user}","gists_url":"https://api.github.com/users/mileszim/gists{/gist_id}","starred_url":"https://api.github.com/users/mileszim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mileszim/subscriptions","organizations_url":"https://api.github.com/users/mileszim/orgs","repos_url":"https://api.github.com/users/mileszim/repos","events_url":"https://api.github.com/users/mileszim/events{/privacy}","received_events_url":"https://api.github.com/users/mileszim/received_events","type":"User","site_admin":false},"repo":{"id":14358583,"name":"documentcloud","full_name":"mileszim/documentcloud","owner":{"login":"mileszim","id":1849508,"avatar_url":"https://avatars.githubusercontent.com/u/1849508?v=3","gravatar_id":"","url":"https://api.github.com/users/mileszim","html_url":"https://github.com/mileszim","followers_url":"https://api.github.com/users/mileszim/followers","following_url":"https://api.github.com/users/mileszim/following{/other_user}","gists_url":"https://api.github.com/users/mileszim/gists{/gist_id}","starred_url":"https://api.github.com/users/mileszim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mileszim/subscriptions","organizations_url":"https://api.github.com/users/mileszim/orgs","repos_url":"https://api.github.com/users/mileszim/repos","events_url":"https://api.github.com/users/mileszim/events{/privacy}","received_events_url":"https://api.github.com/users/mileszim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mileszim/documentcloud","description":"Rubygem for interacting with the DocumentCloud API","fork":false,"url":"https://api.github.com/repos/mileszim/documentcloud","forks_url":"https://api.github.com/repos/mileszim/documentcloud/forks","keys_url":"https://api.github.com/repos/mileszim/documentcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mileszim/documentcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mileszim/documentcloud/teams","hooks_url":"https://api.github.com/repos/mileszim/documentcloud/hooks","issue_events_url":"https://api.github.com/repos/mileszim/documentcloud/issues/events{/number}","events_url":"https://api.github.com/repos/mileszim/documentcloud/events","assignees_url":"https://api.github.com/repos/mileszim/documentcloud/assignees{/user}","branches_url":"https://api.github.com/repos/mileszim/documentcloud/branches{/branch}","tags_url":"https://api.github.com/repos/mileszim/documentcloud/tags","blobs_url":"https://api.github.com/repos/mileszim/documentcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mileszim/documentcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mileszim/documentcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/mileszim/documentcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mileszim/documentcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/mileszim/documentcloud/languages","stargazers_url":"https://api.github.com/repos/mileszim/documentcloud/stargazers","contributors_url":"https://api.github.com/repos/mileszim/documentcloud/contributors","subscribers_url":"https://api.github.com/repos/mileszim/documentcloud/subscribers","subscription_url":"https://api.github.com/repos/mileszim/documentcloud/subscription","commits_url":"https://api.github.com/repos/mileszim/documentcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/mileszim/documentcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/mileszim/documentcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/mileszim/documentcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/mileszim/documentcloud/contents/{+path}","compare_url":"https://api.github.com/repos/mileszim/documentcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mileszim/documentcloud/merges","archive_url":"https://api.github.com/repos/mileszim/documentcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mileszim/documentcloud/downloads","issues_url":"https://api.github.com/repos/mileszim/documentcloud/issues{/number}","pulls_url":"https://api.github.com/repos/mileszim/documentcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/mileszim/documentcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/mileszim/documentcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mileszim/documentcloud/labels{/name}","releases_url":"https://api.github.com/repos/mileszim/documentcloud/releases{/id}","deployments_url":"https://api.github.com/repos/mileszim/documentcloud/deployments","created_at":"2013-11-13T08:42:55Z","updated_at":"2016-02-17T22:22:59Z","pushed_at":"2016-02-18T02:25:29Z","git_url":"git://github.com/mileszim/documentcloud.git","ssh_url":"git@github.com:mileszim/documentcloud.git","clone_url":"https://github.com/mileszim/documentcloud.git","svn_url":"https://github.com/mileszim/documentcloud","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mileszim/documentcloud/pulls/7"},"html":{"href":"https://github.com/mileszim/documentcloud/pull/7"},"issue":{"href":"https://api.github.com/repos/mileszim/documentcloud/issues/7"},"comments":{"href":"https://api.github.com/repos/mileszim/documentcloud/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/mileszim/documentcloud/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/mileszim/documentcloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mileszim/documentcloud/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/mileszim/documentcloud/statuses/dc24aacca4adabd5fed9619d5784583e1714e360"}}}}