eventmachine 0.12.8-x86-mswin32-60 → 0.12.10-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/.gitignore +14 -13
  2. data/Rakefile +374 -264
  3. data/eventmachine.gemspec +4 -5
  4. data/ext/binder.cpp +125 -126
  5. data/ext/binder.h +46 -48
  6. data/ext/cmain.cpp +184 -42
  7. data/ext/cplusplus.cpp +202 -202
  8. data/ext/ed.cpp +242 -81
  9. data/ext/ed.h +39 -22
  10. data/ext/em.cpp +127 -108
  11. data/ext/em.h +27 -18
  12. data/ext/emwin.cpp +3 -3
  13. data/ext/eventmachine.h +49 -38
  14. data/ext/eventmachine_cpp.h +96 -96
  15. data/ext/extconf.rb +147 -132
  16. data/ext/fastfilereader/extconf.rb +82 -76
  17. data/ext/project.h +151 -140
  18. data/ext/rubymain.cpp +222 -103
  19. data/ext/ssl.cpp +460 -460
  20. data/ext/ssl.h +94 -94
  21. data/java/src/com/rubyeventmachine/EmReactor.java +570 -423
  22. data/java/src/com/rubyeventmachine/EventableChannel.java +69 -57
  23. data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +189 -171
  24. data/java/src/com/rubyeventmachine/EventableSocketChannel.java +364 -244
  25. data/java/src/com/rubyeventmachine/{Application.java → application/Application.java} +194 -200
  26. data/java/src/com/rubyeventmachine/{Connection.java → application/Connection.java} +74 -74
  27. data/java/src/com/rubyeventmachine/{ConnectionFactory.java → application/ConnectionFactory.java} +36 -36
  28. data/java/src/com/rubyeventmachine/{DefaultConnectionFactory.java → application/DefaultConnectionFactory.java} +46 -46
  29. data/java/src/com/rubyeventmachine/{PeriodicTimer.java → application/PeriodicTimer.java} +38 -38
  30. data/java/src/com/rubyeventmachine/{Timer.java → application/Timer.java} +54 -54
  31. data/java/src/com/rubyeventmachine/tests/ApplicationTest.java +109 -108
  32. data/java/src/com/rubyeventmachine/tests/ConnectTest.java +148 -146
  33. data/java/src/com/rubyeventmachine/tests/TestDatagrams.java +53 -53
  34. data/java/src/com/rubyeventmachine/tests/TestServers.java +75 -74
  35. data/java/src/com/rubyeventmachine/tests/TestTimers.java +90 -89
  36. data/lib/em/connection.rb +71 -12
  37. data/lib/em/deferrable.rb +191 -186
  38. data/lib/em/protocols.rb +36 -35
  39. data/lib/em/protocols/httpclient2.rb +590 -582
  40. data/lib/em/protocols/line_and_text.rb +125 -126
  41. data/lib/em/protocols/linetext2.rb +161 -160
  42. data/lib/em/protocols/object_protocol.rb +45 -39
  43. data/lib/em/protocols/smtpclient.rb +357 -331
  44. data/lib/em/protocols/socks4.rb +66 -0
  45. data/lib/em/queue.rb +60 -60
  46. data/lib/em/timers.rb +56 -55
  47. data/lib/em/version.rb +1 -1
  48. data/lib/eventmachine.rb +125 -169
  49. data/lib/jeventmachine.rb +257 -142
  50. data/tasks/{cpp.rake → cpp.rake_example} +76 -76
  51. data/tests/test_attach.rb +125 -100
  52. data/tests/test_basic.rb +1 -2
  53. data/tests/test_connection_count.rb +34 -44
  54. data/tests/test_epoll.rb +0 -2
  55. data/tests/test_get_sock_opt.rb +30 -0
  56. data/tests/test_httpclient2.rb +3 -3
  57. data/tests/test_inactivity_timeout.rb +21 -1
  58. data/tests/test_ltp.rb +182 -188
  59. data/tests/test_next_tick.rb +0 -2
  60. data/tests/test_pause.rb +70 -0
  61. data/tests/test_pending_connect_timeout.rb +48 -0
  62. data/tests/test_ssl_args.rb +78 -67
  63. data/tests/test_timers.rb +162 -141
  64. metadata +13 -11
  65. data/tasks/project.rake +0 -79
  66. data/tasks/tests.rake +0 -193
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventmachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.8
4
+ version: 0.12.10
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Francis Cianfrocca
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-23 00:00:00 +01:00
12
+ date: 2009-10-25 01:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -76,17 +76,17 @@ files:
76
76
  - ext/ssl.h
77
77
  - java/.classpath
78
78
  - java/.project
79
- - java/src/com/rubyeventmachine/Application.java
80
- - java/src/com/rubyeventmachine/Connection.java
81
- - java/src/com/rubyeventmachine/ConnectionFactory.java
82
- - java/src/com/rubyeventmachine/DefaultConnectionFactory.java
83
79
  - java/src/com/rubyeventmachine/EmReactor.java
84
80
  - java/src/com/rubyeventmachine/EmReactorException.java
85
81
  - java/src/com/rubyeventmachine/EventableChannel.java
86
82
  - java/src/com/rubyeventmachine/EventableDatagramChannel.java
87
83
  - java/src/com/rubyeventmachine/EventableSocketChannel.java
88
- - java/src/com/rubyeventmachine/PeriodicTimer.java
89
- - java/src/com/rubyeventmachine/Timer.java
84
+ - java/src/com/rubyeventmachine/application/Application.java
85
+ - java/src/com/rubyeventmachine/application/Connection.java
86
+ - java/src/com/rubyeventmachine/application/ConnectionFactory.java
87
+ - java/src/com/rubyeventmachine/application/DefaultConnectionFactory.java
88
+ - java/src/com/rubyeventmachine/application/PeriodicTimer.java
89
+ - java/src/com/rubyeventmachine/application/Timer.java
90
90
  - java/src/com/rubyeventmachine/tests/ApplicationTest.java
91
91
  - java/src/com/rubyeventmachine/tests/ConnectTest.java
92
92
  - java/src/com/rubyeventmachine/tests/EMTest.java
@@ -115,6 +115,7 @@ files:
115
115
  - lib/em/protocols/saslauth.rb
116
116
  - lib/em/protocols/smtpclient.rb
117
117
  - lib/em/protocols/smtpserver.rb
118
+ - lib/em/protocols/socks4.rb
118
119
  - lib/em/protocols/stomp.rb
119
120
  - lib/em/protocols/tcptest.rb
120
121
  - lib/em/queue.rb
@@ -132,9 +133,7 @@ files:
132
133
  - lib/jeventmachine.rb
133
134
  - lib/pr_eventmachine.rb
134
135
  - setup.rb
135
- - tasks/cpp.rake
136
- - tasks/project.rake
137
- - tasks/tests.rake
136
+ - tasks/cpp.rake_example
138
137
  - tests/client.crt
139
138
  - tests/client.key
140
139
  - tests/test_attach.rb
@@ -148,6 +147,7 @@ files:
148
147
  - tests/test_exc.rb
149
148
  - tests/test_file_watch.rb
150
149
  - tests/test_futures.rb
150
+ - tests/test_get_sock_opt.rb
151
151
  - tests/test_handler_check.rb
152
152
  - tests/test_hc.rb
153
153
  - tests/test_httpclient.rb
@@ -158,6 +158,8 @@ files:
158
158
  - tests/test_ltp2.rb
159
159
  - tests/test_next_tick.rb
160
160
  - tests/test_object_protocol.rb
161
+ - tests/test_pause.rb
162
+ - tests/test_pending_connect_timeout.rb
161
163
  - tests/test_process_watch.rb
162
164
  - tests/test_processes.rb
163
165
  - tests/test_proxy_connection.rb
@@ -1,79 +0,0 @@
1
- require 'rake/gempackagetask'
2
- require 'rake/rdoctask'
3
- require 'rake/clean'
4
-
5
- # monkey bitchin' for windows stuffs...
6
- module FileUtils
7
- # If any of these methods ever clobber, try removing them.
8
- # Hopefully they'll do something semantically similar.
9
- abort "Err: #{__FILE__}:#{__LINE__} monkey patch windows? clobbers!" unless instance_methods.grep(/windows\?/).empty?
10
- abort "Err: #{__FILE__}:#{__LINE__} monkey patch sudo clobbers!" unless instance_methods.grep(/sudo/).empty?
11
- abort "Err: #{__FILE__}:#{__LINE__} monkey patch gem_cmd clobbers!" unless instance_methods.grep(/gem_cmd/).empty?
12
- def windows?; RUBY_PLATFORM =~ /mswin|mingw/; end
13
- def sudo(cmd)
14
- if windows? || (require 'etc'; Etc.getpwuid.uid == 0)
15
- sh cmd
16
- else
17
- sh "sudo #{cmd}"
18
- end
19
- end
20
- def gem_cmd(action, name, *args)
21
- rb = Gem.ruby rescue nil
22
- rb ||= (require 'rbconfig'; File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']))
23
- sudo "#{rb} -r rubygems -e 'require %{rubygems/gem_runner}; Gem::GemRunner.new.run(%w{#{action} #{name} #{args.join(' ')}})'"
24
- end
25
- end
26
-
27
-
28
- # Setup our packaging tasks, we're just jacking the builtins.
29
- Rake::GemPackageTask.new(Spec) do |pkg|
30
- pkg.need_tar, pkg.need_tar_gz, pkg.need_zip = true, true, true if Package
31
- pkg.gem_spec = Spec
32
- end
33
- Rake::Task[:clean].enhance [:clobber_package]
34
-
35
- # Only generate rdoc if the spec says so, again, jack the builtins.
36
- if Spec.has_rdoc
37
- Rake::RDocTask.new do |rd|
38
- rd.title = Spec.name
39
- rd.rdoc_dir = 'rdoc'
40
- rd.main = "README"
41
- rd.rdoc_files.include("lib/**/*.rb", *Spec.extra_rdoc_files)
42
- rd.rdoc_files.exclude(*%w(lib/em/version lib/emva lib/evma/ lib/pr_eventmachine lib/jeventmachine))
43
- end
44
- Rake::Task[:clean].enhance [:clobber_rdoc]
45
-
46
- desc 'Generate and open documentation'
47
- task :docs => :rdoc do
48
- case RUBY_PLATFORM
49
- when /darwin/ ; sh 'open rdoc/index.html'
50
- when /mswin|mingw/ ; sh 'start rdoc\index.html'
51
- else
52
- sh 'firefox rdoc/index.html'
53
- end
54
- end
55
- end
56
-
57
- if Spec.default_executable
58
- desc "Run #{Spec.default_executable}"
59
- task :run do ruby File.join(Spec.bindir, Spec.default_executable) end
60
- end
61
-
62
- require 'rubygems'
63
-
64
- desc 'Install gem (and sudo if required)'
65
- task :install => :package do
66
- gem_cmd(:install, "pkg/#{Spec.name}-#{Spec.version}.gem")
67
- end
68
-
69
- desc 'Uninstall gem (and sudo if required)'
70
- task :uninstall do
71
- gem_cmd(:uninstall, "#{Spec.name}", "-v=#{Spec.version}")
72
- end
73
-
74
- # Find an scm's store directory, if we do, make a task to commit to it only
75
- # after running all the tests (successfully).
76
- if scm = %w(git svn bzr hg).find { |d| File.directory? ".#{d}" }
77
- desc "Run tests then commit to #{scm}"
78
- task :commit => :test do sh "#{scm} commit" end
79
- end
@@ -1,193 +0,0 @@
1
- # This is used by several rake tasks, that parameterize the
2
- # behavior so we can use the same tests to test both the
3
- # extension and non-extension versions.
4
- def run_tests t, libr = :cascade, test_files="test_*.rb"
5
- require 'test/unit/testsuite'
6
- require 'test/unit/ui/console/testrunner'
7
- require 'tests/testem'
8
-
9
- base_dir = File.expand_path(File.dirname(__FILE__) + '/../') + '/'
10
-
11
- runner = Test::Unit::UI::Console::TestRunner
12
-
13
- $eventmachine_library = libr
14
- EmTestRunner.run(test_files)
15
-
16
- suite = Test::Unit::TestSuite.new($name)
17
-
18
- ObjectSpace.each_object(Class) do |testcase|
19
- suite << testcase.suite if testcase < Test::Unit::TestCase
20
- end
21
-
22
- runner.run(suite)
23
- end
24
-
25
- desc "Run tests for #{Spec.name}."
26
- task :test do |t|
27
- # run_tests t
28
- # Rake +/ friends leave threads, etc, less stable test runs.
29
- ruby "-Ilib -Iext -Iext/fastfilereader -Ijava tests/testem.rb #{'-v' if ENV['VERBOSE']}"
30
- end
31
-
32
- namespace :test do
33
- desc "Run tests for #{Spec.name}."
34
- task :partial do |t|
35
- lib = RUBY_PLATFORM =~ /java/ ? :java : :extension
36
- run_tests t, lib, [
37
- "test_basic.rb",
38
- "test_epoll.rb",
39
- "test_errors.rb",
40
- "test_error_handler.rb",
41
- "test_eventables.rb",
42
- "test_exc.rb",
43
- "test_futures.rb",
44
- "test_hc.rb",
45
- "test_httpclient2.rb",
46
- "test_httpclient.rb",
47
- "test_kb.rb",
48
- "test_ltp2.rb",
49
- "test_ltp.rb",
50
- "test_next_tick.rb",
51
- "test_processes.rb",
52
- "test_pure.rb",
53
- "test_running.rb",
54
- "test_sasl.rb",
55
- "test_send_file.rb",
56
- "test_servers.rb",
57
- "test_smtpclient.rb",
58
- "test_smtpserver.rb",
59
- "test_spawn.rb",
60
- "test_timers.rb",
61
- "test_ud.rb",
62
- ].map { |tf| "tests/#{tf}" }
63
- end
64
-
65
- desc "Run java tests for #$name."
66
- task :testjava do |t|
67
- run_tests t, :java
68
- end
69
-
70
- desc "Run pure-ruby tests for #$name."
71
- task :testpr do |t|
72
- run_tests t, :pure_ruby
73
- end
74
-
75
- desc "Run extension tests for #$name."
76
- task :testext do |t|
77
- run_tests t, :extension
78
- end
79
-
80
- desc "PROVISIONAL: run tests for user-defined events"
81
- task :ud do |t|
82
- run_tests t, :extension, "test_ud.rb"
83
- end
84
-
85
- desc "PROVISIONAL: run tests for line/text protocol handler"
86
- task :ltp do |t|
87
- run_tests t, :extension, "test_ltp*.rb"
88
- end
89
-
90
- desc "PROVISIONAL: run tests for header/content protocol handler"
91
- task :hc do |t|
92
- run_tests t, :extension, "test_hc.rb"
93
- end
94
-
95
- desc "PROVISIONAL: run tests for exceptions"
96
- task :exc do |t|
97
- run_tests t, :extension, "test_exc.rb"
98
- end
99
-
100
- desc "Test protocol handlers"
101
- task :protocols => [ :hc, :ltp ]
102
-
103
-
104
- desc "Test HTTP client"
105
- task :httpclient do |t|
106
- run_tests t, :extension, "test_httpclient.rb"
107
- end
108
-
109
- desc "Test HTTP client2"
110
- task :httpclient2 do |t|
111
- run_tests t, :extension, "test_httpclient2.rb"
112
- end
113
-
114
- desc "Test futures"
115
- task :futures do |t|
116
- run_tests t, :extension, "test_future*.rb"
117
- end
118
-
119
- desc "Test Timers"
120
- task :timers do |t|
121
- run_tests t, :extension, "test_timer*.rb"
122
- end
123
-
124
- desc "Test Next Tick"
125
- task :next_tick do |t|
126
- run_tests t, :extension, "test_next_tick*.rb"
127
- end
128
-
129
- desc "Test Epoll"
130
- task :epoll do |t|
131
- run_tests t, :extension, "test_epoll*.rb"
132
- end
133
-
134
- desc "Test Servers"
135
- task :servers do |t|
136
- run_tests t, :extension, "test_servers*.rb"
137
- end
138
-
139
- desc "Test Basic"
140
- task :basic do |t|
141
- run_tests t, :extension, "test_basic*.rb"
142
- end
143
-
144
- desc "Test Send File"
145
- task :send_file do |t|
146
- run_tests t, :extension, "test_send_file*.rb"
147
- end
148
-
149
- desc "Test Running"
150
- task :running do |t|
151
- run_tests t, :extension, "test_running*.rb"
152
- end
153
-
154
- desc "Test Keyboard Events"
155
- task :keyboard do |t|
156
- run_tests t, :extension, "test_kb*.rb"
157
- end
158
-
159
- desc "Test Spawn"
160
- task :spawn do |t|
161
- run_tests t, :extension, "test_spawn*.rb"
162
- end
163
-
164
- desc "Test SMTP"
165
- task :smtp do |t|
166
- run_tests t, :extension, "test_smtp*.rb"
167
- end
168
-
169
- desc "Test Errors"
170
- task :errors do |t|
171
- run_tests t, :extension, "test_errors*.rb"
172
- end
173
-
174
- desc "Test Pure Ruby"
175
- task :pure do |t|
176
- run_tests t, :extension, "test_pure*.rb"
177
- end
178
-
179
- desc "Test Processes"
180
- task :processes do |t|
181
- run_tests t, :extension, "test_process*.rb"
182
- end
183
-
184
- desc "Test SASL"
185
- task :sasl do |t|
186
- run_tests t, :java, "test_sasl*.rb"
187
- end
188
-
189
- desc "Test Attach"
190
- task :attach do |t|
191
- run_tests t, :extension, "test_attach*.rb"
192
- end
193
- end