repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_inactivity_timeout.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_inactivity_timeout.rb
require 'em_test_helper' class TestInactivityTimeout < Test::Unit::TestCase if EM.respond_to? :get_comm_inactivity_timeout def test_default EM.run { c = EM.connect("127.0.0.1", 54321) assert_equal 0.0, c.comm_inactivity_timeout EM.stop } end def test_set_and_get ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ssl_methods.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ssl_methods.rb
require 'em_test_helper' class TestSSLMethods < Test::Unit::TestCase module ServerHandler def post_init start_tls end def ssl_handshake_completed $server_called_back = true $server_cert_value = get_peer_cert $server_cipher_bits = get_cipher_bits $server_cipher_name = get_c...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_file_watch.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_file_watch.rb
require 'em_test_helper' require 'tempfile' class TestFileWatch < Test::Unit::TestCase if windows? def test_watch_file_raises_unsupported_error assert_raises(EM::Unsupported) do EM.run do file = Tempfile.new("fake_file") EM.watch_file(file.path) end end end e...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_resolver.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_resolver.rb
require 'em_test_helper' class TestResolver < Test::Unit::TestCase def test_nameserver assert_kind_of(String, EM::DNS::Resolver.nameserver) end def test_nameservers assert_kind_of(Array, EM::DNS::Resolver.nameservers) end def test_hosts assert_kind_of(Hash, EM::DNS::Resolver.hosts) # Make ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_futures.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_futures.rb
require 'em_test_helper' class TestFutures < Test::Unit::TestCase def setup end def teardown end def test_future assert_equal(100, EM::Deferrable.future(100) ) p1 = proc { 100 + 1 } assert_equal(101, EM::Deferrable.future(p1) ) end class MyFuture include EM::Deferrable ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_connection_count.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_connection_count.rb
require 'em_test_helper' class TestConnectionCount < Test::Unit::TestCase def teardown EM.epoll = false EM.kqueue = false end def test_idle_connection_count count = nil EM.run { count = EM.connection_count EM.stop_event_loop } assert_equal(0, count) end # Run this again ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ud.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ud.rb
require 'em_test_helper' class TestUserDefinedEvents < Test::Unit::TestCase def test_a end end
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_handler_check.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_handler_check.rb
require 'em_test_helper' class TestHandlerCheck < Test::Unit::TestCase class Foo < EM::Connection; end; module TestModule; end; def test_with_correct_class assert_nothing_raised do EM.run { EM.connect("127.0.0.1", 80, Foo) EM.stop_event_loop } end end def test_with_inco...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_object_protocol.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_object_protocol.rb
require 'em_test_helper' class TestObjectProtocol < Test::Unit::TestCase module Server include EM::P::ObjectProtocol def post_init send_object :hello=>'world' end def receive_object obj $server = obj EM.stop end end module Client include EM::P::ObjectProtocol def re...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_deferrable.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_deferrable.rb
require 'em_test_helper' class TestDeferrable < Test::Unit::TestCase class Later include EM::Deferrable end def test_timeout_without_args assert_nothing_raised do EM.run { df = Later.new df.timeout(0) df.errback { EM.stop } EM.add_timer(0.01) { flunk "Deferrable was...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_basic.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_basic.rb
require 'em_test_helper' require 'socket' class TestBasic < Test::Unit::TestCase def setup @port = next_port end def test_connection_class_cache mod = Module.new a, b = nil, nil EM.run { EM.start_server '127.0.0.1', @port, mod a = EM.connect '127.0.0.1', @port, mod b = EM.conne...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_smtpclient.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_smtpclient.rb
require 'em_test_helper' class TestSmtpClient < Test::Unit::TestCase Localhost = "127.0.0.1" Localport = 9801 def setup end def teardown end def test_a # No real tests until we have a server implementation to test against. # This is what the call looks like, though: err = nil EM.run {...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_timers.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_timers.rb
require 'em_test_helper' class TestTimers < Test::Unit::TestCase def test_timer_with_block x = false EM.run { EM::Timer.new(0) { x = true EM.stop } } assert x end def test_timer_with_proc x = false EM.run { EM::Timer.new(0, proc { x = true ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_shutdown_hooks.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_shutdown_hooks.rb
require 'em_test_helper' class TestShutdownHooks < Test::Unit::TestCase def test_shutdown_hooks r = false EM.run { EM.add_shutdown_hook { r = true } EM.stop } assert_equal( true, r ) end def test_hook_order r = [] EM.run { EM.add_shutdown_hook { r << 2 } EM.add_sh...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_attach.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_attach.rb
require 'em_test_helper' require 'socket' class TestAttach < Test::Unit::TestCase class EchoServer < EM::Connection def receive_data data $received_data << data send_data data end end class EchoClient < EM::Connection def initialize socket self.notify_readable = true @socket ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ssl_verify.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ssl_verify.rb
require 'em_test_helper' class TestSslVerify < Test::Unit::TestCase def setup $dir = File.dirname(File.expand_path(__FILE__)) + '/' $cert_from_file = File.read($dir+'client.crt') end module ClientNoCert def connection_completed start_tls() end def ssl_handshake_completed $client...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_pure.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_pure.rb
require 'em_test_helper' class TestPure < Test::Unit::TestCase def setup @port = next_port end # These tests are intended to exercise problems that come up in the # pure-Ruby implementation. However, we DON'T constrain them such that # they only run in pure-Ruby. These tests need to work identically in...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ipv6.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ipv6.rb
require 'em_test_helper' class TestIPv6 < Test::Unit::TestCase if Test::Unit::TestCase.public_ipv6? # Runs a TCP server in the local IPv6 address, connects to it and sends a specific data. # Timeout in 2 seconds. def test_ipv6_tcp_local_server @@received_data = nil @local_port = next_port ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_kb.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_kb.rb
require 'em_test_helper' class TestKeyboardEvents < Test::Unit::TestCase module KbHandler include EM::Protocols::LineText2 def receive_line d EM::stop if d == "STOP" end end # This test doesn't actually do anything useful but is here to # illustrate the usage. If you removed the timer and r...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ipv4.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ipv4.rb
require 'em_test_helper' class TestIPv4 < Test::Unit::TestCase # Runs a TCP server in the local IPv4 address, connects to it and sends a specific data. # Timeout in 2 seconds. def test_ipv4_tcp_local_server omit_if(!Test::Unit::TestCase.public_ipv4?) @@received_data = nil @local_port = next_port ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_iterator.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_iterator.rb
require 'em_test_helper' class TestIterator < Test::Unit::TestCase # By default, format the time with tenths-of-seconds. # Some tests should ask for extra decimal places to ensure # that delays between iterations will receive a changed time. def get_time(n=1) time = EM.current_time time.strftime('%H:%...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_fork.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_fork.rb
require 'em_test_helper' class TestFork < Test::Unit::TestCase def test_fork_safe omit_if(jruby?) omit_if(windows?) fork_pid = nil read, write = IO.pipe EM.run do fork_pid = fork do write.puts "forked" EM.run do EM.next_tick do write.puts "EM ran" ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ssl_dhparam.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ssl_dhparam.rb
require 'em_test_helper' class TestSslDhParam < Test::Unit::TestCase def setup $dir = File.dirname(File.expand_path(__FILE__)) + '/' $dhparam_file = File.join($dir, 'dhparam.pem') end module Client def post_init start_tls end def ssl_handshake_completed $client_handshake_complet...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_defer.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_defer.rb
require 'em_test_helper' class TestDefer < Test::Unit::TestCase def test_defers n = 0 n_times = 20 EM.run { n_times.times { work_proc = proc { n += 1 } callback = proc { EM.stop if n == n_times } EM.defer work_proc, callback } } assert_equal( n, n_times ) en...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_process_watch.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_process_watch.rb
require 'em_test_helper' if EM.kqueue? class TestProcessWatch < Test::Unit::TestCase module ParentProcessWatcher def process_forked $forked = true end end module ChildProcessWatcher def process_exited $exited = true end def unbind $unbind = true ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_many_fds.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_many_fds.rb
require 'em_test_helper' require 'socket' class TestManyFDs < Test::Unit::TestCase def setup @port = next_port end def test_connection_class_cache mod = Module.new a = nil Process.setrlimit(Process::RLIMIT_NOFILE, 4096) rescue nil EM.run { EM.start_server '127.0.0.1', @port, mod ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_httpclient.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_httpclient.rb
require 'em_test_helper' class TestHttpClient < Test::Unit::TestCase def setup @port = next_port end #------------------------------------- def test_http_client ok = false EM.run { c = silent { EM::P::HttpClient.send :request, :host => "www.google.com", :port => 80 } c.callback { ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_sock_opt.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_sock_opt.rb
require 'em_test_helper' require 'socket' class TestSockOpt < Test::Unit::TestCase def setup assert(!EM.reactor_running?) @port = next_port end def teardown assert(!EM.reactor_running?) end def test_set_sock_opt omit_if(windows?) omit_if(!EM.respond_to?(:set_sock_opt)) val = nil ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_channel.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_channel.rb
require 'em_test_helper' class TestEMChannel < Test::Unit::TestCase def test_channel_subscribe s = 0 EM.run do c = EM::Channel.new c.subscribe { |v| s = v; EM.stop } c << 1 end assert_equal 1, s end def test_channel_unsubscribe s = 0 EM.run do c = EM::Channel.new ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_smtpserver.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_smtpserver.rb
require 'em_test_helper' class TestSmtpServer < Test::Unit::TestCase # Don't test on port 25. It requires superuser and there's probably # a mail server already running there anyway. Localhost = "127.0.0.1" Localport = 25001 # This class is an example of what you need to write in order # to implement a m...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/em_test_helper.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/em_test_helper.rb
require 'em/pure_ruby' if ENV['EM_PURE_RUBY'] require 'eventmachine' require 'test/unit' require 'rbconfig' require 'socket' puts "EM Library Type: #{EM.library_type}" class Test::Unit::TestCase class EMTestTimeout < StandardError ; end def setup_timeout(timeout = TIMEOUT_INTERVAL) EM.schedule { EM.add...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ltp2.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_ltp2.rb
require 'em_test_helper' # TODO!!! Need tests for overlength headers and text bodies. class TestLineText2 < Test::Unit::TestCase # Run each of these tests two ways: passing in the whole test-dataset in one chunk, # and passing it in one character at a time. class Basic include EM::Protocols::LineText2 ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_sasl.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_sasl.rb
require 'em_test_helper' class TestSASL < Test::Unit::TestCase # SASL authentication is usually done with UNIX-domain sockets, but # we'll use TCP so this test will work on Windows. As far as the # protocol handlers are concerned, there's no difference. TestUser,TestPsw = "someone", "password" class Sasl...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_completion.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_completion.rb
require 'em_test_helper' require 'em/completion' class TestCompletion < Test::Unit::TestCase def completion @completion ||= EM::Completion.new end def crank # This is a slow solution, but this just executes the next tick queue # once. It's the easiest way for now. EM.run { EM.stop } end def...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_spawn.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_spawn.rb
require 'em_test_helper' class TestSpawn < Test::Unit::TestCase # Spawn a process that simply stops the reactor. # Assert that the notification runs after the block that calls it. # def test_stop x = nil EM.run { s = EM.spawn {EM.stop} s.notify x = true } assert x end ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_proxy_connection.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_proxy_connection.rb
require 'em_test_helper' class TestProxyConnection < Test::Unit::TestCase if EM.respond_to?(:start_proxy) module ProxyConnection def initialize(client, request) @client, @request = client, request end def post_init EM::enable_proxy(self, @client) end def connectio...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_idle_connection.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_idle_connection.rb
require 'em_test_helper' class TestIdleConnection < Test::Unit::TestCase def setup @port = next_port end def test_idle_time omit_if(!EM.respond_to?(:get_idle_time)) a, b = nil, nil EM.run do EM.start_server '127.0.0.1', @port, Module.new conn = EM.connect '127.0.0.1', @port EM...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_error_handler.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_error_handler.rb
require 'em_test_helper' class TestErrorHandler < Test::Unit::TestCase def setup @exception = Class.new(StandardError) end def test_error_handler error = nil EM.error_handler{ |e| error = e EM.error_handler(nil) EM.stop } assert_nothing_raised do EM.run{ EM....
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_connection_write.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_connection_write.rb
require 'em_test_helper' class TestConnectionWrite < Test::Unit::TestCase # This test takes advantage of the fact that EM::_RunSelectOnce iterates over the connections twice: # - once to determine which ones to call Write() on # - and once to call Write() on each of them. # # But state may change in the...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_threaded_resource.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_threaded_resource.rb
require 'em_test_helper' class TestThreadedResource < Test::Unit::TestCase def object @object ||= {} end def resource @resource = EM::ThreadedResource.new do object end end def teardown resource.shutdown end def test_dispatch_completion EM.run do EM.add_timer(3) do ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_next_tick.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_next_tick.rb
require 'em_test_helper' class TestNextTick < Test::Unit::TestCase def test_tick_arg pr = proc {EM.stop} EM.run { EM.next_tick pr } assert true end def test_tick_block EM.run { EM.next_tick {EM.stop} } assert true end # This illustrates the solution to a long-standi...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_unbind_reason.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_unbind_reason.rb
require 'em_test_helper' class TestUnbindReason < Test::Unit::TestCase class StubConnection < EM::Connection attr_reader :error def unbind(reason = nil) @error = reason EM.stop end end # RFC 5737 Address Blocks Reserved for Documentation def test_connect_timeout conn = nil EM....
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_line_protocol.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_line_protocol.rb
require 'em_test_helper' class TestLineProtocol < Test::Unit::TestCase class LineProtocolTestClass include EM::Protocols::LineProtocol def lines @lines ||= [] end def receive_line(line) lines << line end end def setup @proto = LineProtocolTestClass.new end def test_sim...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_stomp.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_stomp.rb
require 'em_test_helper' class TestStomp < Test::Unit::TestCase CONTENT_LENGTH_REGEX = /^content-length: (\d+)$/ def bytesize(str) str = str.to_s size = str.bytesize if str.respond_to?(:bytesize) # bytesize added in 1.9 size || str.size end class TStomp include EM::P::Stomp def last_sent...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_epoll.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/tests/test_epoll.rb
require 'em_test_helper' class TestEpoll < Test::Unit::TestCase module TestEchoServer def receive_data data send_data data close_connection_after_writing end end module TestEchoClient def connection_completed send_data "ABCDE" $max += 1 end def receive_data data ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/ext/extconf.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/ext/extconf.rb
require 'fileutils' require 'mkmf' # Eager check devs tools have_devel? if respond_to?(:have_devel?) def check_libs libs = [], fatal = false libs.all? { |lib| have_library(lib) || (abort("could not find library: #{lib}") if fatal) } end def check_heads heads = [], fatal = false heads.all? { |head| have_header(he...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/ext/fastfilereader/extconf.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/ext/fastfilereader/extconf.rb
require 'mkmf' def check_libs libs = [], fatal = false libs.all? { |lib| have_library(lib) || (abort("could not find library: #{lib}") if fatal) } end def check_heads heads = [], fatal = false heads.all? { |head| have_header(head) || (abort("could not find header: #{head}") if fatal)} end def add_define(name) ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_array.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_array.rb
require File.dirname(__FILE__) + '/helper' EM.run do array = (1..100).to_a tickloop = EM.tick_loop do if array.empty? :stop else puts array.shift end end tickloop.on_stop { EM.stop } end
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_counter.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_tick_loop_counter.rb
require File.dirname(__FILE__) + '/helper' class TickCounter attr_reader :start_time, :count def initialize reset @tick_loop = EM.tick_loop(method(:tick)) end def reset @count = 0 @start_time = EM.current_time end def tick @count += 1 end def rate @count / (EM.current_time -...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_queue.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_queue.rb
require File.dirname(__FILE__) + '/helper'
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/helper.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/helper.rb
$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'eventmachine'
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_channel.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/old/ex_channel.rb
require File.dirname(__FILE__) + '/helper' EM.run do # Create a channel to push data to, this could be stocks... RandChannel = EM::Channel.new # The server simply subscribes client connections to the channel on connect, # and unsubscribes them on disconnect. class Server < EM::Connection def self.start...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/06_simple_chat_server_step_three.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/06_simple_chat_server_step_three.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class SimpleChatServer < EM::Connection @@connected_clients = Array.new attr_reader :username # # EventMachine handlers # def post_init @username = nil puts "A client has connected..." ask_username en...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/08_simple_chat_server_step_five.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/08_simple_chat_server_step_five.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class SimpleChatServer < EM::Connection @@connected_clients = Array.new DM_REGEXP = /^@([a-zA-Z0-9]+)\s*:?\s+(.+)/.freeze attr_reader :username # # EventMachine handlers # def post_init @username = ni...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/03_simple_chat_server.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/03_simple_chat_server.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class SimpleChatServer < EM::Connection @@connected_clients = Array.new DM_REGEXP = /^@([a-zA-Z0-9]+)\s*:?\s*(.+)/.freeze attr_reader :username # # EventMachine handlers # def post_init @username = ni...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/04_simple_chat_server_step_one.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/04_simple_chat_server_step_one.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class SimpleChatServer < EM::Connection # # EventMachine handlers # def post_init puts "A client has connected..." end def unbind puts "A client has left..." end end EventMachine.run do # hit Control + C t...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/01_eventmachine_echo_server.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/01_eventmachine_echo_server.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class EchoServer < EM::Connection def receive_data(data) send_data(data) end end EventMachine.run do # hit Control + C to stop Signal.trap("INT") { EventMachine.stop } Signal.trap("TERM") { EventMachine.stop } Even...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/02_eventmachine_echo_server_that_recognizes_exit_command.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class EchoServer < EM::Connection def receive_data(data) if data.strip =~ /exit$/i EventMachine.stop else send_data(data) end end end EventMachine.run do # hit Control + C to stop Signal.trap("INT") ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/07_simple_chat_server_step_four.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/07_simple_chat_server_step_four.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class SimpleChatServer < EM::Connection @@connected_clients = Array.new attr_reader :username # # EventMachine handlers # def post_init @username = nil puts "A client has connected..." ask_username en...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/05_simple_chat_server_step_two.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/examples/guides/getting_started/05_simple_chat_server_step_two.rb
#!/usr/bin/env ruby require 'rubygems' # or use Bundler.setup require 'eventmachine' class SimpleChatServer < EM::Connection @@connected_clients = Array.new # # EventMachine handlers # def post_init @@connected_clients.push(self) puts "A client has connected..." end def unbind @@connect...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/eventmachine.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/eventmachine.rb
if defined?(EventMachine.library_type) and EventMachine.library_type == :pure_ruby # assume 'em/pure_ruby' was loaded already elsif RUBY_PLATFORM =~ /java/ require 'java' require 'jeventmachine' else begin require 'rubyeventmachine' rescue LoadError warn "Unable to load the EventMachine C extension; T...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
true
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/jeventmachine.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/jeventmachine.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 8 Apr 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fra...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/process_watch.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/process_watch.rb
module EventMachine # This is subclassed from EventMachine::Connection for use with the process monitoring API. Read the # documentation on the instance methods of this class, and for a full explanation see EventMachine.watch_process. class ProcessWatch < Connection # @private Cfork = 'fork'.freeze #...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/spawnable.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/spawnable.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 25 Aug 2007 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/callback.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/callback.rb
module EventMachine # Utility method for coercing arguments to an object that responds to :call. # Accepts an object and a method name to send to, or a block, or an object # that responds to :call. # # @example EventMachine.Callback used with a block. Returns that block. # # cb = EventMachine.Callback do...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/version.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/version.rb
module EventMachine VERSION = "1.2.7" end
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/channel.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/channel.rb
module EventMachine # Provides a simple thread-safe way to transfer data between (typically) long running # tasks in {EventMachine.defer} and event loop thread. # # @example # # channel = EventMachine::Channel.new # sid = channel.subscribe { |msg| p [:got, msg] } # # channel.push('hello world')...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/file_watch.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/file_watch.rb
module EventMachine # Utility class that is useful for file monitoring. Supported events are # # * File is modified # * File is deleted # * File is moved # # @note On Mac OS X, file watching only works when kqueue is enabled # # @see EventMachine.watch_file class FileWatch < Connection # @privat...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/completion.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/completion.rb
# = EM::Completion # # A completion is a callback container for various states of completion. In # its most basic form it has a start state and a finish state. # # This implementation includes some hold-back from the EM::Deferrable # interface in order to be compatible - but it has a much cleaner # implementation. # # ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/pool.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/pool.rb
module EventMachine # A simple async resource pool based on a resource and work queue. Resources # are enqueued and work waits for resources to become available. # # @example # require 'em-http-request' # # EM.run do # pool = EM::Pool.new # spawn = lambda { pool.add EM::HttpRequest.new('h...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/processes.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/processes.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 13 Dec 07 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-08 by Fran...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/streamer.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/streamer.rb
module EventMachine # Streams a file over a given connection. Streaming begins once the object is # instantiated. Typically FileStreamer instances are not reused. # # Streaming uses buffering for files larger than 16K and uses so-called fast file reader (a C++ extension) # if available (it is part of eventmac...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/future.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/future.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 Jul 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/queue.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/queue.rb
module EventMachine # A cross thread, reactor scheduled, linear queue. # # This class provides a simple queue abstraction on top of the reactor # scheduler. It services two primary purposes: # # * API sugar for stateful protocols # * Pushing processing onto the reactor thread # # @example # # q =...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/tick_loop.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/tick_loop.rb
module EventMachine # Creates and immediately starts an EventMachine::TickLoop def self.tick_loop(*a, &b) TickLoop.new(*a, &b).start end # A TickLoop is useful when one needs to distribute amounts of work # throughout ticks in order to maintain response times. It is also useful for # simple repeated ch...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/resolver.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/resolver.rb
module EventMachine module DNS class Resolver def self.windows? if RUBY_PLATFORM =~ /mswin32|cygwin|mingw|bccwin/ require 'win32/resolv' true else false end end HOSTS_FILE = windows? ? Win32::Resolv.get_hosts_path : '/etc/hosts' @hos...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/connection.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/connection.rb
module EventMachine class FileNotFoundException < Exception end # EventMachine::Connection is a class that is instantiated # by EventMachine's processing loop whenever a new connection # is created. (New connections can be either initiated locally # to a remote server or accepted locally from a remote clie...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
true
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/messages.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/messages.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 Jul 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/iterator.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/iterator.rb
module EventMachine # A simple iterator for concurrent asynchronous work. # # Unlike ruby's built-in iterators, the end of the current iteration cycle is signaled manually, # instead of happening automatically after the yielded block finishes executing. For example: # # (0..10).each{ |num| } # # becom...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/timers.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/timers.rb
module EventMachine # Creates a one-time timer # # timer = EventMachine::Timer.new(5) do # # this will never fire because we cancel it # end # timer.cancel # class Timer # Create a new timer that fires after a given number of seconds def initialize interval, callback=nil, &block @sig...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/pure_ruby.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 8 Apr 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fran...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
true
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols.rb
module EventMachine # This module contains various protocol implementations, including: # - HttpClient and HttpClient2 # - Stomp # - Memcache # - SmtpClient and SmtpServer # - SASLauth and SASLauthclient # - LineProtocol, LineAndTextProtocol and LineText2 # - HeaderAndContentProtocol # - Postgres3 #...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 Jul 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/buftok.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/buftok.rb
# BufferedTokenizer takes a delimiter upon instantiation, or acts line-based # by default. It allows input to be spoon-fed from some outside source which # receives arbitrary length datagrams which may-or-may-not contain the token # by which entities are delimited. In this respect it's ideally paired with # something...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/threaded_resource.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/threaded_resource.rb
module EventMachine # = EventMachine::ThreadedResource # # A threaded resource is a "quick and dirty" wrapper around the concept of # wiring up synchronous code into a standard EM::Pool. This is useful to keep # interfaces coherent and provide a simple approach at "making an interface # async-ish". # # ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/tcptest.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/tcptest.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 July 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by F...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/line_and_text.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/line_and_text.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 15 November 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/saslauth.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/saslauth.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 15 November 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 July 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/socks4.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/socks4.rb
module EventMachine module Protocols # Basic SOCKS v4 client implementation # # Use as you would any regular connection: # # class MyConn < EM::P::Socks4 # def post_init # send_data("sup") # end # # def receive_data(data) # send_data("you said: #{data}") #...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/postgres3.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/postgres3.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 15 November 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-08 ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient2.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/httpclient2.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 July 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by F...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpserver.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpserver.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 July 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by F...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/memcache.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/memcache.rb
module EventMachine module Protocols # Implements the Memcache protocol (http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt). # Requires memcached >= 1.2.4 w/ noreply support # # == Usage example # # EM.run{ # cache = EM::P::Memcache.connect 'localhost', 11211 #...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/stomp.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/stomp.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 15 November 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/object_protocol.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/object_protocol.rb
module EventMachine module Protocols # ObjectProtocol allows for easy communication using marshaled ruby objects # # module RubyServer # include EM::P::ObjectProtocol # # def receive_object obj # send_object({'you said' => obj}) # end # end # module ObjectPr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/header_and_content.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/header_and_content.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 15 Nov 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpclient.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/smtpclient.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 16 July 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 by Fr...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/line_protocol.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/line_protocol.rb
module EventMachine module Protocols # LineProtocol will parse out newline terminated strings from a receive_data stream # # module Server # include EM::P::LineProtocol # # def receive_line(line) # send_data("you said: #{line}") # end # end # module LineProt...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false
grab/engineering-blog
https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/linetext2.rb
_vendor/ruby/2.6.0/gems/eventmachine-1.2.7/lib/em/protocols/linetext2.rb
#-- # # Author:: Francis Cianfrocca (gmail: blackhedd) # Homepage:: http://rubyeventmachine.com # Date:: 15 November 2006 # # See EventMachine and EventMachine::Connection for documentation and # usage examples. # #---------------------------------------------------------------------------- # # Copyright (C) 2006-07 ...
ruby
MIT
d8026a4e9cc6348bf38951ee96c523f4ec19f3c4
2026-01-04T17:45:10.474201Z
false