{"action":"created","comment":{"url":"https://api.github.com/repos/rails/actioncable/pulls/comments/39967723","id":39967723,"diff_hunk":"@@ -5,4 +5,12 @@\n   PING_IDENTIFIER: \"_ping\"\n \n   createConsumer: (url) ->\n+    if url && (!url.startsWith(\"wss:\") || !url.startsWith(\"ws:\"))","path":"lib/assets/javascripts/cable.coffee","position":4,"original_position":4,"commit_id":"3022511caa5e769a21948495f4ad7aadc0a571f1","original_commit_id":"3022511caa5e769a21948495f4ad7aadc0a571f1","user":{"login":"javan","id":5355,"avatar_url":"https://avatars.githubusercontent.com/u/5355?v=3","gravatar_id":"","url":"https://api.github.com/users/javan","html_url":"https://github.com/javan","followers_url":"https://api.github.com/users/javan/followers","following_url":"https://api.github.com/users/javan/following{/other_user}","gists_url":"https://api.github.com/users/javan/gists{/gist_id}","starred_url":"https://api.github.com/users/javan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javan/subscriptions","organizations_url":"https://api.github.com/users/javan/orgs","repos_url":"https://api.github.com/users/javan/repos","events_url":"https://api.github.com/users/javan/events{/privacy}","received_events_url":"https://api.github.com/users/javan/received_events","type":"User","site_admin":false},"body":"String#startsWith isn't widely supported: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Browser_compatibility","created_at":"2015-09-21T13:08:56Z","updated_at":"2015-09-21T13:08:56Z","html_url":"https://github.com/rails/actioncable/pull/78#discussion_r39967723","pull_request_url":"https://api.github.com/repos/rails/actioncable/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/rails/actioncable/pulls/comments/39967723"},"html":{"href":"https://github.com/rails/actioncable/pull/78#discussion_r39967723"},"pull_request":{"href":"https://api.github.com/repos/rails/actioncable/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/rails/actioncable/pulls/78","id":45124345,"html_url":"https://github.com/rails/actioncable/pull/78","diff_url":"https://github.com/rails/actioncable/pull/78.diff","patch_url":"https://github.com/rails/actioncable/pull/78.patch","issue_url":"https://api.github.com/repos/rails/actioncable/issues/78","number":78,"state":"open","locked":false,"title":"Allow relative urls for createCable","user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"body":"If you are running the websocket channel in puma along with rails, the following solution can address #72 - This lets you pass in an absolute or relative url, with or without a host/port.\r\n\r\nThis can be added after the code in #73, if that solution is also desired.\r\n\r\nIf this looks good, I can spend some time adding support for IE6 and more edge cases. See [gist](https://gist.github.com/jlong/2428561) by @jlong for more information.\r\n","created_at":"2015-09-16T02:17:59Z","updated_at":"2015-09-21T13:08:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a6299e9325ad129c837c659ba545b445ed15277","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/actioncable/pulls/78/commits","review_comments_url":"https://api.github.com/repos/rails/actioncable/pulls/78/comments","review_comment_url":"https://api.github.com/repos/rails/actioncable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/actioncable/issues/78/comments","statuses_url":"https://api.github.com/repos/rails/actioncable/statuses/3022511caa5e769a21948495f4ad7aadc0a571f1","head":{"label":"kbrock:nicer_create","ref":"nicer_create","sha":"3022511caa5e769a21948495f4ad7aadc0a571f1","user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"repo":{"id":42556950,"name":"actioncable","full_name":"kbrock/actioncable","owner":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbrock/actioncable","description":"Framework for real-time communication over websockets","fork":true,"url":"https://api.github.com/repos/kbrock/actioncable","forks_url":"https://api.github.com/repos/kbrock/actioncable/forks","keys_url":"https://api.github.com/repos/kbrock/actioncable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbrock/actioncable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbrock/actioncable/teams","hooks_url":"https://api.github.com/repos/kbrock/actioncable/hooks","issue_events_url":"https://api.github.com/repos/kbrock/actioncable/issues/events{/number}","events_url":"https://api.github.com/repos/kbrock/actioncable/events","assignees_url":"https://api.github.com/repos/kbrock/actioncable/assignees{/user}","branches_url":"https://api.github.com/repos/kbrock/actioncable/branches{/branch}","tags_url":"https://api.github.com/repos/kbrock/actioncable/tags","blobs_url":"https://api.github.com/repos/kbrock/actioncable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbrock/actioncable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbrock/actioncable/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbrock/actioncable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbrock/actioncable/statuses/{sha}","languages_url":"https://api.github.com/repos/kbrock/actioncable/languages","stargazers_url":"https://api.github.com/repos/kbrock/actioncable/stargazers","contributors_url":"https://api.github.com/repos/kbrock/actioncable/contributors","subscribers_url":"https://api.github.com/repos/kbrock/actioncable/subscribers","subscription_url":"https://api.github.com/repos/kbrock/actioncable/subscription","commits_url":"https://api.github.com/repos/kbrock/actioncable/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbrock/actioncable/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbrock/actioncable/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbrock/actioncable/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbrock/actioncable/contents/{+path}","compare_url":"https://api.github.com/repos/kbrock/actioncable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbrock/actioncable/merges","archive_url":"https://api.github.com/repos/kbrock/actioncable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbrock/actioncable/downloads","issues_url":"https://api.github.com/repos/kbrock/actioncable/issues{/number}","pulls_url":"https://api.github.com/repos/kbrock/actioncable/pulls{/number}","milestones_url":"https://api.github.com/repos/kbrock/actioncable/milestones{/number}","notifications_url":"https://api.github.com/repos/kbrock/actioncable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbrock/actioncable/labels{/name}","releases_url":"https://api.github.com/repos/kbrock/actioncable/releases{/id}","created_at":"2015-09-16T01:25:45Z","updated_at":"2015-09-16T01:25:45Z","pushed_at":"2015-09-21T03:51:57Z","git_url":"git://github.com/kbrock/actioncable.git","ssh_url":"git@github.com:kbrock/actioncable.git","clone_url":"https://github.com/kbrock/actioncable.git","svn_url":"https://github.com/kbrock/actioncable","homepage":null,"size":334,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"rails:master","ref":"master","sha":"98855fea634aa1c427c18841cf14fa3777201c4b","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":29253597,"name":"actioncable","full_name":"rails/actioncable","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/actioncable","description":"Framework for real-time communication over websockets","fork":false,"url":"https://api.github.com/repos/rails/actioncable","forks_url":"https://api.github.com/repos/rails/actioncable/forks","keys_url":"https://api.github.com/repos/rails/actioncable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/actioncable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/actioncable/teams","hooks_url":"https://api.github.com/repos/rails/actioncable/hooks","issue_events_url":"https://api.github.com/repos/rails/actioncable/issues/events{/number}","events_url":"https://api.github.com/repos/rails/actioncable/events","assignees_url":"https://api.github.com/repos/rails/actioncable/assignees{/user}","branches_url":"https://api.github.com/repos/rails/actioncable/branches{/branch}","tags_url":"https://api.github.com/repos/rails/actioncable/tags","blobs_url":"https://api.github.com/repos/rails/actioncable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/actioncable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/actioncable/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/actioncable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/actioncable/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/actioncable/languages","stargazers_url":"https://api.github.com/repos/rails/actioncable/stargazers","contributors_url":"https://api.github.com/repos/rails/actioncable/contributors","subscribers_url":"https://api.github.com/repos/rails/actioncable/subscribers","subscription_url":"https://api.github.com/repos/rails/actioncable/subscription","commits_url":"https://api.github.com/repos/rails/actioncable/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/actioncable/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/actioncable/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/actioncable/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/actioncable/contents/{+path}","compare_url":"https://api.github.com/repos/rails/actioncable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/actioncable/merges","archive_url":"https://api.github.com/repos/rails/actioncable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/actioncable/downloads","issues_url":"https://api.github.com/repos/rails/actioncable/issues{/number}","pulls_url":"https://api.github.com/repos/rails/actioncable/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/actioncable/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/actioncable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/actioncable/labels{/name}","releases_url":"https://api.github.com/repos/rails/actioncable/releases{/id}","created_at":"2015-01-14T16:27:07Z","updated_at":"2015-09-21T08:57:47Z","pushed_at":"2015-09-21T03:51:57Z","git_url":"git://github.com/rails/actioncable.git","ssh_url":"git@github.com:rails/actioncable.git","clone_url":"https://github.com/rails/actioncable.git","svn_url":"https://github.com/rails/actioncable","homepage":null,"size":958,"stargazers_count":870,"watchers_count":870,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":23,"forks":65,"open_issues":23,"watchers":870,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/actioncable/pulls/78"},"html":{"href":"https://github.com/rails/actioncable/pull/78"},"issue":{"href":"https://api.github.com/repos/rails/actioncable/issues/78"},"comments":{"href":"https://api.github.com/repos/rails/actioncable/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/actioncable/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/actioncable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/actioncable/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/rails/actioncable/statuses/3022511caa5e769a21948495f4ad7aadc0a571f1"}}}}