-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tom Mornini
committed
Apr 9, 2014
1 parent
5b3a491
commit bd5c665
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"description": "Subledger, Inc.", | ||
"reference": "http://subledger.com", | ||
"annotations": { | ||
"good?": true | ||
} | ||
} |