rainbows 0.97.0 → 1.0.0pre1

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.
Files changed (55) hide show
  1. data/.manifest +14 -2
  2. data/ChangeLog +87 -118
  3. data/GIT-VERSION-FILE +1 -1
  4. data/GIT-VERSION-GEN +1 -1
  5. data/GNUmakefile +1 -1
  6. data/README +1 -1
  7. data/bin/rainbows +15 -20
  8. data/lib/rainbows/actor_spawn.rb +20 -22
  9. data/lib/rainbows/app_pool.rb +89 -93
  10. data/lib/rainbows/base.rb +4 -61
  11. data/lib/rainbows/client.rb +9 -0
  12. data/lib/rainbows/configurator.rb +37 -39
  13. data/lib/rainbows/const.rb +18 -18
  14. data/lib/rainbows/dev_fd_response.rb +2 -1
  15. data/lib/rainbows/error.rb +39 -37
  16. data/lib/rainbows/ev_core.rb +103 -109
  17. data/lib/rainbows/event_machine.rb +188 -196
  18. data/lib/rainbows/fiber/base.rb +69 -88
  19. data/lib/rainbows/fiber/io/compat.rb +13 -0
  20. data/lib/rainbows/fiber/io/methods.rb +49 -0
  21. data/lib/rainbows/fiber/io/pipe.rb +7 -0
  22. data/lib/rainbows/fiber/io/socket.rb +7 -0
  23. data/lib/rainbows/fiber/io.rb +125 -84
  24. data/lib/rainbows/fiber/rev/heartbeat.rb +8 -0
  25. data/lib/rainbows/fiber/rev/kato.rb +22 -0
  26. data/lib/rainbows/fiber/rev/methods.rb +55 -0
  27. data/lib/rainbows/fiber/rev/server.rb +32 -0
  28. data/lib/rainbows/fiber/rev/sleeper.rb +15 -0
  29. data/lib/rainbows/fiber/rev.rb +6 -164
  30. data/lib/rainbows/fiber.rb +23 -5
  31. data/lib/rainbows/fiber_pool.rb +31 -37
  32. data/lib/rainbows/fiber_spawn.rb +21 -28
  33. data/lib/rainbows/http_server.rb +80 -80
  34. data/lib/rainbows/max_body.rb +26 -28
  35. data/lib/rainbows/process_client.rb +61 -0
  36. data/lib/rainbows/queue_pool.rb +19 -22
  37. data/lib/rainbows/read_timeout.rb +28 -0
  38. data/lib/rainbows/rev/client.rb +10 -10
  39. data/lib/rainbows/rev/core.rb +2 -3
  40. data/lib/rainbows/rev/thread.rb +1 -1
  41. data/lib/rainbows/rev_fiber_spawn.rb +21 -24
  42. data/lib/rainbows/revactor.rb +18 -15
  43. data/lib/rainbows/thread_pool.rb +2 -4
  44. data/lib/rainbows/thread_spawn.rb +1 -2
  45. data/lib/rainbows/writer_thread_pool.rb +14 -4
  46. data/lib/rainbows/writer_thread_spawn.rb +14 -4
  47. data/lib/rainbows.rb +7 -15
  48. data/local.mk.sample +3 -11
  49. data/rainbows.gemspec +2 -4
  50. data/t/kgio-pipe-response.ru +10 -0
  51. data/t/t0035-kgio-pipe-response.sh +70 -0
  52. data/t/test_isolate.rb +2 -1
  53. metadata +46 -30
  54. data/lib/rainbows/acceptor.rb +0 -26
  55. data/lib/rainbows/byte_slice.rb +0 -17
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rainbows
3
3
  version: !ruby/object:Gem::Version
4
- hash: 411
5
- prerelease: false
4
+ hash: -766259895
5
+ prerelease: true
6
6
  segments:
7
+ - 1
7
8
  - 0
8
- - 97
9
- - 0
10
- version: 0.97.0
9
+ - 0pre1
10
+ version: 1.0.0pre1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rainbows! hackers
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-28 00:00:00 +00:00
18
+ date: 2010-10-26 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -39,22 +39,14 @@ dependencies:
39
39
  requirement: &id002 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 21
