GitHub PullRequestReviewCommentEvent at 2014-09-03 12:34:19
Repository: smart_proxy_abrt
Actor: mmilata
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/comments/17045936","id":17045936,"diff_hunk":"@@ -0,0 +1,125 @@\n+require 'tmpdir'\n+require 'fileutils'\n+\n+require 'test_helper'\n+require 'smart_proxy_abrt'\n+require 'smart_proxy_abrt/abrt_lib'\n+\n+class AbrtTest < Test::Unit::TestCase\n+  def setup\n+    @tmpdir = Dir.mktmpdir \"foreman-proxy-test\"\n+    FileUtils.cp Dir[\"test/fixtures/ureport-ondisk-*\"], @tmpdir\n+\n+    Proxy::Abrt::Plugin.settings.stubs(:aggregate_reports).returns(false)\n+    Proxy::Abrt::Plugin.settings.stubs(:spooldir).returns(@tmpdir)\n+  end\n+\n+  def teardown\n+    FileUtils.rm_rf @tmpdir\n+  end\n+\n+  def test_multipart_form_data_file\n+    file_contents = '{\"foo\":\"bar\"}'\n+    headers, body = Proxy::Abrt.form_data_file(file_contents, 'application/json')\n+    request_text = \"POST /abrt/whatever/ HTTP/1.1\\r\\n\"\n+    headers.each do |key,value|\n+      request_text << key + \": \" + value + \"\\r\\n\"\n+    end\n+    request_text << \"\\r\\n\"\n+    request_text << body\n+\n+    req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)","path":"test/abrt_test.rb","position":31,"original_position":31,"commit_id":"aeafb9798a679c575a5e0973d6cc6afd34811f9e","original_commit_id":"e0a4d46eb734be1b4e6b65f9b083eb4c5e3dc612","user":{"login":"mmilata","id":85857,"avatar_url":"https://avatars.githubusercontent.com/u/85857?v=2","gravatar_id":"33f6feb8570d94ab65e6a81ac3ed5d29","url":"https://api.github.com/users/mmilata","html_url":"https://github.com/mmilata","followers_url":"https://api.github.com/users/mmilata/followers","following_url":"https://api.github.com/users/mmilata/following{/other_user}","gists_url":"https://api.github.com/users/mmilata/gists{/gist_id}","starred_url":"https://api.github.com/users/mmilata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmilata/subscriptions","organizations_url":"https://api.github.com/users/mmilata/orgs","repos_url":"https://api.github.com/users/mmilata/repos","events_url":"https://api.github.com/users/mmilata/events{/privacy}","received_events_url":"https://api.github.com/users/mmilata/received_events","type":"User","site_admin":false},"body":"I don't see how Net::HTTP::Post can be used for parsing a HTTP request - it seems to be mostly used for creating the requests.","created_at":"2014-09-03T12:34:19Z","updated_at":"2014-09-03T12:34:19Z","html_url":"https://github.com/theforeman/smart_proxy_abrt/pull/1#discussion_r17045936","pull_request_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/comments/17045936"},"html":{"href":"https://github.com/theforeman/smart_proxy_abrt/pull/1#discussion_r17045936"},"pull_request":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1","id":19856267,"html_url":"https://github.com/theforeman/smart_proxy_abrt/pull/1","diff_url":"https://github.com/theforeman/smart_proxy_abrt/pull/1.diff","patch_url":"https://github.com/theforeman/smart_proxy_abrt/pull/1.patch","issue_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/1","number":1,"state":"open","locked":false,"title":"Full review (do not merge)","user":{"login":"mmilata","id":85857,"avatar_url":"https://avatars.githubusercontent.com/u/85857?v=2","gravatar_id":"33f6feb8570d94ab65e6a81ac3ed5d29","url":"https://api.github.com/users/mmilata","html_url":"https://github.com/mmilata","followers_url":"https://api.github.com/users/mmilata/followers","following_url":"https://api.github.com/users/mmilata/following{/other_user}","gists_url":"https://api.github.com/users/mmilata/gists{/gist_id}","starred_url":"https://api.github.com/users/mmilata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmilata/subscriptions","organizations_url":"https://api.github.com/users/mmilata/orgs","repos_url":"https://api.github.com/users/mmilata/repos","events_url":"https://api.github.com/users/mmilata/events{/privacy}","received_events_url":"https://api.github.com/users/mmilata/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-15T17:30:27Z","updated_at":"2014-09-03T12:34:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a041c7740592458e50776d1e2202d7106566001","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1/commits","review_comments_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1/comments","review_comment_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/comments/{number}","comments_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/1/comments","statuses_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/statuses/aeafb9798a679c575a5e0973d6cc6afd34811f9e","head":{"label":"theforeman:review","ref":"review","sha":"aeafb9798a679c575a5e0973d6cc6afd34811f9e","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=2","gravatar_id":"debaffa7d317b9ec76a588682fb1e640","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":22993140,"name":"smart_proxy_abrt","full_name":"theforeman/smart_proxy_abrt","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=2","gravatar_id":"debaffa7d317b9ec76a588682fb1e640","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/smart_proxy_abrt","description":"Automatic Bug Reporting Tool plugin for Foreman's smart-proxy","fork":false,"url":"https://api.github.com/repos/theforeman/smart_proxy_abrt","forks_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/forks","keys_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/teams","hooks_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/hooks","issue_events_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/events","assignees_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/tags","blobs_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/languages","stargazers_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/stargazers","contributors_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/contributors","subscribers_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/subscribers","subscription_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/subscription","commits_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/comments/{number}","contents_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/merges","archive_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/downloads","issues_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/releases{/id}","created_at":"2014-08-15T15:00:58Z","updated_at":"2014-08-15T17:19:29Z","pushed_at":"2014-08-29T10:53:36Z","git_url":"git://github.com/theforeman/smart_proxy_abrt.git","ssh_url":"git@github.com:theforeman/smart_proxy_abrt.git","clone_url":"https://github.com/theforeman/smart_proxy_abrt.git","svn_url":"https://github.com/theforeman/smart_proxy_abrt","homepage":null,"size":248,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"theforeman:empty","ref":"empty","sha":"09a746a6e36f3e9e4f0553e5c67be01a0c9fb2df","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=2","gravatar_id":"debaffa7d317b9ec76a588682fb1e640","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":22993140,"name":"smart_proxy_abrt","full_name":"theforeman/smart_proxy_abrt","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=2","gravatar_id":"debaffa7d317b9ec76a588682fb1e640","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/smart_proxy_abrt","description":"Automatic Bug Reporting Tool plugin for Foreman's smart-proxy","fork":false,"url":"https://api.github.com/repos/theforeman/smart_proxy_abrt","forks_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/forks","keys_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/teams","hooks_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/hooks","issue_events_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/events","assignees_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/tags","blobs_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/languages","stargazers_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/stargazers","contributors_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/contributors","subscribers_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/subscribers","subscription_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/subscription","commits_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/comments/{number}","contents_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/merges","archive_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/downloads","issues_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/smart_proxy_abrt/releases{/id}","created_at":"2014-08-15T15:00:58Z","updated_at":"2014-08-15T17:19:29Z","pushed_at":"2014-08-29T10:53:36Z","git_url":"git://github.com/theforeman/smart_proxy_abrt.git","ssh_url":"git@github.com:theforeman/smart_proxy_abrt.git","clone_url":"https://github.com/theforeman/smart_proxy_abrt.git","svn_url":"https://github.com/theforeman/smart_proxy_abrt","homepage":null,"size":248,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1"},"html":{"href":"https://github.com/theforeman/smart_proxy_abrt/pull/1"},"issue":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/1"},"comments":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/smart_proxy_abrt/statuses/aeafb9798a679c575a5e0973d6cc6afd34811f9e"}}}}