eio 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +8 -0
  2. data/COPYING +502 -0
  3. data/LICENSE +16 -0
  4. data/README.rdoc +201 -0
  5. data/Rakefile +48 -0
  6. data/bench/eventmachine.rb +134 -0
  7. data/eio.gemspec +17 -0
  8. data/ext/eio/eio_ext.c +1447 -0
  9. data/ext/eio/extconf.rb +11 -0
  10. data/ext/libeio/CVS/Entries +13 -0
  11. data/ext/libeio/CVS/Repository +1 -0
  12. data/ext/libeio/CVS/Root +1 -0
  13. data/ext/libeio/Changes +40 -0
  14. data/ext/libeio/LICENSE +36 -0
  15. data/ext/libeio/Makefile +692 -0
  16. data/ext/libeio/Makefile.am +15 -0
  17. data/ext/libeio/Makefile.in +692 -0
  18. data/ext/libeio/aclocal.m4 +8937 -0
  19. data/ext/libeio/autogen.sh +3 -0
  20. data/ext/libeio/autom4te.cache/output.0 +13871 -0
  21. data/ext/libeio/autom4te.cache/output.1 +13867 -0
  22. data/ext/libeio/autom4te.cache/requests +275 -0
  23. data/ext/libeio/autom4te.cache/traces.0 +2384 -0
  24. data/ext/libeio/autom4te.cache/traces.1 +621 -0
  25. data/ext/libeio/config.guess +1501 -0
  26. data/ext/libeio/config.h +122 -0
  27. data/ext/libeio/config.h.in +121 -0
  28. data/ext/libeio/config.status +2035 -0
  29. data/ext/libeio/config.sub +1705 -0
  30. data/ext/libeio/configure +13867 -0
  31. data/ext/libeio/configure.ac +22 -0
  32. data/ext/libeio/demo.c +194 -0
  33. data/ext/libeio/eio.3 +3428 -0
  34. data/ext/libeio/eio.c +2075 -0
  35. data/ext/libeio/eio.h +336 -0
  36. data/ext/libeio/eio.pod +303 -0
  37. data/ext/libeio/install-sh +520 -0
  38. data/ext/libeio/libeio.m4 +156 -0
  39. data/ext/libeio/libtool +8890 -0
  40. data/ext/libeio/ltmain.sh +8406 -0
  41. data/ext/libeio/missing +376 -0
  42. data/ext/libeio/stamp-h1 +1 -0
  43. data/ext/libeio/xthread.h +168 -0
  44. data/lib/eio.rb +9 -0
  45. data/lib/eio/eventmachine.rb +24 -0
  46. data/lib/eio/middleware.rb +21 -0
  47. data/test/test_eio.rb +1161 -0
  48. data/test/test_eventmachine.rb +23 -0
  49. data/test/test_middleware.rb +20 -0
  50. metadata +148 -0
