{"action":"created","comment":{"url":"https://api.github.com/repos/postmanlabs/newman/pulls/comments/79143828","id":79143828,"diff_hunk":"@@ -57,35 +57,41 @@ var _ = require('lodash'),\n      */\n     configLoaders = {\n         collection: function (value, callback) {\n-            var done = function (err, collection) {\n-                if (err) {\n-                    return callback(err);\n-                }\n+            var V2_COLLECTION_PROPERTY = 'info.schema',\n+                COLLECTION_TRANSFORMER_OPTION = { inputVersion: '1.0.0', outputVersion: '2.0.0' },\n \n-                // ensure that the collection option is present before starting a run\n-                if (!_.isObject(collection)) {\n-                    return callback(new Error('newman: collection could not be loaded'));\n-                }\n+                done = function (err, collection) {\n+                    if (err) {\n+                        return callback(err);\n+                    }\n \n-                // ensure that the collection reference is an SDK instance\n-                // @todo - should this be handled by config loaders?\n-                collection = new Collection(Collection.isCollection(collection) ?\n-                    // if the option contain an instance of collection, we simply clone it for future use\n-                    // create a collection in case it is not one. user can send v2 JSON as a source and that will be\n-                    // converted to a collection\n-                    collection.toJSON() : collection);\n+                    // ensure that the collection option is present before starting a run\n+                    if (!_.isObject(collection)) {\n+                        return callback(new Error('newman: collection could not be loaded'));\n+                    }\n \n-                callback(null, collection);\n-            };\n+                    // ensure that the collection reference is an SDK instance\n+                    // @todo - should this be handled by config loaders?\n+                    collection = new Collection(Collection.isCollection(collection) ?\n+                        // if the option contain an instance of collection, we simply clone it for future use\n+                        // create a collection in case it is not one. user can send v2 JSON as a source and that will be\n+                        // converted to a collection\n+                        collection.toJSON() : collection);\n \n-            if (!_.isString(value)) { return done(null, value); }\n+                    callback(null, collection);\n+                };\n+\n+            if (_.isObject(value)) {","path":"lib/run/options.js","position":null,"original_position":46,"commit_id":"5929d91f3a5f97f2ff4450c93f868c8ca501c87e","original_commit_id":"0c7868f0ede16ee3e2bc0f0252f3a87cb46345e9","user":{"login":"shamasis","id":232373,"avatar_url":"https://avatars.githubusercontent.com/u/232373?v=3","gravatar_id":"","url":"https://api.github.com/users/shamasis","html_url":"https://github.com/shamasis","followers_url":"https://api.github.com/users/shamasis/followers","following_url":"https://api.github.com/users/shamasis/following{/other_user}","gists_url":"https://api.github.com/users/shamasis/gists{/gist_id}","starred_url":"https://api.github.com/users/shamasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamasis/subscriptions","organizations_url":"https://api.github.com/users/shamasis/orgs","repos_url":"https://api.github.com/users/shamasis/repos","events_url":"https://api.github.com/users/shamasis/events{/privacy}","received_events_url":"https://api.github.com/users/shamasis/received_events","type":"User","site_admin":false},"body":"check v1 else, assume v2 please.","created_at":"2016-09-16T10:29:29Z","updated_at":"2016-09-16T10:29:29Z","html_url":"https://github.com/postmanlabs/newman/pull/613#discussion_r79143828","pull_request_url":"https://api.github.com/repos/postmanlabs/newman/pulls/613","_links":{"self":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/comments/79143828"},"html":{"href":"https://github.com/postmanlabs/newman/pull/613#discussion_r79143828"},"pull_request":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/613"}}},"pull_request":{"url":"https://api.github.com/repos/postmanlabs/newman/pulls/613","id":85443013,"html_url":"https://github.com/postmanlabs/newman/pull/613","diff_url":"https://github.com/postmanlabs/newman/pull/613.diff","patch_url":"https://github.com/postmanlabs/newman/pull/613.patch","issue_url":"https://api.github.com/repos/postmanlabs/newman/issues/613","number":613,"state":"open","locked":false,"title":"Fixed V1 collection resolution bug","user":{"login":"kunagpal","id":7289840,"avatar_url":"https://avatars.githubusercontent.com/u/7289840?v=3","gravatar_id":"","url":"https://api.github.com/users/kunagpal","html_url":"https://github.com/kunagpal","followers_url":"https://api.github.com/users/kunagpal/followers","following_url":"https://api.github.com/users/kunagpal/following{/other_user}","gists_url":"https://api.github.com/users/kunagpal/gists{/gist_id}","starred_url":"https://api.github.com/users/kunagpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunagpal/subscriptions","organizations_url":"https://api.github.com/users/kunagpal/orgs","repos_url":"https://api.github.com/users/kunagpal/repos","events_url":"https://api.github.com/users/kunagpal/events{/privacy}","received_events_url":"https://api.github.com/users/kunagpal/received_events","type":"User","site_admin":false},"body":"Takes care of #610 \r\n\r\n**Context:** Newman Library usage\r\n\r\nThis ensures that V1 collections passed as objects are unconditionally converted to their respective V2 equivalents first.","created_at":"2016-09-15T17:09:17Z","updated_at":"2016-09-16T10:29:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b95e65f86a7253de92a707ab3945c5cd0bd4ee67","assignee":{"login":"shamasis","id":232373,"avatar_url":"https://avatars.githubusercontent.com/u/232373?v=3","gravatar_id":"","url":"https://api.github.com/users/shamasis","html_url":"https://github.com/shamasis","followers_url":"https://api.github.com/users/shamasis/followers","following_url":"https://api.github.com/users/shamasis/following{/other_user}","gists_url":"https://api.github.com/users/shamasis/gists{/gist_id}","starred_url":"https://api.github.com/users/shamasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamasis/subscriptions","organizations_url":"https://api.github.com/users/shamasis/orgs","repos_url":"https://api.github.com/users/shamasis/repos","events_url":"https://api.github.com/users/shamasis/events{/privacy}","received_events_url":"https://api.github.com/users/shamasis/received_events","type":"User","site_admin":false},"assignees":[{"login":"shamasis","id":232373,"avatar_url":"https://avatars.githubusercontent.com/u/232373?v=3","gravatar_id":"","url":"https://api.github.com/users/shamasis","html_url":"https://github.com/shamasis","followers_url":"https://api.github.com/users/shamasis/followers","following_url":"https://api.github.com/users/shamasis/following{/other_user}","gists_url":"https://api.github.com/users/shamasis/gists{/gist_id}","starred_url":"https://api.github.com/users/shamasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamasis/subscriptions","organizations_url":"https://api.github.com/users/shamasis/orgs","repos_url":"https://api.github.com/users/shamasis/repos","events_url":"https://api.github.com/users/shamasis/events{/privacy}","received_events_url":"https://api.github.com/users/shamasis/received_events","type":"User","site_admin":false},{"login":"czardoz","id":3726484,"avatar_url":"https://avatars.githubusercontent.com/u/3726484?v=3","gravatar_id":"","url":"https://api.github.com/users/czardoz","html_url":"https://github.com/czardoz","followers_url":"https://api.github.com/users/czardoz/followers","following_url":"https://api.github.com/users/czardoz/following{/other_user}","gists_url":"https://api.github.com/users/czardoz/gists{/gist_id}","starred_url":"https://api.github.com/users/czardoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czardoz/subscriptions","organizations_url":"https://api.github.com/users/czardoz/orgs","repos_url":"https://api.github.com/users/czardoz/repos","events_url":"https://api.github.com/users/czardoz/events{/privacy}","received_events_url":"https://api.github.com/users/czardoz/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/postmanlabs/newman/pulls/613/commits","review_comments_url":"https://api.github.com/repos/postmanlabs/newman/pulls/613/comments","review_comment_url":"https://api.github.com/repos/postmanlabs/newman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/postmanlabs/newman/issues/613/comments","statuses_url":"https://api.github.com/repos/postmanlabs/newman/statuses/5929d91f3a5f97f2ff4450c93f868c8ca501c87e","head":{"label":"postmanlabs:feature/v1-collection-fix","ref":"feature/v1-collection-fix","sha":"5929d91f3a5f97f2ff4450c93f868c8ca501c87e","user":{"login":"postmanlabs","id":10251060,"avatar_url":"https://avatars.githubusercontent.com/u/10251060?v=3","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17449493,"name":"newman","full_name":"postmanlabs/newman","owner":{"login":"postmanlabs","id":10251060,"avatar_url":"https://avatars.githubusercontent.com/u/10251060?v=3","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/postmanlabs/newman","description":"Newman is a command-line collection runner for Postman","fork":false,"url":"https://api.github.com/repos/postmanlabs/newman","forks_url":"https://api.github.com/repos/postmanlabs/newman/forks","keys_url":"https://api.github.com/repos/postmanlabs/newman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postmanlabs/newman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postmanlabs/newman/teams","hooks_url":"https://api.github.com/repos/postmanlabs/newman/hooks","issue_events_url":"https://api.github.com/repos/postmanlabs/newman/issues/events{/number}","events_url":"https://api.github.com/repos/postmanlabs/newman/events","assignees_url":"https://api.github.com/repos/postmanlabs/newman/assignees{/user}","branches_url":"https://api.github.com/repos/postmanlabs/newman/branches{/branch}","tags_url":"https://api.github.com/repos/postmanlabs/newman/tags","blobs_url":"https://api.github.com/repos/postmanlabs/newman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postmanlabs/newman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postmanlabs/newman/git/refs{/sha}","trees_url":"https://api.github.com/repos/postmanlabs/newman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postmanlabs/newman/statuses/{sha}","languages_url":"https://api.github.com/repos/postmanlabs/newman/languages","stargazers_url":"https://api.github.com/repos/postmanlabs/newman/stargazers","contributors_url":"https://api.github.com/repos/postmanlabs/newman/contributors","subscribers_url":"https://api.github.com/repos/postmanlabs/newman/subscribers","subscription_url":"https://api.github.com/repos/postmanlabs/newman/subscription","commits_url":"https://api.github.com/repos/postmanlabs/newman/commits{/sha}","git_commits_url":"https://api.github.com/repos/postmanlabs/newman/git/commits{/sha}","comments_url":"https://api.github.com/repos/postmanlabs/newman/comments{/number}","issue_comment_url":"https://api.github.com/repos/postmanlabs/newman/issues/comments{/number}","contents_url":"https://api.github.com/repos/postmanlabs/newman/contents/{+path}","compare_url":"https://api.github.com/repos/postmanlabs/newman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postmanlabs/newman/merges","archive_url":"https://api.github.com/repos/postmanlabs/newman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postmanlabs/newman/downloads","issues_url":"https://api.github.com/repos/postmanlabs/newman/issues{/number}","pulls_url":"https://api.github.com/repos/postmanlabs/newman/pulls{/number}","milestones_url":"https://api.github.com/repos/postmanlabs/newman/milestones{/number}","notifications_url":"https://api.github.com/repos/postmanlabs/newman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postmanlabs/newman/labels{/name}","releases_url":"https://api.github.com/repos/postmanlabs/newman/releases{/id}","deployments_url":"https://api.github.com/repos/postmanlabs/newman/deployments","created_at":"2014-03-05T17:52:17Z","updated_at":"2016-09-15T17:25:03Z","pushed_at":"2016-09-16T09:21:40Z","git_url":"git://github.com/postmanlabs/newman.git","ssh_url":"git@github.com:postmanlabs/newman.git","clone_url":"https://github.com/postmanlabs/newman.git","svn_url":"https://github.com/postmanlabs/newman","homepage":"http://www.getpostman.com","size":2071,"stargazers_count":1242,"watchers_count":1242,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":190,"mirror_url":null,"open_issues_count":60,"forks":190,"open_issues":60,"watchers":1242,"default_branch":"develop"}},"base":{"label":"postmanlabs:develop","ref":"develop","sha":"278d0c5d6ab2c9d067dca5407e359dbd735b34cb","user":{"login":"postmanlabs","id":10251060,"avatar_url":"https://avatars.githubusercontent.com/u/10251060?v=3","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17449493,"name":"newman","full_name":"postmanlabs/newman","owner":{"login":"postmanlabs","id":10251060,"avatar_url":"https://avatars.githubusercontent.com/u/10251060?v=3","gravatar_id":"","url":"https://api.github.com/users/postmanlabs","html_url":"https://github.com/postmanlabs","followers_url":"https://api.github.com/users/postmanlabs/followers","following_url":"https://api.github.com/users/postmanlabs/following{/other_user}","gists_url":"https://api.github.com/users/postmanlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/postmanlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmanlabs/subscriptions","organizations_url":"https://api.github.com/users/postmanlabs/orgs","repos_url":"https://api.github.com/users/postmanlabs/repos","events_url":"https://api.github.com/users/postmanlabs/events{/privacy}","received_events_url":"https://api.github.com/users/postmanlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/postmanlabs/newman","description":"Newman is a command-line collection runner for Postman","fork":false,"url":"https://api.github.com/repos/postmanlabs/newman","forks_url":"https://api.github.com/repos/postmanlabs/newman/forks","keys_url":"https://api.github.com/repos/postmanlabs/newman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postmanlabs/newman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postmanlabs/newman/teams","hooks_url":"https://api.github.com/repos/postmanlabs/newman/hooks","issue_events_url":"https://api.github.com/repos/postmanlabs/newman/issues/events{/number}","events_url":"https://api.github.com/repos/postmanlabs/newman/events","assignees_url":"https://api.github.com/repos/postmanlabs/newman/assignees{/user}","branches_url":"https://api.github.com/repos/postmanlabs/newman/branches{/branch}","tags_url":"https://api.github.com/repos/postmanlabs/newman/tags","blobs_url":"https://api.github.com/repos/postmanlabs/newman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postmanlabs/newman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postmanlabs/newman/git/refs{/sha}","trees_url":"https://api.github.com/repos/postmanlabs/newman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postmanlabs/newman/statuses/{sha}","languages_url":"https://api.github.com/repos/postmanlabs/newman/languages","stargazers_url":"https://api.github.com/repos/postmanlabs/newman/stargazers","contributors_url":"https://api.github.com/repos/postmanlabs/newman/contributors","subscribers_url":"https://api.github.com/repos/postmanlabs/newman/subscribers","subscription_url":"https://api.github.com/repos/postmanlabs/newman/subscription","commits_url":"https://api.github.com/repos/postmanlabs/newman/commits{/sha}","git_commits_url":"https://api.github.com/repos/postmanlabs/newman/git/commits{/sha}","comments_url":"https://api.github.com/repos/postmanlabs/newman/comments{/number}","issue_comment_url":"https://api.github.com/repos/postmanlabs/newman/issues/comments{/number}","contents_url":"https://api.github.com/repos/postmanlabs/newman/contents/{+path}","compare_url":"https://api.github.com/repos/postmanlabs/newman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postmanlabs/newman/merges","archive_url":"https://api.github.com/repos/postmanlabs/newman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postmanlabs/newman/downloads","issues_url":"https://api.github.com/repos/postmanlabs/newman/issues{/number}","pulls_url":"https://api.github.com/repos/postmanlabs/newman/pulls{/number}","milestones_url":"https://api.github.com/repos/postmanlabs/newman/milestones{/number}","notifications_url":"https://api.github.com/repos/postmanlabs/newman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postmanlabs/newman/labels{/name}","releases_url":"https://api.github.com/repos/postmanlabs/newman/releases{/id}","deployments_url":"https://api.github.com/repos/postmanlabs/newman/deployments","created_at":"2014-03-05T17:52:17Z","updated_at":"2016-09-15T17:25:03Z","pushed_at":"2016-09-16T09:21:40Z","git_url":"git://github.com/postmanlabs/newman.git","ssh_url":"git@github.com:postmanlabs/newman.git","clone_url":"https://github.com/postmanlabs/newman.git","svn_url":"https://github.com/postmanlabs/newman","homepage":"http://www.getpostman.com","size":2071,"stargazers_count":1242,"watchers_count":1242,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":190,"mirror_url":null,"open_issues_count":60,"forks":190,"open_issues":60,"watchers":1242,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/613"},"html":{"href":"https://github.com/postmanlabs/newman/pull/613"},"issue":{"href":"https://api.github.com/repos/postmanlabs/newman/issues/613"},"comments":{"href":"https://api.github.com/repos/postmanlabs/newman/issues/613/comments"},"review_comments":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/613/comments"},"review_comment":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/postmanlabs/newman/pulls/613/commits"},"statuses":{"href":"https://api.github.com/repos/postmanlabs/newman/statuses/5929d91f3a5f97f2ff4450c93f868c8ca501c87e"}}}}
{"actor":{"display_login":"shamasis"}}