45
- segments:
46
- - 1
47
- - 1
48
- - 3
49
- version: 1.1.3
50
- - - <
42
+ - - ~>
51
43
  - !ruby/object:Gem::Version
52
- hash: 15
44
+ hash: -766259860
53
45
  segments:
54
46
  - 2
55
47
  - 0
56
- - 0
57
- version: 2.0.0
48
+ - 0pre3
49
+ version: 2.0.0pre3
58
50
  type: :runtime
59
51
  version_requirements: *id002
60
52
  - !ruby/object:Gem::Dependency
@@ -65,12 +57,12 @@ dependencies:
65
57
  requirements:
66
58
  - - ~>
67
59
  - !ruby/object:Gem::Version
68
- hash: 11
60
+ hash: 7
69
61
  segments:
70
- - 2
71
- - 1
62
+ - 3
63
+ - 0
72
64
  - 0
73
- version: 2.1.0
65
+ version: 3.0.0
74
66
  type: :development
75
67
  version_requirements: *id003
76
68
  description: |-
@@ -87,11 +79,10 @@ extra_rdoc_files:
87
79
  - DEPLOY
88
80
  - FAQ
89
81
  - lib/rainbows.rb
90
- - lib/rainbows/acceptor.rb
91
82
  - lib/rainbows/actor_spawn.rb
92
83
  - lib/rainbows/app_pool.rb
93
84
  - lib/rainbows/base.rb
94
- - lib/rainbows/byte_slice.rb
85
+ - lib/rainbows/client.rb
95
86
  - lib/rainbows/configurator.rb
96
87
  - lib/rainbows/const.rb
97
88
  - lib/rainbows/dev_fd_response.rb
@@ -105,8 +96,17 @@ extra_rdoc_files:
105
96
  - lib/rainbows/fiber/base.rb
106
97
  - lib/rainbows/fiber/body.rb
107
98
  - lib/rainbows/fiber/io.rb
99
+ - lib/rainbows/fiber/io/compat.rb
100
+ - lib/rainbows/fiber/io/methods.rb
101
+ - lib/rainbows/fiber/io/pipe.rb
102
+ - lib/rainbows/fiber/io/socket.rb
108
103
  - lib/rainbows/fiber/queue.rb
109
104
  - lib/rainbows/fiber/rev.rb
105
+ - lib/rainbows/fiber/rev/heartbeat.rb
106
+ - lib/rainbows/fiber/rev/kato.rb
107
+ - lib/rainbows/fiber/rev/methods.rb
108
+ - lib/rainbows/fiber/rev/server.rb
109
+ - lib/rainbows/fiber/rev/sleeper.rb
110
110
  - lib/rainbows/fiber_pool.rb
111
111
  - lib/rainbows/fiber_spawn.rb
112
112
  - lib/rainbows/http_response.rb
@@ -114,7 +114,9 @@ extra_rdoc_files:
114
114
  - lib/rainbows/max_body.rb
115
115
  - lib/rainbows/never_block.rb
116
116
  - lib/rainbows/never_block/event_machine.rb
117
+ - lib/rainbows/process_client.rb
117
118
  - lib/rainbows/queue_pool.rb
119
+ - lib/rainbows/read_timeout.rb
118
120
  - lib/rainbows/response.rb
119
121
  - lib/rainbows/response/body.rb
120
122
  - lib/rainbows/response/range.rb
@@ -180,11 +182,10 @@ files:
180
182
  - Test_Suite
181
183
  - bin/rainbows
182
184
  - lib/rainbows.rb
183
- - lib/rainbows/acceptor.rb
184
185
  - lib/rainbows/actor_spawn.rb
185
186
  - lib/rainbows/app_pool.rb
186
187
  - lib/rainbows/base.rb
187
- - lib/rainbows/byte_slice.rb
188
+ - lib/rainbows/client.rb
188
189
  - lib/rainbows/configurator.rb
189
190
  - lib/rainbows/const.rb
190
191
  - lib/rainbows/dev_fd_response.rb
@@ -198,8 +199,17 @@ files:
198
199
  - lib/rainbows/fiber/base.rb
199
200
  - lib/rainbows/fiber/body.rb
200
201
  - lib/rainbows/fiber/io.rb
