Permalink
Browse files

Spec instructions, minor copy fixes

  • Loading branch information...
1 parent ca70099 commit d424e3be4a93b2990b8b5e43a29e8fd6074f61d0 @winton committed Jan 19, 2011
Showing with 33 additions and 5 deletions.
  1. +31 −3 README.md
  2. +1 −1 lib/puggernaut/server/http.rb
  3. +1 −1 public/spec.js
View
@@ -3,7 +3,7 @@ Puggernaut
Simple server push implementation using eventmachine and long polling.
-![Puggernaut](/winton/puggernaut/raw/master/puggernaut.png)
+![Puggernaut](https://github.com/winton/puggernaut/raw/master/puggernaut.png)
Requirements
------------
@@ -74,7 +74,7 @@ The <code>Client.new</code> initializer accepts any number of TCP server address
Receive push messages
---------------------
-Include [puggernaut.js](/winton/puggernaut/public/puggernaut.js) into to your HTML page.
+Include [jQuery](http://jquery.com) and [puggernaut.js](https://github.com/winton/puggernaut/public/puggernaut.js) into to your HTML page.
Javascript client example:
@@ -90,4 +90,32 @@ Puggernaut
});
Puggernaut.unwatch('channel');
-</pre>
+</pre>
+
+Running specs
+-------------
+
+Specs are a work in progress, though we can vouch for some of the functionality :).
+
+Set up Nginx to point to a cloned copy of this project:
+
+*nginx.conf*
+
+<pre>
+server {
+ listen 80;
+ server_name localhost;
+ root /Users/me/puggernaut/public;
+ passenger_enabled on;
+
+ location /long_poll {
+ proxy_pass http://localhost:8000/;
+ }
+}
+</pre>
+
+You have now set up an instance of [Puggernaut's spec server](https://github.com/winton/puggernaut/blob/master/lib/puggernaut/spec_server.rb).
+
+Start up an instance of Puggernaut by calling <code>bin/puggernaut</code>.
+
+When you visit <code>http://localhost</code> you will find a page that executes [QUnit specs](https://github.com/winton/puggernaut/blob/master/public/spec.js).
@@ -64,8 +64,8 @@ def respond(body='', status=200, content_type='text/plain; charset=utf-8')
def unbind
if @subscription_id
@channel.unsubscribe(@subscription_id)
+ logger.info "Sever::Http#unbind - Unsubscribe - #{@channel.channels.join(", ")}"
Channel.channels.delete @channel
- logger.info "Sever::Http#unbind - Unsubscribe - #{@subscription_id}"
end
end
end
View
@@ -60,7 +60,7 @@ $(function() {
module("Multiple channels");
- test("should receive a message", function() {
+ test("should receive all messages", function() {
stop();
var executions = 0;

0 comments on commit d424e3b

Please sign in to comment.