{"action":"created","comment":{"url":"https://api.github.com/repos/serverless/serverless/pulls/comments/87081102","pull_request_review_id":7707854,"id":87081102,"diff_hunk":"@@ -77,5 +129,18 @@ describe('Install', () => {\n         expect(downloadStub.args[0][0]).to.equal(`${install.options.url}/archive/master.zip`);\n       });\n     });\n+\n+    it('should download and rename the service based on the GitHub URL', () => {","path":"lib/plugins/install/tests/install.js","position":null,"original_position":92,"commit_id":"5822407a4d7422ed07fb4720815e455849819743","original_commit_id":"12f7afeb6e150a4786039e258606900a2f0c4459","user":{"login":"laardee","id":4726921,"avatar_url":"https://avatars.githubusercontent.com/u/4726921?v=3","gravatar_id":"","url":"https://api.github.com/users/laardee","html_url":"https://github.com/laardee","followers_url":"https://api.github.com/users/laardee/followers","following_url":"https://api.github.com/users/laardee/following{/other_user}","gists_url":"https://api.github.com/users/laardee/gists{/gist_id}","starred_url":"https://api.github.com/users/laardee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laardee/subscriptions","organizations_url":"https://api.github.com/users/laardee/orgs","repos_url":"https://api.github.com/users/laardee/repos","events_url":"https://api.github.com/users/laardee/events{/privacy}","received_events_url":"https://api.github.com/users/laardee/received_events","type":"User","site_admin":false},"body":"Now the downloadStub mocks the zip loading and saves serverless.yml, then installation process renames the service value and finally the result is tested.","created_at":"2016-11-08T20:53:39Z","updated_at":"2016-11-08T20:53:39Z","html_url":"https://github.com/serverless/serverless/pull/2616#discussion_r87081102","pull_request_url":"https://api.github.com/repos/serverless/serverless/pulls/2616","_links":{"self":{"href":"https://api.github.com/repos/serverless/serverless/pulls/comments/87081102"},"html":{"href":"https://github.com/serverless/serverless/pull/2616#discussion_r87081102"},"pull_request":{"href":"https://api.github.com/repos/serverless/serverless/pulls/2616"}}},"pull_request":{"url":"https://api.github.com/repos/serverless/serverless/pulls/2616","id":92241120,"html_url":"https://github.com/serverless/serverless/pull/2616","diff_url":"https://github.com/serverless/serverless/pull/2616.diff","patch_url":"https://github.com/serverless/serverless/pull/2616.patch","issue_url":"https://api.github.com/repos/serverless/serverless/issues/2616","number":2616,"state":"open","locked":false,"title":"Enables service installation with a name","user":{"login":"laardee","id":4726921,"avatar_url":"https://avatars.githubusercontent.com/u/4726921?v=3","gravatar_id":"","url":"https://api.github.com/users/laardee","html_url":"https://github.com/laardee","followers_url":"https://api.github.com/users/laardee/followers","following_url":"https://api.github.com/users/laardee/following{/other_user}","gists_url":"https://api.github.com/users/laardee/gists{/gist_id}","starred_url":"https://api.github.com/users/laardee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laardee/subscriptions","organizations_url":"https://api.github.com/users/laardee/orgs","repos_url":"https://api.github.com/users/laardee/repos","events_url":"https://api.github.com/users/laardee/events{/privacy}","received_events_url":"https://api.github.com/users/laardee/received_events","type":"User","site_admin":false},"body":"<!--\r\n1. Please check out and follow our Contributing Guidelines: https://github.com/serverless/serverless/blob/master/CONTRIBUTING.md\r\n2. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the PR\r\n3. Please follow the template, otherwise we'll have to ask you to update it and it will take longer until your PR is merged\r\n-->\r\n\r\n## What did you implement:\r\n\r\nThis PR enables to rename the service when installing from GitHub, for example `serverless install --name new-service-name --url https://github.com/SC5/serverless-messenger-boilerplate` will install `serverless-messenger-boilerplate` to folder `new-service-name` and change `service` value in `serverless.yml` to `new-service-name`.\r\n\r\nCloses https://github.com/serverless/serverless/issues/2626\r\n\r\n## How did you implement it:\r\n\r\nAdded new parameter `name` to install class and renameService helper function for renaming service in yaml file.\r\n\r\n## How can we verify it:\r\n\r\n`serverless install --name new-service-name --url https://github.com/SC5/serverless-messenger-boilerplate` should install service to `new-service-name` folder and change service name to `new-service-name`.\r\n\r\n## Todos:\r\n\r\n- [x] Write tests\r\n- [x] Write documentation\r\n- [x] Fix linting errors\r\n- [x] Make sure code coverage hasn't dropped\r\n- [x] Provide verification config/commands/resources\r\n- [x] Change ready for review message below\r\n\r\n\r\n***Is this ready for review?:*** YES\r\n\r\n","created_at":"2016-11-03T21:12:08Z","updated_at":"2016-11-08T20:53:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ea85f89ea8e1ada4d6cb6d6d5fbf9041dff21c3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/serverless/serverless/pulls/2616/commits","review_comments_url":"https://api.github.com/repos/serverless/serverless/pulls/2616/comments","review_comment_url":"https://api.github.com/repos/serverless/serverless/pulls/comments{/number}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/2616/comments","statuses_url":"https://api.github.com/repos/serverless/serverless/statuses/5822407a4d7422ed07fb4720815e455849819743","head":{"label":"laardee:install-with-name","ref":"install-with-name","sha":"5822407a4d7422ed07fb4720815e455849819743","user":{"login":"laardee","id":4726921,"avatar_url":"https://avatars.githubusercontent.com/u/4726921?v=3","gravatar_id":"","url":"https://api.github.com/users/laardee","html_url":"https://github.com/laardee","followers_url":"https://api.github.com/users/laardee/followers","following_url":"https://api.github.com/users/laardee/following{/other_user}","gists_url":"https://api.github.com/users/laardee/gists{/gist_id}","starred_url":"https://api.github.com/users/laardee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laardee/subscriptions","organizations_url":"https://api.github.com/users/laardee/orgs","repos_url":"https://api.github.com/users/laardee/repos","events_url":"https://api.github.com/users/laardee/events{/privacy}","received_events_url":"https://api.github.com/users/laardee/received_events","type":"User","site_admin":false},"repo":{"id":66736393,"name":"serverless","full_name":"laardee/serverless","owner":{"login":"laardee","id":4726921,"avatar_url":"https://avatars.githubusercontent.com/u/4726921?v=3","gravatar_id":"","url":"https://api.github.com/users/laardee","html_url":"https://github.com/laardee","followers_url":"https://api.github.com/users/laardee/followers","following_url":"https://api.github.com/users/laardee/following{/other_user}","gists_url":"https://api.github.com/users/laardee/gists{/gist_id}","starred_url":"https://api.github.com/users/laardee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laardee/subscriptions","organizations_url":"https://api.github.com/users/laardee/orgs","repos_url":"https://api.github.com/users/laardee/repos","events_url":"https://api.github.com/users/laardee/events{/privacy}","received_events_url":"https://api.github.com/users/laardee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/laardee/serverless","description":"Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! – ","fork":true,"url":"https://api.github.com/repos/laardee/serverless","forks_url":"https://api.github.com/repos/laardee/serverless/forks","keys_url":"https://api.github.com/repos/laardee/serverless/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laardee/serverless/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laardee/serverless/teams","hooks_url":"https://api.github.com/repos/laardee/serverless/hooks","issue_events_url":"https://api.github.com/repos/laardee/serverless/issues/events{/number}","events_url":"https://api.github.com/repos/laardee/serverless/events","assignees_url":"https://api.github.com/repos/laardee/serverless/assignees{/user}","branches_url":"https://api.github.com/repos/laardee/serverless/branches{/branch}","tags_url":"https://api.github.com/repos/laardee/serverless/tags","blobs_url":"https://api.github.com/repos/laardee/serverless/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laardee/serverless/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laardee/serverless/git/refs{/sha}","trees_url":"https://api.github.com/repos/laardee/serverless/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laardee/serverless/statuses/{sha}","languages_url":"https://api.github.com/repos/laardee/serverless/languages","stargazers_url":"https://api.github.com/repos/laardee/serverless/stargazers","contributors_url":"https://api.github.com/repos/laardee/serverless/contributors","subscribers_url":"https://api.github.com/repos/laardee/serverless/subscribers","subscription_url":"https://api.github.com/repos/laardee/serverless/subscription","commits_url":"https://api.github.com/repos/laardee/serverless/commits{/sha}","git_commits_url":"https://api.github.com/repos/laardee/serverless/git/commits{/sha}","comments_url":"https://api.github.com/repos/laardee/serverless/comments{/number}","issue_comment_url":"https://api.github.com/repos/laardee/serverless/issues/comments{/number}","contents_url":"https://api.github.com/repos/laardee/serverless/contents/{+path}","compare_url":"https://api.github.com/repos/laardee/serverless/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laardee/serverless/merges","archive_url":"https://api.github.com/repos/laardee/serverless/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laardee/serverless/downloads","issues_url":"https://api.github.com/repos/laardee/serverless/issues{/number}","pulls_url":"https://api.github.com/repos/laardee/serverless/pulls{/number}","milestones_url":"https://api.github.com/repos/laardee/serverless/milestones{/number}","notifications_url":"https://api.github.com/repos/laardee/serverless/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laardee/serverless/labels{/name}","releases_url":"https://api.github.com/repos/laardee/serverless/releases{/id}","deployments_url":"https://api.github.com/repos/laardee/serverless/deployments","created_at":"2016-08-27T21:31:19Z","updated_at":"2016-08-27T21:31:21Z","pushed_at":"2016-11-08T20:19:10Z","git_url":"git://github.com/laardee/serverless.git","ssh_url":"git@github.com:laardee/serverless.git","clone_url":"https://github.com/laardee/serverless.git","svn_url":"https://github.com/laardee/serverless","homepage":"http://www.serverless.com","size":72315,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"serverless:master","ref":"master","sha":"c200d86628c4ae748d18126bddc4d65487d08596","user":{"login":"serverless","id":13742415,"avatar_url":"https://avatars.githubusercontent.com/u/13742415?v=3","gravatar_id":"","url":"https://api.github.com/users/serverless","html_url":"https://github.com/serverless","followers_url":"https://api.github.com/users/serverless/followers","following_url":"https://api.github.com/users/serverless/following{/other_user}","gists_url":"https://api.github.com/users/serverless/gists{/gist_id}","starred_url":"https://api.github.com/users/serverless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serverless/subscriptions","organizations_url":"https://api.github.com/users/serverless/orgs","repos_url":"https://api.github.com/users/serverless/repos","events_url":"https://api.github.com/users/serverless/events{/privacy}","received_events_url":"https://api.github.com/users/serverless/received_events","type":"Organization","site_admin":false},"repo":{"id":34302698,"name":"serverless","full_name":"serverless/serverless","owner":{"login":"serverless","id":13742415,"avatar_url":"https://avatars.githubusercontent.com/u/13742415?v=3","gravatar_id":"","url":"https://api.github.com/users/serverless","html_url":"https://github.com/serverless","followers_url":"https://api.github.com/users/serverless/followers","following_url":"https://api.github.com/users/serverless/following{/other_user}","gists_url":"https://api.github.com/users/serverless/gists{/gist_id}","starred_url":"https://api.github.com/users/serverless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serverless/subscriptions","organizations_url":"https://api.github.com/users/serverless/orgs","repos_url":"https://api.github.com/users/serverless/repos","events_url":"https://api.github.com/users/serverless/events{/privacy}","received_events_url":"https://api.github.com/users/serverless/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/serverless/serverless","description":"Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! – ","fork":false,"url":"https://api.github.com/repos/serverless/serverless","forks_url":"https://api.github.com/repos/serverless/serverless/forks","keys_url":"https://api.github.com/repos/serverless/serverless/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serverless/serverless/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serverless/serverless/teams","hooks_url":"https://api.github.com/repos/serverless/serverless/hooks","issue_events_url":"https://api.github.com/repos/serverless/serverless/issues/events{/number}","events_url":"https://api.github.com/repos/serverless/serverless/events","assignees_url":"https://api.github.com/repos/serverless/serverless/assignees{/user}","branches_url":"https://api.github.com/repos/serverless/serverless/branches{/branch}","tags_url":"https://api.github.com/repos/serverless/serverless/tags","blobs_url":"https://api.github.com/repos/serverless/serverless/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serverless/serverless/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serverless/serverless/git/refs{/sha}","trees_url":"https://api.github.com/repos/serverless/serverless/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serverless/serverless/statuses/{sha}","languages_url":"https://api.github.com/repos/serverless/serverless/languages","stargazers_url":"https://api.github.com/repos/serverless/serverless/stargazers","contributors_url":"https://api.github.com/repos/serverless/serverless/contributors","subscribers_url":"https://api.github.com/repos/serverless/serverless/subscribers","subscription_url":"https://api.github.com/repos/serverless/serverless/subscription","commits_url":"https://api.github.com/repos/serverless/serverless/commits{/sha}","git_commits_url":"https://api.github.com/repos/serverless/serverless/git/commits{/sha}","comments_url":"https://api.github.com/repos/serverless/serverless/comments{/number}","issue_comment_url":"https://api.github.com/repos/serverless/serverless/issues/comments{/number}","contents_url":"https://api.github.com/repos/serverless/serverless/contents/{+path}","compare_url":"https://api.github.com/repos/serverless/serverless/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serverless/serverless/merges","archive_url":"https://api.github.com/repos/serverless/serverless/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serverless/serverless/downloads","issues_url":"https://api.github.com/repos/serverless/serverless/issues{/number}","pulls_url":"https://api.github.com/repos/serverless/serverless/pulls{/number}","milestones_url":"https://api.github.com/repos/serverless/serverless/milestones{/number}","notifications_url":"https://api.github.com/repos/serverless/serverless/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serverless/serverless/labels{/name}","releases_url":"https://api.github.com/repos/serverless/serverless/releases{/id}","deployments_url":"https://api.github.com/repos/serverless/serverless/deployments","created_at":"2015-04-21T03:48:40Z","updated_at":"2016-11-08T20:46:12Z","pushed_at":"2016-11-08T20:32:44Z","git_url":"git://github.com/serverless/serverless.git","ssh_url":"git@github.com:serverless/serverless.git","clone_url":"https://github.com/serverless/serverless.git","svn_url":"https://github.com/serverless/serverless","homepage":"http://www.serverless.com","size":91228,"stargazers_count":12580,"watchers_count":12580,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1000,"mirror_url":null,"open_issues_count":152,"forks":1000,"open_issues":152,"watchers":12580,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/serverless/serverless/pulls/2616"},"html":{"href":"https://github.com/serverless/serverless/pull/2616"},"issue":{"href":"https://api.github.com/repos/serverless/serverless/issues/2616"},"comments":{"href":"https://api.github.com/repos/serverless/serverless/issues/2616/comments"},"review_comments":{"href":"https://api.github.com/repos/serverless/serverless/pulls/2616/comments"},"review_comment":{"href":"https://api.github.com/repos/serverless/serverless/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/serverless/serverless/pulls/2616/commits"},"statuses":{"href":"https://api.github.com/repos/serverless/serverless/statuses/5822407a4d7422ed07fb4720815e455849819743"}}}}
{"actor":{"display_login":"laardee"}}