Sha256: b82901bfbb5dccf76e485b5c3b5bea859ef961ea1043697569d6409ce89302e5
Contents?: true
Size: 770 Bytes
Versions: 30
Compression:
Stored size: 770 Bytes
Contents
# !SLIDE :capture_code_output true # One-way, named pipe service with signature require 'example_helper' begin File.unlink(service_pipe = "service.pipe") rescue nil Email.asir.transport = t = ASIR::Transport::File.new(:file => service_pipe) t.encoder = ASIR::Coder::Chain.new(:encoders => [ ASIR::Coder::Marshal.new, s = ASIR::Coder::Sign.new(:secret => 'abc123'), ASIR::Coder::Yaml.new, ]) t.prepare_pipe_server! server_process do t.run_pipe_server! end pr Email.asir.send_email(:pdf_invoice, :to => "user@email.com", :customer => @customer) ensure t.close; sleep 1; server_kill end # !SLIDE END # EXPECT: : client process # EXPECT: : server process # EXPECT: : Email.send_mail :pdf_invoice # EXPECT: : pr: nil
Version data entries
30 entries across 30 versions & 1 rubygems