Skip to content

Commit

Permalink
Merge 5d586d2 into a1d108a
Browse files Browse the repository at this point in the history
  • Loading branch information
HamptonMakes committed Mar 25, 2015
2 parents a1d108a + 5d586d2 commit 5a68359
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pusher-fake [![Build Status](http://img.shields.io/travis/tristandunn/pusher-fake.svg)](https://travis-ci.org/tristandunn/pusher-fake) [![Dependency Status](http://img.shields.io/gemnasium/tristandunn/pusher-fake.svg)](https://gemnasium.com/tristandunn/pusher-fake) [![Code Climate](http://img.shields.io/codeclimate/github/tristandunn/pusher-fake.svg)](https://codeclimate.com/github/tristandunn/pusher-fake) [![Coverage Status](http://img.shields.io/coveralls/tristandunn/pusher-fake.svg)](https://coveralls.io/r/tristandunn/pusher-fake?branch=master)

A fake [Pusher](http://pusher.com) server for development and testing.
A fake [Pusher](http://pusher.com) server for development and testing. When you run your code, we start up an entire fake service, on a random port that we find open. You can then connect to that service and run your development environment without needing an actual key. To find out where the service is running, check the logs for the startup messages.

It's intended to fully replace the Pusher service with a local version for testing, but can also be used for development purposes. It is not intended to be a replacement for production usage.
The project is intended to fully replace the Pusher service with a local version for testing, and can also be used for development purposes. It is not intended to be a replacement for production usage! If you try, bad things might happen to you.

## Usage

Expand Down Expand Up @@ -49,10 +49,15 @@ PusherFake::Channel.reset

### Development Environment

In a Rails initializer, or any file executed during loading:
In a Rails initializer, or any file executed during loading do the following. Please note that requiring that file immediately starts up the websocket server.

```ruby
require "pusher-fake/support/base"
if Rails.env == "development"
Pusher.app_id = "testapp"
Pusher.key = "testkey"
Pusher.secret = "super secret"
require "pusher-fake/support/base"
end
```

If you're using Foreman or something similar you'll only want to run the fake for a single process:
Expand Down

0 comments on commit 5a68359

Please sign in to comment.