-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Zeus with a custom plan.
- Loading branch information
1 parent
f112d1b
commit add6ded
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require "zeus/rails" | ||
|
||
class PusherPlan < Zeus::Rails | ||
def test_environment | ||
super | ||
|
||
# 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 | ||
|
||
# Start the fake socket and web servers, but don't kill the server at_exit. | ||
fork { PusherFake::Server.start } | ||
end | ||
end | ||
|
||
Zeus.plan = PusherPlan.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require "pusher-fake/support/rspec" | ||
require "pusher-fake/support/base" unless ENV["ZEUS_MASTER_FD"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"command" : "ruby -rubygems -r./pusher_plan -eZeus.go", | ||
|
||
"plan" : { | ||
"boot" : { | ||
"default_bundle" : { | ||
"test_environment" : { | ||
"test_helper" : { | ||
"test" : ["rspec"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |