{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/comments/25267252","id":25267252,"diff_hunk":"@@ -203,6 +203,100 @@ function Bucket(storage, name) {\n }\n \n /**\n+ * Combine mutliple files into one new file.\n+ *\n+ * @throws if a non-array is provided as sources argument.\n+ * @throws if less than two sources are provided.\n+ * @throws if no destination is provided.\n+ * @throws if a content type cannot be determined for the destination file.\n+ *\n+ * @param {string[]|module:storage/file[]} sources - The source files that will\n+ *     be combined.\n+ * @param {string|module:storage/file} destination - The file you would like the\n+ *     source files combined into.\n+ * @param {function=} callback - The callback function.\n+ *\n+ * @example\n+ * var 2013logs = bucket.file('2013-logs.txt');\n+ * var 2014logs = bucket.file('2014-logs.txt');\n+ *\n+ * var allLogs = bucket.file('all-logs.txt');\n+ *\n+ * bucket.combine([\n+ *   2013logs,\n+ *   2014logs\n+ * ], allLogs, function(err, newFile) {\n+ *   // newFile === allLogs\n+ * });\n+ */\n+Bucket.prototype.combine = function(sources, destination, callback) {\n+  if (!util.is(sources, 'array') || sources.length < 2) {\n+    throw new Error('You must provide at least two source files.');\n+  }\n+\n+  if (!destination) {\n+    throw new Error('A destination file must be specified.');\n+  }\n+\n+  var self = this;","path":"lib/storage/bucket.js","position":39,"original_position":39,"commit_id":"8308106595a676e309ec8c41b7e21bc47747c6cd","original_commit_id":"2a81d2daa8fc69516e5336f4bbd1993131307753","user":{"login":"ryanseys","id":163873,"avatar_url":"https://avatars.githubusercontent.com/u/163873?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanseys","html_url":"https://github.com/ryanseys","followers_url":"https://api.github.com/users/ryanseys/followers","following_url":"https://api.github.com/users/ryanseys/following{/other_user}","gists_url":"https://api.github.com/users/ryanseys/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanseys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanseys/subscriptions","organizations_url":"https://api.github.com/users/ryanseys/orgs","repos_url":"https://api.github.com/users/ryanseys/repos","events_url":"https://api.github.com/users/ryanseys/events{/privacy}","received_events_url":"https://api.github.com/users/ryanseys/received_events","type":"User","site_admin":false},"body":"Yeah just leave it and label the switch to `self` as a sort of technical debt.","created_at":"2015-02-24T16:37:48Z","updated_at":"2015-02-24T16:37:48Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/408#discussion_r25267252","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/comments/25267252"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/408#discussion_r25267252"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408","id":29833656,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/408","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/408.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/408.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/408","number":408,"state":"open","locked":false,"title":"storage: support file.compose - fixes #401","user":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars.githubusercontent.com/u/723048?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"body":"Fixes: #401\r\nRefs: #375 \r\n\r\n```js\r\nvar 2013logs = bucket.file('2013-logs.txt');\r\nvar 2014logs = bucket.file('2014-logs.txt');\r\n\r\nvar allLogs = bucket.file('all-logs.txt');\r\n\r\nbucket.combine([\r\n  2013logs,\r\n  2014logs\r\n], allLogs, function(err, newFile) {\r\n  // newFile === allLogs\r\n});\r\n```\r\n\r\n","created_at":"2015-02-23T18:41:04Z","updated_at":"2015-02-24T16:37:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6019508eb5721500839cf922e81a5ac20b976dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/408/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/statuses/8308106595a676e309ec8c41b7e21bc47747c6cd","head":{"label":"stephenplusplus:spp--storage-combine","ref":"spp--storage-combine","sha":"8308106595a676e309ec8c41b7e21bc47747c6cd","user":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars.githubusercontent.com/u/723048?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"repo":{"id":22482767,"name":"gcloud-node","full_name":"stephenplusplus/gcloud-node","owner":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars.githubusercontent.com/u/723048?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephenplusplus/gcloud-node","description":"Google Cloud Node Client Library","fork":true,"url":"https://api.github.com/repos/stephenplusplus/gcloud-node","forks_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/forks","keys_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/teams","hooks_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/hooks","issue_events_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/issues/events{/number}","events_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/events","assignees_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/assignees{/user}","branches_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/branches{/branch}","tags_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/tags","blobs_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/statuses/{sha}","languages_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/languages","stargazers_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/stargazers","contributors_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/contributors","subscribers_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/subscribers","subscription_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/subscription","commits_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/contents/{+path}","compare_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/merges","archive_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/downloads","issues_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/issues{/number}","pulls_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/pulls{/number}","milestones_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/milestones{/number}","notifications_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/labels{/name}","releases_url":"https://api.github.com/repos/stephenplusplus/gcloud-node/releases{/id}","created_at":"2014-07-31T19:55:20Z","updated_at":"2014-07-31T19:55:38Z","pushed_at":"2015-02-24T13:36:45Z","git_url":"git://github.com/stephenplusplus/gcloud-node.git","ssh_url":"git@github.com:stephenplusplus/gcloud-node.git","clone_url":"https://github.com/stephenplusplus/gcloud-node.git","svn_url":"https://github.com/stephenplusplus/gcloud-node","homepage":"","size":11643,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"6938342dbbc045ff9ecd1a89c20ad530526764ca","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":19483273,"name":"gcloud-node","full_name":"GoogleCloudPlatform/gcloud-node","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-node","description":"Google Cloud Client Library for Node.js","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/releases{/id}","created_at":"2014-05-06T06:18:00Z","updated_at":"2015-02-24T04:22:11Z","pushed_at":"2015-02-23T14:25:39Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-node.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-node.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-node.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-node","homepage":"https://googlecloudplatform.github.io/gcloud-node","size":12759,"stargazers_count":442,"watchers_count":442,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":49,"mirror_url":null,"open_issues_count":28,"forks":49,"open_issues":28,"watchers":442,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-node/pull/408"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/408"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/408/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/pulls/408/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/statuses/8308106595a676e309ec8c41b7e21bc47747c6cd"}}}}