punchblock 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +4 -0
- data/lib/punchblock.rb +15 -13
- data/lib/punchblock/client.rb +1 -0
- data/lib/punchblock/component.rb +1 -1
- data/lib/punchblock/connection/asterisk.rb +2 -2
- data/lib/punchblock/connection/xmpp.rb +8 -9
- data/lib/punchblock/core_ext/ruby.rb +24 -0
- data/lib/punchblock/has_headers.rb +4 -0
- data/lib/punchblock/translator/asterisk.rb +40 -9
- data/lib/punchblock/translator/asterisk/call.rb +107 -3
- data/lib/punchblock/translator/asterisk/component.rb +9 -3
- data/lib/punchblock/translator/asterisk/component/asterisk.rb +14 -0
- data/lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb +84 -0
- data/lib/punchblock/translator/asterisk/component/asterisk/ami_action.rb +96 -0
- data/lib/punchblock/version.rb +1 -1
- data/spec/punchblock/connection/xmpp_spec.rb +3 -1
- data/spec/punchblock/translator/asterisk/call_spec.rb +206 -0
- data/spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb +143 -0
- data/spec/punchblock/translator/asterisk/component/asterisk/ami_action_spec.rb +159 -0
- data/spec/punchblock/translator/asterisk_spec.rb +90 -10
- metadata +46 -41
- data/lib/punchblock/translator/asterisk/ami_action.rb +0 -86
- data/spec/punchblock/translator/asterisk/ami_action_spec.rb +0 -149
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Punchblock
|
|
4
|
+
module Translator
|
|
5
|
+
class Asterisk
|
|
6
|
+
module Component
|
|
7
|
+
module Asterisk
|
|
8
|
+
describe AMIAction do
|
|
9
|
+
let(:mock_translator) { mock 'Translator::Asterisk' }
|
|
10
|
+
|
|
11
|
+
let :command do
|
|
12
|
+
Punchblock::Component::Asterisk::AMI::Action.new :name => 'ExtensionStatus', :params => { :context => 'default', :exten => 'idonno' }
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
subject { AMIAction.new command, mock_translator }
|
|
16
|
+
|
|
17
|
+
let :expected_action do
|
|
18
|
+
RubyAMI::Action.new 'ExtensionStatus', 'Context' => 'default', 'Exten' => 'idonno'
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
context 'initial execution' do
|
|
22
|
+
let(:component_id) { UUIDTools::UUID.random_create }
|
|
23
|
+
|
|
24
|
+
let :expected_response do
|
|
25
|
+
Ref.new :id => component_id
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
before { UUIDTools::UUID.stubs :random_create => component_id }
|
|
29
|
+
|
|
30
|
+
it 'should send the appropriate RubyAMI::Action and send the component node a ref with the action ID' do
|
|
31
|
+
mock_translator.expects(:send_ami_action!).once.with(expected_action).returns(expected_action)
|
|
32
|
+
command.expects(:response=).once.with(expected_response)
|
|
33
|
+
subject.execute
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
context 'when the AMI action completes' do
|
|
38
|
+
before do
|
|
39
|
+
command.request!
|
|
40
|
+
command.execute!
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
let :response do
|
|
44
|
+
RubyAMI::Response.new.tap do |r|
|
|
45
|
+
r['ActionID'] = "552a9d9f-46d7-45d8-a257-06fe95f48d99"
|
|
46
|
+
r['Message'] = 'Channel status will follow'
|
|
47
|
+
r["Exten"] = "idonno"
|
|
48
|
+
r["Context"] = "default"
|
|
49
|
+
r["Hint"] = ""
|
|
50
|
+
r["Status"] = "-1"
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
let :expected_complete_reason do
|
|
55
|
+
Punchblock::Component::Asterisk::AMI::Action::Complete::Success.new :message => 'Channel status will follow', :attributes => {:exten => "idonno", :context => "default", :hint => "", :status => "-1"}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
context 'for a non-causal action' do
|
|
59
|
+
it 'should send a complete event to the component node' do
|
|
60
|
+
subject.action.response = response
|
|
61
|
+
|
|
62
|
+
command.should be_complete
|
|
63
|
+
|
|
64
|
+
complete_event = command.complete_event.resource(0.5)
|
|
65
|
+
|
|
66
|
+
complete_event.component_id.should == subject.id
|
|
67
|
+
complete_event.reason.should == expected_complete_reason
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
context 'for a causal action' do
|
|
72
|
+
let :command do
|
|
73
|
+
Punchblock::Component::Asterisk::AMI::Action.new :name => 'CoreShowChannels'
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
let :expected_action do
|
|
77
|
+
RubyAMI::Action.new 'CoreShowChannels'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
let :event do
|
|
81
|
+
RubyAMI::Event.new('CoreShowChannel').tap do |e|
|
|
82
|
+
e['ActionID'] = "552a9d9f-46d7-45d8-a257-06fe95f48d99"
|
|
83
|
+
e['Channel'] = 'SIP/127.0.0.1-00000013'
|
|
84
|
+
e['UniqueID'] = '1287686437.19'
|
|
85
|
+
e['Context'] = 'adhearsion'
|
|
86
|
+
e['Extension'] = '23432'
|
|
87
|
+
e['Priority'] = '2'
|
|
88
|
+
e['ChannelState'] = '6'
|
|
89
|
+
e['ChannelStateDesc'] = 'Up'
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
let :terminating_event do
|
|
94
|
+
RubyAMI::Event.new('CoreShowChannelsComplete').tap do |e|
|
|
95
|
+
e['EventList'] = 'Complete'
|
|
96
|
+
e['ListItems'] = '3'
|
|
97
|
+
e['ActionID'] = 'umtLtvSg-RN5n-GEay-Z786-YdiaSLNXkcYN'
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
let :event_node do
|
|
102
|
+
Punchblock::Event::Asterisk::AMI::Event.new :name => 'CoreShowChannel', :component_id => subject.id, :attributes => {
|
|
103
|
+
:channel => 'SIP/127.0.0.1-00000013',
|
|
104
|
+
:uniqueid => '1287686437.19',
|
|
105
|
+
:context => 'adhearsion',
|
|
106
|
+
:extension => '23432',
|
|
107
|
+
:priority => '2',
|
|
108
|
+
:channelstate => '6',
|
|
109
|
+
:channelstatedesc => 'Up'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
let :expected_complete_reason do
|
|
114
|
+
Punchblock::Component::Asterisk::AMI::Action::Complete::Success.new :message => 'Channel status will follow', :attributes => {:exten => "idonno", :context => "default", :hint => "", :status => "-1", :eventlist => 'Complete', :listitems => '3'}
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
it 'should send events to the component node' do
|
|
118
|
+
command.register_event_handler Punchblock::Event::Asterisk::AMI::Event do |event|
|
|
119
|
+
@event = event
|
|
120
|
+
end
|
|
121
|
+
subject.action << event
|
|
122
|
+
subject.action << response
|
|
123
|
+
subject.action << terminating_event
|
|
124
|
+
@event.should == event_node
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
it 'should send a complete event to the component node' do
|
|
128
|
+
subject.action << response
|
|
129
|
+
subject.action << terminating_event
|
|
130
|
+
|
|
131
|
+
command.complete_event.resource(0.5).reason.should == expected_complete_reason
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
context 'with an error' do
|
|
136
|
+
let :error do
|
|
137
|
+
RubyAMI::Error.new.tap { |e| e.message = 'Action failed' }
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
let :expected_complete_reason do
|
|
141
|
+
Punchblock::Event::Complete::Error.new :component_id => subject.id, :details => 'Action failed'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
it 'should send a complete event to the component node' do
|
|
145
|
+
subject.action << error
|
|
146
|
+
|
|
147
|
+
complete_event = command.complete_event.resource(0.5)
|
|
148
|
+
|
|
149
|
+
complete_event.component_id.should == subject.id
|
|
150
|
+
complete_event.reason.should == expected_complete_reason
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
@@ -51,32 +51,43 @@ module Punchblock
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
describe '#register_call' do
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
let(:call_id) { 'abc123' }
|
|
55
|
+
let(:channel) { 'SIP/foo' }
|
|
56
|
+
let(:call) { Translator::Asterisk::Call.new channel, subject }
|
|
57
|
+
|
|
58
|
+
before do
|
|
59
|
+
call.stubs(:id).returns call_id
|
|
57
60
|
subject.register_call call
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'should make the call accessible by ID' do
|
|
58
64
|
subject.call_with_id(call_id).should be call
|
|
59
65
|
end
|
|
66
|
+
|
|
67
|
+
it 'should make the call accessible by ID' do
|
|
68
|
+
subject.call_for_channel(channel).should be call
|
|
69
|
+
end
|
|
60
70
|
end
|
|
61
71
|
|
|
62
72
|
describe '#execute_call_command' do
|
|
63
73
|
let(:call_id) { 'abc123' }
|
|
64
|
-
let(:call) {
|
|
74
|
+
let(:call) { Translator::Asterisk::Call.new 'SIP/foo', subject }
|
|
65
75
|
let(:command) { mock 'Command::Answer', :call_id => call_id }
|
|
66
76
|
|
|
67
77
|
before do
|
|
78
|
+
call.stubs(:id).returns call_id
|
|
68
79
|
subject.register_call call
|
|
69
80
|
end
|
|
70
81
|
|
|
71
82
|
it 'sends the command to the call for execution' do
|
|
72
|
-
call.expects(:execute_command).once.with command
|
|
83
|
+
call.expects(:execute_command!).once.with command
|
|
73
84
|
subject.execute_call_command command
|
|
74
85
|
end
|
|
75
86
|
end
|
|
76
87
|
|
|
77
88
|
describe '#execute_component_command' do
|
|
78
89
|
let(:call_id) { 'abc123' }
|
|
79
|
-
let(:call) { Translator::Asterisk::Call.new }
|
|
90
|
+
let(:call) { Translator::Asterisk::Call.new 'SIP/foo', subject }
|
|
80
91
|
|
|
81
92
|
let(:component_id) { '123abc' }
|
|
82
93
|
let(:component) { mock 'Translator::Asterisk::Component', :id => component_id }
|
|
@@ -90,7 +101,7 @@ module Punchblock
|
|
|
90
101
|
end
|
|
91
102
|
|
|
92
103
|
it 'sends the command to the component for execution' do
|
|
93
|
-
component.expects(:execute_command).once.with command
|
|
104
|
+
component.expects(:execute_command!).once.with command
|
|
94
105
|
subject.execute_component_command command
|
|
95
106
|
end
|
|
96
107
|
end
|
|
@@ -105,16 +116,24 @@ module Punchblock
|
|
|
105
116
|
Component::Asterisk::AMI::Action.new :name => 'Status', :params => { :channel => 'foo' }
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
let(:mock_action) { mock 'Asterisk::AMIAction' }
|
|
119
|
+
let(:mock_action) { mock 'Asterisk::Component::Asterisk::AMIAction' }
|
|
109
120
|
|
|
110
121
|
it 'should create a component actor and execute it asynchronously' do
|
|
111
|
-
Asterisk::AMIAction.expects(:new).once.with(command, subject
|
|
122
|
+
Asterisk::Component::Asterisk::AMIAction.expects(:new).once.with(command, subject).returns mock_action
|
|
112
123
|
mock_action.expects(:execute!).once
|
|
113
124
|
subject.execute_global_command command
|
|
114
125
|
end
|
|
115
126
|
end
|
|
116
127
|
end
|
|
117
128
|
|
|
129
|
+
describe '#handle_pb_event' do
|
|
130
|
+
it 'should forward the event to the connection' do
|
|
131
|
+
event = mock 'Punchblock::Event'
|
|
132
|
+
subject.connection.expects(:handle_event).once.with event
|
|
133
|
+
subject.handle_pb_event event
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
118
137
|
describe '#handle_ami_event' do
|
|
119
138
|
let :ami_event do
|
|
120
139
|
RubyAMI::Event.new('Newchannel').tap do |e|
|
|
@@ -145,7 +164,6 @@ module Punchblock
|
|
|
145
164
|
end
|
|
146
165
|
end
|
|
147
166
|
|
|
148
|
-
|
|
149
167
|
describe 'with a FullyBooted event' do
|
|
150
168
|
let(:ami_event) { RubyAMI::Event.new 'FullyBooted' }
|
|
151
169
|
|
|
@@ -164,6 +182,68 @@ module Punchblock
|
|
|
164
182
|
end
|
|
165
183
|
end
|
|
166
184
|
end
|
|
185
|
+
|
|
186
|
+
describe 'with an AsyncAGI Start event' do
|
|
187
|
+
let :ami_event do
|
|
188
|
+
RubyAMI::Event.new('AsyncAGI').tap do |e|
|
|
189
|
+
e['SubEvent'] = "Start"
|
|
190
|
+
e['Channel'] = "SIP/1234-00000000"
|
|
191
|
+
e['Env'] = "agi_request%3A%20async%0Aagi_channel%3A%20SIP%2F1234-00000000%0Aagi_language%3A%20en%0Aagi_type%3A%20SIP%0Aagi_uniqueid%3A%201320835995.0%0Aagi_version%3A%201.8.4.1%0Aagi_callerid%3A%205678%0Aagi_calleridname%3A%20Jane%20Smith%0Aagi_callingpres%3A%200%0Aagi_callingani2%3A%200%0Aagi_callington%3A%200%0Aagi_callingtns%3A%200%0Aagi_dnid%3A%201000%0Aagi_rdnis%3A%20unknown%0Aagi_context%3A%20default%0Aagi_extension%3A%201000%0Aagi_priority%3A%201%0Aagi_enhanced%3A%200.0%0Aagi_accountcode%3A%20%0Aagi_threadid%3A%204366221312%0A%0A"
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
before { subject.actor_subject.stubs :handle_pb_event }
|
|
196
|
+
|
|
197
|
+
it 'should be able to look up the call by channel ID' do
|
|
198
|
+
subject.handle_ami_event ami_event
|
|
199
|
+
call_actor = subject.call_for_channel('SIP/1234-00000000')
|
|
200
|
+
call_actor.actor_subject.should be_a Asterisk::Call
|
|
201
|
+
call_actor.agi_env.should be_a Hash
|
|
202
|
+
call_actor.agi_env[:agi_request].should == 'async'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
it 'should instruct the call to send an offer' do
|
|
206
|
+
mock_call = stub_everything 'Asterisk::Call'
|
|
207
|
+
Asterisk::Call.expects(:new).once.returns mock_call
|
|
208
|
+
mock_call.expects(:send_offer!).once
|
|
209
|
+
subject.handle_ami_event ami_event
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
describe 'with an AMI event for a known channel' do
|
|
214
|
+
let :ami_event do
|
|
215
|
+
RubyAMI::Event.new('Hangup').tap do |e|
|
|
216
|
+
e['Uniqueid'] = "1320842458.8"
|
|
217
|
+
e['Calleridnum'] = "5678"
|
|
218
|
+
e['Calleridname'] = "Jane Smith"
|
|
219
|
+
e['Cause'] = "0"
|
|
220
|
+
e['Cause-txt'] = "Unknown"
|
|
221
|
+
e['Channel'] = "SIP/1234-00000000"
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
let(:call) do
|
|
226
|
+
Asterisk::Call.new "SIP/1234-00000000", subject, "agi_request%3A%20async%0Aagi_channel%3A%20SIP%2F1234-00000000%0Aagi_language%3A%20en%0Aagi_type%3A%20SIP%0Aagi_uniqueid%3A%201320835995.0%0Aagi_version%3A%201.8.4.1%0Aagi_callerid%3A%205678%0Aagi_calleridname%3A%20Jane%20Smith%0Aagi_callingpres%3A%200%0Aagi_callingani2%3A%200%0Aagi_callington%3A%200%0Aagi_callingtns%3A%200%0Aagi_dnid%3A%201000%0Aagi_rdnis%3A%20unknown%0Aagi_context%3A%20default%0Aagi_extension%3A%201000%0Aagi_priority%3A%201%0Aagi_enhanced%3A%200.0%0Aagi_accountcode%3A%20%0Aagi_threadid%3A%204366221312%0A%0A"
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
before do
|
|
230
|
+
subject.actor_subject.stubs :handle_pb_event
|
|
231
|
+
subject.register_call call
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
it 'sends the AMI event to the call and to the connection as a PB event' do
|
|
235
|
+
subject.actor_subject.expects(:handle_pb_event).once
|
|
236
|
+
call.expects(:process_ami_event!).once.with ami_event
|
|
237
|
+
subject.handle_ami_event ami_event
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
describe '#send_ami_action' do
|
|
243
|
+
it 'should send the action to the AMI client' do
|
|
244
|
+
ami_client.expects(:send_action).once.with 'foo', :foo => :bar
|
|
245
|
+
subject.send_ami_action 'foo', :foo => :bar
|
|
246
|
+
end
|
|
167
247
|
end
|
|
168
248
|
end
|
|
169
249
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: punchblock
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -11,11 +11,11 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2011-11-
|
|
14
|
+
date: 2011-11-11 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: niceogiri
|
|
18
|
-
requirement: &
|
|
18
|
+
requirement: &2156247020 !ruby/object:Gem::Requirement
|
|
19
19
|
none: false
|
|
20
20
|
requirements:
|
|
21
21
|
- - ! '>='
|
|
@@ -23,10 +23,10 @@ dependencies:
|
|
|
23
23
|
version: 0.0.4
|
|
24
24
|
type: :runtime
|
|
25
25
|
prerelease: false
|
|
26
|
-
version_requirements: *
|
|
26
|
+
version_requirements: *2156247020
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: blather
|
|
29
|
-
requirement: &
|
|
29
|
+
requirement: &2156233680 !ruby/object:Gem::Requirement
|
|
30
30
|
none: false
|
|
31
31
|
requirements:
|
|
32
32
|
- - ! '>='
|
|
@@ -34,10 +34,10 @@ dependencies:
|
|
|
34
34
|
version: 0.5.7
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
|
-
version_requirements: *
|
|
37
|
+
version_requirements: *2156233680
|
|
38
38
|
- !ruby/object:Gem::Dependency
|
|
39
39
|
name: pry
|
|
40
|
-
requirement: &
|
|
40
|
+
requirement: &2156232040 !ruby/object:Gem::Requirement
|
|
41
41
|
none: false
|
|
42
42
|
requirements:
|
|
43
43
|
- - ! '>='
|
|
@@ -45,10 +45,10 @@ dependencies:
|
|
|
45
45
|
version: 0.8.3
|
|
46
46
|
type: :runtime
|
|
47
47
|
prerelease: false
|
|
48
|
-
version_requirements: *
|
|
48
|
+
version_requirements: *2156232040
|
|
49
49
|
- !ruby/object:Gem::Dependency
|
|
50
50
|
name: activesupport
|
|
51
|
-
requirement: &
|
|
51
|
+
requirement: &2156214220 !ruby/object:Gem::Requirement
|
|
52
52
|
none: false
|
|
53
53
|
requirements:
|
|
54
54
|
- - ! '>='
|
|
@@ -56,10 +56,10 @@ dependencies:
|
|
|
56
56
|
version: 2.1.0
|
|
57
57
|
type: :runtime
|
|
58
58
|
prerelease: false
|
|
59
|
-
version_requirements: *
|
|
59
|
+
version_requirements: *2156214220
|
|
60
60
|
- !ruby/object:Gem::Dependency
|
|
61
61
|
name: state_machine
|
|
62
|
-
requirement: &
|
|
62
|
+
requirement: &2156212640 !ruby/object:Gem::Requirement
|
|
63
63
|
none: false
|
|
64
64
|
requirements:
|
|
65
65
|
- - ! '>='
|
|
@@ -67,10 +67,10 @@ dependencies:
|
|
|
67
67
|
version: 1.0.1
|
|
68
68
|
type: :runtime
|
|
69
69
|
prerelease: false
|
|
70
|
-
version_requirements: *
|
|
70
|
+
version_requirements: *2156212640
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: future-resource
|
|
73
|
-
requirement: &
|
|
73
|
+
requirement: &2156189020 !ruby/object:Gem::Requirement
|
|
74
74
|
none: false
|
|
75
75
|
requirements:
|
|
76
76
|
- - ! '>='
|
|
@@ -78,10 +78,10 @@ dependencies:
|
|
|
78
78
|
version: 0.0.2
|
|
79
79
|
type: :runtime
|
|
80
80
|
prerelease: false
|
|
81
|
-
version_requirements: *
|
|
81
|
+
version_requirements: *2156189020
|
|
82
82
|
- !ruby/object:Gem::Dependency
|
|
83
83
|
name: has-guarded-handlers
|
|
84
|
-
requirement: &
|
|
84
|
+
requirement: &2156162060 !ruby/object:Gem::Requirement
|
|
85
85
|
none: false
|
|
86
86
|
requirements:
|
|
87
87
|
- - ! '>='
|
|
@@ -89,10 +89,10 @@ dependencies:
|
|
|
89
89
|
version: 0.1.0
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
|
-
version_requirements: *
|
|
92
|
+
version_requirements: *2156162060
|
|
93
93
|
- !ruby/object:Gem::Dependency
|
|
94
94
|
name: celluloid
|
|
95
|
-
requirement: &
|
|
95
|
+
requirement: &2156159460 !ruby/object:Gem::Requirement
|
|
96
96
|
none: false
|
|
97
97
|
requirements:
|
|
98
98
|
- - ! '>='
|
|
@@ -100,10 +100,10 @@ dependencies:
|
|
|
100
100
|
version: 0.5.0
|
|
101
101
|
type: :runtime
|
|
102
102
|
prerelease: false
|
|
103
|
-
version_requirements: *
|
|
103
|
+
version_requirements: *2156159460
|
|
104
104
|
- !ruby/object:Gem::Dependency
|
|
105
105
|
name: ruby_ami
|
|
106
|
-
requirement: &
|
|
106
|
+
requirement: &2156158160 !ruby/object:Gem::Requirement
|
|
107
107
|
none: false
|
|
108
108
|
requirements:
|
|
109
109
|
- - ! '>='
|
|
@@ -111,10 +111,10 @@ dependencies:
|
|
|
111
111
|
version: 0.1.2
|
|
112
112
|
type: :runtime
|
|
113
113
|
prerelease: false
|
|
114
|
-
version_requirements: *
|
|
114
|
+
version_requirements: *2156158160
|
|
115
115
|
- !ruby/object:Gem::Dependency
|
|
116
116
|
name: bundler
|
|
117
|
-
requirement: &
|
|
117
|
+
requirement: &2156155900 !ruby/object:Gem::Requirement
|
|
118
118
|
none: false
|
|
119
119
|
requirements:
|
|
120
120
|
- - ~>
|
|
@@ -122,10 +122,10 @@ dependencies:
|
|
|
122
122
|
version: 1.0.0
|
|
123
123
|
type: :development
|
|
124
124
|
prerelease: false
|
|
125
|
-
version_requirements: *
|
|
125
|
+
version_requirements: *2156155900
|
|
126
126
|
- !ruby/object:Gem::Dependency
|
|
127
127
|
name: rspec
|
|
128
|
-
requirement: &
|
|
128
|
+
requirement: &2156042060 !ruby/object:Gem::Requirement
|
|
129
129
|
none: false
|
|
130
130
|
requirements:
|
|
131
131
|
- - ! '>='
|
|
@@ -133,10 +133,10 @@ dependencies:
|
|
|
133
133
|
version: 2.5.0
|
|
134
134
|
type: :development
|
|
135
135
|
prerelease: false
|
|
136
|
-
version_requirements: *
|
|
136
|
+
version_requirements: *2156042060
|
|
137
137
|
- !ruby/object:Gem::Dependency
|
|
138
138
|
name: ci_reporter
|
|
139
|
-
requirement: &
|
|
139
|
+
requirement: &2156026360 !ruby/object:Gem::Requirement
|
|
140
140
|
none: false
|
|
141
141
|
requirements:
|
|
142
142
|
- - ! '>='
|
|
@@ -144,10 +144,10 @@ dependencies:
|
|
|
144
144
|
version: 1.6.3
|
|
145
145
|
type: :development
|
|
146
146
|
prerelease: false
|
|
147
|
-
version_requirements: *
|
|
147
|
+
version_requirements: *2156026360
|
|
148
148
|
- !ruby/object:Gem::Dependency
|
|
149
149
|
name: yard
|
|
150
|
-
requirement: &
|
|
150
|
+
requirement: &2155997320 !ruby/object:Gem::Requirement
|
|
151
151
|
none: false
|
|
152
152
|
requirements:
|
|
153
153
|
- - ~>
|
|
@@ -155,10 +155,10 @@ dependencies:
|
|
|
155
155
|
version: 0.6.0
|
|
156
156
|
type: :development
|
|
157
157
|
prerelease: false
|
|
158
|
-
version_requirements: *
|
|
158
|
+
version_requirements: *2155997320
|
|
159
159
|
- !ruby/object:Gem::Dependency
|
|
160
160
|
name: rcov
|
|
161
|
-
requirement: &
|
|
161
|
+
requirement: &2151923240 !ruby/object:Gem::Requirement
|
|
162
162
|
none: false
|
|
163
163
|
requirements:
|
|
164
164
|
- - ! '>='
|
|
@@ -166,10 +166,10 @@ dependencies:
|
|
|
166
166
|
version: '0'
|
|
167
167
|
type: :development
|
|
168
168
|
prerelease: false
|
|
169
|
-
version_requirements: *
|
|
169
|
+
version_requirements: *2151923240
|
|
170
170
|
- !ruby/object:Gem::Dependency
|
|
171
171
|
name: rake
|
|
172
|
-
requirement: &
|
|
172
|
+
requirement: &2151910900 !ruby/object:Gem::Requirement
|
|
173
173
|
none: false
|
|
174
174
|
requirements:
|
|
175
175
|
- - ! '>='
|
|
@@ -177,10 +177,10 @@ dependencies:
|
|
|
177
177
|
version: '0'
|
|
178
178
|
type: :development
|
|
179
179
|
prerelease: false
|
|
180
|
-
version_requirements: *
|
|
180
|
+
version_requirements: *2151910900
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: mocha
|
|
183
|
-
requirement: &
|
|
183
|
+
requirement: &2151908900 !ruby/object:Gem::Requirement
|
|
184
184
|
none: false
|
|
185
185
|
requirements:
|
|
186
186
|
- - ! '>='
|
|
@@ -188,10 +188,10 @@ dependencies:
|
|
|
188
188
|
version: '0'
|
|
189
189
|
type: :development
|
|
190
190
|
prerelease: false
|
|
191
|
-
version_requirements: *
|
|
191
|
+
version_requirements: *2151908900
|
|
192
192
|
- !ruby/object:Gem::Dependency
|
|
193
193
|
name: i18n
|
|
194
|
-
requirement: &
|
|
194
|
+
requirement: &2151907680 !ruby/object:Gem::Requirement
|
|
195
195
|
none: false
|
|
196
196
|
requirements:
|
|
197
197
|
- - ! '>='
|
|
@@ -199,10 +199,10 @@ dependencies:
|
|
|
199
199
|
version: '0'
|
|
200
200
|
type: :development
|
|
201
201
|
prerelease: false
|
|
202
|
-
version_requirements: *
|
|
202
|
+
version_requirements: *2151907680
|
|
203
203
|
- !ruby/object:Gem::Dependency
|
|
204
204
|
name: countdownlatch
|
|
205
|
-
requirement: &
|
|
205
|
+
requirement: &2151906080 !ruby/object:Gem::Requirement
|
|
206
206
|
none: false
|
|
207
207
|
requirements:
|
|
208
208
|
- - ! '>='
|
|
@@ -210,7 +210,7 @@ dependencies:
|
|
|
210
210
|
version: '0'
|
|
211
211
|
type: :development
|
|
212
212
|
prerelease: false
|
|
213
|
-
version_requirements: *
|
|
213
|
+
version_requirements: *2151906080
|
|
214
214
|
description: Like Rack is to Rails and Sinatra, Punchblock provides a consistent API
|
|
215
215
|
on top of several underlying third-party call control protocols.
|
|
216
216
|
email: punchblock@adhearsion.com
|
|
@@ -270,6 +270,7 @@ files:
|
|
|
270
270
|
- lib/punchblock/core_ext/blather/stanza.rb
|
|
271
271
|
- lib/punchblock/core_ext/blather/stanza/presence.rb
|
|
272
272
|
- lib/punchblock/core_ext/celluloid.rb
|
|
273
|
+
- lib/punchblock/core_ext/ruby.rb
|
|
273
274
|
- lib/punchblock/dsl.rb
|
|
274
275
|
- lib/punchblock/event.rb
|
|
275
276
|
- lib/punchblock/event/answered.rb
|
|
@@ -293,9 +294,11 @@ files:
|
|
|
293
294
|
- lib/punchblock/ref.rb
|
|
294
295
|
- lib/punchblock/translator.rb
|
|
295
296
|
- lib/punchblock/translator/asterisk.rb
|
|
296
|
-
- lib/punchblock/translator/asterisk/ami_action.rb
|
|
297
297
|
- lib/punchblock/translator/asterisk/call.rb
|
|
298
298
|
- lib/punchblock/translator/asterisk/component.rb
|
|
299
|
+
- lib/punchblock/translator/asterisk/component/asterisk.rb
|
|
300
|
+
- lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb
|
|
301
|
+
- lib/punchblock/translator/asterisk/component/asterisk/ami_action.rb
|
|
299
302
|
- lib/punchblock/version.rb
|
|
300
303
|
- log/.gitkeep
|
|
301
304
|
- punchblock.gemspec
|
|
@@ -336,8 +339,9 @@ files:
|
|
|
336
339
|
- spec/punchblock/header_spec.rb
|
|
337
340
|
- spec/punchblock/protocol_error_spec.rb
|
|
338
341
|
- spec/punchblock/ref_spec.rb
|
|
339
|
-
- spec/punchblock/translator/asterisk/ami_action_spec.rb
|
|
340
342
|
- spec/punchblock/translator/asterisk/call_spec.rb
|
|
343
|
+
- spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb
|
|
344
|
+
- spec/punchblock/translator/asterisk/component/asterisk/ami_action_spec.rb
|
|
341
345
|
- spec/punchblock/translator/asterisk/component_spec.rb
|
|
342
346
|
- spec/punchblock/translator/asterisk_spec.rb
|
|
343
347
|
- spec/spec_helper.rb
|
|
@@ -404,8 +408,9 @@ test_files:
|
|
|
404
408
|
- spec/punchblock/header_spec.rb
|
|
405
409
|
- spec/punchblock/protocol_error_spec.rb
|
|
406
410
|
- spec/punchblock/ref_spec.rb
|
|
407
|
-
- spec/punchblock/translator/asterisk/ami_action_spec.rb
|
|
408
411
|
- spec/punchblock/translator/asterisk/call_spec.rb
|
|
412
|
+
- spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb
|
|
413
|
+
- spec/punchblock/translator/asterisk/component/asterisk/ami_action_spec.rb
|
|
409
414
|
- spec/punchblock/translator/asterisk/component_spec.rb
|
|
410
415
|
- spec/punchblock/translator/asterisk_spec.rb
|
|
411
416
|
- spec/spec_helper.rb
|