Skip to content

Instantly share code, notes, and snippets.

@Domon
Created November 25, 2014 03:38
Show Gist options
  • Save Domon/8c48d44200da348e5723 to your computer and use it in GitHub Desktop.
Save Domon/8c48d44200da348e5723 to your computer and use it in GitHub Desktop.
require 'zeus/rails'
class CustomPlan < Zeus::Rails
def test_environment
super
#
# Copied from pusher-fake/support/base.rb
#
# Use the same API key and secret as the live version.
PusherFake.configure do |configuration|
configuration.app_id = Pusher.app_id
configuration.key = Pusher.key
configuration.secret = Pusher.secret
end
# Set the host and port to the fake web server.
PusherFake.configuration.web_options.tap do |options|
Pusher.host = options[:host]
Pusher.port = options[:port]
end
#
# Modified from pusher-fake/support/base.rb
#
# Start the fake socket and web servers, but don't kill the server at_exit.
fork { PusherFake::Server.start }
end
end
Zeus.plan = CustomPlan.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment