adhearsion 2.0.0.rc4 → 2.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/adhearsion.gemspec +1 -1
  3. data/bin/ahn +0 -3
  4. data/lib/adhearsion.rb +7 -4
  5. data/lib/adhearsion/call.rb +1 -1
  6. data/lib/adhearsion/call_controller.rb +1 -0
  7. data/lib/adhearsion/call_controller/menu_dsl.rb +19 -0
  8. data/lib/adhearsion/call_controller/menu_dsl/calculated_match.rb +43 -0
  9. data/lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb +45 -0
  10. data/lib/adhearsion/call_controller/menu_dsl/fixnum_match_calculator.rb +22 -0
  11. data/lib/adhearsion/call_controller/menu_dsl/match_calculator.rb +40 -0
  12. data/lib/adhearsion/call_controller/menu_dsl/menu.rb +203 -0
  13. data/lib/adhearsion/call_controller/menu_dsl/menu_builder.rb +84 -0
  14. data/lib/adhearsion/call_controller/menu_dsl/range_match_calculator.rb +60 -0
  15. data/lib/adhearsion/call_controller/menu_dsl/string_match_calculator.rb +25 -0
  16. data/lib/adhearsion/cli.rb +0 -1
  17. data/lib/adhearsion/router/route.rb +2 -2
  18. data/lib/adhearsion/version.rb +1 -1
  19. data/spec/adhearsion/call_controller/input_spec.rb +1 -1
  20. data/spec/adhearsion/call_controller/menu_dsl/calculated_match_collection_spec.rb +60 -0
  21. data/spec/adhearsion/call_controller/menu_dsl/calculated_match_spec.rb +61 -0
  22. data/spec/adhearsion/call_controller/menu_dsl/fixnum_match_calculator_spec.rb +37 -0
  23. data/spec/adhearsion/call_controller/menu_dsl/match_calculator_spec.rb +17 -0
  24. data/spec/adhearsion/call_controller/menu_dsl/menu_builder_spec.rb +151 -0
  25. data/spec/adhearsion/call_controller/menu_dsl/menu_spec.rb +373 -0
  26. data/spec/adhearsion/call_controller/menu_dsl/range_match_calculator_spec.rb +32 -0
  27. data/spec/adhearsion/call_controller/menu_dsl/string_match_calculator_spec.rb +40 -0
  28. metadata +91 -91
  29. data/lib/adhearsion/menu_dsl.rb +0 -17
  30. data/lib/adhearsion/menu_dsl/calculated_match.rb +0 -41
  31. data/lib/adhearsion/menu_dsl/calculated_match_collection.rb +0 -43
  32. data/lib/adhearsion/menu_dsl/fixnum_match_calculator.rb +0 -20
  33. data/lib/adhearsion/menu_dsl/match_calculator.rb +0 -38
  34. data/lib/adhearsion/menu_dsl/menu.rb +0 -201
  35. data/lib/adhearsion/menu_dsl/menu_builder.rb +0 -82
  36. data/lib/adhearsion/menu_dsl/range_match_calculator.rb +0 -58
  37. data/lib/adhearsion/menu_dsl/string_match_calculator.rb +0 -23
  38. data/spec/adhearsion/menu_dsl/calculated_match_collection_spec.rb +0 -58
  39. data/spec/adhearsion/menu_dsl/calculated_match_spec.rb +0 -59
  40. data/spec/adhearsion/menu_dsl/fixnum_match_calculator_spec.rb +0 -35
  41. data/spec/adhearsion/menu_dsl/match_calculator_spec.rb +0 -15
  42. data/spec/adhearsion/menu_dsl/menu_builder_spec.rb +0 -149
  43. data/spec/adhearsion/menu_dsl/menu_spec.rb +0 -371
  44. data/spec/adhearsion/menu_dsl/range_match_calculator_spec.rb +0 -30
  45. data/spec/adhearsion/menu_dsl/string_match_calculator_spec.rb +0 -38
