sensu-em 2.4.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.travis.yml +12 -0
  4. data/.yardopts +7 -0
  5. data/CHANGELOG.md +33 -0
  6. data/GNU +281 -0
  7. data/Gemfile +2 -0
  8. data/LICENSE +60 -0
  9. data/README.md +109 -0
  10. data/Rakefile +20 -0
  11. data/docs/DocumentationGuidesIndex.md +27 -0
  12. data/docs/GettingStarted.md +521 -0
  13. data/docs/old/ChangeLog +211 -0
  14. data/docs/old/DEFERRABLES +246 -0
  15. data/docs/old/EPOLL +141 -0
  16. data/docs/old/INSTALL +13 -0
  17. data/docs/old/KEYBOARD +42 -0
  18. data/docs/old/LEGAL +25 -0
  19. data/docs/old/LIGHTWEIGHT_CONCURRENCY +130 -0
  20. data/docs/old/PURE_RUBY +75 -0
  21. data/docs/old/RELEASE_NOTES +94 -0
  22. data/docs/old/SMTP +4 -0
  23. data/docs/old/SPAWNED_PROCESSES +148 -0
  24. data/docs/old/TODO +8 -0
  25. data/eventmachine.gemspec +37 -0
  26. data/examples/guides/getting_started/01_eventmachine_echo_server.rb +18 -0
  27. data/examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb +22 -0
  28. data/examples/guides/getting_started/03_simple_chat_server.rb +149 -0
  29. data/examples/guides/getting_started/04_simple_chat_server_step_one.rb +27 -0
  30. data/examples/guides/getting_started/05_simple_chat_server_step_two.rb +43 -0
  31. data/examples/guides/getting_started/06_simple_chat_server_step_three.rb +98 -0
  32. data/examples/guides/getting_started/07_simple_chat_server_step_four.rb +121 -0
  33. data/examples/guides/getting_started/08_simple_chat_server_step_five.rb +141 -0
  34. data/examples/old/ex_channel.rb +43 -0
  35. data/examples/old/ex_queue.rb +2 -0
  36. data/examples/old/ex_tick_loop_array.rb +15 -0
  37. data/examples/old/ex_tick_loop_counter.rb +32 -0
  38. data/examples/old/helper.rb +2 -0
  39. data/ext/binder.cpp +124 -0
  40. data/ext/binder.h +46 -0
  41. data/ext/cmain.cpp +887 -0
  42. data/ext/ed.cpp +1992 -0
  43. data/ext/ed.h +424 -0
  44. data/ext/em.cpp +2352 -0
  45. data/ext/em.h +253 -0
  46. data/ext/eventmachine.h +128 -0
  47. data/ext/extconf.rb +179 -0
  48. data/ext/fastfilereader/extconf.rb +103 -0
  49. data/ext/fastfilereader/mapper.cpp +214 -0
  50. data/ext/fastfilereader/mapper.h +59 -0
  51. data/ext/fastfilereader/rubymain.cpp +127 -0
  52. data/ext/kb.cpp +79 -0
  53. data/ext/page.cpp +107 -0
  54. data/ext/page.h +51 -0
  55. data/ext/pipe.cpp +347 -0
  56. data/ext/project.h +161 -0
  57. data/ext/rubymain.cpp +1318 -0
  58. data/ext/ssl.cpp +476 -0
  59. data/ext/ssl.h +95 -0
  60. data/java/.classpath +6 -0
  61. data/java/.gitignore +1 -0
  62. data/java/.project +17 -0
  63. data/java/src/com/rubyeventmachine/DatagramPacket.java +13 -0
  64. data/java/src/com/rubyeventmachine/EmReactor.java +531 -0
  65. data/java/src/com/rubyeventmachine/EmReactorException.java +40 -0
  66. data/java/src/com/rubyeventmachine/EventCallback.java +7 -0
  67. data/java/src/com/rubyeventmachine/EventCode.java +26 -0
  68. data/java/src/com/rubyeventmachine/EventableChannel.java +130 -0
  69. data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +179 -0
  70. data/java/src/com/rubyeventmachine/EventableSocketChannel.java +405 -0
  71. data/java/src/com/rubyeventmachine/SslBox.java +311 -0
  72. data/lib/em/buftok.rb +110 -0
  73. data/lib/em/callback.rb +58 -0
  74. data/lib/em/channel.rb +64 -0
  75. data/lib/em/completion.rb +304 -0
  76. data/lib/em/connection.rb +716 -0
  77. data/lib/em/deferrable.rb +210 -0
  78. data/lib/em/deferrable/pool.rb +2 -0
  79. data/lib/em/file_watch.rb +73 -0
  80. data/lib/em/future.rb +61 -0
  81. data/lib/em/iterator.rb +231 -0
  82. data/lib/em/messages.rb +66 -0
  83. data/lib/em/pool.rb +151 -0
  84. data/lib/em/process_watch.rb +45 -0
  85. data/lib/em/processes.rb +123 -0
  86. data/lib/em/protocols.rb +37 -0
  87. data/lib/em/protocols/header_and_content.rb +138 -0
  88. data/lib/em/protocols/httpclient.rb +279 -0
  89. data/lib/em/protocols/httpclient2.rb +600 -0
  90. data/lib/em/protocols/line_and_text.rb +125 -0
  91. data/lib/em/protocols/line_protocol.rb +29 -0
  92. data/lib/em/protocols/linetext2.rb +161 -0
  93. data/lib/em/protocols/memcache.rb +331 -0
  94. data/lib/em/protocols/object_protocol.rb +46 -0
  95. data/lib/em/protocols/postgres3.rb +246 -0
  96. data/lib/em/protocols/saslauth.rb +175 -0
  97. data/lib/em/protocols/smtpclient.rb +365 -0
  98. data/lib/em/protocols/smtpserver.rb +643 -0
  99. data/lib/em/protocols/socks4.rb +66 -0
  100. data/lib/em/protocols/stomp.rb +205 -0
  101. data/lib/em/protocols/tcptest.rb +54 -0
  102. data/lib/em/pure_ruby.rb +1017 -0
  103. data/lib/em/queue.rb +71 -0
  104. data/lib/em/resolver.rb +209 -0
  105. data/lib/em/spawnable.rb +84 -0
  106. data/lib/em/streamer.rb +118 -0
  107. data/lib/em/threaded_resource.rb +90 -0
  108. data/lib/em/tick_loop.rb +85 -0
  109. data/lib/em/timers.rb +61 -0
  110. data/lib/em/version.rb +3 -0
  111. data/lib/eventmachine.rb +1553 -0
  112. data/lib/fastfilereaderext.rb +2 -0
  113. data/lib/jeventmachine.rb +321 -0
  114. data/lib/rubyeventmachine.rb +2 -0
  115. data/rakelib/cpp.rake_example +77 -0
  116. data/rakelib/package.rake +98 -0
  117. data/rakelib/test.rake +8 -0
  118. data/tests/client.crt +31 -0
  119. data/tests/client.key +51 -0
  120. data/tests/em_test_helper.rb +64 -0
  121. data/tests/server.crt +36 -0
  122. data/tests/server.key +51 -0
  123. data/tests/test_attach.rb +150 -0
  124. data/tests/test_basic.rb +294 -0
  125. data/tests/test_channel.rb +62 -0
  126. data/tests/test_completion.rb +177 -0
  127. data/tests/test_connection_count.rb +53 -0
  128. data/tests/test_defer.rb +18 -0
  129. data/tests/test_deferrable.rb +35 -0
  130. data/tests/test_epoll.rb +145 -0
  131. data/tests/test_error_handler.rb +38 -0
  132. data/tests/test_exc.rb +28 -0
  133. data/tests/test_file_watch.rb +65 -0
  134. data/tests/test_futures.rb +170 -0
  135. data/tests/test_get_sock_opt.rb +37 -0
  136. data/tests/test_handler_check.rb +35 -0
  137. data/tests/test_hc.rb +155 -0
  138. data/tests/test_httpclient.rb +190 -0
  139. data/tests/test_httpclient2.rb +133 -0
  140. data/tests/test_idle_connection.rb +25 -0
  141. data/tests/test_inactivity_timeout.rb +54 -0
  142. data/tests/test_iterator.rb +97 -0
  143. data/tests/test_kb.rb +34 -0
  144. data/tests/test_line_protocol.rb +33 -0
  145. data/tests/test_ltp.rb +138 -0
  146. data/tests/test_ltp2.rb +288 -0
  147. data/tests/test_next_tick.rb +104 -0
  148. data/tests/test_object_protocol.rb +36 -0
  149. data/tests/test_pause.rb +102 -0
  150. data/tests/test_pending_connect_timeout.rb +52 -0
  151. data/tests/test_pool.rb +194 -0
  152. data/tests/test_process_watch.rb +48 -0
  153. data/tests/test_processes.rb +128 -0
  154. data/tests/test_proxy_connection.rb +180 -0
  155. data/tests/test_pure.rb +88 -0
  156. data/tests/test_queue.rb +50 -0
  157. data/tests/test_resolver.rb +55 -0
  158. data/tests/test_running.rb +14 -0
  159. data/tests/test_sasl.rb +47 -0
  160. data/tests/test_send_file.rb +217 -0
  161. data/tests/test_servers.rb +33 -0
  162. data/tests/test_set_sock_opt.rb +37 -0
  163. data/tests/test_shutdown_hooks.rb +23 -0
  164. data/tests/test_smtpclient.rb +55 -0
  165. data/tests/test_smtpserver.rb +57 -0
  166. data/tests/test_spawn.rb +293 -0
  167. data/tests/test_ssl_args.rb +78 -0
  168. data/tests/test_ssl_echo_data.rb +60 -0
  169. data/tests/test_ssl_methods.rb +56 -0
  170. data/tests/test_ssl_verify.rb +82 -0
  171. data/tests/test_stomp.rb +37 -0
  172. data/tests/test_system.rb +42 -0
  173. data/tests/test_threaded_resource.rb +53 -0
  174. data/tests/test_tick_loop.rb +59 -0
  175. data/tests/test_timers.rb +123 -0
  176. data/tests/test_ud.rb +8 -0
  177. data/tests/test_unbind_reason.rb +48 -0
  178. metadata +300 -0
