eventmachine-win32 0.7.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,36 +1,27 @@
1
- # $Id: test_ltp.rb 278 2006-11-16 15:54:52Z blackhedd $
2
- #
3
- # Author:: blackhedd (gmail address: garbagecat10).
4
- # Date:: 8 Apr 2006
5
- #
6
- # Copyright (C) 2006 by Francis Cianfrocca. All Rights Reserved.
7
- #
8
- # This program is made available under the terms of the GPL version 2.
1
+ # $Id: test_ltp.rb 323 2007-05-22 22:22:43Z blackhedd $
9
2
  #
3
+ # Author:: Francis Cianfrocca (gmail: blackhedd)
4
+ # Homepage:: http://rubyeventmachine.com
5
+ # Date:: 8 April 2006
6
+ #
10
7
  # See EventMachine and EventMachine::Connection for documentation and
11
8
  # usage examples.
12
9
  #
13
10
  #----------------------------------------------------------------------------
14
11
  #
15
- # Copyright (C) 2006 by Francis Cianfrocca. All Rights Reserved.
16
- #
17
- # Gmail: garbagecat10
18
- #
12
+ # Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
13
+ # Gmail: blackhedd
14
+ #
19
15
  # This program is free software; you can redistribute it and/or modify
20
- # it under the terms of the GNU General Public License as published by
21
- # the Free Software Foundation; either version 2 of the License, or
22
- # (at your option) any later version.
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.
23
21
  #
24
- # This program is distributed in the hope that it will be useful,
25
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- # GNU General Public License for more details.
22
+ #---------------------------------------------------------------------------
28
23
  #
29
- # You should have received a copy of the GNU General Public License
30
- # along with this program; if not, write to the Free Software
31
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32
24
  #
33
- #---------------------------------------------------------------------------
34
25
  #
35
26
  #
36
27
 
@@ -0,0 +1,109 @@
1
+ # $Id: test_timers.rb 323 2007-05-22 22:22:43Z blackhedd $
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
+ $:.unshift "../lib"
29
+ require 'eventmachine'
30
+
31
+
32
+
33
+ class TestTimers < Test::Unit::TestCase
34
+
35
+ def setup
36
+ end
37
+
38
+ def teardown
39
+ end
40
+
41
+ def test_timer_with_block
42
+ x = false
43
+ EventMachine.run {
44
+ EventMachine::Timer.new(0.25) {
45
+ x = true
46
+ EventMachine.stop
47
+ }
48
+ }
49
+ assert x
50
+ end
51
+
52
+ def test_timer_with_proc
53
+ x = false
54
+ EventMachine.run {
55
+ EventMachine::Timer.new(0.25, proc {
56
+ x = true
57
+ EventMachine.stop
58
+ })
59
+ }
60
+ assert x
61
+ end
62
+
63
+ def test_timer_cancel
64
+ x = true
65
+ EventMachine.run {
66
+ timer = EventMachine::Timer.new(0.25, proc { x = false })
67
+ timer.cancel
68
+ EventMachine::Timer.new(0.5, proc {EventMachine.stop})
69
+ }
70
+ assert x
71
+ end
72
+
73
+ def test_periodic_timer
74
+ x = 0
75
+ EventMachine.run {
76
+ EventMachine::PeriodicTimer.new(0.1, proc {
77
+ x += 1
78
+ EventMachine.stop if x == 4
79
+ })
80
+ }
81
+ assert( x == 4 )
82
+ end
83
+
84
+ def test_periodic_timer_cancel
85
+ x = 0
86
+ EventMachine.run {
87
+ pt = EventMachine::PeriodicTimer.new(5, proc { x += 1 })
88
+ pt.cancel
89
+ EventMachine::Timer.new(0.5) {EventMachine.stop}
90
+ }
91
+ assert( x == 0 )
92
+ end
93
+
94
+ def test_periodic_timer_self_cancel
95
+ x = 0
96
+ EventMachine.run {
97
+ pt = EventMachine::PeriodicTimer.new(0.1) {
98
+ x += 1
99
+ if x == 4
100
+ pt.cancel
101
+ EventMachine.stop
102
+ end
103
+ }
104
+ }
105
+ assert( x == 4 )
106
+ end
107
+
108
+ end
109
+
@@ -1,38 +1,28 @@
1
- # $Id: test_ud.rb 269 2006-10-25 23:31:15Z blackhedd $
2
- #
3
- # Author:: blackhedd (gmail address: garbagecat10).
4
- # Date:: 8 Apr 2006
5
- #
6
- # Copyright (C) 2006 by Francis Cianfrocca. All Rights Reserved.
7
- #
8
- # This program is made available under the terms of the GPL version 2.
1
+ # $Id: test_ud.rb 323 2007-05-22 22:22:43Z blackhedd $
9
2
  #
