goliath 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of goliath might be problematic. Click here for more details.
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.yardopts +2 -0
- data/Gemfile +3 -0
- data/LICENSE +66 -0
- data/README.md +86 -0
- data/Rakefile +18 -0
- data/examples/activerecord/config/srv.rb +7 -0
- data/examples/activerecord/srv.rb +37 -0
- data/examples/async_upload.rb +34 -0
- data/examples/conf_test.rb +27 -0
- data/examples/config/conf_test.rb +12 -0
- data/examples/config/echo.rb +1 -0
- data/examples/config/http_log.rb +7 -0
- data/examples/config/shared.rb +5 -0
- data/examples/custom_server.rb +57 -0
- data/examples/echo.rb +37 -0
- data/examples/gziped.rb +40 -0
- data/examples/hello_world.rb +10 -0
- data/examples/http_log.rb +85 -0
- data/examples/rack_routes.rb +44 -0
- data/examples/stream.rb +37 -0
- data/examples/valid.rb +19 -0
- data/goliath.gemspec +41 -0
- data/lib/goliath.rb +38 -0
- data/lib/goliath/api.rb +165 -0
- data/lib/goliath/application.rb +90 -0
- data/lib/goliath/connection.rb +94 -0
- data/lib/goliath/constants.rb +51 -0
- data/lib/goliath/env.rb +92 -0
- data/lib/goliath/goliath.rb +49 -0
- data/lib/goliath/headers.rb +37 -0
- data/lib/goliath/http_status_codes.rb +44 -0
- data/lib/goliath/plugins/latency.rb +33 -0
- data/lib/goliath/rack/default_mime_type.rb +30 -0
- data/lib/goliath/rack/default_response_format.rb +33 -0
- data/lib/goliath/rack/formatters/html.rb +90 -0
- data/lib/goliath/rack/formatters/json.rb +42 -0
- data/lib/goliath/rack/formatters/xml.rb +90 -0
- data/lib/goliath/rack/heartbeat.rb +23 -0
- data/lib/goliath/rack/jsonp.rb +38 -0
- data/lib/goliath/rack/params.rb +30 -0
- data/lib/goliath/rack/render.rb +66 -0
- data/lib/goliath/rack/tracer.rb +31 -0
- data/lib/goliath/rack/validation/boolean_value.rb +59 -0
- data/lib/goliath/rack/validation/default_params.rb +46 -0
- data/lib/goliath/rack/validation/numeric_range.rb +59 -0
- data/lib/goliath/rack/validation/request_method.rb +33 -0
- data/lib/goliath/rack/validation/required_param.rb +54 -0
- data/lib/goliath/rack/validation/required_value.rb +58 -0
- data/lib/goliath/rack/validation_error.rb +38 -0
- data/lib/goliath/request.rb +199 -0
- data/lib/goliath/response.rb +93 -0
- data/lib/goliath/runner.rb +236 -0
- data/lib/goliath/server.rb +149 -0
- data/lib/goliath/test_helper.rb +118 -0
- data/lib/goliath/version.rb +4 -0
- data/spec/integration/async_request_processing.rb +23 -0
- data/spec/integration/echo_spec.rb +27 -0
- data/spec/integration/keepalive_spec.rb +28 -0
- data/spec/integration/pipelining_spec.rb +43 -0
- data/spec/integration/valid_spec.rb +24 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/connection_spec.rb +59 -0
- data/spec/unit/env_spec.rb +55 -0
- data/spec/unit/headers_spec.rb +53 -0
- data/spec/unit/rack/default_mime_type_spec.rb +34 -0
- data/spec/unit/rack/formatters/json_spec.rb +54 -0
- data/spec/unit/rack/formatters/xml_spec.rb +66 -0
- data/spec/unit/rack/heartbeat_spec.rb +47 -0
- data/spec/unit/rack/params_spec.rb +94 -0
- data/spec/unit/rack/render_spec.rb +87 -0
- data/spec/unit/rack/validation/boolean_value_spec.rb +54 -0
- data/spec/unit/rack/validation/default_params_spec.rb +71 -0
- data/spec/unit/rack/validation/numeric_range_spec.rb +96 -0
- data/spec/unit/rack/validation/request_method_spec.rb +47 -0
- data/spec/unit/rack/validation/required_param_spec.rb +92 -0
- data/spec/unit/rack/validation/required_value_spec.rb +99 -0
- data/spec/unit/rack/validation_error_spec.rb +40 -0
- data/spec/unit/request_spec.rb +59 -0
- data/spec/unit/response_spec.rb +35 -0
- data/spec/unit/runner_spec.rb +129 -0
- data/spec/unit/server_spec.rb +137 -0
- metadata +409 -0
@@ -0,0 +1,129 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'goliath/runner'
|
3
|
+
|
4
|
+
describe Goliath::Runner do
|
5
|
+
before(:each) do
|
6
|
+
@r = Goliath::Runner.new([], nil)
|
7
|
+
@r.stub!(:store_pid)
|
8
|
+
|
9
|
+
@log_mock = mock('logger').as_null_object
|
10
|
+
@r.stub!(:setup_logger).and_return(@log_mock)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'server execution' do
|
14
|
+
describe 'daemonization' do
|
15
|
+
it 'daemonizes if specified' do
|
16
|
+
Process.should_receive(:fork)
|
17
|
+
@r.daemonize = true
|
18
|
+
@r.run
|
19
|
+
end
|
20
|
+
|
21
|
+
it "doesn't daemonize if not specified" do
|
22
|
+
Process.should_not_receive(:fork)
|
23
|
+
@r.should_receive(:run_server)
|
24
|
+
@r.run
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'logging' do
|
29
|
+
before(:each) do
|
30
|
+
@r = Goliath::Runner.new([], nil)
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'without setting up file logger' do
|
34
|
+
before(:each) do
|
35
|
+
@r.stub!(:setup_file_logger)
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'configures the logger' do
|
39
|
+
log = @r.send(:setup_logger)
|
40
|
+
log.should_not be_nil
|
41
|
+
end
|
42
|
+
|
43
|
+
[:debug, :warn, :info].each do |type|
|
44
|
+
it "responds to #{type} messages" do
|
45
|
+
log = @r.send(:setup_logger)
|
46
|
+
log.respond_to?(type).should be_true
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe 'log level' do
|
51
|
+
before(:each) do
|
52
|
+
FileUtils.stub!(:mkdir_p)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'sets the default log level' do
|
56
|
+
log = @r.send(:setup_logger)
|
57
|
+
log.level.should == Log4r::INFO
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'sets debug when verbose' do
|
61
|
+
@r.verbose = true
|
62
|
+
log = @r.send(:setup_logger)
|
63
|
+
log.level.should == Log4r::DEBUG
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe 'file logger' do
|
68
|
+
it "doesn't configure by default" do
|
69
|
+
@r.should_not_receive(:setup_file_logger)
|
70
|
+
log = @r.send(:setup_logger)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'configures if -l is provided' do
|
74
|
+
@r.should_receive(:setup_file_logger)
|
75
|
+
@r.log_file = 'out.log'
|
76
|
+
log = @r.send(:setup_logger)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe 'stdout logger' do
|
81
|
+
it "doesn't configure by default" do
|
82
|
+
@r.should_not_receive(:setup_stdout_logger)
|
83
|
+
log = @r.send(:setup_logger)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'configures if -s is provided' do
|
87
|
+
@r.should_receive(:setup_stdout_logger)
|
88
|
+
@r.log_stdout = true
|
89
|
+
log = @r.send(:setup_logger)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'creates the log dir if neeed' do
|
95
|
+
Log4r::FileOutputter.stub!(:new)
|
96
|
+
log_mock = mock('log').as_null_object
|
97
|
+
|
98
|
+
FileUtils.should_receive(:mkdir_p).with('/my/log/dir')
|
99
|
+
|
100
|
+
@r.log_file = '/my/log/dir/log.txt'
|
101
|
+
@r.send(:setup_file_logger, log_mock, nil)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'runs the server' do
|
106
|
+
server_mock = mock("Server").as_null_object
|
107
|
+
server_mock.should_receive(:start)
|
108
|
+
|
109
|
+
Goliath::Server.should_receive(:new).and_return(server_mock)
|
110
|
+
|
111
|
+
@r.stub!(:load_config).and_return({})
|
112
|
+
@r.send(:run_server)
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'configures the server' do
|
116
|
+
server_mock = Goliath::Server.new
|
117
|
+
server_mock.stub!(:start)
|
118
|
+
|
119
|
+
@r.app = 'my_app'
|
120
|
+
|
121
|
+
Goliath::Server.should_receive(:new).and_return(server_mock)
|
122
|
+
|
123
|
+
server_mock.should_receive(:logger=).with(@log_mock)
|
124
|
+
server_mock.should_receive(:app=).with('my_app')
|
125
|
+
|
126
|
+
@r.send(:run_server)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'goliath/server'
|
3
|
+
|
4
|
+
describe Goliath::Server do
|
5
|
+
before(:each) do
|
6
|
+
@s = Goliath::Server.new
|
7
|
+
end
|
8
|
+
|
9
|
+
describe 'defaults' do
|
10
|
+
it 'to any interface' do
|
11
|
+
@s.address.should == '0.0.0.0'
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'to port 9000' do
|
15
|
+
@s.port.should == 9000
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'configuration' do
|
20
|
+
it 'accepts an address and port' do
|
21
|
+
@s = Goliath::Server.new('10.2.1.1', 2020)
|
22
|
+
@s.address.should == '10.2.1.1'
|
23
|
+
@s.port.should == 2020
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'accepts a logger' do
|
27
|
+
logger = mock('logger')
|
28
|
+
@s.logger = logger
|
29
|
+
@s.logger.should == logger
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'accepts an app' do
|
33
|
+
app = mock('app')
|
34
|
+
@s.app = app
|
35
|
+
@s.app.should == app
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'accepts config' do
|
39
|
+
config = mock('config')
|
40
|
+
@s.config = config
|
41
|
+
@s.config.should == config
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'startup' do
|
46
|
+
before(:each) do
|
47
|
+
EM.should_receive(:synchrony).and_yield
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'starts' do
|
51
|
+
addr = '10.2.1.1'
|
52
|
+
port = 10000
|
53
|
+
|
54
|
+
EM.should_receive(:start_server).with(addr, port, anything)
|
55
|
+
|
56
|
+
@s.address = addr
|
57
|
+
@s.port = port
|
58
|
+
@s.start
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'provides the app to each connection' do
|
62
|
+
app = mock('application')
|
63
|
+
|
64
|
+
conn = mock("connection").as_null_object
|
65
|
+
conn.should_receive(:app=).with(app)
|
66
|
+
|
67
|
+
EM.should_receive(:start_server).and_yield(conn)
|
68
|
+
|
69
|
+
@s.app = app
|
70
|
+
@s.start
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'provides the logger to each connection' do
|
74
|
+
logger = mock('logger')
|
75
|
+
|
76
|
+
conn = mock("connection").as_null_object
|
77
|
+
conn.should_receive(:logger=).with(logger)
|
78
|
+
|
79
|
+
EM.should_receive(:start_server).and_yield(conn)
|
80
|
+
|
81
|
+
@s.logger = logger
|
82
|
+
@s.start
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'provides the status object to each connection' do
|
86
|
+
status = mock('status')
|
87
|
+
|
88
|
+
conn = mock("connection").as_null_object
|
89
|
+
conn.should_receive(:status=).with(status)
|
90
|
+
|
91
|
+
EM.should_receive(:start_server).and_yield(conn)
|
92
|
+
|
93
|
+
@s.status = status
|
94
|
+
@s.start
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'loads the config for each connection' do
|
98
|
+
conn = mock("connection").as_null_object
|
99
|
+
EM.should_receive(:start_server).and_yield(conn)
|
100
|
+
|
101
|
+
@s.should_receive(:load_config)
|
102
|
+
@s.start
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
context 'config parsing' do
|
107
|
+
context 'environment' do
|
108
|
+
it 'executes the block if the environment matches the provided string' do
|
109
|
+
Goliath.env = 'dev'
|
110
|
+
block_run = false
|
111
|
+
@s.environment('development') { block_run = true }
|
112
|
+
block_run.should be_true
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'does not execute the block if the environment does not match' do
|
116
|
+
Goliath.env = 'dev'
|
117
|
+
block_run = false
|
118
|
+
@s.environment('test') { block_run = true }
|
119
|
+
block_run.should be_false
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'accepts an array of environments' do
|
123
|
+
Goliath.env = 'dev'
|
124
|
+
block_run = false
|
125
|
+
@s.environment(['development', 'test']) { block_run = true }
|
126
|
+
block_run.should be_true
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'does not run the block if the environment is not in the array' do
|
130
|
+
Goliath.env = 'prod'
|
131
|
+
block_run = false
|
132
|
+
@s.environment(['development', 'test']) { block_run = true }
|
133
|
+
block_run.should be_false
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
metadata
ADDED
@@ -0,0 +1,409 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: goliath
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 9
|
8
|
+
- 0
|
9
|
+
version: 0.9.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- dan sinclair
|
13
|
+
- Ilya Grigorik
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-03-08 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: eventmachine
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
- beta
|
34
|
+
- 1
|
35
|
+
version: 1.0.0.beta.1
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: em-synchrony
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 3
|
49
|
+
- 0
|
50
|
+
- beta
|
51
|
+
- 1
|
52
|
+
version: 0.3.0.beta.1
|
53
|
+
type: :runtime
|
54
|
+
version_requirements: *id002
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: http_parser.rb
|
57
|
+
prerelease: false
|
58
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
segments:
|
64
|
+
- 0
|
65
|
+
version: "0"
|
66
|
+
type: :runtime
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: log4r
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
version: "0"
|
79
|
+
type: :runtime
|
80
|
+
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: rack
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
type: :runtime
|
93
|
+
version_requirements: *id005
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rack-contrib
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
105
|
+
type: :runtime
|
106
|
+
version_requirements: *id006
|
107
|
+
- !ruby/object:Gem::Dependency
|
108
|
+
name: rack-respond_to
|
109
|
+
prerelease: false
|
110
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
version: "0"
|
118
|
+
type: :runtime
|
119
|
+
version_requirements: *id007
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: async-rack
|
122
|
+
prerelease: false
|
123
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
segments:
|
129
|
+
- 0
|
130
|
+
version: "0"
|
131
|
+
type: :runtime
|
132
|
+
version_requirements: *id008
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: multi_json
|
135
|
+
prerelease: false
|
136
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
segments:
|
142
|
+
- 0
|
143
|
+
version: "0"
|
144
|
+
type: :runtime
|
145
|
+
version_requirements: *id009
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: rspec
|
148
|
+
prerelease: false
|
149
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
151
|
+
requirements:
|
152
|
+
- - ">"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
segments:
|
155
|
+
- 2
|
156
|
+
- 0
|
157
|
+
version: "2.0"
|
158
|
+
type: :development
|
159
|
+
version_requirements: *id010
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: nokogiri
|
162
|
+
prerelease: false
|
163
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
164
|
+
none: false
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
segments:
|
169
|
+
- 0
|
170
|
+
version: "0"
|
171
|
+
type: :development
|
172
|
+
version_requirements: *id011
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: em-http-request
|
175
|
+
prerelease: false
|
176
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
segments:
|
182
|
+
- 1
|
183
|
+
- 0
|
184
|
+
- 0
|
185
|
+
- beta
|
186
|
+
- 1
|
187
|
+
version: 1.0.0.beta.1
|
188
|
+
type: :development
|
189
|
+
version_requirements: *id012
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: em-mongo
|
192
|
+
prerelease: false
|
193
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
195
|
+
requirements:
|
196
|
+
- - ">="
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
segments:
|
199
|
+
- 0
|
200
|
+
version: "0"
|
201
|
+
type: :development
|
202
|
+
version_requirements: *id013
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: yajl-ruby
|
205
|
+
prerelease: false
|
206
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
207
|
+
none: false
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
segments:
|
212
|
+
- 0
|
213
|
+
version: "0"
|
214
|
+
type: :development
|
215
|
+
version_requirements: *id014
|
216
|
+
- !ruby/object:Gem::Dependency
|
217
|
+
name: rack-rewrite
|
218
|
+
prerelease: false
|
219
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
220
|
+
none: false
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
segments:
|
225
|
+
- 0
|
226
|
+
version: "0"
|
227
|
+
type: :development
|
228
|
+
version_requirements: *id015
|
229
|
+
- !ruby/object:Gem::Dependency
|
230
|
+
name: yard
|
231
|
+
prerelease: false
|
232
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
234
|
+
requirements:
|
235
|
+
- - ">="
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
segments:
|
238
|
+
- 0
|
239
|
+
version: "0"
|
240
|
+
type: :development
|
241
|
+
version_requirements: *id016
|
242
|
+
- !ruby/object:Gem::Dependency
|
243
|
+
name: bluecloth
|
244
|
+
prerelease: false
|
245
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
246
|
+
none: false
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
segments:
|
251
|
+
- 0
|
252
|
+
version: "0"
|
253
|
+
type: :development
|
254
|
+
version_requirements: *id017
|
255
|
+
description: Framework for writing API servers
|
256
|
+
email:
|
257
|
+
- dj2@everburning.com
|
258
|
+
- ilya@igvita.com
|
259
|
+
executables: []
|
260
|
+
|
261
|
+
extensions: []
|
262
|
+
|
263
|
+
extra_rdoc_files: []
|
264
|
+
|
265
|
+
files:
|
266
|
+
- .gitignore
|
267
|
+
- .rspec
|
268
|
+
- .yardopts
|
269
|
+
- Gemfile
|
270
|
+
- LICENSE
|
271
|
+
- README.md
|
272
|
+
- Rakefile
|
273
|
+
- examples/activerecord/config/srv.rb
|
274
|
+
- examples/activerecord/srv.rb
|
275
|
+
- examples/async_upload.rb
|
276
|
+
- examples/conf_test.rb
|
277
|
+
- examples/config/conf_test.rb
|
278
|
+
- examples/config/echo.rb
|
279
|
+
- examples/config/http_log.rb
|
280
|
+
- examples/config/shared.rb
|
281
|
+
- examples/custom_server.rb
|
282
|
+
- examples/echo.rb
|
283
|
+
- examples/gziped.rb
|
284
|
+
- examples/hello_world.rb
|
285
|
+
- examples/http_log.rb
|
286
|
+
- examples/rack_routes.rb
|
287
|
+
- examples/stream.rb
|
288
|
+
- examples/valid.rb
|
289
|
+
- goliath.gemspec
|
290
|
+
- lib/goliath.rb
|
291
|
+
- lib/goliath/api.rb
|
292
|
+
- lib/goliath/application.rb
|
293
|
+
- lib/goliath/connection.rb
|
294
|
+
- lib/goliath/constants.rb
|
295
|
+
- lib/goliath/env.rb
|
296
|
+
- lib/goliath/goliath.rb
|
297
|
+
- lib/goliath/headers.rb
|
298
|
+
- lib/goliath/http_status_codes.rb
|
299
|
+
- lib/goliath/plugins/latency.rb
|
300
|
+
- lib/goliath/rack/default_mime_type.rb
|
301
|
+
- lib/goliath/rack/default_response_format.rb
|
302
|
+
- lib/goliath/rack/formatters/html.rb
|
303
|
+
- lib/goliath/rack/formatters/json.rb
|
304
|
+
- lib/goliath/rack/formatters/xml.rb
|
305
|
+
- lib/goliath/rack/heartbeat.rb
|
306
|
+
- lib/goliath/rack/jsonp.rb
|
307
|
+
- lib/goliath/rack/params.rb
|
308
|
+
- lib/goliath/rack/render.rb
|
309
|
+
- lib/goliath/rack/tracer.rb
|
310
|
+
- lib/goliath/rack/validation/boolean_value.rb
|
311
|
+
- lib/goliath/rack/validation/default_params.rb
|
312
|
+
- lib/goliath/rack/validation/numeric_range.rb
|
313
|
+
- lib/goliath/rack/validation/request_method.rb
|
314
|
+
- lib/goliath/rack/validation/required_param.rb
|
315
|
+
- lib/goliath/rack/validation/required_value.rb
|
316
|
+
- lib/goliath/rack/validation_error.rb
|
317
|
+
- lib/goliath/request.rb
|
318
|
+
- lib/goliath/response.rb
|
319
|
+
- lib/goliath/runner.rb
|
320
|
+
- lib/goliath/server.rb
|
321
|
+
- lib/goliath/test_helper.rb
|
322
|
+
- lib/goliath/version.rb
|
323
|
+
- spec/integration/async_request_processing.rb
|
324
|
+
- spec/integration/echo_spec.rb
|
325
|
+
- spec/integration/keepalive_spec.rb
|
326
|
+
- spec/integration/pipelining_spec.rb
|
327
|
+
- spec/integration/valid_spec.rb
|
328
|
+
- spec/spec_helper.rb
|
329
|
+
- spec/unit/connection_spec.rb
|
330
|
+
- spec/unit/env_spec.rb
|
331
|
+
- spec/unit/headers_spec.rb
|
332
|
+
- spec/unit/rack/default_mime_type_spec.rb
|
333
|
+
- spec/unit/rack/formatters/json_spec.rb
|
334
|
+
- spec/unit/rack/formatters/xml_spec.rb
|
335
|
+
- spec/unit/rack/heartbeat_spec.rb
|
336
|
+
- spec/unit/rack/params_spec.rb
|
337
|
+
- spec/unit/rack/render_spec.rb
|
338
|
+
- spec/unit/rack/validation/boolean_value_spec.rb
|
339
|
+
- spec/unit/rack/validation/default_params_spec.rb
|
340
|
+
- spec/unit/rack/validation/numeric_range_spec.rb
|
341
|
+
- spec/unit/rack/validation/request_method_spec.rb
|
342
|
+
- spec/unit/rack/validation/required_param_spec.rb
|
343
|
+
- spec/unit/rack/validation/required_value_spec.rb
|
344
|
+
- spec/unit/rack/validation_error_spec.rb
|
345
|
+
- spec/unit/request_spec.rb
|
346
|
+
- spec/unit/response_spec.rb
|
347
|
+
- spec/unit/runner_spec.rb
|
348
|
+
- spec/unit/server_spec.rb
|
349
|
+
has_rdoc: true
|
350
|
+
homepage: http://labs.postrank.com/
|
351
|
+
licenses: []
|
352
|
+
|
353
|
+
post_install_message:
|
354
|
+
rdoc_options: []
|
355
|
+
|
356
|
+
require_paths:
|
357
|
+
- lib
|
358
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
359
|
+
none: false
|
360
|
+
requirements:
|
361
|
+
- - ">="
|
362
|
+
- !ruby/object:Gem::Version
|
363
|
+
segments:
|
364
|
+
- 1
|
365
|
+
- 9
|
366
|
+
- 2
|
367
|
+
version: 1.9.2
|
368
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
369
|
+
none: false
|
370
|
+
requirements:
|
371
|
+
- - ">="
|
372
|
+
- !ruby/object:Gem::Version
|
373
|
+
segments:
|
374
|
+
- 0
|
375
|
+
version: "0"
|
376
|
+
requirements: []
|
377
|
+
|
378
|
+
rubyforge_project:
|
379
|
+
rubygems_version: 1.3.7
|
380
|
+
signing_key:
|
381
|
+
specification_version: 3
|
382
|
+
summary: Framework for writing API servers
|
383
|
+
test_files:
|
384
|
+
- spec/integration/async_request_processing.rb
|
385
|
+
- spec/integration/echo_spec.rb
|
386
|
+
- spec/integration/keepalive_spec.rb
|
387
|
+
- spec/integration/pipelining_spec.rb
|
388
|
+
- spec/integration/valid_spec.rb
|
389
|
+
- spec/spec_helper.rb
|
390
|
+
- spec/unit/connection_spec.rb
|
391
|
+
- spec/unit/env_spec.rb
|
392
|
+
- spec/unit/headers_spec.rb
|
393
|
+
- spec/unit/rack/default_mime_type_spec.rb
|
394
|
+
- spec/unit/rack/formatters/json_spec.rb
|
395
|
+
- spec/unit/rack/formatters/xml_spec.rb
|
396
|
+
- spec/unit/rack/heartbeat_spec.rb
|
397
|
+
- spec/unit/rack/params_spec.rb
|
398
|
+
- spec/unit/rack/render_spec.rb
|
399
|
+
- spec/unit/rack/validation/boolean_value_spec.rb
|
400
|
+
- spec/unit/rack/validation/default_params_spec.rb
|
401
|
+
- spec/unit/rack/validation/numeric_range_spec.rb
|
402
|
+
- spec/unit/rack/validation/request_method_spec.rb
|
403
|
+
- spec/unit/rack/validation/required_param_spec.rb
|
404
|
+
- spec/unit/rack/validation/required_value_spec.rb
|
405
|
+
- spec/unit/rack/validation_error_spec.rb
|
406
|
+
- spec/unit/request_spec.rb
|
407
|
+
- spec/unit/response_spec.rb
|
408
|
+
- spec/unit/runner_spec.rb
|
409
|
+
- spec/unit/server_spec.rb
|