Skip to content

Commit

Permalink
Simple repro for celluloid/reel#136
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Mornini committed Apr 9, 2014
1 parent 5b3a491 commit bd5c665
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'http', github: 'tarcieri/http'
gem 'reel', github: 'celluloid/reel'
37 changes: 37 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
GIT
remote: git://github.com/celluloid/reel.git
revision: dba5c521b8f4ad6509c3634d5aa1c4adc8c9ec4c
specs:
reel (0.5.0.pre)
celluloid (>= 0.15.1)
celluloid-io (>= 0.15.0)
http (>= 0.6.0.pre)
http_parser.rb (>= 0.6.0)
websocket_parser (>= 0.1.6)

GIT
remote: git://github.com/tarcieri/http.git
revision: af63d6a01dbd8650ae8fb6237e9ffcd22d36cd7a
specs:
http (0.6.0)
http_parser.rb (~> 0.6.0)

GEM
remote: https://rubygems.org/
specs:
celluloid (0.15.2)
timers (~> 1.1.0)
celluloid-io (0.15.0)
celluloid (>= 0.15.0)
nio4r (>= 0.5.0)
http_parser.rb (0.6.0)
nio4r (1.0.0)
timers (1.1.0)
websocket_parser (0.1.6)

PLATFORMS
ruby

DEPENDENCIES
http!
reel!
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
siege -c 128 -b -r 12 -q "http://0.0.0.0:3000/v3/orgs POST < org.json"
28 changes: 28 additions & 0 deletions my_server.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env ruby
# -*- encoding : utf-8 -*-

$LOAD_PATH.unshift 'lib'

require 'rubygems'
require 'bundler/setup'

require 'reel'

class MyServer < Reel::Server::HTTP
def initialize host = '127.0.0.1', port = 3000
super host, port, &method(:on_connection)
end

def on_connection connection
connection.each_request do |request|
handle_request request
end
end

def handle_request request
request.respond :ok, 'Hello, world!'
end

end

MyServer.run
7 changes: 7 additions & 0 deletions org.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"description": "Subledger, Inc.",
"reference": "http://subledger.com",
"annotations": {
"good?": true
}
}

0 comments on commit bd5c665

Please sign in to comment.