@@ -0,0 +1,23 @@
1
+ # encoding: utf-8
2
+
3
+ require 'test/unit'
4
+ require 'eio'
5
+
6
+ begin
7
+ require 'rubygems'
8
+ require 'eio/eventmachine'
9
+ rescue LoadError
10
+ end
11
+
12
+ class TestEventmachine < Test::Unit::TestCase
13
+ def test_eventmachine
14
+ EM.run do
15
+ EIO.eventmachine_handler
16
+ EIO.open(__FILE__) do |fd|
17
+ EIO.read(fd) do |data|
18
+ EM.stop
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end if defined?(::EM)
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+
3
+ require 'test/unit'
4
+ require 'eio'
5
+
6
+ class TestMiddleware < Test::Unit::TestCase
7
+ def test_wait
8
+ closed = false
9
+ app = Proc.new do |env|
10
+ EIO.open(__FILE__) do |fd|
11
+ EIO.close(fd){ closed = true }
12
+ end
13
+ env
14
+ end
15
+
16
+ mw = EIO::Middleware.new(app)
17
+ assert_equal [200, {}, ""], mw.call([200, {}, ""])
18
+ assert closed
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eio
3
+ version: !ruby/object:Gem::Version
4
+ hash: 9
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ version: "0.1"
10
+ platform: ruby
11
+ authors:
12
+ - "Lourens Naud\xC3\xA9"
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-07-04 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rake-compiler
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 13
29
+ segments:
30
+ - 0
31
+ - 7
32
+ - 7
33
+ version: 0.7.7
34
+ type: :development
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: eventmachine
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ hash: 41
45
+ segments:
46
+ - 0
47
+ - 12
48
+ - 3
49
+ version: 0.12.3
50
+ type: :development
51
+ version_requirements: *id002
52
+ description: eio - a libeio wrapper for Ruby
53
+ email:
54
+ - lourens@methodmissing.com
55
+ executables: []
56
+
57
+ extensions:
58
+ - ext/eio/extconf.rb
59
+ extra_rdoc_files: []
60
+
61
+ files:
62
+ - .gitignore
63
+ - COPYING
64
+ - LICENSE
65
+ - README.rdoc
66
+ - Rakefile
67
+ - bench/eventmachine.rb
68
+ - eio.gemspec
69
+ - ext/eio/eio_ext.c
70
+ - ext/eio/extconf.rb
71
+ - ext/libeio/CVS/Entries
72
+ - ext/libeio/CVS/Repository
73
+ - ext/libeio/CVS/Root
74
+ - ext/libeio/Changes
75
+ - ext/libeio/LICENSE
76
+ - ext/libeio/Makefile
77
+ - ext/libeio/Makefile.am
78
+ - ext/libeio/Makefile.in
79
+ - ext/libeio/aclocal.m4
80
+ - ext/libeio/autogen.sh
81
+ - ext/libeio/autom4te.cache/output.0
82
+ - ext/libeio/autom4te.cache/output.1
83
+ - ext/libeio/autom4te.cache/requests
84
+ - ext/libeio/autom4te.cache/traces.0
85
+ - ext/libeio/autom4te.cache/traces.1
86
+ - ext/libeio/config.guess
87
+ - ext/libeio/config.h
88
+ - ext/libeio/config.h.in
89
+ - ext/libeio/config.status
90
+ - ext/libeio/config.sub
91
+ - ext/libeio/configure
92
+ - ext/libeio/configure.ac
93
+ - ext/libeio/demo.c
94
+ - ext/libeio/eio.3
95
+ - ext/libeio/eio.c
96
+ - ext/libeio/eio.h
97
+ - ext/libeio/eio.pod
98
+ - ext/libeio/install-sh
99
+ - ext/libeio/libeio.m4
100
+ - ext/libeio/libtool
101
+ - ext/libeio/ltmain.sh
102
+ - ext/libeio/missing
103
+ - ext/libeio/stamp-h1
104
+ - ext/libeio/xthread.h
105
+ - lib/eio.rb
106
+ - lib/eio/eventmachine.rb
107
+ - lib/eio/middleware.rb
108
+ - test/test_eio.rb
109
+ - test/test_eventmachine.rb
110
+ - test/test_middleware.rb
111
+ has_rdoc: true
112
+ homepage: http://github.com/methodmissing/eio
113
+ licenses: []
114
+
115
+ post_install_message:
116
+ rdoc_options: []
117
+
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ hash: 3
126
+ segments:
127
+ - 0
128
+ version: "0"
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ hash: 3
135
+ segments:
136
+ - 0
137
+ version: "0"
138
+ requirements: []
139
+
140
+ rubyforge_project:
141
+ rubygems_version: 1.6.2
142
+ signing_key:
143
+ specification_version: 3
144
+ summary: eio - a libeio wrapper for Ruby
145
+ test_files:
146
+ - test/test_eio.rb
147
+ - test/test_eventmachine.rb
148
+ - test/test_middleware.rb