3
+ # Author:: Francis Cianfrocca (gmail: blackhedd)
4
+ # Homepage:: http://rubyeventmachine.com
5
+ # Date:: 8 April 2006
6
+ #
10
7
  # See EventMachine and EventMachine::Connection for documentation and
11
8
  # usage examples.
12
9
  #
13
10
  #----------------------------------------------------------------------------
14
11
  #
15
- # Copyright (C) 2006 by Francis Cianfrocca. All Rights Reserved.
16
- #
17
- # Gmail: garbagecat10
18
- #
12
+ # Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
13
+ # Gmail: blackhedd
14
+ #
19
15
  # This program is free software; you can redistribute it and/or modify
20
- # it under the terms of the GNU General Public License as published by
21
- # the Free Software Foundation; either version 2 of the License, or
22
- # (at your option) any later version.
23
- #
24
- # This program is distributed in the hope that it will be useful,
25
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- # GNU General Public License for more details.
28
- #
29
- # You should have received a copy of the GNU General Public License
30
- # along with this program; if not, write to the Free Software
31
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
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.
32
21
  #
33
22
  #---------------------------------------------------------------------------
34
23
  #
35
24
  #
25
+ #
36
26
 
37
27
  $:.unshift "../lib"
38
28
  require 'eventmachine'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: eventmachine-win32
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.0
7
- date: 2006-11-22 00:00:00 -05:00
6
+ version: 0.7.2
7
+ date: 2007-05-22 00:00:00 -04:00
8
8
  summary: Ruby/EventMachine socket engine library- binary gem for Win32
9
9
  require_paths:
10
10
  - lib
@@ -29,35 +29,42 @@ post_install_message:
29
29
  authors:
30
30
  - Francis Cianfrocca
31
31
  files:
32
- - tests/testem.rb
32
+ - tests/test_httpclient.rb
33
33
  - tests/test_basic.rb
34
+ - tests/testem.rb
34
35
  - tests/test_eventables.rb
35
- - tests/test_hc.rb
36
- - tests/test_httpclient.rb
37
- - tests/test_ltp.rb
38
36
  - tests/test_ud.rb
37
+ - tests/test_ltp.rb
38
+ - tests/test_hc.rb
39
+ - tests/test_futures.rb
40
+ - tests/test_exc.rb
41
+ - tests/test_timers.rb
39
42
  - lib/em
40
- - lib/eventmachine.rb
41
- - lib/eventmachine_version.rb
42
- - lib/evma
43
- - lib/evma.rb
44
43
  - lib/protocols
44
+ - lib/evma
45
+ - lib/eventmachine.rb
45
46
  - lib/pr_eventmachine.rb
47
+ - lib/evma.rb
48
+ - lib/eventmachine_version.rb
46
49
  - lib/rubyeventmachine.so
47
- - lib/em/deferrable.rb
48
50
  - lib/em/eventable.rb
49
- - lib/evma/callback.rb
50
- - lib/evma/container.rb
51
- - lib/evma/factory.rb
52
- - lib/evma/protocol.rb
53
- - lib/evma/reactor.rb
54
- - lib/protocols/header_and_content.rb
51
+ - lib/em/deferrable.rb
52
+ - lib/em/future.rb
55
53
  - lib/protocols/httpclient.rb
56
- - lib/protocols/line_and_text.rb
57
54
  - lib/protocols/tcptest.rb
55
+ - lib/protocols/line_and_text.rb
56
+ - lib/protocols/header_and_content.rb
57
+ - lib/protocols/buftok.rb
58
+ - lib/evma/reactor.rb
59
+ - lib/evma/protocol.rb
60
+ - lib/evma/container.rb
61
+ - lib/evma/factory.rb
62
+ - lib/evma/callback.rb
58
63
  - README
59
64
  - RELEASE_NOTES
60
65
  - COPYING
66
+ - GNU
67
+ - LEGAL
61
68
  - TODO
62
69
  test_files:
63
70
  - tests/testem.rb
@@ -71,6 +78,8 @@ extra_rdoc_files:
71
78
  - README
72
79
  - RELEASE_NOTES
73
80
  - COPYING
81
+ - GNU
82
+ - LEGAL
74
83
  - TODO
75
84
  executables: []
76
85