{"action":"opened","number":186,"pull_request":{"url":"https://api.github.com/repos/chrismccord/sync/pulls/186","id":35010423,"html_url":"https://github.com/chrismccord/sync/pull/186","diff_url":"https://github.com/chrismccord/sync/pull/186.diff","patch_url":"https://github.com/chrismccord/sync/pull/186.patch","issue_url":"https://api.github.com/repos/chrismccord/sync/issues/186","number":186,"state":"open","locked":false,"title":"Support PusherFake","user":{"login":"pyro2927","id":39943,"avatar_url":"https://avatars.githubusercontent.com/u/39943?v=3","gravatar_id":"","url":"https://api.github.com/users/pyro2927","html_url":"https://github.com/pyro2927","followers_url":"https://api.github.com/users/pyro2927/followers","following_url":"https://api.github.com/users/pyro2927/following{/other_user}","gists_url":"https://api.github.com/users/pyro2927/gists{/gist_id}","starred_url":"https://api.github.com/users/pyro2927/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyro2927/subscriptions","organizations_url":"https://api.github.com/users/pyro2927/orgs","repos_url":"https://api.github.com/users/pyro2927/repos","events_url":"https://api.github.com/users/pyro2927/events{/privacy}","received_events_url":"https://api.github.com/users/pyro2927/received_events","type":"User","site_admin":false},"body":"While some may use Faye for development and Pusher for production, another alternative is to use [PusherFake](https://github.com/tristandunn/pusher-fake/) in dev/test and Pusher in prod.  The [documentation](https://github.com/tristandunn/pusher-fake/blob/master/README.markdown#1-use-the-pusherfake-js-for-the-pusher-js-instance) states that you should use `var instance = <%= PusherFake.javascript %>;` to instantiate it, but that appears to conflict with the local namespaced `Pusher` due to how it's [constructed](https://github.com/tristandunn/pusher-fake/blob/master/lib/pusher-fake.rb#L44).  Instead, I went with inlining the config so `new window.Pusher(` could be used.\r\n\r\nGoing with `defined?(PusherFake) ?` seemed like the easiest way to easily setup the alternate config, as that is how they recommend doing it in the README.","created_at":"2015-05-08T13:51:40Z","updated_at":"2015-05-08T13:51:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chrismccord/sync/pulls/186/commits","review_comments_url":"https://api.github.com/repos/chrismccord/sync/pulls/186/comments","review_comment_url":"https://api.github.com/repos/chrismccord/sync/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chrismccord/sync/issues/186/comments","statuses_url":"https://api.github.com/repos/chrismccord/sync/statuses/58ad5de0fd8c35be4a6b27fb500fa6a2f556b6f4","head":{"label":"EvolveLabs:feature/pusher_fake","ref":"feature/pusher_fake","sha":"58ad5de0fd8c35be4a6b27fb500fa6a2f556b6f4","user":{"login":"EvolveLabs","id":11398428,"avatar_url":"https://avatars.githubusercontent.com/u/11398428?v=3","gravatar_id":"","url":"https://api.github.com/users/EvolveLabs","html_url":"https://github.com/EvolveLabs","followers_url":"https://api.github.com/users/EvolveLabs/followers","following_url":"https://api.github.com/users/EvolveLabs/following{/other_user}","gists_url":"https://api.github.com/users/EvolveLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/EvolveLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvolveLabs/subscriptions","organizations_url":"https://api.github.com/users/EvolveLabs/orgs","repos_url":"https://api.github.com/users/EvolveLabs/repos","events_url":"https://api.github.com/users/EvolveLabs/events{/privacy}","received_events_url":"https://api.github.com/users/EvolveLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":35255694,"name":"sync","full_name":"EvolveLabs/sync","owner":{"login":"EvolveLabs","id":11398428,"avatar_url":"https://avatars.githubusercontent.com/u/11398428?v=3","gravatar_id":"","url":"https://api.github.com/users/EvolveLabs","html_url":"https://github.com/EvolveLabs","followers_url":"https://api.github.com/users/EvolveLabs/followers","following_url":"https://api.github.com/users/EvolveLabs/following{/other_user}","gists_url":"https://api.github.com/users/EvolveLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/EvolveLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvolveLabs/subscriptions","organizations_url":"https://api.github.com/users/EvolveLabs/orgs","repos_url":"https://api.github.com/users/EvolveLabs/repos","events_url":"https://api.github.com/users/EvolveLabs/events{/privacy}","received_events_url":"https://api.github.com/users/EvolveLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EvolveLabs/sync","description":"Real-time Rails Partials","fork":true,"url":"https://api.github.com/repos/EvolveLabs/sync","forks_url":"https://api.github.com/repos/EvolveLabs/sync/forks","keys_url":"https://api.github.com/repos/EvolveLabs/sync/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EvolveLabs/sync/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EvolveLabs/sync/teams","hooks_url":"https://api.github.com/repos/EvolveLabs/sync/hooks","issue_events_url":"https://api.github.com/repos/EvolveLabs/sync/issues/events{/number}","events_url":"https://api.github.com/repos/EvolveLabs/sync/events","assignees_url":"https://api.github.com/repos/EvolveLabs/sync/assignees{/user}","branches_url":"https://api.github.com/repos/EvolveLabs/sync/branches{/branch}","tags_url":"https://api.github.com/repos/EvolveLabs/sync/tags","blobs_url":"https://api.github.com/repos/EvolveLabs/sync/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EvolveLabs/sync/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EvolveLabs/sync/git/refs{/sha}","trees_url":"https://api.github.com/repos/EvolveLabs/sync/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EvolveLabs/sync/statuses/{sha}","languages_url":"https://api.github.com/repos/EvolveLabs/sync/languages","stargazers_url":"https://api.github.com/repos/EvolveLabs/sync/stargazers","contributors_url":"https://api.github.com/repos/EvolveLabs/sync/contributors","subscribers_url":"https://api.github.com/repos/EvolveLabs/sync/subscribers","subscription_url":"https://api.github.com/repos/EvolveLabs/sync/subscription","commits_url":"https://api.github.com/repos/EvolveLabs/sync/commits{/sha}","git_commits_url":"https://api.github.com/repos/EvolveLabs/sync/git/commits{/sha}","comments_url":"https://api.github.com/repos/EvolveLabs/sync/comments{/number}","issue_comment_url":"https://api.github.com/repos/EvolveLabs/sync/issues/comments{/number}","contents_url":"https://api.github.com/repos/EvolveLabs/sync/contents/{+path}","compare_url":"https://api.github.com/repos/EvolveLabs/sync/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EvolveLabs/sync/merges","archive_url":"https://api.github.com/repos/EvolveLabs/sync/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EvolveLabs/sync/downloads","issues_url":"https://api.github.com/repos/EvolveLabs/sync/issues{/number}","pulls_url":"https://api.github.com/repos/EvolveLabs/sync/pulls{/number}","milestones_url":"https://api.github.com/repos/EvolveLabs/sync/milestones{/number}","notifications_url":"https://api.github.com/repos/EvolveLabs/sync/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EvolveLabs/sync/labels{/name}","releases_url":"https://api.github.com/repos/EvolveLabs/sync/releases{/id}","created_at":"2015-05-08T03:03:31Z","updated_at":"2015-05-08T03:03:32Z","pushed_at":"2015-05-08T04:00:23Z","git_url":"git://github.com/EvolveLabs/sync.git","ssh_url":"git@github.com:EvolveLabs/sync.git","clone_url":"https://github.com/EvolveLabs/sync.git","svn_url":"https://github.com/EvolveLabs/sync","homepage":null,"size":1138,"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":"chrismccord:master","ref":"master","sha":"6ff1f7e5a167947daf8be46b5f3cee21e2d038b9","user":{"login":"chrismccord","id":576796,"avatar_url":"https://avatars.githubusercontent.com/u/576796?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismccord","html_url":"https://github.com/chrismccord","followers_url":"https://api.github.com/users/chrismccord/followers","following_url":"https://api.github.com/users/chrismccord/following{/other_user}","gists_url":"https://api.github.com/users/chrismccord/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismccord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismccord/subscriptions","organizations_url":"https://api.github.com/users/chrismccord/orgs","repos_url":"https://api.github.com/users/chrismccord/repos","events_url":"https://api.github.com/users/chrismccord/events{/privacy}","received_events_url":"https://api.github.com/users/chrismccord/received_events","type":"User","site_admin":false},"repo":{"id":9255872,"name":"sync","full_name":"chrismccord/sync","owner":{"login":"chrismccord","id":576796,"avatar_url":"https://avatars.githubusercontent.com/u/576796?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismccord","html_url":"https://github.com/chrismccord","followers_url":"https://api.github.com/users/chrismccord/followers","following_url":"https://api.github.com/users/chrismccord/following{/other_user}","gists_url":"https://api.github.com/users/chrismccord/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismccord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismccord/subscriptions","organizations_url":"https://api.github.com/users/chrismccord/orgs","repos_url":"https://api.github.com/users/chrismccord/repos","events_url":"https://api.github.com/users/chrismccord/events{/privacy}","received_events_url":"https://api.github.com/users/chrismccord/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chrismccord/sync","description":"Real-time Rails Partials","fork":false,"url":"https://api.github.com/repos/chrismccord/sync","forks_url":"https://api.github.com/repos/chrismccord/sync/forks","keys_url":"https://api.github.com/repos/chrismccord/sync/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrismccord/sync/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrismccord/sync/teams","hooks_url":"https://api.github.com/repos/chrismccord/sync/hooks","issue_events_url":"https://api.github.com/repos/chrismccord/sync/issues/events{/number}","events_url":"https://api.github.com/repos/chrismccord/sync/events","assignees_url":"https://api.github.com/repos/chrismccord/sync/assignees{/user}","branches_url":"https://api.github.com/repos/chrismccord/sync/branches{/branch}","tags_url":"https://api.github.com/repos/chrismccord/sync/tags","blobs_url":"https://api.github.com/repos/chrismccord/sync/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrismccord/sync/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrismccord/sync/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrismccord/sync/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrismccord/sync/statuses/{sha}","languages_url":"https://api.github.com/repos/chrismccord/sync/languages","stargazers_url":"https://api.github.com/repos/chrismccord/sync/stargazers","contributors_url":"https://api.github.com/repos/chrismccord/sync/contributors","subscribers_url":"https://api.github.com/repos/chrismccord/sync/subscribers","subscription_url":"https://api.github.com/repos/chrismccord/sync/subscription","commits_url":"https://api.github.com/repos/chrismccord/sync/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrismccord/sync/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrismccord/sync/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrismccord/sync/issues/comments{/number}","contents_url":"https://api.github.com/repos/chrismccord/sync/contents/{+path}","compare_url":"https://api.github.com/repos/chrismccord/sync/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrismccord/sync/merges","archive_url":"https://api.github.com/repos/chrismccord/sync/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrismccord/sync/downloads","issues_url":"https://api.github.com/repos/chrismccord/sync/issues{/number}","pulls_url":"https://api.github.com/repos/chrismccord/sync/pulls{/number}","milestones_url":"https://api.github.com/repos/chrismccord/sync/milestones{/number}","notifications_url":"https://api.github.com/repos/chrismccord/sync/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrismccord/sync/labels{/name}","releases_url":"https://api.github.com/repos/chrismccord/sync/releases{/id}","created_at":"2013-04-06T05:38:16Z","updated_at":"2015-05-07T07:48:18Z","pushed_at":"2015-04-07T21:11:35Z","git_url":"git://github.com/chrismccord/sync.git","ssh_url":"git@github.com:chrismccord/sync.git","clone_url":"https://github.com/chrismccord/sync.git","svn_url":"https://github.com/chrismccord/sync","homepage":null,"size":1138,"stargazers_count":1049,"watchers_count":1049,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":15,"forks":78,"open_issues":15,"watchers":1049,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chrismccord/sync/pulls/186"},"html":{"href":"https://github.com/chrismccord/sync/pull/186"},"issue":{"href":"https://api.github.com/repos/chrismccord/sync/issues/186"},"comments":{"href":"https://api.github.com/repos/chrismccord/sync/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/chrismccord/sync/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/chrismccord/sync/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chrismccord/sync/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/chrismccord/sync/statuses/58ad5de0fd8c35be4a6b27fb500fa6a2f556b6f4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":1,"deletions":1,"changed_files":1}}