unicorn 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/CHANGELOG +1 -0
- data/GNUmakefile +15 -15
- data/Manifest +6 -6
- data/README +11 -4
- data/Rakefile +5 -5
- data/ext/{unicorn/http11 → unicorn_http}/ext_help.h +0 -0
- data/ext/unicorn_http/extconf.rb +5 -0
- data/ext/{unicorn/http11/http11.c → unicorn_http/unicorn_http.c} +2 -2
- data/ext/{unicorn/http11/http11_parser.h → unicorn_http/unicorn_http.h} +87 -87
- data/ext/{unicorn/http11/http11_parser.rl → unicorn_http/unicorn_http.rl} +4 -4
- data/ext/{unicorn/http11/http11_parser_common.rl → unicorn_http/unicorn_http_common.rl} +2 -2
- data/lib/unicorn.rb +10 -13
- data/lib/unicorn/app/exec_cgi.rb +3 -9
- data/lib/unicorn/chunked_reader.rb +1 -18
- data/lib/unicorn/const.rb +1 -1
- data/lib/unicorn/http_request.rb +5 -7
- data/lib/unicorn/tee_input.rb +19 -21
- data/lib/unicorn/trailer_parser.rb +1 -1
- data/lib/unicorn/util.rb +17 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/test_chunked_reader.rb +2 -59
- data/test/unit/test_tee_input.rb +66 -0
- data/test/unit/test_trailer_parser.rb +1 -1
- data/test/unit/test_util.rb +30 -28
- data/unicorn.gemspec +6 -6
- metadata +22 -21
- data/ext/unicorn/http11/extconf.rb +0 -5
data/test/unit/test_util.rb
CHANGED
@@ -43,20 +43,21 @@ class TestUtil < Test::Unit::TestCase
|
|
43
43
|
tmp = Tempfile.new(nil)
|
44
44
|
tmp_path = tmp.path.dup.freeze
|
45
45
|
Encoding.list.each { |encoding|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
46
|
+
File.open(tmp_path, "a:#{encoding.to_s}") { |fp|
|
47
|
+
fp.sync = true
|
48
|
+
assert_equal encoding, fp.external_encoding
|
49
|
+
assert_nil fp.internal_encoding
|
50
|
+
File.unlink(tmp_path)
|
51
|
+
assert ! File.exist?(tmp_path)
|
52
|
+
Unicorn::Util.reopen_logs
|
53
|
+
assert_equal tmp_path, fp.path
|
54
|
+
assert File.exist?(tmp_path)
|
55
|
+
assert_equal fp.stat.inspect, File.stat(tmp_path).inspect
|
56
|
+
assert_equal encoding, fp.external_encoding
|
57
|
+
assert_nil fp.internal_encoding
|
58
|
+
assert_equal(EXPECT_FLAGS, EXPECT_FLAGS & fp.fcntl(Fcntl::F_GETFL))
|
59
|
+
assert fp.sync
|
60
|
+
}
|
60
61
|
}
|
61
62
|
end if STDIN.respond_to?(:external_encoding)
|
62
63
|
|
@@ -66,20 +67,21 @@ class TestUtil < Test::Unit::TestCase
|
|
66
67
|
Encoding.list.each { |ext|
|
67
68
|
Encoding.list.each { |int|
|
68
69
|
next if ext == int
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
70
|
+
File.open(tmp_path, "a:#{ext.to_s}:#{int.to_s}") { |fp|
|
71
|
+
fp.sync = true
|
72
|
+
assert_equal ext, fp.external_encoding
|
73
|
+
assert_equal int, fp.internal_encoding
|
74
|
+
File.unlink(tmp_path)
|
75
|
+
assert ! File.exist?(tmp_path)
|
76
|
+
Unicorn::Util.reopen_logs
|
77
|
+
assert_equal tmp_path, fp.path
|
78
|
+
assert File.exist?(tmp_path)
|
79
|
+
assert_equal fp.stat.inspect, File.stat(tmp_path).inspect
|
80
|
+
assert_equal ext, fp.external_encoding
|
81
|
+
assert_equal int, fp.internal_encoding
|
82
|
+
assert_equal(EXPECT_FLAGS, EXPECT_FLAGS & fp.fcntl(Fcntl::F_GETFL))
|
83
|
+
assert fp.sync
|
84
|
+
}
|
83
85
|
}
|
84
86
|
}
|
85
87
|
end if STDIN.respond_to?(:external_encoding)
|
data/unicorn.gemspec
CHANGED
@@ -2,24 +2,24 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{unicorn}
|
5
|
-
s.version = "0.9.
|
5
|
+
s.version = "0.9.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Eric Wong"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-19}
|
10
10
|
s.description = %q{Rack HTTP server for Unix, fast clients and nothing else}
|
11
11
|
s.email = %q{normalperson@yhbt.net}
|
12
12
|
s.executables = ["unicorn", "unicorn_rails"]
|
13
|
-
s.extensions = ["ext/
|
14
|
-
s.extra_rdoc_files = ["CHANGELOG", "COPYING", "LICENSE", "README", "TODO", "bin/unicorn", "bin/unicorn_rails", "ext/
|
15
|
-
s.files = [".document", ".gitignore", "CHANGELOG", "CONTRIBUTORS", "COPYING", "DESIGN", "GNUmakefile", "LICENSE", "Manifest", "PHILOSOPHY", "README", "Rakefile", "SIGNALS", "TODO", "TUNING", "bin/unicorn", "bin/unicorn_rails", "examples/echo.ru", "examples/git.ru", "examples/init.sh", "ext/
|
13
|
+
s.extensions = ["ext/unicorn_http/extconf.rb"]
|
14
|
+
s.extra_rdoc_files = ["CHANGELOG", "COPYING", "LICENSE", "README", "TODO", "bin/unicorn", "bin/unicorn_rails", "ext/unicorn_http/ext_help.h", "ext/unicorn_http/extconf.rb", "ext/unicorn_http/unicorn_http.c", "ext/unicorn_http/unicorn_http.h", "ext/unicorn_http/unicorn_http.rl", "ext/unicorn_http/unicorn_http_common.rl", "lib/unicorn.rb", "lib/unicorn/app/exec_cgi.rb", "lib/unicorn/app/inetd.rb", "lib/unicorn/app/old_rails.rb", "lib/unicorn/app/old_rails/static.rb", "lib/unicorn/cgi_wrapper.rb", "lib/unicorn/chunked_reader.rb", "lib/unicorn/configurator.rb", "lib/unicorn/const.rb", "lib/unicorn/http_request.rb", "lib/unicorn/http_response.rb", "lib/unicorn/launcher.rb", "lib/unicorn/socket_helper.rb", "lib/unicorn/tee_input.rb", "lib/unicorn/trailer_parser.rb", "lib/unicorn/util.rb"]
|
15
|
+
s.files = [".document", ".gitignore", "CHANGELOG", "CONTRIBUTORS", "COPYING", "DESIGN", "GNUmakefile", "LICENSE", "Manifest", "PHILOSOPHY", "README", "Rakefile", "SIGNALS", "TODO", "TUNING", "bin/unicorn", "bin/unicorn_rails", "examples/echo.ru", "examples/git.ru", "examples/init.sh", "ext/unicorn_http/ext_help.h", "ext/unicorn_http/extconf.rb", "ext/unicorn_http/unicorn_http.c", "ext/unicorn_http/unicorn_http.h", "ext/unicorn_http/unicorn_http.rl", "ext/unicorn_http/unicorn_http_common.rl", "lib/unicorn.rb", "lib/unicorn/app/exec_cgi.rb", "lib/unicorn/app/inetd.rb", "lib/unicorn/app/old_rails.rb", "lib/unicorn/app/old_rails/static.rb", "lib/unicorn/cgi_wrapper.rb", "lib/unicorn/chunked_reader.rb", "lib/unicorn/configurator.rb", "lib/unicorn/const.rb", "lib/unicorn/http_request.rb", "lib/unicorn/http_response.rb", "lib/unicorn/launcher.rb", "lib/unicorn/socket_helper.rb", "lib/unicorn/tee_input.rb", "lib/unicorn/trailer_parser.rb", "lib/unicorn/util.rb", "local.mk.sample", "setup.rb", "test/aggregate.rb", "test/benchmark/README", "test/benchmark/big_request.rb", "test/benchmark/dd.ru", "test/benchmark/request.rb", "test/benchmark/response.rb", "test/exec/README", "test/exec/test_exec.rb", "test/rails/app-1.2.3/.gitignore", "test/rails/app-1.2.3/Rakefile", "test/rails/app-1.2.3/app/controllers/application.rb", "test/rails/app-1.2.3/app/controllers/foo_controller.rb", "test/rails/app-1.2.3/app/helpers/application_helper.rb", "test/rails/app-1.2.3/config/boot.rb", "test/rails/app-1.2.3/config/database.yml", "test/rails/app-1.2.3/config/environment.rb", "test/rails/app-1.2.3/config/environments/development.rb", "test/rails/app-1.2.3/config/environments/production.rb", "test/rails/app-1.2.3/config/routes.rb", "test/rails/app-1.2.3/db/.gitignore", "test/rails/app-1.2.3/log/.gitignore", "test/rails/app-1.2.3/public/404.html", "test/rails/app-1.2.3/public/500.html", "test/rails/app-2.0.2/.gitignore", "test/rails/app-2.0.2/Rakefile", "test/rails/app-2.0.2/app/controllers/application.rb", "test/rails/app-2.0.2/app/controllers/foo_controller.rb", "test/rails/app-2.0.2/app/helpers/application_helper.rb", "test/rails/app-2.0.2/config/boot.rb", "test/rails/app-2.0.2/config/database.yml", "test/rails/app-2.0.2/config/environment.rb", "test/rails/app-2.0.2/config/environments/development.rb", "test/rails/app-2.0.2/config/environments/production.rb", "test/rails/app-2.0.2/config/routes.rb", "test/rails/app-2.0.2/db/.gitignore", "test/rails/app-2.0.2/log/.gitignore", "test/rails/app-2.0.2/public/404.html", "test/rails/app-2.0.2/public/500.html", "test/rails/app-2.1.2/.gitignore", "test/rails/app-2.1.2/Rakefile", "test/rails/app-2.1.2/app/controllers/application.rb", "test/rails/app-2.1.2/app/controllers/foo_controller.rb", "test/rails/app-2.1.2/app/helpers/application_helper.rb", "test/rails/app-2.1.2/config/boot.rb", "test/rails/app-2.1.2/config/database.yml", "test/rails/app-2.1.2/config/environment.rb", "test/rails/app-2.1.2/config/environments/development.rb", "test/rails/app-2.1.2/config/environments/production.rb", "test/rails/app-2.1.2/config/routes.rb", "test/rails/app-2.1.2/db/.gitignore", "test/rails/app-2.1.2/log/.gitignore", "test/rails/app-2.1.2/public/404.html", "test/rails/app-2.1.2/public/500.html", "test/rails/app-2.2.2/.gitignore", "test/rails/app-2.2.2/Rakefile", "test/rails/app-2.2.2/app/controllers/application.rb", "test/rails/app-2.2.2/app/controllers/foo_controller.rb", "test/rails/app-2.2.2/app/helpers/application_helper.rb", "test/rails/app-2.2.2/config/boot.rb", "test/rails/app-2.2.2/config/database.yml", "test/rails/app-2.2.2/config/environment.rb", "test/rails/app-2.2.2/config/environments/development.rb", "test/rails/app-2.2.2/config/environments/production.rb", "test/rails/app-2.2.2/config/routes.rb", "test/rails/app-2.2.2/db/.gitignore", "test/rails/app-2.2.2/log/.gitignore", "test/rails/app-2.2.2/public/404.html", "test/rails/app-2.2.2/public/500.html", "test/rails/app-2.3.2.1/.gitignore", "test/rails/app-2.3.2.1/Rakefile", "test/rails/app-2.3.2.1/app/controllers/application_controller.rb", "test/rails/app-2.3.2.1/app/controllers/foo_controller.rb", "test/rails/app-2.3.2.1/app/helpers/application_helper.rb", "test/rails/app-2.3.2.1/config/boot.rb", "test/rails/app-2.3.2.1/config/database.yml", "test/rails/app-2.3.2.1/config/environment.rb", "test/rails/app-2.3.2.1/config/environments/development.rb", "test/rails/app-2.3.2.1/config/environments/production.rb", "test/rails/app-2.3.2.1/config/routes.rb", "test/rails/app-2.3.2.1/db/.gitignore", "test/rails/app-2.3.2.1/log/.gitignore", "test/rails/app-2.3.2.1/public/404.html", "test/rails/app-2.3.2.1/public/500.html", "test/rails/test_rails.rb", "test/test_helper.rb", "test/unit/test_chunked_reader.rb", "test/unit/test_configurator.rb", "test/unit/test_http_parser.rb", "test/unit/test_request.rb", "test/unit/test_response.rb", "test/unit/test_server.rb", "test/unit/test_signals.rb", "test/unit/test_socket_helper.rb", "test/unit/test_trailer_parser.rb", "test/unit/test_upload.rb", "test/unit/test_util.rb", "unicorn.gemspec", "test/unit/test_tee_input.rb"]
|
16
16
|
s.homepage = %q{http://unicorn.bogomips.org/}
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Unicorn", "--main", "README"]
|
18
18
|
s.require_paths = ["lib", "ext"]
|
19
19
|
s.rubyforge_project = %q{unicorn}
|
20
20
|
s.rubygems_version = %q{1.3.4}
|
21
21
|
s.summary = %q{Rack HTTP server for Unix, fast clients and nothing else}
|
22
|
-
s.test_files = ["test/unit/test_trailer_parser.rb", "test/unit/
|
22
|
+
s.test_files = ["test/unit/test_trailer_parser.rb", "test/unit/test_request.rb", "test/unit/test_http_parser.rb", "test/unit/test_chunked_reader.rb", "test/unit/test_server.rb", "test/unit/test_response.rb", "test/unit/test_configurator.rb", "test/unit/test_util.rb", "test/unit/test_upload.rb", "test/unit/test_signals.rb", "test/unit/test_tee_input.rb", "test/unit/test_socket_helper.rb"]
|
23
23
|
|
24
24
|
if s.respond_to? :specification_version then
|
25
25
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Wong
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-19 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +28,7 @@ executables:
|
|
28
28
|
- unicorn
|
29
29
|
- unicorn_rails
|
30
30
|
extensions:
|
31
|
-
- ext/
|
31
|
+
- ext/unicorn_http/extconf.rb
|
32
32
|
extra_rdoc_files:
|
33
33
|
- CHANGELOG
|
34
34
|
- COPYING
|
@@ -37,12 +37,12 @@ extra_rdoc_files:
|
|
37
37
|
- TODO
|
38
38
|
- bin/unicorn
|
39
39
|
- bin/unicorn_rails
|
40
|
-
- ext/
|
41
|
-
- ext/
|
42
|
-
- ext/
|
43
|
-
- ext/
|
44
|
-
- ext/
|
45
|
-
- ext/
|
40
|
+
- ext/unicorn_http/ext_help.h
|
41
|
+
- ext/unicorn_http/extconf.rb
|
42
|
+
- ext/unicorn_http/unicorn_http.c
|
43
|
+
- ext/unicorn_http/unicorn_http.h
|
44
|
+
- ext/unicorn_http/unicorn_http.rl
|
45
|
+
- ext/unicorn_http/unicorn_http_common.rl
|
46
46
|
- lib/unicorn.rb
|
47
47
|
- lib/unicorn/app/exec_cgi.rb
|
48
48
|
- lib/unicorn/app/inetd.rb
|
@@ -80,12 +80,12 @@ files:
|
|
80
80
|
- examples/echo.ru
|
81
81
|
- examples/git.ru
|
82
82
|
- examples/init.sh
|
83
|
-
- ext/
|
84
|
-
- ext/
|
85
|
-
- ext/
|
86
|
-
- ext/
|
87
|
-
- ext/
|
88
|
-
- ext/
|
83
|
+
- ext/unicorn_http/ext_help.h
|
84
|
+
- ext/unicorn_http/extconf.rb
|
85
|
+
- ext/unicorn_http/unicorn_http.c
|
86
|
+
- ext/unicorn_http/unicorn_http.h
|
87
|
+
- ext/unicorn_http/unicorn_http.rl
|
88
|
+
- ext/unicorn_http/unicorn_http_common.rl
|
89
89
|
- lib/unicorn.rb
|
90
90
|
- lib/unicorn/app/exec_cgi.rb
|
91
91
|
- lib/unicorn/app/inetd.rb
|
@@ -237,13 +237,14 @@ specification_version: 3
|
|
237
237
|
summary: Rack HTTP server for Unix, fast clients and nothing else
|
238
238
|
test_files:
|
239
239
|
- test/unit/test_trailer_parser.rb
|
240
|
-
- test/unit/
|
240
|
+
- test/unit/test_request.rb
|
241
|
+
- test/unit/test_http_parser.rb
|
241
242
|
- test/unit/test_chunked_reader.rb
|
243
|
+
- test/unit/test_server.rb
|
242
244
|
- test/unit/test_response.rb
|
243
|
-
- test/unit/
|
244
|
-
- test/unit/
|
245
|
+
- test/unit/test_configurator.rb
|
246
|
+
- test/unit/test_util.rb
|
245
247
|
- test/unit/test_upload.rb
|
246
|
-
- test/unit/
|
248
|
+
- test/unit/test_signals.rb
|
249
|
+
- test/unit/test_tee_input.rb
|
247
250
|
- test/unit/test_socket_helper.rb
|
248
|
-
- test/unit/test_util.rb
|
249
|
-
- test/unit/test_server.rb
|