Skip to content

Commit

Permalink
gemfile to bootstrap the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Apr 24, 2011
1 parent 2586d44 commit 8062b8d
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 12 deletions.
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,5 @@
source :rubygems

gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git'
gem 'spdy', :git => 'git://github.com/igrigorik/spdy.git'
gem 'em-zeromq', :git => 'git://github.com/andrewvc/em-zeromq.git'
63 changes: 63 additions & 0 deletions Gemfile.lock
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,63 @@
GIT
remote: git://github.com/andrewvc/em-zeromq.git
revision: 0b19d683f9ee2894c28b11405d275331a2c51bbd
specs:
em-zeromq (0.2.1)
eventmachine (>= 1.0.0.beta.3)
ffi-rzmq (>= 0.7.2)

GIT
remote: git://github.com/igrigorik/spdy.git
revision: a9288b06da812c39baa83b3113ede867e6eff423
specs:
spdy (0.0.2)
bindata
ffi-zlib

GIT
remote: git://github.com/postrank-labs/goliath.git
revision: c879223db898e3aad9036c007f74b51e3fa963df
specs:
goliath (0.9.1)
async-rack
em-synchrony (>= 0.3.0.beta.1)
eventmachine (>= 1.0.0.beta.3)
http_parser.rb
log4r
multi_json
rack (>= 1.2.2)
rack-contrib
rack-respond_to

GEM
remote: http://rubygems.org/
specs:
async-rack (0.5.1)
rack (~> 1.1)
bindata (1.3.1)
em-synchrony (0.3.0.beta.1)
eventmachine (>= 1.0.0.beta.1)
eventmachine (1.0.0.beta.3)
ffi (1.0.7)
rake (>= 0.8.7)
ffi-rzmq (0.7.2)
ffi-zlib (0.2.0)
ffi
http_parser.rb (0.5.1)
log4r (1.1.9)
multi_json (0.0.5)
rack (1.2.2)
rack-accept-media-types (0.9)
rack-contrib (1.1.0)
rack (>= 0.9.1)
rack-respond_to (0.9.8)
rack-accept-media-types (>= 0.6)
rake (0.8.7)

PLATFORMS
ruby

DEPENDENCIES
em-zeromq!
goliath!
spdy!
2 changes: 2 additions & 0 deletions README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ All reverse proxy servers have a common pain point: they have to know which back


## Example ## Example


$> bundle install
$>
$> ruby hello.rb worker-1 $> ruby hello.rb worker-1
$> ruby hello.rb worker-2 $> ruby hello.rb worker-2
$> $>
Expand Down
9 changes: 6 additions & 3 deletions lib/worker.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,10 @@
$: << '/git/spdy/lib' require 'bundler'
Bundler.require


require 'ffi-rzmq' # $: << '/git/spdy/lib'
require 'spdy' #
# require 'ffi-rzmq'
# require 'spdy'


class Worker class Worker
def initialize(opts = {}) def initialize(opts = {})
Expand Down
20 changes: 11 additions & 9 deletions router.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,13 @@
$: << '/git/spdy/lib' require 'bundler'
$: << '/git/goliath/lib' Bundler.require
$: << '/git/em-zeromq/lib'


require 'em-zeromq' # $: << '/git/spdy/lib'
require 'goliath' # $: << '/git/goliath/lib'
require 'spdy' # $: << '/git/em-zeromq/lib'
#
# require 'em-zeromq'
# require 'goliath'
# require 'spdy'


class Router < Goliath::API class Router < Goliath::API


Expand Down Expand Up @@ -70,9 +73,8 @@ def response(env)


proxy(env, fin.to_binary_s, true) proxy(env, fin.to_binary_s, true)


# TODO: merge upstream Goliath return # don't send any response to client just yet
# Goliath::Connection::AsyncResponse [nil, nil, nil]
nil
end end


end end

0 comments on commit 8062b8d

Please sign in to comment.