Searching 326 files for "< Adhearsion::Event" (case sensitive) /Users/ben/code/adhearsion/lib/adhearsion/event/asterisk/ami.rb: 4 class Event 5 module Asterisk 6: class AMI < Adhearsion::Event 7 register :event, :ami 8 /Users/ben/code/adhearsion/spec/adhearsion/call_controller_spec.rb: 440 end 441 expect(latch.wait(1)).to be false 442: subject.call << Adhearsion::Event::Joined.new(call_uri: 'call1') 443 expect(latch.wait(1)).to be false 444: subject.call << Adhearsion::Event::Unjoined.new(call_uri: 'call1') 445 expect(latch.wait(1)).to be true 446 end ... 456 end 457 expect(latch.wait(1)).to be false 458: subject.call << Adhearsion::Event::Joined.new(:mixer_name => 'foobar') 459 expect(latch.wait(1)).to be false 460: subject.call << Adhearsion::Event::Unjoined.new(:mixer_name => 'foobar') 461 expect(latch.wait(1)).to be true 462 end ... 473 end 474 expect(latch.wait(1)).to be false 475: subject.call << Adhearsion::Event::Joined.new(call_uri: 'call1') 476 expect(latch.wait(1)).to be true 477 end ... 487 end 488 expect(latch.wait(1)).to be false 489: subject.call << Adhearsion::Event::Joined.new(:mixer_name => 'foobar') 490 expect(latch.wait(1)).to be true 491 end /Users/ben/code/adhearsion/spec/adhearsion/call_spec.rb: 1126 expect(result[:joined_condition].wait(0.5)).to be_falsey 1127 1128: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1129 expect(result[:joined_condition].wait(0.5)).to be_truthy 1130 end .... 1136 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1137 1138: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1139 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1140 1141: subject << Adhearsion::Event::Unjoined.new(call_uri: uri) 1142 expect(result[:unjoined_condition].wait(0.5)).to be_truthy 1143 end .... 1150 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1151 1152: subject << Adhearsion::Event::End.new 1153 expect(result[:joined_condition].wait(0.5)).to be_truthy 1154 expect(result[:unjoined_condition].wait(0.5)).to be_truthy .... 1159 result = subject.join target, :media => :bridge, :direction => :recv 1160 1161: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1162: subject << Adhearsion::Event::Unjoined.new(call_uri: uri) 1163 1164: subject << Adhearsion::Event::End.new 1165 end 1166 .... 1169 result = subject.join target, :media => :bridge, :direction => :recv 1170 1171: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1172: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1173 1174 expect(subject).to be_alive .... 1207 expect(result[:joined_condition].wait(0.5)).to be_falsey 1208 1209: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1210 expect(result[:joined_condition].wait(0.5)).to be_truthy 1211 end .... 1217 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1218 1219: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1220 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1221 1222: subject << Adhearsion::Event::Unjoined.new(call_uri: uri) 1223 expect(result[:unjoined_condition].wait(0.5)).to be_truthy 1224 end .... 1231 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1232 1233: subject << Adhearsion::Event::End.new 1234 expect(result[:joined_condition].wait(0.5)).to be_truthy 1235 expect(result[:unjoined_condition].wait(0.5)).to be_truthy .... 1240 result = subject.join target, :media => :bridge, :direction => :recv 1241 1242: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1243: subject << Adhearsion::Event::Unjoined.new(call_uri: uri) 1244 1245: subject << Adhearsion::Event::End.new 1246 end 1247 .... 1250 result = subject.join target, :media => :bridge, :direction => :recv 1251 1252: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1253: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1254 1255 expect(subject).to be_alive .... 1289 expect(result[:joined_condition].wait(0.5)).to be_falsey 1290 1291: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1292 expect(result[:joined_condition].wait(0.5)).to be_truthy 1293 end .... 1299 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1300 1301: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1302 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1303 1304: subject << Adhearsion::Event::Unjoined.new(call_uri: uri) 1305 expect(result[:unjoined_condition].wait(0.5)).to be_truthy 1306 end .... 1313 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1314 1315: subject << Adhearsion::Event::End.new 1316 expect(result[:joined_condition].wait(0.5)).to be_truthy 1317 expect(result[:unjoined_condition].wait(0.5)).to be_truthy .... 1322 result = subject.join target.merge({:media => :bridge, :direction => :recv}) 1323 1324: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1325: subject << Adhearsion::Event::Unjoined.new(call_uri: uri) 1326 1327: subject << Adhearsion::Event::End.new 1328 end 1329 .... 1332 result = subject.join target.merge({:media => :bridge, :direction => :recv}) 1333 1334: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1335: subject << Adhearsion::Event::Joined.new(call_uri: uri) 1336 1337 expect(subject).to be_alive .... 1370 expect(result[:joined_condition].wait(0.5)).to be_falsey 1371 1372: subject << Adhearsion::Event::Joined.new(mixer_name: mixer_name) 1373 expect(result[:joined_condition].wait(0.5)).to be_truthy 1374 end .... 1380 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1381 1382: subject << Adhearsion::Event::Joined.new(mixer_name: mixer_name) 1383 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1384 1385: subject << Adhearsion::Event::Unjoined.new(mixer_name: mixer_name) 1386 expect(result[:unjoined_condition].wait(0.5)).to be_truthy 1387 end .... 1394 expect(result[:unjoined_condition].wait(0.5)).to be_falsey 1395 1396: subject << Adhearsion::Event::End.new 1397 expect(result[:joined_condition].wait(0.5)).to be_truthy 1398 expect(result[:unjoined_condition].wait(0.5)).to be_truthy .... 1403 result = subject.join target.merge({:media => :bridge, :direction => :recv}) 1404 1405: subject << Adhearsion::Event::Joined.new(mixer_name: mixer_name) 1406: subject << Adhearsion::Event::Unjoined.new(mixer_name: mixer_name) 1407 1408: subject << Adhearsion::Event::End.new 1409 end 1410 .... 1413 result = subject.join target.merge({:media => :bridge, :direction => :recv}) 1414 1415: subject << Adhearsion::Event::Joined.new(mixer_name: mixer_name) 1416: subject << Adhearsion::Event::Joined.new(mixer_name: mixer_name) 1417 1418 expect(subject).to be_alive /Users/ben/code/adhearsion/spec/adhearsion/outbound_call_spec.rb: 68 expect(Adhearsion.router).to receive(:handle).once.with(mock_call) 69 70: OutboundCall.originate(to) << Adhearsion::Event::Answered.new 71 end 72 .. 78 expect(mock_call).to receive(:execute_controller).once.with kind_of(controller), kind_of(Proc) 79 call = OutboundCall.originate to, :controller => controller 80: call << Adhearsion::Event::Answered.new 81 end 82 .. 86 87 call = OutboundCall.originate to, :controller => controller 88: call << Adhearsion::Event::Answered.new 89 sleep 0.5 90 end .. 96 expect(mock_call).to receive(:execute_controller).with(expected_controller, kind_of(Proc)).once 97 call = OutboundCall.originate to, :controller => controller, :controller_metadata => {:foo => 'bar'} 98: call << Adhearsion::Event::Answered.new 99 end 100 end ... 111 :foobar 112 end 113: call << Adhearsion::Event::Answered.new 114 end 115 end /Users/ben/code/adhearsion/spec/adhearsion/call_controller/dial_spec.rb: 267 expect(call).to receive(:answer).once 268 expect(other_mock_call).to receive(:join).once.with(call, {}) do 269: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 270: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 271 end 272 ... 291 expect(call).to receive(:answer).once 292 expect(other_mock_call).to receive(:join).once.with(call, {}) do 293: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 294: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 295 end 296 allow(other_mock_call).to receive_messages hangup: true ... 307 base_time = Time.local(2008, 9, 1, 12, 0, 37) 308 Timecop.freeze base_time 309: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 310 other_mock_call << mock_end 311 ... 325 expect(call).to receive(:answer).once 326 expect(other_mock_call).to receive(:join).once.with(call, media: :direct) do 327: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 328: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 329 end 330 allow(other_mock_call).to receive_messages hangup: true ... 336 other_mock_call << mock_answered 337 338: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 339 other_mock_call << mock_end 340 ... 352 expect(call).to receive(:answer).once 353 expect(other_mock_call).to receive(:join).once.with(join_target, join_options) do 354: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 355: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 356 end 357 allow(other_mock_call).to receive(:unjoin) do 358: call << Adhearsion::Event::Unjoined.new(call_uri: other_mock_call.id) 359: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 360 end 361 end ... 363 it "should unjoin the calls" do 364 expect(other_mock_call).to receive(:unjoin).once.ordered.with(call) do 365: call << Adhearsion::Event::Unjoined.new(call_uri: other_mock_call.id) 366: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 367 end 368 ... 504 it "should rejoin the calls" do 505 expect(other_mock_call).to receive(:unjoin).once.ordered.with(call) do 506: call << Adhearsion::Event::Unjoined.new(call_uri: other_mock_call.id) 507: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 508 end 509 ... 523 524 expect(other_mock_call).to receive(:join).once.ordered.with(call, {}) do 525: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 526: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 527 end 528 dial.rejoin ... 550 551 expect(other_mock_call).to receive(:join).once.ordered.with(call, media: :direct) do 552: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 553: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 554 end 555 dial.rejoin ... 569 570 expect(other_mock_call).to receive(:join).once.ordered.with(call, media: :direct) do 571: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 572: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 573 end 574 dial.rejoin nil, media: :direct ... 584 expect(other_mock_call).to receive(:unjoin).once.ordered.with(join_target) 585 expect(call).to receive(:unjoin).once.ordered.with(join_target) do 586: call << Adhearsion::Event::Unjoined.new(join_target) 587: other_mock_call << Adhearsion::Event::Unjoined.new(join_target) 588 end 589 ... 620 it "should join all calls to the mixer" do 621 expect(other_mock_call).to receive(:unjoin).once.ordered.with(call) do 622: call << Adhearsion::Event::Unjoined.new(call_uri: other_mock_call.id) 623: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 624 end 625 ... 652 it "#split should then unjoin calls from the mixer" do 653 expect(other_mock_call).to receive(:unjoin).once.ordered.with(call) do 654: call << Adhearsion::Event::Unjoined.new(call_uri: other_mock_call.id) 655: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 656 end 657 ... 675 676 expect(other_mock_call).to receive(:unjoin).once.ordered.with(mixer_name: mixer) do 677: other_mock_call << Adhearsion::Event::Unjoined.new(mixer_name: mixer) 678 end 679 expect(call).to receive(:unjoin).once.ordered.with(mixer_name: mixer) do 680: call << Adhearsion::Event::Unjoined.new(mixer_name: mixer) 681 end 682 dial.split ... 718 it "should split calls, rejoin to a mixer, and rejoin other calls to mixer" do 719 expect(other_mock_call).to receive(:unjoin).once.ordered.with(call) do 720: call << Adhearsion::Event::Unjoined.new(call_uri: other_mock_call.id) 721: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 722 end 723 expect(second_other_mock_call).to receive(:unjoin).once.ordered.with(second_root_call) do 724: second_root_call << Adhearsion::Event::Unjoined.new(call_uri: second_other_mock_call.id) 725: second_other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: second_root_call.id) 726 end 727 ... 857 [call, second_root_call, second_other_mock_call].each do |call| 858 expect(call).to receive(:unjoin).once.with(mixer_name: mixer) do 859: call << Adhearsion::Event::Unjoined.new(mixer_name: mixer) 860 end 861 end ... 865 [call, other_mock_call, second_root_call, second_other_mock_call].each do |call| 866 expect(call).to receive(:join).once.with({mixer_name: mixer}, {}) do 867: call << Adhearsion::Event::Joined.new(mixer_name: mixer) 868 end 869 end ... 965 [call, second_root_call, second_other_mock_call].each do |call| 966 expect(call).to receive(:unjoin).once.with(mixer_name: mixer) do 967: call << Adhearsion::Event::Unjoined.new(mixer_name: mixer) 968 end 969 end ... 978 [call, second_root_call, second_other_mock_call].each do |call| 979 expect(call).to receive(:join).once.with({mixer_name: mixer}, {}) do 980: call << Adhearsion::Event::Joined.new(mixer_name: mixer) 981 end 982 end ... 1095 1096 other_mock_call << mock_answered 1097: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 1098 1099 expect(latch.wait(2)).to be_truthy .... 1354 expect(call).to receive(:answer).once 1355 expect(other_mock_call).to receive(:join).once.with(call, {}) do 1356: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 1357: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 1358 end 1359 .... 1369 base_time = Time.local(2008, 9, 1, 12, 0, 42) 1370 Timecop.freeze base_time 1371: other_mock_call << Adhearsion::Event::Unjoined.new(call_uri: call.id) 1372 1373 expect(latch.wait(2)).to be_truthy .... 1444 expect(other_mock_call).to receive(:dial).once.with(to, from: nil) 1445 expect(other_mock_call).to receive(:join).once.with(call, {}) do 1446: call << Adhearsion::Event::Joined.new(call_uri: other_mock_call.id) 1447: other_mock_call << Adhearsion::Event::Joined.new(call_uri: call.id) 1448 end 1449 expect(other_mock_call).to receive(:hangup).once do 92 matches across 5 files Searching 326 files for " < Adhearsion::Event" (case sensitive) /Users/ben/code/adhearsion/lib/adhearsion/event/asterisk/ami.rb: 4 class Event 5 module Asterisk 6: class AMI < Adhearsion::Event 7 register :event, :ami 8 1 match in 1 file