data/tests/test_ud.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'em_test_helper'
2
+
3
+ class TestUserDefinedEvents < Test::Unit::TestCase
4
+
5
+ def test_a
6
+ end
7
+
8
+ end
@@ -0,0 +1,48 @@
1
+ require 'em_test_helper'
2
+ require 'socket'
3
+
4
+ class TestUnbindReason < Test::Unit::TestCase
5
+
6
+ class StubConnection < EM::Connection
7
+ attr_reader :error
8
+ def unbind(reason = nil)
9
+ @error = reason
10
+ EM.stop
11
+ end
12
+ end
13
+
14
+ def test_connect_timeout
15
+ error = nil
16
+ EM.run {
17
+ conn = EM.connect 'google.com', 81, Module.new{ |m|
18
+ m.send(:define_method, :unbind) do |reason|
19
+ error = reason
20
+ EM.stop
21
+ end
22
+ }
23
+ conn.pending_connect_timeout = 0.1
24
+ }
25
+ assert_equal Errno::ETIMEDOUT, error
26
+ end
27
+
28
+ def test_connect_refused
29
+ error = nil
30
+ EM.run {
31
+ EM.connect '127.0.0.1', 12388, Module.new{ |m|
32
+ m.send(:define_method, :unbind) do |reason|
33
+ error = reason
34
+ EM.stop
35
+ end
36
+ }
37
+ }
38
+ assert_equal Errno::ECONNREFUSED, error
39
+ end
40
+
41
+ def test_optional_argument
42
+ conn = nil
43
+ EM.run {
44
+ conn = EM.connect '127.0.0.1', 12388, StubConnection
45
+ }
46
+ assert_equal Errno::ECONNREFUSED, conn.error
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,300 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sensu-em
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.4.0
5
+ platform: x86-mingw32
6
+ authors:
7
+ - Francis Cianfrocca
8
+ - Aman Gupta
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-09-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake-compiler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: 0.8.3
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: 0.8.3
28
+ - !ruby/object:Gem::Dependency
29
+ name: yard
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: 0.8.5.2
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: 0.8.5.2
42
+ - !ruby/object:Gem::Dependency
43
+ name: bluecloth
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ description: |-
57
+ EventMachine implements a fast, single-threaded engine for arbitrary network
58
+ communications. It's extremely easy to use in Ruby. EventMachine wraps all
59
+ interactions with IP sockets, allowing programs to concentrate on the
60
+ implementation of network protocols. It can be used to create both network
61
+ servers and clients. To create a server or client, a Ruby program only needs
62
+ to specify the IP address and port, and provide a Module that implements the
63
+ communications protocol. Implementations of several standard network protocols
64
+ are provided with the package, primarily to serve as examples. The real goal
65
+ of EventMachine is to enable programs to easily interface with other programs
66
+ using TCP/IP, especially if custom protocols are required.
67
+ email:
68
+ - garbagecat10@gmail.com
69
+ - aman@tmm1.net
70
+ executables: []
71
+ extensions: []
72
+ extra_rdoc_files:
73
+ - README.md
74
+ - docs/DocumentationGuidesIndex.md
75
+ - docs/GettingStarted.md
76
+ - docs/old/ChangeLog
77
+ - docs/old/DEFERRABLES
78
+ - docs/old/EPOLL
79
+ - docs/old/INSTALL
80
+ - docs/old/KEYBOARD
81
+ - docs/old/LEGAL
82
+ - docs/old/LIGHTWEIGHT_CONCURRENCY
83
+ - docs/old/PURE_RUBY
84
+ - docs/old/RELEASE_NOTES
85
+ - docs/old/SMTP
86
+ - docs/old/SPAWNED_PROCESSES
87
+ - docs/old/TODO
88
+ files:
89
+ - .gitignore
90
+ - .travis.yml
91
+ - .yardopts
92
+ - CHANGELOG.md
93
+ - GNU
94
+ - Gemfile
95
+ - LICENSE
96
+ - README.md
97
+ - Rakefile
98
+ - docs/DocumentationGuidesIndex.md
99
+ - docs/GettingStarted.md
100
+ - docs/old/ChangeLog
101
+ - docs/old/DEFERRABLES
102
+ - docs/old/EPOLL
103
+ - docs/old/INSTALL
104
+ - docs/old/KEYBOARD
105
+ - docs/old/LEGAL
106
+ - docs/old/LIGHTWEIGHT_CONCURRENCY
107
+ - docs/old/PURE_RUBY
108
+ - docs/old/RELEASE_NOTES
109
+ - docs/old/SMTP
110
+ - docs/old/SPAWNED_PROCESSES
111
+ - docs/old/TODO
112
+ - eventmachine.gemspec
113
+ - examples/guides/getting_started/01_eventmachine_echo_server.rb
114
+ - examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb
115
+ - examples/guides/getting_started/03_simple_chat_server.rb
116
+ - examples/guides/getting_started/04_simple_chat_server_step_one.rb
117
+ - examples/guides/getting_started/05_simple_chat_server_step_two.rb
118
+ - examples/guides/getting_started/06_simple_chat_server_step_three.rb
119
+ - examples/guides/getting_started/07_simple_chat_server_step_four.rb
120
+ - examples/guides/getting_started/08_simple_chat_server_step_five.rb
121
+ - examples/old/ex_channel.rb
122
+ - examples/old/ex_queue.rb
123
+ - examples/old/ex_tick_loop_array.rb
124
+ - examples/old/ex_tick_loop_counter.rb
125
+ - examples/old/helper.rb
126
+ - ext/binder.cpp
127
+ - ext/binder.h
128
+ - ext/cmain.cpp
129
+ - ext/ed.cpp
130
+ - ext/ed.h
131
+ - ext/em.cpp
132
+ - ext/em.h
133
+ - ext/eventmachine.h
134
+ - ext/extconf.rb
135
+ - ext/fastfilereader/extconf.rb
136
+ - ext/fastfilereader/mapper.cpp
137
+ - ext/fastfilereader/mapper.h
138
+ - ext/fastfilereader/rubymain.cpp
139
+ - ext/kb.cpp
140
+ - ext/page.cpp
141
+ - ext/page.h
142
+ - ext/pipe.cpp
143
+ - ext/project.h
144
+ - ext/rubymain.cpp
145
+ - ext/ssl.cpp
146
+ - ext/ssl.h
147
+ - java/.classpath
148
+ - java/.gitignore
149
+ - java/.project
150
+ - java/src/com/rubyeventmachine/DatagramPacket.java
151
+ - java/src/com/rubyeventmachine/EmReactor.java
152
+ - java/src/com/rubyeventmachine/EmReactorException.java
153
+ - java/src/com/rubyeventmachine/EventCallback.java
154
+ - java/src/com/rubyeventmachine/EventCode.java
155
+ - java/src/com/rubyeventmachine/EventableChannel.java
156
+ - java/src/com/rubyeventmachine/EventableDatagramChannel.java
157
+ - java/src/com/rubyeventmachine/EventableSocketChannel.java
158
+ - java/src/com/rubyeventmachine/SslBox.java
159
+ - lib/em/buftok.rb
160
+ - lib/em/callback.rb
161
+ - lib/em/channel.rb
162
+ - lib/em/completion.rb
163
+ - lib/em/connection.rb
164
+ - lib/em/deferrable.rb
165
+ - lib/em/deferrable/pool.rb
166
+ - lib/em/file_watch.rb
167
+ - lib/em/future.rb
168
+ - lib/em/iterator.rb
169
+ - lib/em/messages.rb
170
+ - lib/em/pool.rb
171
+ - lib/em/process_watch.rb
172
+ - lib/em/processes.rb
173
+ - lib/em/protocols.rb
174
+ - lib/em/protocols/header_and_content.rb
175
+ - lib/em/protocols/httpclient.rb
176
+ - lib/em/protocols/httpclient2.rb
177
+ - lib/em/protocols/line_and_text.rb
178
+ - lib/em/protocols/line_protocol.rb
179
+ - lib/em/protocols/linetext2.rb
180
+ - lib/em/protocols/memcache.rb
181
+ - lib/em/protocols/object_protocol.rb
182
+ - lib/em/protocols/postgres3.rb
183
+ - lib/em/protocols/saslauth.rb
184
+ - lib/em/protocols/smtpclient.rb
185
+ - lib/em/protocols/smtpserver.rb
186
+ - lib/em/protocols/socks4.rb
187
+ - lib/em/protocols/stomp.rb
188
+ - lib/em/protocols/tcptest.rb
189
+ - lib/em/pure_ruby.rb
190
+ - lib/em/queue.rb
191
+ - lib/em/resolver.rb
192
+ - lib/em/spawnable.rb
193
+ - lib/em/streamer.rb
194
+ - lib/em/threaded_resource.rb
195
+ - lib/em/tick_loop.rb
196
+ - lib/em/timers.rb
197
+ - lib/em/version.rb
198
+ - lib/eventmachine.rb
199
+ - lib/jeventmachine.rb
200
+ - rakelib/cpp.rake_example
201
+ - rakelib/package.rake
202
+ - rakelib/test.rake
203
+ - tests/client.crt
204
+ - tests/client.key
205
+ - tests/em_test_helper.rb
206
+ - tests/server.crt
207
+ - tests/server.key
208
+ - tests/test_attach.rb
209
+ - tests/test_basic.rb
210
+ - tests/test_channel.rb
211
+ - tests/test_completion.rb
212
+ - tests/test_connection_count.rb
213
+ - tests/test_defer.rb
214
+ - tests/test_deferrable.rb
215
+ - tests/test_epoll.rb
216
+ - tests/test_error_handler.rb
217
+ - tests/test_exc.rb
218
+ - tests/test_file_watch.rb
219
+ - tests/test_futures.rb
220
+ - tests/test_get_sock_opt.rb
221
+ - tests/test_handler_check.rb
222
+ - tests/test_hc.rb
223
+ - tests/test_httpclient.rb
224
+ - tests/test_httpclient2.rb
225
+ - tests/test_idle_connection.rb
226
+ - tests/test_inactivity_timeout.rb
227
+ - tests/test_iterator.rb
228
+ - tests/test_kb.rb
229
+ - tests/test_line_protocol.rb
230
+ - tests/test_ltp.rb
231
+ - tests/test_ltp2.rb
232
+ - tests/test_next_tick.rb
233
+ - tests/test_object_protocol.rb
234
+ - tests/test_pause.rb
235
+ - tests/test_pending_connect_timeout.rb
236
+ - tests/test_pool.rb
237
+ - tests/test_process_watch.rb
238
+ - tests/test_processes.rb
239
+ - tests/test_proxy_connection.rb
240
+ - tests/test_pure.rb
241
+ - tests/test_queue.rb
242
+ - tests/test_resolver.rb
243
+ - tests/test_running.rb
244
+ - tests/test_sasl.rb
245
+ - tests/test_send_file.rb
246
+ - tests/test_servers.rb
247
+ - tests/test_set_sock_opt.rb
248
+ - tests/test_shutdown_hooks.rb
249
+ - tests/test_smtpclient.rb
250
+ - tests/test_smtpserver.rb
251
+ - tests/test_spawn.rb
252
+ - tests/test_ssl_args.rb
253
+ - tests/test_ssl_echo_data.rb
254
+ - tests/test_ssl_methods.rb
255
+ - tests/test_ssl_verify.rb
256
+ - tests/test_stomp.rb
257
+ - tests/test_system.rb
258
+ - tests/test_threaded_resource.rb
259
+ - tests/test_tick_loop.rb
260
+ - tests/test_timers.rb
261
+ - tests/test_ud.rb
262
+ - tests/test_unbind_reason.rb
263
+ - lib/fastfilereaderext.rb
264
+ - lib/rubyeventmachine.rb
265
+ - lib/rubyeventmachine.so
266
+ - lib/fastfilereaderext.so
267
+ homepage: http://rubyeventmachine.com
268
+ licenses:
269
+ - Ruby
270
+ - GPL
271
+ metadata: {}
272
+ post_install_message:
273
+ rdoc_options:
274
+ - --title
275
+ - EventMachine
276
+ - --main
277
+ - README.md
278
+ - -x
279
+ - lib/em/version
280
+ - -x
281
+ - lib/jeventmachine
282
+ require_paths:
283
+ - lib
284
+ required_ruby_version: !ruby/object:Gem::Requirement
285
+ requirements:
286
+ - - '>='
287
+ - !ruby/object:Gem::Version
288
+ version: '0'
289
+ required_rubygems_version: !ruby/object:Gem::Requirement
290
+ requirements:
291
+ - - '>='
292
+ - !ruby/object:Gem::Version
293
+ version: '0'
294
+ requirements: []
295
+ rubyforge_project: eventmachine
296
+ rubygems_version: 2.0.14
297
+ signing_key:
298
+ specification_version: 4
299
+ summary: Ruby/EventMachine library
300
+ test_files: []