{"action":"created","comment":{"url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/comments/25327879","id":25327879,"diff_hunk":"@@ -152,20 +153,73 @@ describe \"Heroku Commands\", ->\n       )\n \n   describe \"heroku config:set <app> <KEY=value>\", ->\n-    it \"sets config <KEY=value>\", (done) ->\n+    mockRequest = (keyPair) ->\n       mockHeroku\n-        .patch(\"/apps/shield-global-watch/config-vars\",\n-          \"CLOAK_ID\": 10\n-        ).replyWithFile(200, __dirname + \"/fixtures/config-set.json\")\n+        .patch(\"/apps/shield-global-watch/config-vars\",keyPair)\n+        .replyWithFile(200, __dirname + \"/fixtures/config-set.json\")\n+\n+    it \"sets config <KEY=value>\", (done) ->\n+      mockRequest({ \"CLOAK_ID\": \"example.com\" })\n+\n+      room.user.say \"Damon\", \"hubot heroku config:set shield-global-watch CLOAK_ID=example.com\"\n+\n+      setTimeout(->\n+        expect(room.messages[1][1]).to.equal(\"@Damon Setting config CLOAK_ID => example.com\")\n+        expect(room.messages[2][1]).to.equal(\"@Damon Heroku: CLOAK_ID is set to example.com\")\n+        done()\n+      , duration)\n+\n+    it \"handles UUIDs\", (done) ->\n+      mockRequest(\"UUID\": \"d5126f0d-b3be-46af-883f-b330a73964f9\")\n+\n+      room.user.say \"Damon\", \"hubot heroku config:set shield-global-watch UUID=d5126f0d-b3be-46af-883f-b330a73964f9\"\n+\n+      setTimeout(->\n+        expect(room.messages[2][1]).to.equal(\"@Damon Heroku: UUID is set to d5126f0d-b3be-46af-883f-b330a73964f9\")\n+        done()\n+      , duration)\n+\n+    it \"handles URLs\", (done) ->\n+      mockRequest(\"PUSHER_URL\": \"http://c0d9g8najfcc4634kd3:cf2eeas0d8dghfa847d@api.pusherapp.com/apps/1234\")\n+\n+      room.user.say \"Damon\", \"hubot heroku config:set shield-global-watch PUSHER_URL=http://c0d9g8najfcc4634kd3:cf2eeas0d8dghfa847d@api.pusherapp.com/apps/1234\"\n \n-      room.user.say \"Damon\", \"hubot heroku config:set shield-global-watch CLOAK_ID=10\"\n+      setTimeout(->\n+        expect(room.messages[2][1]).to.equal(\"@Damon Heroku: PUSHER_URL is set to http://c0d9g8najfcc4634kd3:cf2eeas0d8dghfa847d@api.pusherapp.com/apps/1234\")\n+        done()\n+      , duration)\n+\n+    it \"handles comma delimited strings\", (done) ->\n+      mockRequest(\"COMMA_DELIMITED_STRING\": \"MiD,DA,MDe\")\n+\n+      room.user.say \"Damon\", \"hubot heroku config:set shield-global-watch COMMA_DELIMITED_STRING=MiD,DA,MDe\"\n+\n+      setTimeout(->\n+        expect(room.messages[2][1]).to.equal(\"@Damon Heroku: COMMA_DELIMITED_STRING is set to MiD,DA,MDe\")\n+        done()\n+      , duration)\n+\n+    it \"handles text strings\", (done) ->\n+      mockRequest(\"SENTENCE\": \"Don\\'t stop believin.\")\n+\n+      room.user.say \"Damon\", \"hubot heroku config:set shield-global-watch SENTENCE=\\\"Don't stop believin.\\\"\"\n \n       setTimeout(->\n-        expect(room.messages[1][1]).to.equal(\"@Damon Setting config CLOAK_ID => 10\")\n-        expect(room.messages[2][1]).to.equal(\"@Damon Heroku: CLOAK_ID is set to 10\")\n+        expect(room.messages[2][1]).to.equal(\"@Damon Heroku: SENTENCE is set to Don\\'t stop believin.\")\n         done()\n       , duration)\n \n+    xit \"handles RSA secret keys\", (done) ->","path":"test/heroku-commands-spec.coffee","position":75,"original_position":75,"commit_id":"6427c348cf3feb5609a9e8c5ee8af86c6ab2759e","original_commit_id":"6427c348cf3feb5609a9e8c5ee8af86c6ab2759e","user":{"login":"daemonsy","id":1251946,"avatar_url":"https://avatars.githubusercontent.com/u/1251946?v=3","gravatar_id":"","url":"https://api.github.com/users/daemonsy","html_url":"https://github.com/daemonsy","followers_url":"https://api.github.com/users/daemonsy/followers","following_url":"https://api.github.com/users/daemonsy/following{/other_user}","gists_url":"https://api.github.com/users/daemonsy/gists{/gist_id}","starred_url":"https://api.github.com/users/daemonsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemonsy/subscriptions","organizations_url":"https://api.github.com/users/daemonsy/orgs","repos_url":"https://api.github.com/users/daemonsy/repos","events_url":"https://api.github.com/users/daemonsy/events{/privacy}","received_events_url":"https://api.github.com/users/daemonsy/received_events","type":"User","site_admin":false},"body":"Couldn't deal with naked `\\n`, need someone with great regex foo like @arkham","created_at":"2015-02-25T09:48:44Z","updated_at":"2015-02-25T09:48:44Z","html_url":"https://github.com/daemonsy/hubot-heroku/pull/13#discussion_r25327879","pull_request_url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/comments/25327879"},"html":{"href":"https://github.com/daemonsy/hubot-heroku/pull/13#discussion_r25327879"},"pull_request":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13","id":29972965,"html_url":"https://github.com/daemonsy/hubot-heroku/pull/13","diff_url":"https://github.com/daemonsy/hubot-heroku/pull/13.diff","patch_url":"https://github.com/daemonsy/hubot-heroku/pull/13.patch","issue_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/13","number":13,"state":"open","locked":false,"title":"Fix set command","user":{"login":"daemonsy","id":1251946,"avatar_url":"https://avatars.githubusercontent.com/u/1251946?v=3","gravatar_id":"","url":"https://api.github.com/users/daemonsy","html_url":"https://github.com/daemonsy","followers_url":"https://api.github.com/users/daemonsy/followers","following_url":"https://api.github.com/users/daemonsy/following{/other_user}","gists_url":"https://api.github.com/users/daemonsy/gists{/gist_id}","starred_url":"https://api.github.com/users/daemonsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemonsy/subscriptions","organizations_url":"https://api.github.com/users/daemonsy/orgs","repos_url":"https://api.github.com/users/daemonsy/repos","events_url":"https://api.github.com/users/daemonsy/events{/privacy}","received_events_url":"https://api.github.com/users/daemonsy/received_events","type":"User","site_admin":false},"body":"## What's up? \r\n\r\n`hubot heroku config:set xyz-app ABC=example.com` breaks because the regex matcher is too simplistic. \r\n\r\nThis updates it to accept the common type of values, such as UUIDs, URIs, sentences. \r\n\r\nI got a small snag when trying to deal with naked `\\n`. Any help is greatly appreciated.","created_at":"2015-02-25T09:47:25Z","updated_at":"2015-02-25T09:48:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"003482b18a37549a81ac5aa8dca24c43be2ef7c6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13/commits","review_comments_url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13/comments","review_comment_url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/comments{/number}","comments_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/13/comments","statuses_url":"https://api.github.com/repos/daemonsy/hubot-heroku/statuses/6427c348cf3feb5609a9e8c5ee8af86c6ab2759e","head":{"label":"daemonsy:mid-fix-heroku-set","ref":"mid-fix-heroku-set","sha":"6427c348cf3feb5609a9e8c5ee8af86c6ab2759e","user":{"login":"daemonsy","id":1251946,"avatar_url":"https://avatars.githubusercontent.com/u/1251946?v=3","gravatar_id":"","url":"https://api.github.com/users/daemonsy","html_url":"https://github.com/daemonsy","followers_url":"https://api.github.com/users/daemonsy/followers","following_url":"https://api.github.com/users/daemonsy/following{/other_user}","gists_url":"https://api.github.com/users/daemonsy/gists{/gist_id}","starred_url":"https://api.github.com/users/daemonsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemonsy/subscriptions","organizations_url":"https://api.github.com/users/daemonsy/orgs","repos_url":"https://api.github.com/users/daemonsy/repos","events_url":"https://api.github.com/users/daemonsy/events{/privacy}","received_events_url":"https://api.github.com/users/daemonsy/received_events","type":"User","site_admin":false},"repo":{"id":27571039,"name":"hubot-heroku","full_name":"daemonsy/hubot-heroku","owner":{"login":"daemonsy","id":1251946,"avatar_url":"https://avatars.githubusercontent.com/u/1251946?v=3","gravatar_id":"","url":"https://api.github.com/users/daemonsy","html_url":"https://github.com/daemonsy","followers_url":"https://api.github.com/users/daemonsy/followers","following_url":"https://api.github.com/users/daemonsy/following{/other_user}","gists_url":"https://api.github.com/users/daemonsy/gists{/gist_id}","starred_url":"https://api.github.com/users/daemonsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemonsy/subscriptions","organizations_url":"https://api.github.com/users/daemonsy/orgs","repos_url":"https://api.github.com/users/daemonsy/repos","events_url":"https://api.github.com/users/daemonsy/events{/privacy}","received_events_url":"https://api.github.com/users/daemonsy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daemonsy/hubot-heroku","description":"A hubot library that exposes heroku commands, with focus of letting non privileged developers deploy but not run dangerous commands","fork":false,"url":"https://api.github.com/repos/daemonsy/hubot-heroku","forks_url":"https://api.github.com/repos/daemonsy/hubot-heroku/forks","keys_url":"https://api.github.com/repos/daemonsy/hubot-heroku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daemonsy/hubot-heroku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daemonsy/hubot-heroku/teams","hooks_url":"https://api.github.com/repos/daemonsy/hubot-heroku/hooks","issue_events_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/events{/number}","events_url":"https://api.github.com/repos/daemonsy/hubot-heroku/events","assignees_url":"https://api.github.com/repos/daemonsy/hubot-heroku/assignees{/user}","branches_url":"https://api.github.com/repos/daemonsy/hubot-heroku/branches{/branch}","tags_url":"https://api.github.com/repos/daemonsy/hubot-heroku/tags","blobs_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/refs{/sha}","trees_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daemonsy/hubot-heroku/statuses/{sha}","languages_url":"https://api.github.com/repos/daemonsy/hubot-heroku/languages","stargazers_url":"https://api.github.com/repos/daemonsy/hubot-heroku/stargazers","contributors_url":"https://api.github.com/repos/daemonsy/hubot-heroku/contributors","subscribers_url":"https://api.github.com/repos/daemonsy/hubot-heroku/subscribers","subscription_url":"https://api.github.com/repos/daemonsy/hubot-heroku/subscription","commits_url":"https://api.github.com/repos/daemonsy/hubot-heroku/commits{/sha}","git_commits_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/commits{/sha}","comments_url":"https://api.github.com/repos/daemonsy/hubot-heroku/comments{/number}","issue_comment_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/comments{/number}","contents_url":"https://api.github.com/repos/daemonsy/hubot-heroku/contents/{+path}","compare_url":"https://api.github.com/repos/daemonsy/hubot-heroku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daemonsy/hubot-heroku/merges","archive_url":"https://api.github.com/repos/daemonsy/hubot-heroku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daemonsy/hubot-heroku/downloads","issues_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues{/number}","pulls_url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls{/number}","milestones_url":"https://api.github.com/repos/daemonsy/hubot-heroku/milestones{/number}","notifications_url":"https://api.github.com/repos/daemonsy/hubot-heroku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daemonsy/hubot-heroku/labels{/name}","releases_url":"https://api.github.com/repos/daemonsy/hubot-heroku/releases{/id}","created_at":"2014-12-05T02:46:37Z","updated_at":"2015-02-25T06:21:12Z","pushed_at":"2015-02-25T09:45:26Z","git_url":"git://github.com/daemonsy/hubot-heroku.git","ssh_url":"git@github.com:daemonsy/hubot-heroku.git","clone_url":"https://github.com/daemonsy/hubot-heroku.git","svn_url":"https://github.com/daemonsy/hubot-heroku","homepage":null,"size":336,"stargazers_count":2,"watchers_count":2,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"daemonsy:master","ref":"master","sha":"ef6a2293638cbdb6e923cb1492f176b3da995d0c","user":{"login":"daemonsy","id":1251946,"avatar_url":"https://avatars.githubusercontent.com/u/1251946?v=3","gravatar_id":"","url":"https://api.github.com/users/daemonsy","html_url":"https://github.com/daemonsy","followers_url":"https://api.github.com/users/daemonsy/followers","following_url":"https://api.github.com/users/daemonsy/following{/other_user}","gists_url":"https://api.github.com/users/daemonsy/gists{/gist_id}","starred_url":"https://api.github.com/users/daemonsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemonsy/subscriptions","organizations_url":"https://api.github.com/users/daemonsy/orgs","repos_url":"https://api.github.com/users/daemonsy/repos","events_url":"https://api.github.com/users/daemonsy/events{/privacy}","received_events_url":"https://api.github.com/users/daemonsy/received_events","type":"User","site_admin":false},"repo":{"id":27571039,"name":"hubot-heroku","full_name":"daemonsy/hubot-heroku","owner":{"login":"daemonsy","id":1251946,"avatar_url":"https://avatars.githubusercontent.com/u/1251946?v=3","gravatar_id":"","url":"https://api.github.com/users/daemonsy","html_url":"https://github.com/daemonsy","followers_url":"https://api.github.com/users/daemonsy/followers","following_url":"https://api.github.com/users/daemonsy/following{/other_user}","gists_url":"https://api.github.com/users/daemonsy/gists{/gist_id}","starred_url":"https://api.github.com/users/daemonsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemonsy/subscriptions","organizations_url":"https://api.github.com/users/daemonsy/orgs","repos_url":"https://api.github.com/users/daemonsy/repos","events_url":"https://api.github.com/users/daemonsy/events{/privacy}","received_events_url":"https://api.github.com/users/daemonsy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daemonsy/hubot-heroku","description":"A hubot library that exposes heroku commands, with focus of letting non privileged developers deploy but not run dangerous commands","fork":false,"url":"https://api.github.com/repos/daemonsy/hubot-heroku","forks_url":"https://api.github.com/repos/daemonsy/hubot-heroku/forks","keys_url":"https://api.github.com/repos/daemonsy/hubot-heroku/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daemonsy/hubot-heroku/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daemonsy/hubot-heroku/teams","hooks_url":"https://api.github.com/repos/daemonsy/hubot-heroku/hooks","issue_events_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/events{/number}","events_url":"https://api.github.com/repos/daemonsy/hubot-heroku/events","assignees_url":"https://api.github.com/repos/daemonsy/hubot-heroku/assignees{/user}","branches_url":"https://api.github.com/repos/daemonsy/hubot-heroku/branches{/branch}","tags_url":"https://api.github.com/repos/daemonsy/hubot-heroku/tags","blobs_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/refs{/sha}","trees_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daemonsy/hubot-heroku/statuses/{sha}","languages_url":"https://api.github.com/repos/daemonsy/hubot-heroku/languages","stargazers_url":"https://api.github.com/repos/daemonsy/hubot-heroku/stargazers","contributors_url":"https://api.github.com/repos/daemonsy/hubot-heroku/contributors","subscribers_url":"https://api.github.com/repos/daemonsy/hubot-heroku/subscribers","subscription_url":"https://api.github.com/repos/daemonsy/hubot-heroku/subscription","commits_url":"https://api.github.com/repos/daemonsy/hubot-heroku/commits{/sha}","git_commits_url":"https://api.github.com/repos/daemonsy/hubot-heroku/git/commits{/sha}","comments_url":"https://api.github.com/repos/daemonsy/hubot-heroku/comments{/number}","issue_comment_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/comments{/number}","contents_url":"https://api.github.com/repos/daemonsy/hubot-heroku/contents/{+path}","compare_url":"https://api.github.com/repos/daemonsy/hubot-heroku/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daemonsy/hubot-heroku/merges","archive_url":"https://api.github.com/repos/daemonsy/hubot-heroku/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daemonsy/hubot-heroku/downloads","issues_url":"https://api.github.com/repos/daemonsy/hubot-heroku/issues{/number}","pulls_url":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls{/number}","milestones_url":"https://api.github.com/repos/daemonsy/hubot-heroku/milestones{/number}","notifications_url":"https://api.github.com/repos/daemonsy/hubot-heroku/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daemonsy/hubot-heroku/labels{/name}","releases_url":"https://api.github.com/repos/daemonsy/hubot-heroku/releases{/id}","created_at":"2014-12-05T02:46:37Z","updated_at":"2015-02-25T06:21:12Z","pushed_at":"2015-02-25T09:45:26Z","git_url":"git://github.com/daemonsy/hubot-heroku.git","ssh_url":"git@github.com:daemonsy/hubot-heroku.git","clone_url":"https://github.com/daemonsy/hubot-heroku.git","svn_url":"https://github.com/daemonsy/hubot-heroku","homepage":null,"size":336,"stargazers_count":2,"watchers_count":2,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13"},"html":{"href":"https://github.com/daemonsy/hubot-heroku/pull/13"},"issue":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/13"},"comments":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/daemonsy/hubot-heroku/statuses/6427c348cf3feb5609a9e8c5ee8af86c6ab2759e"}}}}