202
+ - lib/rainbows/fiber/io/compat.rb
203
+ - lib/rainbows/fiber/io/methods.rb
204
+ - lib/rainbows/fiber/io/pipe.rb
205
+ - lib/rainbows/fiber/io/socket.rb
201
206
  - lib/rainbows/fiber/queue.rb
202
207
  - lib/rainbows/fiber/rev.rb
208
+ - lib/rainbows/fiber/rev/heartbeat.rb
209
+ - lib/rainbows/fiber/rev/kato.rb
210
+ - lib/rainbows/fiber/rev/methods.rb
211
+ - lib/rainbows/fiber/rev/server.rb
212
+ - lib/rainbows/fiber/rev/sleeper.rb
203
213
  - lib/rainbows/fiber_pool.rb
204
214
  - lib/rainbows/fiber_spawn.rb
205
215
  - lib/rainbows/http_response.rb
@@ -207,7 +217,9 @@ files:
207
217
  - lib/rainbows/max_body.rb
208
218
  - lib/rainbows/never_block.rb
209
219
  - lib/rainbows/never_block/event_machine.rb
220
+ - lib/rainbows/process_client.rb
210
221
  - lib/rainbows/queue_pool.rb
222
+ - lib/rainbows/read_timeout.rb
211
223
  - lib/rainbows/response.rb
212
224
  - lib/rainbows/response/body.rb
213
225
  - lib/rainbows/response/range.rb
@@ -265,6 +277,7 @@ files:
265
277
  - t/file-wrap-to_path.ru
266
278
  - t/fork-sleep.ru
267
279
  - t/heartbeat-timeout.ru
280
+ - t/kgio-pipe-response.ru
268
281
  - t/large-file-response.ru
269
282
  - t/my-tap-lib.sh
270
283
  - t/rack-fiber_pool/app.ru
@@ -317,6 +330,7 @@ files:
317
330
  - t/t0031-close-pipe-response.sh
318
331
  - t/t0032-close-pipe-to_path-response.sh
319
332
  - t/t0034-pipelined-pipe-response.sh
333
+ - t/t0035-kgio-pipe-response.sh
320
334
  - t/t0100-rack-input-hammer-chunked.sh
321
335
  - t/t0100-rack-input-hammer-content-length.sh
322
336
  - t/t0101-rack-input-trailer.sh
@@ -369,12 +383,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
369
383
  required_rubygems_version: !ruby/object:Gem::Requirement
370
384
  none: false
371
385
  requirements:
372
- - - ">="
386
+ - - ">"
373
387
  - !ruby/object:Gem::Version
374
- hash: 3
388
+ hash: 25
375
389
  segments:
376
- - 0
377
- version: "0"
390
+ - 1
391
+ - 3
392
+ - 1
393
+ version: 1.3.1
378
394
  requirements: []
379
395
 
380
396
  rubyforge_project: rainbows
@@ -1,26 +0,0 @@
1
- # -*- encoding: binary -*-
2
-
3
- # :enddoc:
4
- require 'fcntl'
5
-
6
- # this should make life easier for Zbatery if compatibility with
7
- # fcntl-crippled platforms is required (or if FD_CLOEXEC is inherited)
8
- # and we want to microptimize away fcntl(2) syscalls.
9
- module Rainbows::Acceptor
10
-
11
- # returns nil if accept fails
12
- def sync_accept(sock)
13
- rv = sock.accept
14
- rv.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
15
- rv
16
- rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EINTR
17
- end
18
-
19
- # returns nil if accept fails
20
- def accept(sock)
21
- rv = sock.accept_nonblock
22
- rv.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
23
- rv
24
- rescue Errno::EAGAIN, Errno::ECONNABORTED
25
- end
26
- end
@@ -1,17 +0,0 @@
1
- # -*- encoding: binary -*-
2
- # :enddoc:
3
- module Rainbows::ByteSlice
4
- if String.method_defined?(:encoding)
5
- def byte_slice(buf, range)
6
- if buf.encoding != Encoding::BINARY
7
- buf.dup.force_encoding(Encoding::BINARY)[range]
8
- else
9
- buf[range]
10
- end
11
- end
12
- else
13
- def byte_slice(buf, range)
14
- buf[range]
15
- end
16
- end
17
- end