ebb 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README CHANGED
@@ -10,11 +10,12 @@ and a front-end server. It is not meant to serve static files in production.
10
10
 
11
11
  ## Design
12
12
 
13
- The design is similar to the
14
- [Evented Mongrel](http://swiftiply.swiftcore.org/mongrel.html) web server;
15
- except instead of using EventMachine (a ruby binding to libevent), the Ebb
16
- web server is written in C and uses the
17
- [libev](http://software.schmorp.de/pkg/libev.html) event loop library.
13
+ The design is similar to the [Evented
14
+ Mongrel](http://swiftiply.swiftcore.org/mongrel.html) web server; except
15
+ instead of using [EventMachine](http://rubyeventmachine.com/) to drive
16
+ network interactions, the Ebb web server handles sockets directly in C and
17
+ employs the use of the [libev](http://software.schmorp.de/pkg/libev.html)
18
+ event loop.
18
19
 
19
20
  Connections are processed as follows:
20
21
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/ruby_lib/ebb.rb CHANGED
@@ -15,7 +15,6 @@ module Ebb
15
15
  'SCRIPT_NAME' => '',
16
16
  'SERVER_SOFTWARE' => "Ebb #{Ebb::VERSION}",
17
17
  'SERVER_PROTOCOL' => 'HTTP/1.1',
18
- 'GATEWAY_INTERFACE' => 'CGI/1.2',
19
18
  'rack.version' => [0, 1],
20
19
  'rack.errors' => STDERR,
21
20
  'rack.url_scheme' => 'http',
data/src/ebb.h CHANGED
@@ -18,10 +18,10 @@
18
18
  typedef struct ebb_server ebb_server;
19
19
  typedef struct ebb_client ebb_client;
20
20
 
21
- #define EBB_BUFFERSIZE (1024 * (80 + 32) * 2)
22
- #define EBB_MAX_CLIENTS 950
21
+ #define EBB_BUFFERSIZE (1024 * (80 + 33))
22
+ #define EBB_MAX_CLIENTS 200
23
23
  #define EBB_TIMEOUT 30.0
24
- #define EBB_MAX_ENV 100
24
+ #define EBB_MAX_ENV 500
25
25
  #define EBB_TCP_COMMON \
26
26
  unsigned open : 1; \
27
27
  int fd; \
@@ -88,7 +88,7 @@ struct ebb_client {
88
88
 
89
89
  typedef void (*ebb_request_cb)(ebb_client*, void*);
90
90
 
91
- ebb_server* ebb_server_alloc();
91
+ ebb_server* ebb_server_alloc(void);
92
92
  void ebb_server_free(ebb_server*);
93
93
  void ebb_server_init( ebb_server *server
94
94
  , struct ev_loop *loop
data/test/basic_test.rb CHANGED
@@ -145,7 +145,6 @@ class EnvTest < Test::Unit::TestCase
145
145
  assert_equal '/', env['REQUEST_PATH']
146
146
  assert_equal 'HTTP/1.1', env['HTTP_VERSION']
147
147
  assert_equal '/', env['REQUEST_URI']
148
- assert_equal 'CGI/1.2', env['GATEWAY_INTERFACE']
149
148
  assert_equal 'GET', env['REQUEST_METHOD']
150
149
  assert_nil env['FRAGMENT']
151
150
  assert_nil env['QUERY_STRING']
data/test/env_test.rb CHANGED
@@ -45,7 +45,6 @@ class HttpParserTest < Test::Unit::TestCase
45
45
  assert_equal '/', env['REQUEST_PATH']
46
46
  assert_equal 'HTTP/1.1', env['HTTP_VERSION']
47
47
  assert_equal '/', env['REQUEST_URI']
48
- assert_equal 'CGI/1.2', env['GATEWAY_INTERFACE']
49
48
  assert_equal 'GET', env['REQUEST_METHOD']
50
49
  assert_nil env['FRAGMENT']
51
50
  assert_nil env['QUERY_STRING']
data/test/test.py ADDED
@@ -0,0 +1,15 @@
1
+ import sys
2
+ sys.path.append('/Users/ry/projects/ebb/build/lib.macosx-10.3-ppc-2.5')
3
+ import ebb
4
+
5
+ print "hello"
6
+
7
+ def simple_app(environ, start_response):
8
+ """Simplest possible application object"""
9
+ status = '200 OK'
10
+ print repr(environ)
11
+ response_headers = [('Content-type','text/plain')]
12
+ #start_response(status, response_headers)
13
+ return ['Hello world!\n']
14
+
15
+ ebb.start_server(simple_app, 4000)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ry dahl
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-03 00:00:00 +01:00
12
+ date: 2008-03-04 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -52,6 +52,7 @@ files:
52
52
  - test/basic_test.rb
53
53
  - test/echo_server.rb
54
54
  - test/env_test.rb
55
+ - test/test.py
55
56
  has_rdoc: false
56
57
  homepage: http://ebb.rubyforge.org
57
58
  post_install_message: