eventmachine 1.0.0.beta.2-x86-mswin32-60 → 1.0.0.beta.3-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/.yardopts +3 -0
  2. data/Gemfile +1 -0
  3. data/eventmachine.gemspec +1 -3
  4. data/ext/cmain.cpp +4 -4
  5. data/ext/ed.cpp +13 -16
  6. data/ext/ed.h +9 -10
  7. data/ext/em.cpp +14 -24
  8. data/ext/eventmachine.h +2 -2
  9. data/ext/extconf.rb +1 -1
  10. data/ext/rubymain.cpp +8 -6
  11. data/lib/em/connection.rb +3 -1
  12. data/lib/em/pure_ruby.rb +17 -17
  13. data/lib/em/resolver.rb +186 -0
  14. data/lib/em/spawnable.rb +3 -7
  15. data/lib/em/version.rb +1 -1
  16. data/lib/eventmachine.rb +6 -4
  17. data/lib/jeventmachine.rb +1 -1
  18. data/tasks/package.rake +4 -1
  19. data/tasks/test.rake +1 -0
  20. data/tests/em_test_helper.rb +55 -0
  21. data/tests/test_attach.rb +46 -56
  22. data/tests/test_basic.rb +74 -96
  23. data/tests/test_channel.rb +2 -4
  24. data/tests/test_connection_count.rb +1 -3
  25. data/tests/test_defer.rb +13 -44
  26. data/tests/test_deferrable.rb +19 -19
  27. data/tests/test_epoll.rb +25 -55
  28. data/tests/test_error_handler.rb +10 -7
  29. data/tests/test_exc.rb +6 -33
  30. data/tests/test_file_watch.rb +51 -35
  31. data/tests/test_futures.rb +9 -37
  32. data/tests/test_get_sock_opt.rb +27 -20
  33. data/tests/test_handler_check.rb +1 -3
  34. data/tests/test_hc.rb +24 -59
  35. data/tests/test_httpclient.rb +27 -64
  36. data/tests/test_httpclient2.rb +1 -29
  37. data/tests/test_inactivity_timeout.rb +44 -40
  38. data/tests/test_kb.rb +26 -52
  39. data/tests/test_ltp.rb +23 -67
  40. data/tests/test_ltp2.rb +1 -30
  41. data/tests/test_next_tick.rb +1 -30
  42. data/tests/test_object_protocol.rb +8 -9
  43. data/tests/test_pause.rb +45 -37
  44. data/tests/test_pending_connect_timeout.rb +42 -38
  45. data/tests/test_process_watch.rb +1 -3
  46. data/tests/test_processes.rb +92 -110
  47. data/tests/test_proxy_connection.rb +128 -104
  48. data/tests/test_pure.rb +29 -75
  49. data/tests/test_queue.rb +2 -4
  50. data/tests/test_resolver.rb +55 -0
  51. data/tests/test_running.rb +1 -29
  52. data/tests/test_sasl.rb +7 -32
  53. data/tests/test_send_file.rb +162 -196
  54. data/tests/test_servers.rb +13 -56
  55. data/tests/test_smtpclient.rb +1 -29
  56. data/tests/test_smtpserver.rb +1 -29
  57. data/tests/test_spawn.rb +2 -31
  58. data/tests/test_ssl_args.rb +9 -10
  59. data/tests/test_ssl_methods.rb +1 -3
  60. data/tests/test_ssl_verify.rb +63 -63
  61. data/tests/test_tick_loop.rb +1 -1
  62. data/tests/test_timers.rb +52 -89
  63. data/tests/test_ud.rb +1 -29
  64. metadata +20 -10
  65. data/setup.rb +0 -1585
  66. data/tests/test_errors.rb +0 -82
  67. data/tests/testem.rb +0 -31
data/tests/test_errors.rb DELETED
@@ -1,82 +0,0 @@
1
- # $Id$
2
- #
3
- # Author:: Francis Cianfrocca (gmail: blackhedd)
4
- # Homepage:: http://rubyeventmachine.com
5
- # Date:: 8 April 2006
6
- #
7
- # See EventMachine and EventMachine::Connection for documentation and
8
- # usage examples.
9
- #
10
- #----------------------------------------------------------------------------
11
- #
12
- # Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
13
- # Gmail: blackhedd
14
- #
15
- # This program is free software; you can redistribute it and/or modify
16
- # it under the terms of either: 1) the GNU General Public License
17
- # as published by the Free Software Foundation; either version 2 of the
18
- # License, or (at your option) any later version; or 2) Ruby's License.
19
- #
20
- # See the file COPYING for complete licensing information.
21
- #
22
- #---------------------------------------------------------------------------
23
- #
24
- #
25
- #
26
-
27
-
28
- ###### THIS TEST IS NOW OBSOLETE.
29
- ###### As of 27Dec07, the hookable error handling is obsolete because
30
- ###### of its performance impact.
31
-
32
-
33
- $:.unshift "../lib"
34
- require 'eventmachine'
35
- require 'test/unit'
36
-
37
- class TestErrors < Test::Unit::TestCase
38
-
39
- Localhost = "127.0.0.1"
40
- Localport = 9801
41
-
42
- def setup
43
- end
44
-
45
- def obsolete_teardown
46
- # Calling #set_runtime_error_hook with no block restores the
47
- # default handling of runtime_errors.
48
- #
49
- EM.set_runtime_error_hook
50
- end
51
-
52
- def test_no_tests_stub
53
- end
54
-
55
- # EM has a default handler for RuntimeErrors that are emitted from
56
- # user written code. You can override the handler if you wish, but it's
57
- # easier to call #set_runtime_error_hook.
58
- # Ordinarily, an error in user code invoked by the reactor aborts the
59
- # run.
60
- #
61
- def obsolete_test_unhandled_error
62
- assert_raises( RuntimeError ) {
63
- EM.run {
64
- EM.add_timer(0) {raise "AAA"}
65
- }
66
- }
67
-
68
- end
69
-
70
- def obsolete_test_handled_error
71
- err = nil
72
- EM.run {
73
- EM.set_runtime_error_hook {
74
- err = true
75
- EM.stop
76
- }
77
- EM.add_timer(0) {raise "AAA"}
78
- }
79
- assert err
80
- end
81
- end
82
-
data/tests/testem.rb DELETED
@@ -1,31 +0,0 @@
1
- # $Id$
2
-
3
- require 'test/unit'
4
-
5
- module EmTestRunner
6
- @em_root = File.expand_path(File.dirname(__FILE__) + '/../')
7
- @lib_dir = File.join(@em_root, 'lib')
8
- @ext_dir = File.join(@em_root, 'ext')
9
- @java_dir = File.join(@em_root, 'java')
10
-
11
- def self.run(glob = 'test_*.rb')
12
- $:.unshift(@lib_dir)
13
- $:.unshift(@ext_dir)
14
- $:.unshift(@java_dir)
15
-
16
- case glob
17
- when Array
18
- files = glob
19
- else
20
- files = Dir[File.dirname(__FILE__) + '/' + glob]
21
- end
22
-
23
- files.each do |tc|
24
- require tc
25
- end
26
- end
27
- end
28
-
29
- if __FILE__ == $0
30
- EmTestRunner.run
31
- end