@@ -0,0 +1,373 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ module Adhearsion
6
+ class CallController
7
+ module MenuDSL
8
+ describe Menu do
9
+
10
+ let(:options) { Hash.new }
11
+ subject { Menu.new(options) }
12
+
13
+ describe "#initialize" do
14
+ its(:tries_count) { should be == 0 }
15
+
16
+ context 'when no timeout is set' do
17
+ it "should have the default timeout" do
18
+ subject.timeout.should be == 5
19
+ end
20
+ end
21
+
22
+ context 'when a timeout is set' do
23
+ let(:options) {
24
+ {:timeout => 20}
25
+ }
26
+
27
+ it 'should have the passed timeout' do
28
+ subject.timeout.should be == 20
29
+ end
30
+ end
31
+
32
+ context 'when no max number of tries is set' do
33
+ it "should have the default max number of tries" do
34
+ subject.max_number_of_tries.should be == 1
35
+ end
36
+ end
37
+
38
+ context 'when a max number of tries is set' do
39
+ let(:options) {
40
+ {:tries => 3}
41
+ }
42
+
43
+ it 'should have the passed max number of tries' do
44
+ subject.max_number_of_tries.should be == 3
45
+ end
46
+ end
47
+
48
+ context 'when no terminator is set' do
49
+ it "should have no terminator" do
50
+ subject.terminator.should be == ''
51
+ end
52
+
53
+ it 'should not validate successfully' do
54
+ lambda { subject.validate }.should raise_error(Menu::InvalidStructureError)
55
+ end
56
+ end
57
+
58
+ context 'when a terminator is set' do
59
+ let(:options) {
60
+ {:terminator => 3}
61
+ }
62
+
63
+ it 'should have the passed terminator' do
64
+ subject.terminator.should be == '3'
65
+ end
66
+
67
+ it 'should validate(:basic) successfully' do
68
+ subject.validate(:basic).should be true
69
+ end
70
+
71
+ it 'should not validate successfully' do
72
+ lambda { subject.validate }.should raise_error(Menu::InvalidStructureError)
73
+ end
74
+ end
75
+
76
+ context 'when no limit is set' do
77
+ it "should have no limit" do
78
+ subject.limit.should be nil
79
+ end
80
+
81
+ it 'should not validate successfully' do
82
+ lambda { subject.validate }.should raise_error(Menu::InvalidStructureError)
83
+ end
84
+ end
85
+
86
+ context 'when a limit is set' do
87
+ let(:options) {
88
+ {:limit => 3}
89
+ }
90
+
91
+ it 'should have the passed limit' do
92
+ subject.limit.should be == 3
93
+ end
94
+
95
+ it 'should validate(:basic) successfully' do
96
+ subject.validate(:basic).should be true
97
+ end
98
+
99
+ it 'should not validate successfully' do
100
+ lambda { subject.validate }.should raise_error(Menu::InvalidStructureError)
101
+ end
102
+ end
103
+
104
+ context 'when no interruptibility is set' do
105
+ it "should be interruptible" do
106
+ subject.interruptible.should be true
107
+ end
108
+ end
109
+
110
+ context 'when interruptible is set false' do
111
+ let(:options) {
112
+ {:interruptible => false}
113
+ }
114
+
115
+ it 'should be interruptible' do
116
+ subject.interruptible.should be false
117
+ end
118
+ end
119
+
120
+ context 'when matchers are specified' do
121
+ subject do
122
+ Menu.new do
123
+ match(1) { }
124
+ end
125
+ end
126
+
127
+ it 'should validate successfully' do
128
+ subject.validate.should be true
129
+ end
130
+
131
+ it 'should not validate(:basic) successfully' do
132
+ lambda { subject.validate :basic }.should raise_error(Menu::InvalidStructureError)
133
+ end
134
+ end
135
+
136
+ context 'menu builder setup' do
137
+ its(:builder) { should be_a MenuBuilder }
138
+
139
+ it "should evaluate the block on the builder object" do
140
+ mock_menu_builder = flexmock(MenuBuilder.new)
141
+ flexmock(MenuBuilder).should_receive(:new).and_return(mock_menu_builder)
142
+ mock_menu_builder.should_receive(:match).once.with(1)
143
+ Menu.new { match 1 }
144
+ end
145
+ end
146
+
147
+ end # describe #initialize
148
+
149
+ describe "#digit_buffer" do
150
+ its(:digit_buffer) { should be_a Menu::ClearableStringBuffer }
151
+ its(:digit_buffer) { should be == "" }
152
+ end
153
+
154
+ describe "#<<" do
155
+ it "should add a digit to the buffer" do
156
+ subject << 'a'
157
+ subject.digit_buffer.should be == 'a'
158
+ subject.result.should be == 'a'
159
+ end
160
+ end
161
+
162
+ describe "#digit_buffer_empty?" do
163
+ it "returns true if buffer is empty" do
164
+ subject.digit_buffer_empty?.should be == true
165
+ end
166
+
167
+ it "returns false if buffer is not empty" do
168
+ subject << 1
169
+ subject.digit_buffer_empty?.should be == false
170
+ end
171
+ end
172
+
173
+ describe "#digit_buffer_string" do
174
+ it "returns the digit buffer as a string" do
175
+ subject << 1
176
+ subject.digit_buffer_string.should be == "1"
177
+ end
178
+ end
179
+
180
+ describe "#should_continue?" do
181
+ it "returns true if the number of tries is less than the maximum" do
182
+ subject.max_number_of_tries.should be == 1
183
+ subject.tries_count.should be == 0
184
+ subject.should_continue?.should be == true
185
+ end
186
+ end
187
+
188
+ describe "#restart!" do
189
+ it "increments tries and clears the digit buffer" do
190
+ subject << 1
191
+ subject.restart!
192
+ subject.tries_count.should be == 1
193
+ subject.digit_buffer_empty?.should be == true
194
+ end
195
+ end
196
+
197
+ describe "#execute_invalid_hook" do
198
+ it "calls the builder's execute_hook_for with :invalid" do
199
+ mock_menu_builder = flexmock(MenuBuilder.new)
200
+ flexmock(MenuBuilder).should_receive(:new).and_return(mock_menu_builder)
201
+ mock_menu_builder.should_receive(:execute_hook_for).with(:invalid, "")
202
+ menu_instance = Menu.new
203
+ menu_instance.execute_invalid_hook
204
+ end
205
+ end
206
+
207
+ describe "#execute_timeout_hook" do
208
+ it "calls the builder's execute_hook_for with :timeout" do
209
+ mock_menu_builder = flexmock(MenuBuilder.new)
210
+ flexmock(MenuBuilder).should_receive(:new).and_return(mock_menu_builder)
211
+ mock_menu_builder.should_receive(:execute_hook_for).with(:timeout, "")
212
+ menu_instance = Menu.new
213
+ menu_instance.execute_timeout_hook
214
+ end
215
+ end
216
+
217
+ describe "#execute_failure_hook" do
218
+ it "calls the builder's execute_hook_for with :failure" do
219
+ mock_menu_builder = flexmock(MenuBuilder.new)
220
+ flexmock(MenuBuilder).should_receive(:new).and_return(mock_menu_builder)
221
+ mock_menu_builder.should_receive(:execute_hook_for).with(:failure, "")
222
+ menu_instance = Menu.new
223
+ menu_instance.execute_failure_hook
224
+ end
225
+ end
226
+
227
+ describe "#execute_validator_hook" do
228
+ it "calls the builder's execute_hook_for with :validator" do
229
+ mock_menu_builder = flexmock(MenuBuilder.new)
230
+ flexmock(MenuBuilder).should_receive(:new).and_return(mock_menu_builder)
231
+ mock_menu_builder.should_receive(:execute_hook_for).with(:validator, "")
232
+ menu_instance = Menu.new
233
+ menu_instance.execute_validator_hook
234
+ end
235
+ end
236
+
237
+ describe "#continue" do
238
+ class MockControllerA; end
239
+ class MockControllerB; end
240
+ class MockControllerC; end
241
+ let(:options) { {} }
242
+ let(:menu_instance) {
243
+ Menu.new options do
244
+ match 1, MockControllerA
245
+ match 21, MockControllerA
246
+ match 23, MockControllerA
247
+ match 3, MockControllerB
248
+ match 3..5, MockControllerC
249
+ match 33, MockControllerA
250
+ match 6, MockControllerC
251
+ match 6..8, MockControllerA
252
+ end
253
+ }
254
+
255
+ it "returns a MenuGetAnotherDigitOrTimeout if the digit buffer is empty" do
256
+ subject.continue.should be_a Menu::MenuGetAnotherDigitOrTimeout
257
+ menu_instance.status.should be nil
258
+ end
259
+
260
+ it "asks for another digit if it has potential matches" do
261
+ menu_instance << 2
262
+ menu_instance.continue.should be_a Menu::MenuGetAnotherDigitOrTimeout
263
+ menu_instance.status.should be == :potential
264
+ end
265
+
266
+ it "returns a MenuResultInvalid if there are no matches" do
267
+ menu_instance << 9
268
+ menu_instance.continue.should be_a Menu::MenuResultInvalid
269
+ menu_instance.status.should be == :invalid
270
+ end
271
+
272
+ it "returns the first exact match when it has exact and potentials" do
273
+ menu_instance << 3
274
+ menu_result = menu_instance.continue
275
+ menu_result.should be_a Menu::MenuGetAnotherDigitOrFinish
276
+ menu_result.match_object.should be == MockControllerB
277
+ menu_result.new_extension.should be == "3"
278
+ menu_instance.status.should be == :multi_matched
279
+ end
280
+
281
+ it "returns a MenuResultFound if it has exact matches" do
282
+ menu_instance << 6
283
+ menu_result = menu_instance.continue
284
+ menu_result.should be_a Menu::MenuResultFound
285
+ menu_instance.status.should be == :matched
286
+ end
287
+
288
+ it "returns the first exact match when it has only exact matches" do
289
+ menu_instance << 6
290
+ menu_result = menu_instance.continue
291
+ menu_result.should be_a Menu::MenuResultFound
292
+ menu_result.match_object.match_payload.should be == MockControllerC
293
+ menu_result.match_object.pattern.to_s.should be == "6"
294
+ end
295
+
296
+ context "with no matchers" do
297
+ let(:menu_instance) { Menu.new options }
298
+
299
+ context "when a terminator digit is set" do
300
+ let(:options) { { :terminator => '#' } }
301
+
302
+ it "buffers until the terminator is issued then returns a MenuTerminated and sets the status to :terminated, removing the terminator from the buffer" do
303
+ menu_instance << 2
304
+ menu_instance << 4
305
+ menu_instance.continue.should be_a Menu::MenuGetAnotherDigitOrTimeout
306
+ menu_instance.status.should be == :potential
307
+ menu_instance << '#'
308
+ menu_instance.continue.should be_a Menu::MenuTerminated
309
+ menu_instance.continue.should be_a Menu::MenuResultDone
310
+ menu_instance.status.should be == :terminated
311
+ menu_instance.result.should be == '24'
312
+ end
313
+ end
314
+
315
+ context "when a digit limit is set" do
316
+ let(:options) { { :limit => 3 } }
317
+
318
+ it "buffers until the limit is reached, then returns MenuLimitReached and sets the status to :limited" do
319
+ menu_instance << 2
320
+ menu_instance << 4
321
+ menu_instance.continue.should be_a Menu::MenuGetAnotherDigitOrTimeout
322
+ menu_instance.status.should be == :potential
323
+ menu_instance << 2
324
+ menu_instance.continue.should be_a Menu::MenuLimitReached
325
+ menu_instance.continue.should be_a Menu::MenuResultDone
326
+ menu_instance.status.should be == :limited
327
+ menu_instance.result.should be == '242'
328
+ end
329
+ end
330
+
331
+ context "when a validator is defined" do
332
+ let(:menu_instance) do
333
+ Menu.new options do
334
+ validator { |buffer| buffer == "242" }
335
+ end
336
+ end
337
+
338
+ it "buffers until the validator returns true, then returns MenuValidatorTerminated and sets the status to :validator_terminated" do
339
+ menu_instance << 2
340
+ menu_instance << 4
341
+ menu_instance.continue.should be_a Menu::MenuGetAnotherDigitOrTimeout
342
+ menu_instance.status.should be == :potential
343
+ menu_instance << 2
344
+ menu_instance.continue.should be_a Menu::MenuValidatorTerminated
345
+ menu_instance.continue.should be_a Menu::MenuResultDone
346
+ menu_instance.status.should be == :validator_terminated
347
+ menu_instance.result.should be == '242'
348
+ end
349
+ end
350
+ end
351
+
352
+ end#continue
353
+
354
+ describe Menu::ClearableStringBuffer do
355
+ subject { Menu::ClearableStringBuffer.new }
356
+
357
+ it "adds a string to itself" do
358
+ subject << 'b'
359
+ subject << 'c'
360
+ subject.should be == 'bc'
361
+ end
362
+
363
+ it "clears itself" do
364
+ subject << 'a'
365
+ subject.clear!
366
+ subject.should be == ""
367
+ end
368
+ end
369
+
370
+ end # describe Menu
371
+ end
372
+ end
373
+ end
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ module Adhearsion
6
+ class CallController
7
+ module MenuDSL
8
+
9
+ describe RangeMatchCalculator do
10
+ it "matching with a Range should handle the case of two potential matches in the range" do
11
+ digits_that_begin_with_eleven = [110..119, 1100..1111].map { |x| Array(x) }.flatten
12
+ calculator = RangeMatchCalculator.new 11..1111, :match_payload_doesnt_matter
13
+ match = calculator.match 11
14
+ match.exact_matches.should be == [11]
15
+ match.potential_matches.should be == digits_that_begin_with_eleven
16
+ end
17
+
18
+ it "return values of #match should be an instance of CalculatedMatch" do
19
+ calculator = RangeMatchCalculator.new 1..9, :match_payload_doesnt_matter
20
+ calculator.match(0).should be_an_instance_of CalculatedMatch
21
+ calculator.match(1000).should be_an_instance_of CalculatedMatch
22
+ end
23
+
24
+ it "returns a failed match if the query is not numeric or coercible to numeric" do
25
+ calculator = RangeMatchCalculator.new 1..9, :match_payload_doesnt_matter
26
+ calculator.match("ABC").should be_an_instance_of CalculatedMatch
27
+ end
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,40 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ module Adhearsion
6
+ class CallController
7
+ module MenuDSL
8
+ describe StringMatchCalculator do
9
+
10
+ let(:match_payload) { :doesnt_matter }
11
+
12
+ it "numerical digits mixed with special digits" do
13
+ %w[5*11#3 5*** ###].each do |str|
14
+ calculator = StringMatchCalculator.new str, match_payload
15
+
16
+ match_case = calculator.match str[0,2]
17
+ match_case.exact_match?.should_not be true
18
+ match_case.potential_match?.should be true
19
+ match_case.potential_matches.should be == [str]
20
+
21
+ match_case = calculator.match str
22
+ match_case.exact_match?.should be true
23
+ match_case.potential_match?.should_not be true
24
+ match_case.exact_matches.should be == [str]
25
+ end
26
+ end
27
+
28
+ it "matching the special DTMF characters such as * and #" do
29
+ %w[* #].each do |special_digit|
30
+ calculator = StringMatchCalculator.new(special_digit, match_payload)
31
+ match_case = calculator.match special_digit
32
+ match_case.potential_match?.should_not be true
33
+ match_case.exact_match?.should be true
34
+ match_case.exact_matches.first.should be == special_digit
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
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: 2.0.0.rc4
4
+ version: 2.0.0.rc5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -12,11 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-03-30 00:00:00.000000000 Z
15
+ date: 2012-04-06 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
19
- requirement: &2156866840 !ruby/object:Gem::Requirement
19
+ requirement: &2160082980 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 1.0.10
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2156866840
27
+ version_requirements: *2160082980
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: punchblock
30
- requirement: &2156865600 !ruby/object:Gem::Requirement
30
+ requirement: &2160085060 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 0.12.0
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2156865600
38
+ version_requirements: *2160085060
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: logging
41
- requirement: &2156864400 !ruby/object:Gem::Requirement
41
+ requirement: &2160122360 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 1.6.1
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *2156864400
49
+ version_requirements: *2160122360
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: adhearsion-loquacious
52
- requirement: &2156863220 !ruby/object:Gem::Requirement
52
+ requirement: &2160118660 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: 1.9.0
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *2156863220
60
+ version_requirements: *2160118660
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: activesupport
63
- requirement: &2156862080 !ruby/object:Gem::Requirement
63
+ requirement: &2160130100 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: 3.0.10
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *2156862080
71
+ version_requirements: *2160130100
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: i18n
74
- requirement: &2156861160 !ruby/object:Gem::Requirement
74
+ requirement: &2160151980 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ! '>='
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: 0.5.0
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *2156861160
82
+ version_requirements: *2160151980
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: json
85
- requirement: &2156860540 !ruby/object:Gem::Requirement
85
+ requirement: &2160150160 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ! '>='
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '0'
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *2156860540
93
+ version_requirements: *2160150160
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: thor
96
- requirement: &2156859720 !ruby/object:Gem::Requirement
96
+ requirement: &2160148100 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :runtime
103
103
  prerelease: false
104
- version_requirements: *2156859720
104
+ version_requirements: *2160148100
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: rake
107
- requirement: &2156858580 !ruby/object:Gem::Requirement
107
+ requirement: &2160146860 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: '0'
113
113
  type: :runtime
114
114
  prerelease: false
115
- version_requirements: *2156858580
115
+ version_requirements: *2160146860
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: pry
118
- requirement: &2156857240 !ruby/object:Gem::Requirement
118
+ requirement: &2160144620 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: '0'
124
124
  type: :runtime
125
125
  prerelease: false
126
- version_requirements: *2156857240
126
+ version_requirements: *2160144620
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: uuid
129
- requirement: &2156855960 !ruby/object:Gem::Requirement
129
+ requirement: &2160221660 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ! '>='
@@ -134,10 +134,10 @@ dependencies:
134
134
  version: '0'
135
135
  type: :runtime
136
136
  prerelease: false
137
- version_requirements: *2156855960
137
+ version_requirements: *2160221660
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: future-resource
140
- requirement: &2156854240 !ruby/object:Gem::Requirement
140
+ requirement: &2160219300 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - ! '>='
@@ -145,10 +145,10 @@ dependencies:
145
145
  version: 0.0.2
146
146
  type: :runtime
147
147
  prerelease: false
148
- version_requirements: *2156854240
148
+ version_requirements: *2160219300
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: ruby_speech
151
- requirement: &2156852180 !ruby/object:Gem::Requirement
151
+ requirement: &2160216340 !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
154
154
  - - ! '>='
@@ -156,10 +156,10 @@ dependencies:
156
156
  version: 0.4.0
157
157
  type: :runtime
158
158
  prerelease: false
159
- version_requirements: *2156852180
159
+ version_requirements: *2160216340
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: countdownlatch
162
- requirement: &2156851480 !ruby/object:Gem::Requirement
162
+ requirement: &2151956180 !ruby/object:Gem::Requirement
163
163
  none: false
164
164
  requirements:
165
165
  - - ! '>='
@@ -167,10 +167,10 @@ dependencies:
167
167
  version: '0'
168
168
  type: :runtime
169
169
  prerelease: false
170
- version_requirements: *2156851480
170
+ version_requirements: *2151956180
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: has-guarded-handlers
173
- requirement: &2156850640 !ruby/object:Gem::Requirement
173
+ requirement: &2152014720 !ruby/object:Gem::Requirement
174
174
  none: false
175
175
  requirements:
176
176
  - - ! '>='
@@ -178,10 +178,10 @@ dependencies:
178
178
  version: 1.1.0
179
179
  type: :runtime
180
180
  prerelease: false
181
- version_requirements: *2156850640
181
+ version_requirements: *2152014720
182
182
  - !ruby/object:Gem::Dependency
183
183
  name: girl_friday
184
- requirement: &2156849760 !ruby/object:Gem::Requirement
184
+ requirement: &2152013300 !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
187
187
  - - ! '>='
@@ -189,10 +189,10 @@ dependencies:
189
189
  version: '0'
190
190
  type: :runtime
191
191
  prerelease: false
192
- version_requirements: *2156849760
192
+ version_requirements: *2152013300
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: ffi
195
- requirement: &2156848240 !ruby/object:Gem::Requirement
195
+ requirement: &2152011820 !ruby/object:Gem::Requirement
196
196
  none: false
197
197
  requirements:
198
198
  - - ! '>='
@@ -200,21 +200,21 @@ dependencies:
200
200
  version: 1.0.11
201
201
  type: :runtime
202
202
  prerelease: false
203
- version_requirements: *2156848240
203
+ version_requirements: *2152011820
204
204
  - !ruby/object:Gem::Dependency
205
205
  name: celluloid
206
- requirement: &2156847120 !ruby/object:Gem::Requirement
206
+ requirement: &2152010660 !ruby/object:Gem::Requirement
207
207
  none: false
208
208
  requirements:
209
209
  - - ! '>='
210
210
  - !ruby/object:Gem::Version
211
- version: 0.9.0
211
+ version: 0.10.0
212
212
  type: :runtime
213
213
  prerelease: false
214
- version_requirements: *2156847120
214
+ version_requirements: *2152010660
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: deep_merge
217
- requirement: &2156846580 !ruby/object:Gem::Requirement
217
+ requirement: &2152009860 !ruby/object:Gem::Requirement
218
218
  none: false
219
219
  requirements:
220
220
  - - ! '>='
@@ -222,10 +222,10 @@ dependencies:
222
222
  version: '0'
223
223
  type: :runtime
224
224
  prerelease: false
225
- version_requirements: *2156846580
225
+ version_requirements: *2152009860
226
226
  - !ruby/object:Gem::Dependency
227
227
  name: rspec
228
- requirement: &2156844180 !ruby/object:Gem::Requirement
228
+ requirement: &2152008540 !ruby/object:Gem::Requirement
229
229
  none: false
230
230
  requirements:
231
231
  - - ~>
@@ -233,10 +233,10 @@ dependencies:
233
233
  version: 2.7.0
234
234
  type: :development
235
235
  prerelease: false
236
- version_requirements: *2156844180
236
+ version_requirements: *2152008540
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: flexmock
239
- requirement: &2156843420 !ruby/object:Gem::Requirement
239
+ requirement: &2152007520 !ruby/object:Gem::Requirement
240
240
  none: false
241
241
  requirements:
242
242
  - - ! '>='
@@ -244,10 +244,10 @@ dependencies:
244
244
  version: '0'
245
245
  type: :development
246
246
  prerelease: false
247
- version_requirements: *2156843420
247
+ version_requirements: *2152007520
248
248
  - !ruby/object:Gem::Dependency
249
249
  name: activerecord
250
- requirement: &2156842020 !ruby/object:Gem::Requirement
250
+ requirement: &2152036300 !ruby/object:Gem::Requirement
251
251
  none: false
252
252
  requirements:
253
253
  - - ! '>='
@@ -255,10 +255,10 @@ dependencies:
255
255
  version: 3.0.10
256
256
  type: :development
257
257
  prerelease: false
258
- version_requirements: *2156842020
258
+ version_requirements: *2152036300
259
259
  - !ruby/object:Gem::Dependency
260
260
  name: simplecov
261
- requirement: &2156841380 !ruby/object:Gem::Requirement
261
+ requirement: &2152034420 !ruby/object:Gem::Requirement
262
262
  none: false
263
263
  requirements:
264
264
  - - ! '>='
@@ -266,10 +266,10 @@ dependencies:
266
266
  version: '0'
267
267
  type: :development
268
268
  prerelease: false
269
- version_requirements: *2156841380
269
+ version_requirements: *2152034420
270
270
  - !ruby/object:Gem::Dependency
271
271
  name: simplecov-rcov
272
- requirement: &2156840600 !ruby/object:Gem::Requirement
272
+ requirement: &2152031820 !ruby/object:Gem::Requirement
273
273
  none: false
274
274
  requirements:
275
275
  - - ! '>='
@@ -277,10 +277,10 @@ dependencies:
277
277
  version: '0'
278
278
  type: :development
279
279
  prerelease: false
280
- version_requirements: *2156840600
280
+ version_requirements: *2152031820
281
281
  - !ruby/object:Gem::Dependency
282
282
  name: ci_reporter
283
- requirement: &2156839920 !ruby/object:Gem::Requirement
283
+ requirement: &2155914300 !ruby/object:Gem::Requirement
284
284
  none: false
285
285
  requirements:
286
286
  - - ! '>='
@@ -288,10 +288,10 @@ dependencies:
288
288
  version: '0'
289
289
  type: :development
290
290
  prerelease: false
291
- version_requirements: *2156839920
291
+ version_requirements: *2155914300
292
292
  - !ruby/object:Gem::Dependency
293
293
  name: yard
294
- requirement: &2164576620 !ruby/object:Gem::Requirement
294
+ requirement: &2155910500 !ruby/object:Gem::Requirement
295
295
  none: false
296
296
  requirements:
297
297
  - - ! '>='
@@ -299,10 +299,10 @@ dependencies:
299
299
  version: '0'
300
300
  type: :development
301
301
  prerelease: false
302
- version_requirements: *2164576620
302
+ version_requirements: *2155910500
303
303
  - !ruby/object:Gem::Dependency
304
304
  name: guard-rspec
305
- requirement: &2168963940 !ruby/object:Gem::Requirement
305
+ requirement: &2155908700 !ruby/object:Gem::Requirement
306
306
  none: false
307
307
  requirements:
308
308
  - - ! '>='
@@ -310,10 +310,10 @@ dependencies:
310
310
  version: '0'
311
311
  type: :development
312
312
  prerelease: false
313
- version_requirements: *2168963940
313
+ version_requirements: *2155908700
314
314
  - !ruby/object:Gem::Dependency
315
315
  name: guard-cucumber
316
- requirement: &2157043100 !ruby/object:Gem::Requirement
316
+ requirement: &2155922760 !ruby/object:Gem::Requirement
317
317
  none: false
318
318
  requirements:
319
319
  - - ! '>='
@@ -321,10 +321,10 @@ dependencies:
321
321
  version: '0'
322
322
  type: :development
323
323
  prerelease: false
324
- version_requirements: *2157043100
324
+ version_requirements: *2155922760
325
325
  - !ruby/object:Gem::Dependency
326
326
  name: ruby_gntp
327
- requirement: &2156949860 !ruby/object:Gem::Requirement
327
+ requirement: &2155917860 !ruby/object:Gem::Requirement
328
328
  none: false
329
329
  requirements:
330
330
  - - ! '>='
@@ -332,10 +332,10 @@ dependencies:
332
332
  version: '0'
333
333
  type: :development
334
334
  prerelease: false
335
- version_requirements: *2156949860
335
+ version_requirements: *2155917860
336
336
  - !ruby/object:Gem::Dependency
337
337
  name: cucumber
338
- requirement: &2156953860 !ruby/object:Gem::Requirement
338
+ requirement: &2155953840 !ruby/object:Gem::Requirement
339
339
  none: false
340
340
  requirements:
341
341
  - - ! '>='
@@ -343,10 +343,10 @@ dependencies:
343
343
  version: '0'
344
344
  type: :development
345
345
  prerelease: false
346
- version_requirements: *2156953860
346
+ version_requirements: *2155953840
347
347
  - !ruby/object:Gem::Dependency
348
348
  name: aruba
349
- requirement: &2156944220 !ruby/object:Gem::Requirement
349
+ requirement: &2155951020 !ruby/object:Gem::Requirement
350
350
  none: false
351
351
  requirements:
352
352
  - - ! '>='
@@ -354,7 +354,7 @@ dependencies:
354
354
  version: '0'
355
355
  type: :development
356
356
  prerelease: false
357
- version_requirements: *2156944220
357
+ version_requirements: *2155951020
358
358
  description: Adhearsion is an open-source telephony development framework
359
359
  email: dev&Adhearsion.com
360
360
  executables:
@@ -394,6 +394,15 @@ files:
394
394
  - lib/adhearsion/call_controller.rb
395
395
  - lib/adhearsion/call_controller/dial.rb
396
396
  - lib/adhearsion/call_controller/input.rb
397
+ - lib/adhearsion/call_controller/menu_dsl.rb
398
+ - lib/adhearsion/call_controller/menu_dsl/calculated_match.rb
399
+ - lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb
400
+ - lib/adhearsion/call_controller/menu_dsl/fixnum_match_calculator.rb
401
+ - lib/adhearsion/call_controller/menu_dsl/match_calculator.rb
402
+ - lib/adhearsion/call_controller/menu_dsl/menu.rb
403
+ - lib/adhearsion/call_controller/menu_dsl/menu_builder.rb
404
+ - lib/adhearsion/call_controller/menu_dsl/range_match_calculator.rb
405
+ - lib/adhearsion/call_controller/menu_dsl/string_match_calculator.rb
397
406
  - lib/adhearsion/call_controller/output.rb
398
407
  - lib/adhearsion/call_controller/record.rb
399
408
  - lib/adhearsion/call_controller/utility.rb
@@ -442,15 +451,6 @@ files:
442
451
  - lib/adhearsion/initializer.rb
443
452
  - lib/adhearsion/linux_proc_name.rb
444
453
  - lib/adhearsion/logging.rb
445
- - lib/adhearsion/menu_dsl.rb
446
- - lib/adhearsion/menu_dsl/calculated_match.rb
447
- - lib/adhearsion/menu_dsl/calculated_match_collection.rb
448
- - lib/adhearsion/menu_dsl/fixnum_match_calculator.rb
449
- - lib/adhearsion/menu_dsl/match_calculator.rb
450
- - lib/adhearsion/menu_dsl/menu.rb
451
- - lib/adhearsion/menu_dsl/menu_builder.rb
452
- - lib/adhearsion/menu_dsl/range_match_calculator.rb
453
- - lib/adhearsion/menu_dsl/string_match_calculator.rb
454
454
  - lib/adhearsion/outbound_call.rb
455
455
  - lib/adhearsion/plugin.rb
456
456
  - lib/adhearsion/plugin/collection.rb
@@ -472,6 +472,14 @@ files:
472
472
  - pre-commit
473
473
  - spec/adhearsion/call_controller/dial_spec.rb
474
474
  - spec/adhearsion/call_controller/input_spec.rb
475
+ - spec/adhearsion/call_controller/menu_dsl/calculated_match_collection_spec.rb
476
+ - spec/adhearsion/call_controller/menu_dsl/calculated_match_spec.rb
477
+ - spec/adhearsion/call_controller/menu_dsl/fixnum_match_calculator_spec.rb
478
+ - spec/adhearsion/call_controller/menu_dsl/match_calculator_spec.rb
479
+ - spec/adhearsion/call_controller/menu_dsl/menu_builder_spec.rb
480
+ - spec/adhearsion/call_controller/menu_dsl/menu_spec.rb
481
+ - spec/adhearsion/call_controller/menu_dsl/range_match_calculator_spec.rb
482
+ - spec/adhearsion/call_controller/menu_dsl/string_match_calculator_spec.rb
475
483
  - spec/adhearsion/call_controller/output_spec.rb
476
484
  - spec/adhearsion/call_controller/record_spec.rb
477
485
  - spec/adhearsion/call_controller/utility_spec.rb
@@ -484,14 +492,6 @@ files:
484
492
  - spec/adhearsion/generators_spec.rb
485
493
  - spec/adhearsion/initializer_spec.rb
486
494
  - spec/adhearsion/logging_spec.rb
487
- - spec/adhearsion/menu_dsl/calculated_match_collection_spec.rb
488
- - spec/adhearsion/menu_dsl/calculated_match_spec.rb
489
- - spec/adhearsion/menu_dsl/fixnum_match_calculator_spec.rb
490
- - spec/adhearsion/menu_dsl/match_calculator_spec.rb
491
- - spec/adhearsion/menu_dsl/menu_builder_spec.rb
492
- - spec/adhearsion/menu_dsl/menu_spec.rb
493
- - spec/adhearsion/menu_dsl/range_match_calculator_spec.rb
494
- - spec/adhearsion/menu_dsl/string_match_calculator_spec.rb
495
495
  - spec/adhearsion/outbound_call_spec.rb
496
496
  - spec/adhearsion/plugin_spec.rb
497
497
  - spec/adhearsion/process_spec.rb
@@ -520,7 +520,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
520
520
  version: '0'
521
521
  segments:
522
522
  - 0
523
- hash: 1219852997240048480
523
+ hash: -509637299476401617
524
524
  required_rubygems_version: !ruby/object:Gem::Requirement
525
525
  none: false
526
526
  requirements:
@@ -551,6 +551,14 @@ test_files:
551
551
  - features/support/utils.rb
552
552
  - spec/adhearsion/call_controller/dial_spec.rb
553
553
  - spec/adhearsion/call_controller/input_spec.rb
554
+ - spec/adhearsion/call_controller/menu_dsl/calculated_match_collection_spec.rb
555
+ - spec/adhearsion/call_controller/menu_dsl/calculated_match_spec.rb
556
+ - spec/adhearsion/call_controller/menu_dsl/fixnum_match_calculator_spec.rb
557
+ - spec/adhearsion/call_controller/menu_dsl/match_calculator_spec.rb
558
+ - spec/adhearsion/call_controller/menu_dsl/menu_builder_spec.rb
559
+ - spec/adhearsion/call_controller/menu_dsl/menu_spec.rb
560
+ - spec/adhearsion/call_controller/menu_dsl/range_match_calculator_spec.rb
561
+ - spec/adhearsion/call_controller/menu_dsl/string_match_calculator_spec.rb
554
562
  - spec/adhearsion/call_controller/output_spec.rb
555
563
  - spec/adhearsion/call_controller/record_spec.rb
556
564
  - spec/adhearsion/call_controller/utility_spec.rb
@@ -563,14 +571,6 @@ test_files:
563
571
  - spec/adhearsion/generators_spec.rb
564
572
  - spec/adhearsion/initializer_spec.rb
565
573
  - spec/adhearsion/logging_spec.rb
566
- - spec/adhearsion/menu_dsl/calculated_match_collection_spec.rb
567
- - spec/adhearsion/menu_dsl/calculated_match_spec.rb
568
- - spec/adhearsion/menu_dsl/fixnum_match_calculator_spec.rb
569
- - spec/adhearsion/menu_dsl/match_calculator_spec.rb
570
- - spec/adhearsion/menu_dsl/menu_builder_spec.rb
571
- - spec/adhearsion/menu_dsl/menu_spec.rb
572
- - spec/adhearsion/menu_dsl/range_match_calculator_spec.rb
573
- - spec/adhearsion/menu_dsl/string_match_calculator_spec.rb
574
574
  - spec/adhearsion/outbound_call_spec.rb
575
575
  - spec/adhearsion/plugin_spec.rb
576
576
  - spec/adhearsion/process_spec.rb