Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
217 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ rvm: | |
- 1.9.2 | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.0 | ||
- 2.2.0 | ||
- jruby-19mode | ||
- rbx-19mode | ||
- ruby-head | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'adhearsion' | ||
|
||
class Adhearsion::Call | ||
def stop_all_runners! | ||
return unless variables[:matrioska_runners] | ||
|
||
variables[:matrioska_runners].each do |runner| | ||
runner.stop! | ||
end | ||
end | ||
|
||
def runners | ||
Array(variables[:matrioska_runners]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Matrioska | ||
VERSION = "0.2.1" | ||
VERSION = "0.3.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require 'adhearsion' | ||
require 'matrioska' | ||
|
||
describe Adhearsion::Call do | ||
let(:call) { Adhearsion::Call.new } | ||
|
||
|
||
it 'should track all runners launched with it' do | ||
runner = Matrioska::AppRunner.new call | ||
call.runners.should include(runner) | ||
end | ||
|
||
it 'should be possible to stop all runners on a call' do | ||
r1 = Matrioska::AppRunner.new call | ||
r2 = Matrioska::AppRunner.new call | ||
r3 = Matrioska::AppRunner.new call | ||
|
||
r1.should_receive(:stop!).once | ||
r2.should_receive(:stop!).once | ||
r3.should_receive(:stop!).once | ||
|
||
call.stop_all_runners! | ||
end | ||
|
||
|
||
end |
Oops, something went wrong.