{"action":"created","comment":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments/202213593","pull_request_review_id":136870290,"id":202213593,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjIxMzU5Mw==","diff_hunk":"@@ -48,6 +48,20 @@ def test_assets\n     @api.delete_object(sound_filename)\n     assert successful?\n \n+    # test put asset\n+    sound_body = 'stub-sound-contents'\n+    sound_filename = 'meow.mp3'\n+    response = @api.put_object(sound_filename, sound_body, {'CONTENT_TYPE' => 'json'})\n+    actual_sound_info = JSON.parse(response)\n+    expected_sound_info = {'filename' => sound_filename, 'category' => 'audio', 'size' => sound_body.length}\n+    assert_fileinfo_equal(expected_sound_info, actual_sound_info)","path":"shared/test/test_assets.rb","position":10,"original_position":10,"commit_id":"5b4749d2dd97be0ab81a2c13dfcda5ccbf58547b","original_commit_id":"5b4749d2dd97be0ab81a2c13dfcda5ccbf58547b","user":{"login":"islemaster","id":1615761,"node_id":"MDQ6VXNlcjE2MTU3NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1615761?v=4","gravatar_id":"","url":"https://api.github.com/users/islemaster","html_url":"https://github.com/islemaster","followers_url":"https://api.github.com/users/islemaster/followers","following_url":"https://api.github.com/users/islemaster/following{/other_user}","gists_url":"https://api.github.com/users/islemaster/gists{/gist_id}","starred_url":"https://api.github.com/users/islemaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islemaster/subscriptions","organizations_url":"https://api.github.com/users/islemaster/orgs","repos_url":"https://api.github.com/users/islemaster/repos","events_url":"https://api.github.com/users/islemaster/events{/privacy}","received_events_url":"https://api.github.com/users/islemaster/received_events","type":"User","site_admin":false},"body":"Additional test ideas:\r\n\r\n1. PUT to the same filename again and verify that the object is replaced (rather than failing or making a second object), to show the appropriate idempotent behavior.\r\n2. PUT to a second filename and verify the API can handle different files being uploaded (would catch accidentally hard-coded filename values, etc).","created_at":"2018-07-13T00:07:08Z","updated_at":"2018-07-13T00:07:18Z","html_url":"https://github.com/code-dot-org/code-dot-org/pull/23678#discussion_r202213593","pull_request_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments/202213593"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/23678#discussion_r202213593"},"pull_request":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678"}}},"pull_request":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678","id":201155264,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMTU1MjY0","html_url":"https://github.com/code-dot-org/code-dot-org/pull/23678","diff_url":"https://github.com/code-dot-org/code-dot-org/pull/23678.diff","patch_url":"https://github.com/code-dot-org/code-dot-org/pull/23678.patch","issue_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23678","number":23678,"state":"open","locked":false,"title":"Create Route to Put Assets","user":{"login":"epeach","id":2959170,"node_id":"MDQ6VXNlcjI5NTkxNzA=","avatar_url":"https://avatars0.githubusercontent.com/u/2959170?v=4","gravatar_id":"","url":"https://api.github.com/users/epeach","html_url":"https://github.com/epeach","followers_url":"https://api.github.com/users/epeach/followers","following_url":"https://api.github.com/users/epeach/following{/other_user}","gists_url":"https://api.github.com/users/epeach/gists{/gist_id}","starred_url":"https://api.github.com/users/epeach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epeach/subscriptions","organizations_url":"https://api.github.com/users/epeach/orgs","repos_url":"https://api.github.com/users/epeach/repos","events_url":"https://api.github.com/users/epeach/events{/privacy}","received_events_url":"https://api.github.com/users/epeach/received_events","type":"User","site_admin":false},"body":"Includes test.\r\n\r\nThis route is being added to handle audio that is recorded by the student in the browser and then sent to the assets in S3.\r\n\r\nI went back and forth quite a bit deciding whether this route should be a 'put' or 'post' and would love input on whether using a 'put' makes sense in this situation.\r\n\r\nAdditionally, any feedback on additional tests I should include to ensure full coverage would be appreciated. Thanks!","created_at":"2018-07-12T23:53:27Z","updated_at":"2018-07-13T00:07:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49ec80aa4b96a80f90093edfbb5c07b80e8bed8b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678/commits","review_comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678/comments","review_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23678/comments","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/5b4749d2dd97be0ab81a2c13dfcda5ccbf58547b","head":{"label":"code-dot-org:record-audio-put-asset","ref":"record-audio-put-asset","sha":"5b4749d2dd97be0ab81a2c13dfcda5ccbf58547b","user":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24250009,"node_id":"MDEwOlJlcG9zaXRvcnkyNDI1MDAwOQ==","name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-dot-org/code-dot-org","description":"The code powering code.org and studio.code.org","fork":false,"url":"https://api.github.com/repos/code-dot-org/code-dot-org","forks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/forks","keys_url":"https://api.github.com/repos/code-dot-org/code-dot-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-dot-org/code-dot-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-dot-org/code-dot-org/teams","hooks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/hooks","issue_events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/events{/number}","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/events","assignees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/assignees{/user}","branches_url":"https://api.github.com/repos/code-dot-org/code-dot-org/branches{/branch}","tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/tags","blobs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/{sha}","languages_url":"https://api.github.com/repos/code-dot-org/code-dot-org/languages","stargazers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/stargazers","contributors_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contributors","subscribers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscribers","subscription_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscription","commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contents/{+path}","compare_url":"https://api.github.com/repos/code-dot-org/code-dot-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-dot-org/code-dot-org/merges","archive_url":"https://api.github.com/repos/code-dot-org/code-dot-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-dot-org/code-dot-org/downloads","issues_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues{/number}","pulls_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls{/number}","milestones_url":"https://api.github.com/repos/code-dot-org/code-dot-org/milestones{/number}","notifications_url":"https://api.github.com/repos/code-dot-org/code-dot-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/labels{/name}","releases_url":"https://api.github.com/repos/code-dot-org/code-dot-org/releases{/id}","deployments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/deployments","created_at":"2014-09-20T00:46:11Z","updated_at":"2018-07-12T23:27:04Z","pushed_at":"2018-07-13T00:04:08Z","git_url":"git://github.com/code-dot-org/code-dot-org.git","ssh_url":"git@github.com:code-dot-org/code-dot-org.git","clone_url":"https://github.com/code-dot-org/code-dot-org.git","svn_url":"https://github.com/code-dot-org/code-dot-org","homepage":"http://code.org","size":8020297,"stargazers_count":328,"watchers_count":328,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":189,"mirror_url":null,"archived":false,"open_issues_count":134,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":189,"open_issues":134,"watchers":328,"default_branch":"staging"}},"base":{"label":"code-dot-org:staging","ref":"staging","sha":"9ef8f5dded0d843a7896087b6eaf17e21d0cdab4","user":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24250009,"node_id":"MDEwOlJlcG9zaXRvcnkyNDI1MDAwOQ==","name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-dot-org/code-dot-org","description":"The code powering code.org and studio.code.org","fork":false,"url":"https://api.github.com/repos/code-dot-org/code-dot-org","forks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/forks","keys_url":"https://api.github.com/repos/code-dot-org/code-dot-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-dot-org/code-dot-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-dot-org/code-dot-org/teams","hooks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/hooks","issue_events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/events{/number}","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/events","assignees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/assignees{/user}","branches_url":"https://api.github.com/repos/code-dot-org/code-dot-org/branches{/branch}","tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/tags","blobs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/{sha}","languages_url":"https://api.github.com/repos/code-dot-org/code-dot-org/languages","stargazers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/stargazers","contributors_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contributors","subscribers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscribers","subscription_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscription","commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contents/{+path}","compare_url":"https://api.github.com/repos/code-dot-org/code-dot-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-dot-org/code-dot-org/merges","archive_url":"https://api.github.com/repos/code-dot-org/code-dot-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-dot-org/code-dot-org/downloads","issues_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues{/number}","pulls_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls{/number}","milestones_url":"https://api.github.com/repos/code-dot-org/code-dot-org/milestones{/number}","notifications_url":"https://api.github.com/repos/code-dot-org/code-dot-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/labels{/name}","releases_url":"https://api.github.com/repos/code-dot-org/code-dot-org/releases{/id}","deployments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/deployments","created_at":"2014-09-20T00:46:11Z","updated_at":"2018-07-12T23:27:04Z","pushed_at":"2018-07-13T00:04:08Z","git_url":"git://github.com/code-dot-org/code-dot-org.git","ssh_url":"git@github.com:code-dot-org/code-dot-org.git","clone_url":"https://github.com/code-dot-org/code-dot-org.git","svn_url":"https://github.com/code-dot-org/code-dot-org","homepage":"http://code.org","size":8020297,"stargazers_count":328,"watchers_count":328,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":189,"mirror_url":null,"archived":false,"open_issues_count":134,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":189,"open_issues":134,"watchers":328,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/23678"},"issue":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23678"},"comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23678/comments"},"review_comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678/comments"},"review_comment":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23678/commits"},"statuses":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/5b4749d2dd97be0ab81a2c13dfcda5ccbf58547b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"islemaster"}}