adhearsion 1.2.1 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -11,3 +11,4 @@ Gemfile.lock
11
11
  coverage
12
12
  spec/reports
13
13
  doc
14
+ /.rbx/
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ 1.2.3
2
+ - Changes from 1.2.2, without an accidental API change which slipped in
3
+
4
+ 1.2.2 - yanked
5
+ - Fixed a console bug related to recent versions of Pry passing extra arguments. Thanks to Alvaro Parres
6
+ - Introducing new :initial_timeout and :interdigit_timeout options to #input in order to control the wait delay for the 1st and subsequent digits, respectively. Maintains support for the existing :timeout option. (https://github.com/adhearsion/adhearsion/pull/41)
7
+ - Updated #input documentation for new features in Adhearsion 1.2.x
8
+ - Fix bug where setting log formatters when demonising would not work (https://github.com/adhearsion/adhearsion/issues/36)
9
+
1
10
  1.2.1
2
11
  - Removed the restful_rpc component since it is now in a gem.
3
12
  - Allow overriding the path to a component in the testing framework so as to support new style components (lib/)
@@ -9,8 +9,8 @@ module Adhearsion
9
9
  # Start the Adhearsion console
10
10
  #
11
11
  def run
12
- Pry.prompt = [ proc {|obj, nest_level| "AHN#{' ' * nest_level}> " },
13
- proc {|obj, nest_level| "AHN#{' ' * nest_level}? " } ]
12
+ Pry.prompt = [ proc { |obj, nest_level, pry_instance = nil| "AHN#{' ' * nest_level}> " },
13
+ proc { |obj, nest_level, pry_instance = nil| "AHN#{' ' * nest_level}? " } ]
14
14
  pry
15
15
  end
16
16
 
@@ -349,7 +349,7 @@ Adhearsion will abort until you fix this. Sorry for the incovenience.
349
349
  file_logger = Log4r::FileOutputter.new("Main Adhearsion log file", :filename => log_file, :trunc => false)
350
350
 
351
351
  if should_daemonize?
352
- Logging::AdhearsionLogger.outputters = file_logger
352
+ Logging::AdhearsionLogger.outputters = [file_logger]
353
353
  else
354
354
  Logging::AdhearsionLogger.outputters << file_logger
355
355
  end
@@ -2,7 +2,7 @@ module Adhearsion #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1 unless defined? MAJOR
4
4
  MINOR = 2 unless defined? MINOR
5
- TINY = 1 unless defined? TINY
5
+ TINY = 3 unless defined? TINY
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.') unless defined? STRING
8
8
  end
@@ -663,11 +663,16 @@ module Adhearsion
663
663
  end
664
664
 
665
665
  # Used to receive keypad input from the user. Digits are collected
666
- # via DTMF (keypad) input until one of three things happens:
666
+ # via DTMF (keypad) input until one of four things happens:
667
667
  #
668
- # 1. The number of digits you specify as the first argument is collected
669
- # 2. The timeout you specify with the :timeout option elapses.
670
- # 3. The "#" key (or the key you specify with :accept_key) is pressed
668
+ # 1. The number of digits you specify as the first argument is collected
669
+ # 2. The timeout elapses. You can specify the timeout by either:
670
+ # * Providing the :timeout option which applies for each awaited
671
+ # digit
672
+ # * Providing the :initial_timeout for 1st digit and
673
+ # :interdigit_timeout for subsequent digits.
674
+ # 3. The "#" key (or the key you specify with :accept_key) is pressed
675
+ # 4. You return true from a block you pass in (see "Currency Example" below)
671
676
  #
672
677
  # Usage examples
673
678
  #
@@ -675,7 +680,10 @@ module Adhearsion
675
680
  # input 3 # Receives three digits. Can be 0-9, * or #
676
681
  # input 5, :accept_key => "*" # Receive at most 5 digits, stopping if '*' is pressed
677
682
  # input 1, :timeout => 1.minute # Receive a single digit, returning an empty
678
- # string if the timeout is encountered
683
+ # # string if the timeout is encountered
684
+ # input 3, :initial_timeout => 10.seconds, :interdigit_timeout => 5.seconds # Accept up to 3 digits,
685
+ # # waiting 10 seconds for the 1st digit
686
+ # # and 5 seconds for each subsequent digit.
679
687
  # input 9, :timeout => 7, :accept_key => "0" # Receives nine digits, returning
680
688
  # # when the timeout is encountered
681
689
  # # or when the "0" key is pressed.
@@ -683,9 +691,22 @@ module Adhearsion
683
691
  # input :play => ["if-this-is-correct-press", 1, "otherwise-press", 2]
684
692
  # input :interruptible => false, :play => ["you-cannot-interrupt-this-message"] # Disallow DTMF (keypad) interruption
685
693
  # # until after all files are played.
694
+ # input 3, :speak => {:text => 'How much wood could a woodchuck chuck?'} # Say an interruptible TTS phrase
695
+ # # before waiting for input
696
+ # input 5, :play => 'this-sound-file-might-not-exist', :speak => {:text => "Here's the TTS I say in case I can't find the sound file"}
697
+ #
698
+ # Currency Example
699
+ # # Use a block to describe what kind of data will satisfy our input. Your block will be invoked each time a new digit is
700
+ # # received. When your block returns true, it signals #input not to wait for digits anymore. In the example below, we are
701
+ # # expecting a "currency" value, like 10*99. If the data ends with 2 decimal places, we immediately stop waiting for input.
702
+ # input 7, :speak => {:text => "How much is that doggie in the window?"} { |value| value =~ /\*\d\d/ }
686
703
  #
687
704
  # When specifying files to play, the playback of the sequence of files will stop
688
- # immediately when the user presses the first digit.
705
+ # immediately when the user presses the first digit unless you set :interruptible
706
+ # to false.
707
+ #
708
+ # The :speak option takes a Hash. The Hash should include a :text key with a
709
+ # TTS phrase to say. All other keys accepted by {#speak} are also supported.
689
710
  #
690
711
  # The :timeout option works like a digit timeout, therefore each digit pressed
691
712
  # causes the timer to reset. This is a much more user-friendly approach than an
@@ -698,6 +719,8 @@ module Adhearsion
698
719
  # @return [String] The keypad input received. An empty string is returned in the
699
720
  # absense of input. If the :accept_key argument was pressed, it
700
721
  # will not appear in the output.
722
+ #
723
+ # @see http://mojolingo.com/blog/2011/getting_ready_for_adhearsion_1_2/ More information on :speak, and &block parameters
701
724
  def input(*args, &block)
702
725
  begin
703
726
  input! *args, &block
@@ -730,8 +753,10 @@ module Adhearsion
730
753
  options[:speak][:interruptible] = options[:interruptible]
731
754
  end
732
755
 
733
- timeout = options[:timeout]
734
- terminating_key = options[:accept_key]
756
+ timeout = options[:timeout] || -1
757
+ initial_timeout = options[:initial_timeout] || timeout
758
+ interdigit_timeout = options[:interdigit_timeout] || timeout
759
+ terminating_key = options[:accept_key]
735
760
  terminating_key = if terminating_key
736
761
  terminating_key.to_s
737
762
  elsif number_of_digits.nil? && !terminating_key.equal?(false)
@@ -762,8 +787,10 @@ module Adhearsion
762
787
  elsif options[:speak]
763
788
  key = speak(options[:speak].delete(:text), options[:speak]) || ''
764
789
  else
765
- key = wait_for_digit timeout || -1
790
+ key = ''
766
791
  end
792
+ initial_timeout = nil if key.present?
793
+
767
794
  loop do
768
795
  return buffer if key.nil?
769
796
  if terminating_key
@@ -778,7 +805,8 @@ module Adhearsion
778
805
  return buffer if number_of_digits && number_of_digits == buffer.length
779
806
  end
780
807
  return buffer if block_given? && yield(buffer)
781
- key = wait_for_digit(timeout || -1)
808
+ key = wait_for_digit(initial_timeout || interdigit_timeout)
809
+ initial_timeout = nil
782
810
  end
783
811
  end
784
812
 
@@ -16,6 +16,10 @@ module DatabaseInitializationTestHelper
16
16
  Adhearsion::Initializer::DatabaseInitializer.start
17
17
  end
18
18
 
19
+ def expect_establish_connection
20
+ flexmock(ActiveRecord::Base).should_receive :establish_connection
21
+ end
22
+
19
23
  def tempfile_with_contents(contents)
20
24
  Tempfile.new("bogus_model").tap do |file|
21
25
  file.puts contents
@@ -74,7 +78,7 @@ describe "The database initializer" do
74
78
  connection_options = { :adapter => "sqlite3",
75
79
  :dbfile => "foo.sqlite3" }
76
80
  flexmock(Adhearsion::Initializer::DatabaseInitializer).should_receive(:require_models).once
77
- flexmock(ActiveRecord::Base).should_receive(:establish_connection).with(connection_options)
81
+ expect_establish_connection.with(connection_options)
78
82
 
79
83
  start_database_initializer_with_options connection_options
80
84
  end
@@ -83,6 +87,7 @@ describe "The database initializer" do
83
87
  bogus_model = tempfile_with_contents sample_user_model
84
88
  flexmock(Adhearsion::Configuration).new_instances.should_receive(:files_from_setting).once.
85
89
  with("paths", "models").and_return [bogus_model.path]
90
+ expect_establish_connection
86
91
  start_database_initializer
87
92
  User.superclass.should be ActiveRecord::Base
88
93
  end
@@ -889,7 +889,7 @@ describe 'The #input method' do
889
889
 
890
890
  it 'input() calls wait_for_digit the specified number of times (when no sound files are given)' do
891
891
  mock_call.should_receive(:interruptible_play!).never
892
- mock_call.should_receive(:wait_for_digit).times(4).and_return('1', '2', '3', '4')
892
+ mock_call.should_receive(:wait_for_digit).times(4).with(-1).and_return('1', '2', '3', '4')
893
893
  mock_call.input(4).should == '1234'
894
894
  end
895
895
 
@@ -898,12 +898,95 @@ describe 'The #input method' do
898
898
  mock_call.should_receive(:interruptible_play!).once.with('one').and_return nil
899
899
  mock_call.should_receive(:interruptible_play!).once.with('two').and_return nil
900
900
  mock_call.should_receive(:interruptible_play!).once.with('three').and_return nil
901
- mock_call.should_receive(:wait_for_digit).once.and_throw :digit_request
901
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_throw :digit_request
902
902
  should_throw(:digit_request) { mock_call.input(10, :play => sound_files) }
903
903
  end
904
904
 
905
+ it 'waits for digits with :initial_timeout and :interdigit_timeout' do
906
+ initial_timeout = 6.seconds
907
+ interdigit_timeout = 3.seconds
908
+ mock_call.should_receive(:interruptible_play!).never
909
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
910
+ mock_call.should_receive(:wait_for_digit).times(3).with(interdigit_timeout).and_return '2', '3', '4'
911
+ mock_call.input(4, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '1234'
912
+ end
913
+
914
+ it 'waits for digits with :initial_timeout when nothing is pressed' do
915
+ initial_timeout = 6.seconds
916
+ interdigit_timeout = 3.seconds
917
+ mock_call.should_receive(:interruptible_play!).never
918
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return nil
919
+ mock_call.input(4, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq ''
920
+ end
921
+
922
+ it 'waits for digits, ignoring :timeout if :initial_timeout and :interdigit_timeout are provided' do
923
+ timeout = 99.hours
924
+ initial_timeout = 2.seconds
925
+ interdigit_timeout = 1.second
926
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
927
+ mock_call.should_receive(:wait_for_digit).times(3).with(interdigit_timeout).and_return '2', '3', '4'
928
+ mock_call.input(4, :timeout => timeout, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '1234'
929
+ end
930
+
931
+ it 'waits for digits, and given a :timeout and :initial_timeout, defaults :interdigit_timeout to :timeout' do
932
+ initial_timeout = 20.seconds
933
+ timeout = 10.seconds
934
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
935
+ mock_call.should_receive(:wait_for_digit).times(2).with(timeout).and_return '2', '3'
936
+ mock_call.input(3, :timeout => timeout, :initial_timeout => initial_timeout).should eq '123'
937
+ end
938
+
939
+ it 'waits for digits, and given a :timeout and :interdigit_timeout, defaults :initial_timeout to :timeout' do
940
+ timeout = 12.seconds
941
+ interdigit_timeout = 6.seconds
942
+ mock_call.should_receive(:wait_for_digit).once.with(timeout).and_return '1'
943
+ mock_call.should_receive(:wait_for_digit).times(4).with(interdigit_timeout).and_return '2', '3', '4', '5'
944
+ mock_call.input(5, :timeout => timeout, :interdigit_timeout => interdigit_timeout).should eq '12345'
945
+ end
946
+
947
+ it 'waits for digits for :initial_timeout if sound playback is not interrupted' do
948
+ initial_timeout = 8.seconds
949
+ interdigit_timeout = 4.seconds
950
+ sound_files = %w[ready set go]
951
+ mock_call.should_receive(:interruptible_play!).once.with('ready').and_return nil
952
+ mock_call.should_receive(:interruptible_play!).once.with('set').and_return nil
953
+ mock_call.should_receive(:interruptible_play!).once.with('go').and_return nil
954
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
955
+ mock_call.should_receive(:wait_for_digit).times(4).with(interdigit_timeout).and_return '2', '3', '4', '5'
956
+ mock_call.input(5, :play => sound_files, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '12345'
957
+ end
958
+
959
+ it 'ignores :initial_timeout if sound playback is interrupted' do
960
+ initial_timeout = 8.seconds
961
+ interdigit_timeout = 4.seconds
962
+ sound_files = %w[ready set go]
963
+ mock_call.should_receive(:interruptible_play!).once.with('ready').and_return nil
964
+ mock_call.should_receive(:interruptible_play!).once.with('set').and_return '*'
965
+ mock_call.should_receive(:wait_for_digit).times(4).with(interdigit_timeout).and_return '2', '3', '4', '5'
966
+ mock_call.input(5, :play => sound_files, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '*2345'
967
+ end
968
+
969
+ it 'waits for digits for :initial_timeout if speech is not interrupted' do
970
+ initial_timeout = 10.seconds
971
+ interdigit_timeout = 5.seconds
972
+ text = "What's your area code?"
973
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return nil
974
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
975
+ mock_call.should_receive(:wait_for_digit).times(2).with(interdigit_timeout).and_return '2', '0'
976
+ mock_call.input(3, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout, :speak => {:text => text}).should eq '120'
977
+ end
978
+
979
+ it 'ignores :initial_timeout if speech is interrupted' do
980
+ initial_timeout = 10.seconds
981
+ interdigit_timeout = 5.seconds
982
+ text = "What's your area code?"
983
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return '3'
984
+ mock_call.should_receive(:wait_for_digit).times(2).with(interdigit_timeout).and_return '1', '2'
985
+ mock_call.input(3, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout, :speak => {:text => text}).should eq '312'
986
+ end
987
+
905
988
  it 'should default the :accept_key to "#" when unlimited digits are to be collected' do
906
- mock_call.should_receive(:wait_for_digit).times(2).and_return '*', '#'
989
+ mock_call.should_receive(:wait_for_digit).times(2).with(-1).and_return '*', '#'
907
990
  mock_call.input.should == '*'
908
991
  end
909
992
 
@@ -917,7 +1000,7 @@ describe 'The #input method' do
917
1000
 
918
1001
  it 'when :accept_key is false and input() is collecting a finite number of digits, it should allow all DTMFs' do
919
1002
  all_digits = %w[0 1 2 3 # * 4 5 6 7 8 9]
920
- mock_call.should_receive(:wait_for_digit).times(all_digits.size).and_return(*all_digits)
1003
+ mock_call.should_receive(:wait_for_digit).times(all_digits.size).with(-1).and_return(*all_digits)
921
1004
  the_following_code {
922
1005
  mock_call.input(all_digits.size, :accept_key => false)
923
1006
  }.should_not raise_error ArgumentError
@@ -925,7 +1008,7 @@ describe 'The #input method' do
925
1008
 
926
1009
  it 'should terminate early when the passed block returns something truthy' do
927
1010
  three_digits = %w[9 3 0]
928
- mock_call.should_receive(:wait_for_digit).times(2).and_return(*three_digits)
1011
+ mock_call.should_receive(:wait_for_digit).times(2).with(-1).and_return(*three_digits)
929
1012
  mock_call.input(3, :accept_key => false) { |buffer| buffer.size == 2 }.should == '93'
930
1013
  end
931
1014
 
@@ -936,9 +1019,10 @@ describe 'The #input method' do
936
1019
  end
937
1020
 
938
1021
  it 'passes wait_for_digit the :timeout option when one is given' do
1022
+ timeout = 1.minute
939
1023
  mock_call.should_receive(:interruptible_play!).never
940
- mock_call.should_receive(:wait_for_digit).twice.and_return '1', '2'
941
- mock_call.input(2, :timeout => 1.minute).should == '12'
1024
+ mock_call.should_receive(:wait_for_digit).twice.with(timeout).and_return '1', '2'
1025
+ mock_call.input(2, :timeout => timeout).should == '12'
942
1026
  end
943
1027
 
944
1028
  it 'executes interruptible_play!() with all of the files given to :play' do
@@ -946,7 +1030,7 @@ describe 'The #input method' do
946
1030
  mock_call.should_receive(:interruptible_play!).once.with('foo').and_return nil
947
1031
  mock_call.should_receive(:interruptible_play!).once.with('bar').and_return nil
948
1032
  mock_call.should_receive(:interruptible_play!).once.with('qaz').and_return '#'
949
- mock_call.should_receive(:wait_for_digit).once.and_return '*'
1033
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_return '*'
950
1034
  mock_call.input(2, :play => sound_files).should == '#*'
951
1035
  end
952
1036
 
@@ -955,18 +1039,18 @@ describe 'The #input method' do
955
1039
  mock_call.should_receive(:play!).once.with('foo').and_return true
956
1040
  mock_call.should_receive(:play!).once.with('bar').and_return true
957
1041
  mock_call.should_receive(:play!).once.with('qaz').and_return true
958
- mock_call.should_receive(:wait_for_digit).once.and_return '*'
1042
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_return '*'
959
1043
  mock_call.input(1, :play => sound_files, :interruptible => false).should == '*'
960
1044
  end
961
1045
 
962
1046
  it 'pressing the terminating key before any other digits returns an empty string' do
963
- mock_call.should_receive(:wait_for_digit).once.and_return '*'
1047
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_return '*'
964
1048
  mock_call.input(:accept_key => '*').should == ''
965
1049
  end
966
1050
 
967
1051
  it 'should execute wait_for_digit first if no sound files are given' do
968
1052
  mock_call.should_receive(:interruptible_play!).never
969
- mock_call.should_receive(:wait_for_digit).once.and_throw :digit_request
1053
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_throw :digit_request
970
1054
  should_throw(:digit_request) { mock_call.input(1) }
971
1055
  end
972
1056
 
@@ -979,18 +1063,22 @@ describe 'The #input method' do
979
1063
  it 'should execute wait_for_digit, even if some interruptible sound files are not found' do
980
1064
  pbx_should_respond_with_stream_file_failure_on_open
981
1065
  file = 'foobar'
982
- timeout = 1.hour
983
- mock_call.should_receive(:wait_for_digit).twice.with(timeout).and_return '8', '9'
984
- mock_call.input(2, :timeout => timeout, :play => file).should == '89'
1066
+ initial_timeout = 1.hour
1067
+ interdigit_timeout = 1.minute
1068
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '8'
1069
+ mock_call.should_receive(:wait_for_digit).once.with(interdigit_timeout).and_return '9'
1070
+ mock_call.input(2, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout, :play => file).should == '89'
985
1071
  pbx_was_asked_to_stream file
986
1072
  end
987
1073
 
988
- it 'should execute wait_for_digit with, even if some uninterruptible sound files are not found' do
1074
+ it 'should execute wait_for_digit, even if some uninterruptible sound files are not found' do
989
1075
  pbx_should_respond_with_playback_failure
990
1076
  file = 'foobar'
991
- timeout = 1.hour
992
- mock_call.should_receive(:wait_for_digit).twice.with(timeout).and_return '8', '9'
993
- mock_call.input(2, :timeout => timeout, :play => file, :interruptible => false).should == '89'
1077
+ initial_timeout = 1.hour
1078
+ interdigit_timeout = 1.minute
1079
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '8'
1080
+ mock_call.should_receive(:wait_for_digit).once.with(interdigit_timeout).and_return '9'
1081
+ mock_call.input(2, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout, :play => file, :interruptible => false).should == '89'
994
1082
  pbx_was_asked_to_play file
995
1083
  end
996
1084
 
@@ -1035,7 +1123,7 @@ describe 'The #input method' do
1035
1123
  it 'should not raise an exception if the sound file is unplayable' do
1036
1124
  pbx_should_respond_with_stream_file_failure_on_open
1037
1125
  file = 'foobar'
1038
- mock_call.should_receive(:wait_for_digit).once
1126
+ mock_call.should_receive(:wait_for_digit).once.with -1
1039
1127
  the_following_code {
1040
1128
  mock_call.input 1, :play => file
1041
1129
  }.should_not raise_error
@@ -1044,27 +1132,52 @@ describe 'The #input method' do
1044
1132
 
1045
1133
  it 'should default to playing interruptible prompts' do
1046
1134
  mock_call.should_receive(:interruptible_play!).once.with('does_not_matter')
1047
- mock_call.should_receive(:wait_for_digit).once
1135
+ mock_call.should_receive(:wait_for_digit).once.with -1
1048
1136
  mock_call.input(1, :play => 'does_not_matter')
1049
1137
  end
1050
1138
 
1051
1139
  it 'should render uninterruptible prompts' do
1052
1140
  mock_call.should_receive(:play!).once.with('does_not_matter')
1053
- mock_call.should_receive(:wait_for_digit).once
1141
+ mock_call.should_receive(:wait_for_digit).once.with -1
1054
1142
  mock_call.input(1, :play => 'does_not_matter', :interruptible => false)
1055
1143
  end
1056
1144
 
1057
1145
  it 'should fall back to speaking TTS if sound file is unplayable' do
1058
1146
  pbx_should_respond_with_stream_file_failure_on_open
1059
1147
  mock_call.should_receive(:speak).once.with("The sound file was not available", :interruptible => true)
1060
- mock_call.should_receive(:wait_for_digit).once
1148
+ mock_call.should_receive(:wait_for_digit).once.with -1
1061
1149
  mock_call.input(1, :play => 'unavailable sound file', :speak => {:text => "The sound file was not available"})
1062
1150
  @output.read.should == "STREAM FILE \"unavailable sound file\" \"1234567890*#\"\n"
1063
1151
  end
1064
1152
 
1153
+ it 'waits for digits for :initial_timeout if fall back TTS is not interrupted' do
1154
+ initial_timeout = 10.seconds
1155
+ interdigit_timeout = 5.seconds
1156
+ text = "What's your sign?"
1157
+ missing_sound_file = 'missing-sound-file'
1158
+ pbx_should_respond_with_stream_file_failure_on_open
1159
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return nil
1160
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1161
+ mock_call.should_receive(:wait_for_digit).once.with(interdigit_timeout).and_return '2'
1162
+ mock_call.input(2, :play => missing_sound_file, :speak => {:text => text}, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '12'
1163
+ @output.read.should == "STREAM FILE \"#{missing_sound_file}\" \"1234567890*#\"\n"
1164
+ end
1165
+
1166
+ it 'ignores :initial_timeout if fall back TTS is interrupted' do
1167
+ initial_timeout = 10.seconds
1168
+ interdigit_timeout = 5.seconds
1169
+ text = "What's your sign?"
1170
+ missing_sound_file = 'missing-sound-file'
1171
+ pbx_should_respond_with_stream_file_failure_on_open
1172
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return '1'
1173
+ mock_call.should_receive(:wait_for_digit).once.with(interdigit_timeout).and_return '2'
1174
+ mock_call.input(2, :play => missing_sound_file, :speak => {:text => text}, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '12'
1175
+ @output.read.should == "STREAM FILE \"#{missing_sound_file}\" \"1234567890*#\"\n"
1176
+ end
1177
+
1065
1178
  it 'should allow uninterruptible TTS prompts' do
1066
1179
  mock_call.should_receive(:speak).once.with("The sound file was not available", :interruptible => false)
1067
- mock_call.should_receive(:wait_for_digit).once
1180
+ mock_call.should_receive(:wait_for_digit).once.with -1
1068
1181
  mock_call.input(1, :speak => {:text => "The sound file was not available"}, :interruptible => false)
1069
1182
  end
1070
1183
 
@@ -1097,16 +1210,99 @@ describe 'The #input! method' do
1097
1210
  mock_call.should_receive(:interruptible_play!).once.with('one').and_return nil
1098
1211
  mock_call.should_receive(:interruptible_play!).once.with('two').and_return nil
1099
1212
  mock_call.should_receive(:interruptible_play!).once.with('three').and_return nil
1100
- mock_call.should_receive(:wait_for_digit).once.and_throw :digit_request
1213
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_throw :digit_request
1101
1214
  should_throw(:digit_request) { mock_call.input! 10, :play => sound_files }
1102
1215
  end
1103
1216
 
1217
+ it 'waits for digits with :initial_timeout and :interdigit_timeout' do
1218
+ initial_timeout = 6.seconds
1219
+ interdigit_timeout = 3.seconds
1220
+ mock_call.should_receive(:interruptible_play!).never
1221
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1222
+ mock_call.should_receive(:wait_for_digit).times(3).with(interdigit_timeout).and_return '2', '3', '4'
1223
+ mock_call.input!(4, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '1234'
1224
+ end
1225
+
1226
+ it 'waits for digits with :initial_timeout when nothing is pressed' do
1227
+ initial_timeout = 6.seconds
1228
+ interdigit_timeout = 3.seconds
1229
+ mock_call.should_receive(:interruptible_play!).never
1230
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return nil
1231
+ mock_call.input!(4, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq ''
1232
+ end
1233
+
1234
+ it 'waits for digits, ignoring :timeout if :initial_timeout and :interdigit_timeout are provided' do
1235
+ timeout = 99.hours
1236
+ initial_timeout = 2.seconds
1237
+ interdigit_timeout = 1.second
1238
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1239
+ mock_call.should_receive(:wait_for_digit).times(3).with(interdigit_timeout).and_return '2', '3', '4'
1240
+ mock_call.input!(4, :timeout => timeout, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '1234'
1241
+ end
1242
+
1243
+ it 'waits for digits, and given a :timeout and :initial_timeout, defaults :interdigit_timeout to :timeout' do
1244
+ initial_timeout = 20.seconds
1245
+ timeout = 10.seconds
1246
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1247
+ mock_call.should_receive(:wait_for_digit).times(2).with(timeout).and_return '2', '3'
1248
+ mock_call.input!(3, :timeout => timeout, :initial_timeout => initial_timeout).should eq '123'
1249
+ end
1250
+
1251
+ it 'waits for digits, and given a :timeout and :interdigit_timeout, defaults :initial_timeout to :timeout' do
1252
+ timeout = 12.seconds
1253
+ interdigit_timeout = 6.seconds
1254
+ mock_call.should_receive(:wait_for_digit).once.with(timeout).and_return '1'
1255
+ mock_call.should_receive(:wait_for_digit).times(4).with(interdigit_timeout).and_return '2', '3', '4', '5'
1256
+ mock_call.input!(5, :timeout => timeout, :interdigit_timeout => interdigit_timeout).should eq '12345'
1257
+ end
1258
+
1259
+ it 'waits for digits for :initial_timeout if sound playback is not interrupted' do
1260
+ initial_timeout = 8.seconds
1261
+ interdigit_timeout = 4.seconds
1262
+ sound_files = %w[ready set go]
1263
+ mock_call.should_receive(:interruptible_play!).once.with('ready').and_return nil
1264
+ mock_call.should_receive(:interruptible_play!).once.with('set').and_return nil
1265
+ mock_call.should_receive(:interruptible_play!).once.with('go').and_return nil
1266
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1267
+ mock_call.should_receive(:wait_for_digit).times(4).with(interdigit_timeout).and_return '2', '3', '4', '5'
1268
+ mock_call.input!(5, :play => sound_files, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '12345'
1269
+ end
1270
+
1271
+ it 'ignores :initial_timeout if sound playback is interrupted' do
1272
+ initial_timeout = 8.seconds
1273
+ interdigit_timeout = 4.seconds
1274
+ sound_files = %w[ready set go]
1275
+ mock_call.should_receive(:interruptible_play!).once.with('ready').and_return nil
1276
+ mock_call.should_receive(:interruptible_play!).once.with('set').and_return '*'
1277
+ mock_call.should_receive(:wait_for_digit).times(4).with(interdigit_timeout).and_return '2', '3', '4', '5'
1278
+ mock_call.input!(5, :play => sound_files, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '*2345'
1279
+ end
1280
+
1281
+ it 'waits for digits for :initial_timeout if speech is not interrupted' do
1282
+ initial_timeout = 10.seconds
1283
+ interdigit_timeout = 5.seconds
1284
+ text = "What's your area code?"
1285
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return nil
1286
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1287
+ mock_call.should_receive(:wait_for_digit).times(2).with(interdigit_timeout).and_return '2', '0'
1288
+ mock_call.input!(3, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout, :speak => {:text => text}).should eq '120'
1289
+ end
1290
+
1291
+ it 'ignores :initial_timeout if speech is interrupted' do
1292
+ initial_timeout = 10.seconds
1293
+ interdigit_timeout = 5.seconds
1294
+ text = "What's your area code?"
1295
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return '3'
1296
+ mock_call.should_receive(:wait_for_digit).times(2).with(interdigit_timeout).and_return '1', '2'
1297
+ mock_call.input!(3, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout, :speak => {:text => text}).should eq '312'
1298
+ end
1299
+
1104
1300
  it 'executes interruptible_play!() with all of the files given to :play' do
1105
1301
  sound_files = %w[foo bar qaz]
1106
1302
  mock_call.should_receive(:interruptible_play!).once.with('foo').and_return nil
1107
1303
  mock_call.should_receive(:interruptible_play!).once.with('bar').and_return nil
1108
1304
  mock_call.should_receive(:interruptible_play!).once.with('qaz').and_return '#'
1109
- mock_call.should_receive(:wait_for_digit).once.and_return '*'
1305
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_return '*'
1110
1306
  mock_call.input!(2, :play => sound_files).should == '#*'
1111
1307
  end
1112
1308
 
@@ -1115,13 +1311,13 @@ describe 'The #input! method' do
1115
1311
  mock_call.should_receive(:play!).once.with('foo').and_return true
1116
1312
  mock_call.should_receive(:play!).once.with('bar').and_return true
1117
1313
  mock_call.should_receive(:play!).once.with('qaz').and_return true
1118
- mock_call.should_receive(:wait_for_digit).once.and_return '*'
1314
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_return '*'
1119
1315
  mock_call.input!(1, :play => sound_files, :interruptible => false).should == '*'
1120
1316
  end
1121
1317
 
1122
1318
  it 'should execute wait_for_digit first if no sound files are given' do
1123
1319
  mock_call.should_receive(:interruptible_play!).never
1124
- mock_call.should_receive(:wait_for_digit).once.and_throw :digit_request
1320
+ mock_call.should_receive(:wait_for_digit).once.with(-1).and_throw :digit_request
1125
1321
  should_throw(:digit_request) { mock_call.input! 1 }
1126
1322
  end
1127
1323
 
@@ -1135,6 +1331,39 @@ describe 'The #input! method' do
1135
1331
  pbx_was_asked_to_stream file
1136
1332
  end
1137
1333
 
1334
+ it 'should fall back to speaking TTS if sound file is unplayable' do
1335
+ pbx_should_respond_with_stream_file_failure_on_open
1336
+ mock_call.should_receive(:speak).once.with("The sound file was not available", :interruptible => true)
1337
+ mock_call.should_receive(:wait_for_digit).once.with -1
1338
+ mock_call.input!(1, :play => 'unavailable sound file', :speak => {:text => "The sound file was not available"})
1339
+ @output.read.should == "STREAM FILE \"unavailable sound file\" \"1234567890*#\"\n"
1340
+ end
1341
+
1342
+ it 'waits for digits for :initial_timeout if fall back TTS is not interrupted' do
1343
+ initial_timeout = 10.seconds
1344
+ interdigit_timeout = 5.seconds
1345
+ text = "What's your sign?"
1346
+ missing_sound_file = 'missing-sound-file'
1347
+ pbx_should_respond_with_stream_file_failure_on_open
1348
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return nil
1349
+ mock_call.should_receive(:wait_for_digit).once.with(initial_timeout).and_return '1'
1350
+ mock_call.should_receive(:wait_for_digit).once.with(interdigit_timeout).and_return '2'
1351
+ mock_call.input!(2, :play => missing_sound_file, :speak => {:text => text}, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '12'
1352
+ @output.read.should == "STREAM FILE \"#{missing_sound_file}\" \"1234567890*#\"\n"
1353
+ end
1354
+
1355
+ it 'ignores :initial_timeout if fall back TTS is interrupted' do
1356
+ initial_timeout = 10.seconds
1357
+ interdigit_timeout = 5.seconds
1358
+ text = "What's your sign?"
1359
+ missing_sound_file = 'missing-sound-file'
1360
+ pbx_should_respond_with_stream_file_failure_on_open
1361
+ mock_call.should_receive(:speak).once.with(text, :interruptible => true).and_return '1'
1362
+ mock_call.should_receive(:wait_for_digit).once.with(interdigit_timeout).and_return '2'
1363
+ mock_call.input!(2, :play => missing_sound_file, :speak => {:text => text}, :initial_timeout => initial_timeout, :interdigit_timeout => interdigit_timeout).should eq '12'
1364
+ @output.read.should == "STREAM FILE \"#{missing_sound_file}\" \"1234567890*#\"\n"
1365
+ end
1366
+
1138
1367
  it 'should play a series of interruptible files, raising an error if a sound file cannot be found' do
1139
1368
  pbx_should_respond_with_stream_file_success 0
1140
1369
  pbx_should_respond_with_stream_file_failure_on_open
@@ -1535,7 +1764,7 @@ describe "The queue management abstractions" do
1535
1764
 
1536
1765
  it 'should fetch the members with the name given to queue()' do
1537
1766
  mock_call.should_receive(:variable).once.with("QUEUE_MEMBER_COUNT(jay)").and_return 5
1538
- mock_call.queue('jay').agents.size.should be 5
1767
+ mock_call.queue('jay').agents.size.should == 5
1539
1768
  end
1540
1769
 
1541
1770
  it 'should not fetch a QUEUE_MEMBER_COUNT each time count() is called when caching is enabled' do
@@ -1554,7 +1783,7 @@ describe "The queue management abstractions" do
1554
1783
  it 'when fetching agents, it should properly split by the supported delimiters' do
1555
1784
  queue_name = "doesnt_matter"
1556
1785
  mock_call.should_receive(:get_variable).with("QUEUE_MEMBER_LIST(#{queue_name})").and_return('Agent/007,Agent/003,Zap/2')
1557
- mock_call.queue(queue_name).agents(:cache => true).to_a.size.should be 3
1786
+ mock_call.queue(queue_name).agents(:cache => true).to_a.size.should == 3
1558
1787
  end
1559
1788
 
1560
1789
  it 'when fetching agents, each array index should be an instance of AgentProxy' do
@@ -1734,7 +1963,7 @@ describe "The queue management abstractions" do
1734
1963
  it 'waiting_count for a queue that does exist' do
1735
1964
  mock_call.should_receive(:get_variable).once.with("QUEUE_WAITING_COUNT(q)").and_return "50"
1736
1965
  flexmock(mock_call.queue('q')).should_receive(:exists?).once.and_return true
1737
- mock_call.queue('q').waiting_count.should be 50
1966
+ mock_call.queue('q').waiting_count.should == 50
1738
1967
  end
1739
1968
 
1740
1969
  it 'waiting_count for a queue that does not exist' do
@@ -2056,7 +2285,7 @@ describe 'the MenuBuilder' do
2056
2285
  link.bar "4", "5", 6
2057
2286
  end
2058
2287
 
2059
- builder.weighted_match_calculators.size.should be 6
2288
+ builder.weighted_match_calculators.size.should == 6
2060
2289
  builder.weighted_match_calculators.each do |match_calculator|
2061
2290
  match_calculator.should be_a_kind_of Adhearsion::VoIP::MatchCalculator
2062
2291
  end
@@ -2102,12 +2331,12 @@ describe 'the MenuBuilder' do
2102
2331
  end
2103
2332
  1.upto 9 do |num|
2104
2333
  builder.calculate_matches_for(num).tap do |matches_of_num|
2105
- matches_of_num.potential_match_count.should be 100
2106
- matches_of_num.exact_match_count.should be 1
2334
+ matches_of_num.potential_match_count.should == 100
2335
+ matches_of_num.exact_match_count.should == 1
2107
2336
  end
2108
2337
  builder.calculate_matches_for((num * 100) + 5).tap do |matches_of_num|
2109
- matches_of_num.potential_match_count.should be 0
2110
- matches_of_num.exact_match_count.should be 1
2338
+ matches_of_num.potential_match_count.should == 0
2339
+ matches_of_num.exact_match_count.should == 1
2111
2340
  end
2112
2341
  end
2113
2342
  end
@@ -2117,7 +2346,7 @@ describe 'the MenuBuilder' do
2117
2346
  link.nineninenine 999
2118
2347
  link.shouldnt_match 4444
2119
2348
  end
2120
- builder.calculate_matches_for(9).potential_match_count.should be 1
2349
+ builder.calculate_matches_for(9).potential_match_count.should == 1
2121
2350
  end
2122
2351
 
2123
2352
  it "three fixnums that obviously don't conflict" do
@@ -2158,7 +2387,7 @@ describe 'the MenuBuilder' do
2158
2387
  link.range 100..200
2159
2388
  end
2160
2389
  matches = builder.calculate_matches_for 1
2161
- matches.potential_match_count.should be 100
2390
+ matches.potential_match_count.should == 100
2162
2391
  end
2163
2392
 
2164
2393
  end
@@ -2333,7 +2562,7 @@ describe 'jump_to command' do
2333
2562
  rescue Adhearsion::VoIP::DSL::Dialplan::ControlPassingException
2334
2563
  # Eating this exception
2335
2564
  end
2336
- mock_call.extension.__real_num.should be 1337
2565
+ mock_call.extension.__real_num.should == 1337
2337
2566
  end
2338
2567
 
2339
2568
  it 'other overrides should be simply metadef()d' do
@@ -2869,7 +3098,7 @@ describe 'the DialPlan::ConfirmationManager' do
2869
3098
  it '::decode_hash() should split the sound files in the :play key to an array by splitting by "++"' do
2870
3099
  decoded_sound_files = Adhearsion::DialPlan::ConfirmationManager.decode_hash(example_encoded_hash)[:play]
2871
3100
  decoded_sound_files.should be_a_kind_of Array
2872
- decoded_sound_files.size.should be 2
3101
+ decoded_sound_files.size.should == 2
2873
3102
  end
2874
3103
 
2875
3104
  it 'a call to a party which is acknowledged with the proper key during the call to interruptible_play' do
@@ -107,7 +107,7 @@ describe 'A mailbox definition' do
107
107
 
108
108
  it 'setting the pin_number should be reflected in the to_hash form of the definition' do
109
109
  mailbox.pin_number 555
110
- mailbox.to_hash[:pin_number].should be 555
110
+ mailbox.to_hash[:pin_number].should == 555
111
111
  end
112
112
 
113
113
  it 'the mailbox number should be available in the mailbox_number getter' do
@@ -265,7 +265,7 @@ describe 'An expansive example of the Voicemail config generator' do
265
265
  end
266
266
  end
267
267
  internalized = vm.to_sanitary_hash
268
- internalized.size.should be 5 # general, zonemessages, default, employees, groups
268
+ internalized.size.should == 5 # general, zonemessages, default, employees, groups
269
269
 
270
270
  target_config = <<-CONFIG
271
271
  [general]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhearsion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,12 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2011-09-22 00:00:00.000000000 +01:00
16
- default_executable:
15
+ date: 2011-11-18 00:00:00.000000000 Z
17
16
  dependencies:
18
17
  - !ruby/object:Gem::Dependency
19
18
  name: bundler
20
- requirement: &2153625640 !ruby/object:Gem::Requirement
19
+ requirement: &2153249240 !ruby/object:Gem::Requirement
21
20
  none: false
22
21
  requirements:
23
22
  - - ! '>='
@@ -25,10 +24,10 @@ dependencies:
25
24
  version: 1.0.10
26
25
  type: :runtime
27
26
  prerelease: false
28
- version_requirements: *2153625640
27
+ version_requirements: *2153249240
29
28
  - !ruby/object:Gem::Dependency
30
29
  name: log4r
31
- requirement: &2153625040 !ruby/object:Gem::Requirement
30
+ requirement: &2153248640 !ruby/object:Gem::Requirement
32
31
  none: false
33
32
  requirements:
34
33
  - - ! '>='
@@ -36,10 +35,10 @@ dependencies:
36
35
  version: 1.0.5
37
36
  type: :runtime
38
37
  prerelease: false
39
- version_requirements: *2153625040
38
+ version_requirements: *2153248640
40
39
  - !ruby/object:Gem::Dependency
41
40
  name: activesupport
42
- requirement: &2153624560 !ruby/object:Gem::Requirement
41
+ requirement: &2160508360 !ruby/object:Gem::Requirement
43
42
  none: false
44
43
  requirements:
45
44
  - - ! '>='
@@ -47,10 +46,10 @@ dependencies:
47
46
  version: 2.1.0
48
47
  type: :runtime
49
48
  prerelease: false
50
- version_requirements: *2153624560
49
+ version_requirements: *2160508360
51
50
  - !ruby/object:Gem::Dependency
52
51
  name: i18n
53
- requirement: &2153624180 !ruby/object:Gem::Requirement
52
+ requirement: &2160507740 !ruby/object:Gem::Requirement
54
53
  none: false
55
54
  requirements:
56
55
  - - ! '>='
@@ -58,10 +57,10 @@ dependencies:
58
57
  version: '0'
59
58
  type: :runtime
60
59
  prerelease: false
61
- version_requirements: *2153624180
60
+ version_requirements: *2160507740
62
61
  - !ruby/object:Gem::Dependency
63
62
  name: json
64
- requirement: &2153623720 !ruby/object:Gem::Requirement
63
+ requirement: &2160506720 !ruby/object:Gem::Requirement
65
64
  none: false
66
65
  requirements:
67
66
  - - ! '>='
@@ -69,10 +68,10 @@ dependencies:
69
68
  version: '0'
70
69
  type: :runtime
71
70
  prerelease: false
72
- version_requirements: *2153623720
71
+ version_requirements: *2160506720
73
72
  - !ruby/object:Gem::Dependency
74
73
  name: rubigen
75
- requirement: &2153621640 !ruby/object:Gem::Requirement
74
+ requirement: &2160505340 !ruby/object:Gem::Requirement
76
75
  none: false
77
76
  requirements:
78
77
  - - ! '>='
@@ -80,10 +79,10 @@ dependencies:
80
79
  version: 1.5.6
81
80
  type: :runtime
82
81
  prerelease: false
83
- version_requirements: *2153621640
82
+ version_requirements: *2160505340
84
83
  - !ruby/object:Gem::Dependency
85
84
  name: rake
86
- requirement: &2153621020 !ruby/object:Gem::Requirement
85
+ requirement: &2160504180 !ruby/object:Gem::Requirement
87
86
  none: false
88
87
  requirements:
89
88
  - - ! '>='
@@ -91,10 +90,10 @@ dependencies:
91
90
  version: '0'
92
91
  type: :runtime
93
92
  prerelease: false
94
- version_requirements: *2153621020
93
+ version_requirements: *2160504180
95
94
  - !ruby/object:Gem::Dependency
96
95
  name: pry
97
- requirement: &2153620340 !ruby/object:Gem::Requirement
96
+ requirement: &2160500800 !ruby/object:Gem::Requirement
98
97
  none: false
99
98
  requirements:
100
99
  - - ! '>='
@@ -102,10 +101,10 @@ dependencies:
102
101
  version: '0'
103
102
  type: :runtime
104
103
  prerelease: false
105
- version_requirements: *2153620340
104
+ version_requirements: *2160500800
106
105
  - !ruby/object:Gem::Dependency
107
106
  name: rubigen
108
- requirement: &2153619580 !ruby/object:Gem::Requirement
107
+ requirement: &2160498080 !ruby/object:Gem::Requirement
109
108
  none: false
110
109
  requirements:
111
110
  - - ! '>='
@@ -113,10 +112,10 @@ dependencies:
113
112
  version: 1.5.6
114
113
  type: :development
115
114
  prerelease: false
116
- version_requirements: *2153619580
115
+ version_requirements: *2160498080
117
116
  - !ruby/object:Gem::Dependency
118
117
  name: rspec
119
- requirement: &2153618960 !ruby/object:Gem::Requirement
118
+ requirement: &2160496140 !ruby/object:Gem::Requirement
120
119
  none: false
121
120
  requirements:
122
121
  - - ! '>='
@@ -124,10 +123,10 @@ dependencies:
124
123
  version: 2.4.0
125
124
  type: :development
126
125
  prerelease: false
127
- version_requirements: *2153618960
126
+ version_requirements: *2160496140
128
127
  - !ruby/object:Gem::Dependency
129
128
  name: flexmock
130
- requirement: &2153618560 !ruby/object:Gem::Requirement
129
+ requirement: &2160494480 !ruby/object:Gem::Requirement
131
130
  none: false
132
131
  requirements:
133
132
  - - ! '>='
@@ -135,10 +134,10 @@ dependencies:
135
134
  version: '0'
136
135
  type: :development
137
136
  prerelease: false
138
- version_requirements: *2153618560
137
+ version_requirements: *2160494480
139
138
  - !ruby/object:Gem::Dependency
140
139
  name: activerecord
141
- requirement: &2153617980 !ruby/object:Gem::Requirement
140
+ requirement: &2160493320 !ruby/object:Gem::Requirement
142
141
  none: false
143
142
  requirements:
144
143
  - - ! '>='
@@ -146,10 +145,10 @@ dependencies:
146
145
  version: 2.1.0
147
146
  type: :development
148
147
  prerelease: false
149
- version_requirements: *2153617980
148
+ version_requirements: *2160493320
150
149
  - !ruby/object:Gem::Dependency
151
150
  name: rake
152
- requirement: &2153617540 !ruby/object:Gem::Requirement
151
+ requirement: &2160491920 !ruby/object:Gem::Requirement
153
152
  none: false
154
153
  requirements:
155
154
  - - ! '>='
@@ -157,10 +156,10 @@ dependencies:
157
156
  version: '0'
158
157
  type: :development
159
158
  prerelease: false
160
- version_requirements: *2153617540
159
+ version_requirements: *2160491920
161
160
  - !ruby/object:Gem::Dependency
162
161
  name: simplecov
163
- requirement: &2153617080 !ruby/object:Gem::Requirement
162
+ requirement: &2160491240 !ruby/object:Gem::Requirement
164
163
  none: false
165
164
  requirements:
166
165
  - - ! '>='
@@ -168,10 +167,10 @@ dependencies:
168
167
  version: '0'
169
168
  type: :development
170
169
  prerelease: false
171
- version_requirements: *2153617080
170
+ version_requirements: *2160491240
172
171
  - !ruby/object:Gem::Dependency
173
172
  name: simplecov-rcov
174
- requirement: &2153616640 !ruby/object:Gem::Requirement
173
+ requirement: &2160490120 !ruby/object:Gem::Requirement
175
174
  none: false
176
175
  requirements:
177
176
  - - ! '>='
@@ -179,10 +178,10 @@ dependencies:
179
178
  version: '0'
180
179
  type: :development
181
180
  prerelease: false
182
- version_requirements: *2153616640
181
+ version_requirements: *2160490120
183
182
  - !ruby/object:Gem::Dependency
184
183
  name: ci_reporter
185
- requirement: &2153616220 !ruby/object:Gem::Requirement
184
+ requirement: &2160488600 !ruby/object:Gem::Requirement
186
185
  none: false
187
186
  requirements:
188
187
  - - ! '>='
@@ -190,7 +189,7 @@ dependencies:
190
189
  version: '0'
191
190
  type: :development
192
191
  prerelease: false
193
- version_requirements: *2153616220
192
+ version_requirements: *2160488600
194
193
  description: Adhearsion is an open-source telephony development framework
195
194
  email: dev&Adhearsion.com
196
195
  executables:
@@ -364,7 +363,6 @@ files:
364
363
  - spec/theatre/namespace_spec.rb
365
364
  - spec/theatre/spec_helper_spec.rb
366
365
  - spec/theatre/theatre_class_spec.rb
367
- has_rdoc: true
368
366
  homepage: http://adhearsion.com
369
367
  licenses: []
370
368
  post_install_message:
@@ -379,7 +377,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
379
377
  version: '0'
380
378
  segments:
381
379
  - 0
382
- hash: 3254044399957334280
380
+ hash: 4207106213381902731
383
381
  required_rubygems_version: !ruby/object:Gem::Requirement
384
382
  none: false
385
383
  requirements:
@@ -388,10 +386,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
388
386
  version: '0'
389
387
  segments:
390
388
  - 0
391
- hash: 3254044399957334280
389
+ hash: 4207106213381902731
392
390
  requirements: []
393
391
  rubyforge_project:
394
- rubygems_version: 1.6.2
392
+ rubygems_version: 1.8.10
395
393
  signing_key:
396
394
  specification_version: 3
397
395
  summary: Adhearsion, open-source telephony development framework