Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

gemfile to bootstrap the environment

  • Loading branch information...
commit 8062b8da5ecbb31f002469756fe2b91a8f49ec0a 1 parent 2586d44
Ilya Grigorik authored April 23, 2011
5  Gemfile
... ...
@@ -0,0 +1,5 @@
  1
+source :rubygems
  2
+
  3
+gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git'
  4
+gem 'spdy', :git => 'git://github.com/igrigorik/spdy.git'
  5
+gem 'em-zeromq', :git => 'git://github.com/andrewvc/em-zeromq.git'
63  Gemfile.lock
... ...
@@ -0,0 +1,63 @@
  1
+GIT
  2
+  remote: git://github.com/andrewvc/em-zeromq.git
  3
+  revision: 0b19d683f9ee2894c28b11405d275331a2c51bbd
  4
+  specs:
  5
+    em-zeromq (0.2.1)
  6
+      eventmachine (>= 1.0.0.beta.3)
  7
+      ffi-rzmq (>= 0.7.2)
  8
+
  9
+GIT
  10
+  remote: git://github.com/igrigorik/spdy.git
  11
+  revision: a9288b06da812c39baa83b3113ede867e6eff423
  12
+  specs:
  13
+    spdy (0.0.2)
  14
+      bindata
  15
+      ffi-zlib
  16
+
  17
+GIT
  18
+  remote: git://github.com/postrank-labs/goliath.git
  19
+  revision: c879223db898e3aad9036c007f74b51e3fa963df
  20
+  specs:
  21
+    goliath (0.9.1)
  22
+      async-rack
  23
+      em-synchrony (>= 0.3.0.beta.1)
  24
+      eventmachine (>= 1.0.0.beta.3)
  25
+      http_parser.rb
  26
+      log4r
  27
+      multi_json
  28
+      rack (>= 1.2.2)
  29
+      rack-contrib
  30
+      rack-respond_to
  31
+
  32
+GEM
  33
+  remote: http://rubygems.org/
  34
+  specs:
  35
+    async-rack (0.5.1)
  36
+      rack (~> 1.1)
  37
+    bindata (1.3.1)
  38
+    em-synchrony (0.3.0.beta.1)
  39
+      eventmachine (>= 1.0.0.beta.1)
  40
+    eventmachine (1.0.0.beta.3)
  41
+    ffi (1.0.7)
  42
+      rake (>= 0.8.7)
  43
+    ffi-rzmq (0.7.2)
  44
+    ffi-zlib (0.2.0)
  45
+      ffi
  46
+    http_parser.rb (0.5.1)
  47
+    log4r (1.1.9)
  48
+    multi_json (0.0.5)
  49
+    rack (1.2.2)
  50
+    rack-accept-media-types (0.9)
  51
+    rack-contrib (1.1.0)
  52
+      rack (>= 0.9.1)
  53
+    rack-respond_to (0.9.8)
  54
+      rack-accept-media-types (>= 0.6)
  55
+    rake (0.8.7)
  56
+
  57
+PLATFORMS
  58
+  ruby
  59
+
  60
+DEPENDENCIES
  61
+  em-zeromq!
  62
+  goliath!
  63
+  spdy!
2  README.md
Source Rendered
@@ -18,6 +18,8 @@ All reverse proxy servers have a common pain point: they have to know which back
18 18
 
19 19
 ## Example
20 20
 
  21
+    $> bundle install
  22
+    $>
21 23
     $> ruby hello.rb worker-1
22 24
     $> ruby hello.rb worker-2
23 25
     $>
9  lib/worker.rb
... ...
@@ -1,7 +1,10 @@
1  
-$: << '/git/spdy/lib'
  1
+require 'bundler'
  2
+Bundler.require
2 3
 
3  
-require 'ffi-rzmq'
4  
-require 'spdy'
  4
+# $: << '/git/spdy/lib'
  5
+#
  6
+# require 'ffi-rzmq'
  7
+# require 'spdy'
5 8
 
6 9
 class Worker
7 10
   def initialize(opts = {})
20  router.rb
... ...
@@ -1,10 +1,13 @@
1  
-$: << '/git/spdy/lib'
2  
-$: << '/git/goliath/lib'
3  
-$: << '/git/em-zeromq/lib'
  1
+require 'bundler'
  2
+Bundler.require
4 3
 
5  
-require 'em-zeromq'
6  
-require 'goliath'
7  
-require 'spdy'
  4
+# $: << '/git/spdy/lib'
  5
+# $: << '/git/goliath/lib'
  6
+# $: << '/git/em-zeromq/lib'
  7
+#
  8
+# require 'em-zeromq'
  9
+# require 'goliath'
  10
+# require 'spdy'
8 11
 
9 12
 class Router < Goliath::API
10 13
 
@@ -70,9 +73,8 @@ def response(env)
70 73
 
71 74
     proxy(env, fin.to_binary_s, true)
72 75
 
73  
-    # TODO: merge upstream Goliath return
74  
-    # Goliath::Connection::AsyncResponse
75  
-    nil
  76
+    # don't send any response to client just yet
  77
+    [nil, nil, nil]
76 78
   end
77 79
 
78 80
 end

0 notes on commit 8062b8d

Please sign in to comment.
Something went wrong with that request. Please try again.