punchblock 0.5.1 → 0.6.0
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 +5 -0
- data/LICENSE.txt +3 -1
- data/bin/punchblock-console +19 -1
- data/lib/punchblock.rb +11 -4
- data/lib/punchblock/command/reject.rb +6 -2
- data/lib/punchblock/component.rb +1 -0
- data/lib/punchblock/component/asterisk.rb +10 -0
- data/lib/punchblock/component/asterisk/agi.rb +11 -0
- data/lib/punchblock/component/asterisk/agi/command.rb +157 -0
- data/lib/punchblock/component/asterisk/ami.rb +12 -0
- data/lib/punchblock/component/asterisk/ami/action.rb +144 -0
- data/lib/punchblock/component/input.rb +2 -2
- data/lib/punchblock/connection.rb +1 -0
- data/lib/punchblock/connection/asterisk.rb +31 -0
- data/lib/punchblock/core_ext/celluloid.rb +11 -0
- data/lib/punchblock/event.rb +1 -1
- data/lib/punchblock/event/asterisk.rb +9 -0
- data/lib/punchblock/event/asterisk/ami.rb +11 -0
- data/lib/punchblock/event/asterisk/ami/event.rb +66 -0
- data/lib/punchblock/event/complete.rb +20 -0
- data/lib/punchblock/event/dtmf.rb +19 -0
- data/lib/punchblock/event/end.rb +23 -0
- data/lib/punchblock/event/offer.rb +23 -0
- data/lib/punchblock/header.rb +4 -44
- data/lib/punchblock/key_value_pair_node.rb +50 -0
- data/lib/punchblock/rayo_node.rb +1 -1
- data/lib/punchblock/ref.rb +6 -0
- data/lib/punchblock/translator.rb +7 -0
- data/lib/punchblock/translator/asterisk.rb +74 -0
- data/lib/punchblock/translator/asterisk/ami_action.rb +86 -0
- data/lib/punchblock/translator/asterisk/call.rb +25 -0
- data/lib/punchblock/translator/asterisk/component.rb +11 -0
- data/lib/punchblock/version.rb +1 -1
- data/punchblock.gemspec +3 -1
- data/spec/punchblock/command/accept_spec.rb +8 -0
- data/spec/punchblock/command/answer_spec.rb +8 -0
- data/spec/punchblock/command/dial_spec.rb +22 -2
- data/spec/punchblock/command/hangup_spec.rb +8 -0
- data/spec/punchblock/command/join_spec.rb +21 -0
- data/spec/punchblock/command/mute_spec.rb +8 -0
- data/spec/punchblock/command/redirect_spec.rb +21 -0
- data/spec/punchblock/command/reject_spec.rb +19 -8
- data/spec/punchblock/command/unjoin_spec.rb +17 -0
- data/spec/punchblock/command/unmute_spec.rb +8 -0
- data/spec/punchblock/component/asterisk/agi/command_spec.rb +102 -0
- data/spec/punchblock/component/asterisk/ami/action_spec.rb +118 -0
- data/spec/punchblock/component/input_spec.rb +40 -0
- data/spec/punchblock/component/output_spec.rb +28 -0
- data/spec/punchblock/component/record_spec.rb +27 -0
- data/spec/punchblock/connection/asterisk_spec.rb +69 -0
- data/spec/punchblock/event/asterisk/ami/event_spec.rb +60 -0
- data/spec/punchblock/event/complete_spec.rb +8 -0
- data/spec/punchblock/event/dtmf_spec.rb +8 -0
- data/spec/punchblock/event/end_spec.rb +8 -0
- data/spec/punchblock/event/offer_spec.rb +15 -2
- data/spec/punchblock/ref_spec.rb +6 -0
- data/spec/punchblock/translator/asterisk/ami_action_spec.rb +149 -0
- data/spec/punchblock/translator/asterisk/call_spec.rb +18 -0
- data/spec/punchblock/translator/asterisk/component_spec.rb +11 -0
- data/spec/punchblock/translator/asterisk_spec.rb +150 -0
- data/spec/spec_helper.rb +42 -0
- metadata +92 -42
- data/lib/punchblock/event/info.rb +0 -15
- data/spec/punchblock/event/info_spec.rb +0 -30
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.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -11,12 +11,11 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2011-
|
|
15
|
-
default_executable:
|
|
14
|
+
date: 2011-11-08 00:00:00.000000000 Z
|
|
16
15
|
dependencies:
|
|
17
16
|
- !ruby/object:Gem::Dependency
|
|
18
17
|
name: niceogiri
|
|
19
|
-
requirement: &
|
|
18
|
+
requirement: &2160733620 !ruby/object:Gem::Requirement
|
|
20
19
|
none: false
|
|
21
20
|
requirements:
|
|
22
21
|
- - ! '>='
|
|
@@ -24,10 +23,10 @@ dependencies:
|
|
|
24
23
|
version: 0.0.4
|
|
25
24
|
type: :runtime
|
|
26
25
|
prerelease: false
|
|
27
|
-
version_requirements: *
|
|
26
|
+
version_requirements: *2160733620
|
|
28
27
|
- !ruby/object:Gem::Dependency
|
|
29
28
|
name: blather
|
|
30
|
-
requirement: &
|
|
29
|
+
requirement: &2160732480 !ruby/object:Gem::Requirement
|
|
31
30
|
none: false
|
|
32
31
|
requirements:
|
|
33
32
|
- - ! '>='
|
|
@@ -35,10 +34,10 @@ dependencies:
|
|
|
35
34
|
version: 0.5.7
|
|
36
35
|
type: :runtime
|
|
37
36
|
prerelease: false
|
|
38
|
-
version_requirements: *
|
|
37
|
+
version_requirements: *2160732480
|
|
39
38
|
- !ruby/object:Gem::Dependency
|
|
40
39
|
name: pry
|
|
41
|
-
requirement: &
|
|
40
|
+
requirement: &2160730960 !ruby/object:Gem::Requirement
|
|
42
41
|
none: false
|
|
43
42
|
requirements:
|
|
44
43
|
- - ! '>='
|
|
@@ -46,10 +45,10 @@ dependencies:
|
|
|
46
45
|
version: 0.8.3
|
|
47
46
|
type: :runtime
|
|
48
47
|
prerelease: false
|
|
49
|
-
version_requirements: *
|
|
48
|
+
version_requirements: *2160730960
|
|
50
49
|
- !ruby/object:Gem::Dependency
|
|
51
50
|
name: activesupport
|
|
52
|
-
requirement: &
|
|
51
|
+
requirement: &2160729840 !ruby/object:Gem::Requirement
|
|
53
52
|
none: false
|
|
54
53
|
requirements:
|
|
55
54
|
- - ! '>='
|
|
@@ -57,10 +56,10 @@ dependencies:
|
|
|
57
56
|
version: 2.1.0
|
|
58
57
|
type: :runtime
|
|
59
58
|
prerelease: false
|
|
60
|
-
version_requirements: *
|
|
59
|
+
version_requirements: *2160729840
|
|
61
60
|
- !ruby/object:Gem::Dependency
|
|
62
61
|
name: state_machine
|
|
63
|
-
requirement: &
|
|
62
|
+
requirement: &2160729040 !ruby/object:Gem::Requirement
|
|
64
63
|
none: false
|
|
65
64
|
requirements:
|
|
66
65
|
- - ! '>='
|
|
@@ -68,10 +67,10 @@ dependencies:
|
|
|
68
67
|
version: 1.0.1
|
|
69
68
|
type: :runtime
|
|
70
69
|
prerelease: false
|
|
71
|
-
version_requirements: *
|
|
70
|
+
version_requirements: *2160729040
|
|
72
71
|
- !ruby/object:Gem::Dependency
|
|
73
72
|
name: future-resource
|
|
74
|
-
requirement: &
|
|
73
|
+
requirement: &2160728280 !ruby/object:Gem::Requirement
|
|
75
74
|
none: false
|
|
76
75
|
requirements:
|
|
77
76
|
- - ! '>='
|
|
@@ -79,10 +78,10 @@ dependencies:
|
|
|
79
78
|
version: 0.0.2
|
|
80
79
|
type: :runtime
|
|
81
80
|
prerelease: false
|
|
82
|
-
version_requirements: *
|
|
81
|
+
version_requirements: *2160728280
|
|
83
82
|
- !ruby/object:Gem::Dependency
|
|
84
83
|
name: has-guarded-handlers
|
|
85
|
-
requirement: &
|
|
84
|
+
requirement: &2160727760 !ruby/object:Gem::Requirement
|
|
86
85
|
none: false
|
|
87
86
|
requirements:
|
|
88
87
|
- - ! '>='
|
|
@@ -90,10 +89,32 @@ dependencies:
|
|
|
90
89
|
version: 0.1.0
|
|
91
90
|
type: :runtime
|
|
92
91
|
prerelease: false
|
|
93
|
-
version_requirements: *
|
|
92
|
+
version_requirements: *2160727760
|
|
93
|
+
- !ruby/object:Gem::Dependency
|
|
94
|
+
name: celluloid
|
|
95
|
+
requirement: &2160727280 !ruby/object:Gem::Requirement
|
|
96
|
+
none: false
|
|
97
|
+
requirements:
|
|
98
|
+
- - ! '>='
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: 0.5.0
|
|
101
|
+
type: :runtime
|
|
102
|
+
prerelease: false
|
|
103
|
+
version_requirements: *2160727280
|
|
104
|
+
- !ruby/object:Gem::Dependency
|
|
105
|
+
name: ruby_ami
|
|
106
|
+
requirement: &2160726780 !ruby/object:Gem::Requirement
|
|
107
|
+
none: false
|
|
108
|
+
requirements:
|
|
109
|
+
- - ! '>='
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: 0.1.2
|
|
112
|
+
type: :runtime
|
|
113
|
+
prerelease: false
|
|
114
|
+
version_requirements: *2160726780
|
|
94
115
|
- !ruby/object:Gem::Dependency
|
|
95
116
|
name: bundler
|
|
96
|
-
requirement: &
|
|
117
|
+
requirement: &2160726080 !ruby/object:Gem::Requirement
|
|
97
118
|
none: false
|
|
98
119
|
requirements:
|
|
99
120
|
- - ~>
|
|
@@ -101,21 +122,21 @@ dependencies:
|
|
|
101
122
|
version: 1.0.0
|
|
102
123
|
type: :development
|
|
103
124
|
prerelease: false
|
|
104
|
-
version_requirements: *
|
|
125
|
+
version_requirements: *2160726080
|
|
105
126
|
- !ruby/object:Gem::Dependency
|
|
106
127
|
name: rspec
|
|
107
|
-
requirement: &
|
|
128
|
+
requirement: &2160546520 !ruby/object:Gem::Requirement
|
|
108
129
|
none: false
|
|
109
130
|
requirements:
|
|
110
|
-
- -
|
|
131
|
+
- - ! '>='
|
|
111
132
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: 2.
|
|
133
|
+
version: 2.5.0
|
|
113
134
|
type: :development
|
|
114
135
|
prerelease: false
|
|
115
|
-
version_requirements: *
|
|
136
|
+
version_requirements: *2160546520
|
|
116
137
|
- !ruby/object:Gem::Dependency
|
|
117
138
|
name: ci_reporter
|
|
118
|
-
requirement: &
|
|
139
|
+
requirement: &2160546040 !ruby/object:Gem::Requirement
|
|
119
140
|
none: false
|
|
120
141
|
requirements:
|
|
121
142
|
- - ! '>='
|
|
@@ -123,10 +144,10 @@ dependencies:
|
|
|
123
144
|
version: 1.6.3
|
|
124
145
|
type: :development
|
|
125
146
|
prerelease: false
|
|
126
|
-
version_requirements: *
|
|
147
|
+
version_requirements: *2160546040
|
|
127
148
|
- !ruby/object:Gem::Dependency
|
|
128
149
|
name: yard
|
|
129
|
-
requirement: &
|
|
150
|
+
requirement: &2160545300 !ruby/object:Gem::Requirement
|
|
130
151
|
none: false
|
|
131
152
|
requirements:
|
|
132
153
|
- - ~>
|
|
@@ -134,10 +155,10 @@ dependencies:
|
|
|
134
155
|
version: 0.6.0
|
|
135
156
|
type: :development
|
|
136
157
|
prerelease: false
|
|
137
|
-
version_requirements: *
|
|
158
|
+
version_requirements: *2160545300
|
|
138
159
|
- !ruby/object:Gem::Dependency
|
|
139
160
|
name: rcov
|
|
140
|
-
requirement: &
|
|
161
|
+
requirement: &2160544240 !ruby/object:Gem::Requirement
|
|
141
162
|
none: false
|
|
142
163
|
requirements:
|
|
143
164
|
- - ! '>='
|
|
@@ -145,10 +166,10 @@ dependencies:
|
|
|
145
166
|
version: '0'
|
|
146
167
|
type: :development
|
|
147
168
|
prerelease: false
|
|
148
|
-
version_requirements: *
|
|
169
|
+
version_requirements: *2160544240
|
|
149
170
|
- !ruby/object:Gem::Dependency
|
|
150
171
|
name: rake
|
|
151
|
-
requirement: &
|
|
172
|
+
requirement: &2160543520 !ruby/object:Gem::Requirement
|
|
152
173
|
none: false
|
|
153
174
|
requirements:
|
|
154
175
|
- - ! '>='
|
|
@@ -156,10 +177,10 @@ dependencies:
|
|
|
156
177
|
version: '0'
|
|
157
178
|
type: :development
|
|
158
179
|
prerelease: false
|
|
159
|
-
version_requirements: *
|
|
180
|
+
version_requirements: *2160543520
|
|
160
181
|
- !ruby/object:Gem::Dependency
|
|
161
182
|
name: mocha
|
|
162
|
-
requirement: &
|
|
183
|
+
requirement: &2160542900 !ruby/object:Gem::Requirement
|
|
163
184
|
none: false
|
|
164
185
|
requirements:
|
|
165
186
|
- - ! '>='
|
|
@@ -167,10 +188,10 @@ dependencies:
|
|
|
167
188
|
version: '0'
|
|
168
189
|
type: :development
|
|
169
190
|
prerelease: false
|
|
170
|
-
version_requirements: *
|
|
191
|
+
version_requirements: *2160542900
|
|
171
192
|
- !ruby/object:Gem::Dependency
|
|
172
193
|
name: i18n
|
|
173
|
-
requirement: &
|
|
194
|
+
requirement: &2160542320 !ruby/object:Gem::Requirement
|
|
174
195
|
none: false
|
|
175
196
|
requirements:
|
|
176
197
|
- - ! '>='
|
|
@@ -178,10 +199,10 @@ dependencies:
|
|
|
178
199
|
version: '0'
|
|
179
200
|
type: :development
|
|
180
201
|
prerelease: false
|
|
181
|
-
version_requirements: *
|
|
202
|
+
version_requirements: *2160542320
|
|
182
203
|
- !ruby/object:Gem::Dependency
|
|
183
204
|
name: countdownlatch
|
|
184
|
-
requirement: &
|
|
205
|
+
requirement: &2160541740 !ruby/object:Gem::Requirement
|
|
185
206
|
none: false
|
|
186
207
|
requirements:
|
|
187
208
|
- - ! '>='
|
|
@@ -189,7 +210,7 @@ dependencies:
|
|
|
189
210
|
version: '0'
|
|
190
211
|
type: :development
|
|
191
212
|
prerelease: false
|
|
192
|
-
version_requirements: *
|
|
213
|
+
version_requirements: *2160541740
|
|
193
214
|
description: Like Rack is to Rails and Sinatra, Punchblock provides a consistent API
|
|
194
215
|
on top of several underlying third-party call control protocols.
|
|
195
216
|
email: punchblock@adhearsion.com
|
|
@@ -228,6 +249,11 @@ files:
|
|
|
228
249
|
- lib/punchblock/command/unmute.rb
|
|
229
250
|
- lib/punchblock/command_node.rb
|
|
230
251
|
- lib/punchblock/component.rb
|
|
252
|
+
- lib/punchblock/component/asterisk.rb
|
|
253
|
+
- lib/punchblock/component/asterisk/agi.rb
|
|
254
|
+
- lib/punchblock/component/asterisk/agi/command.rb
|
|
255
|
+
- lib/punchblock/component/asterisk/ami.rb
|
|
256
|
+
- lib/punchblock/component/asterisk/ami/action.rb
|
|
231
257
|
- lib/punchblock/component/input.rb
|
|
232
258
|
- lib/punchblock/component/output.rb
|
|
233
259
|
- lib/punchblock/component/record.rb
|
|
@@ -237,28 +263,38 @@ files:
|
|
|
237
263
|
- lib/punchblock/component/tropo/say.rb
|
|
238
264
|
- lib/punchblock/component/tropo/transfer.rb
|
|
239
265
|
- lib/punchblock/connection.rb
|
|
266
|
+
- lib/punchblock/connection/asterisk.rb
|
|
240
267
|
- lib/punchblock/connection/connected.rb
|
|
241
268
|
- lib/punchblock/connection/xmpp.rb
|
|
242
269
|
- lib/punchblock/core_ext/blather/stanza.rb
|
|
243
270
|
- lib/punchblock/core_ext/blather/stanza/presence.rb
|
|
271
|
+
- lib/punchblock/core_ext/celluloid.rb
|
|
244
272
|
- lib/punchblock/dsl.rb
|
|
245
273
|
- lib/punchblock/event.rb
|
|
246
274
|
- lib/punchblock/event/answered.rb
|
|
275
|
+
- lib/punchblock/event/asterisk.rb
|
|
276
|
+
- lib/punchblock/event/asterisk/ami.rb
|
|
277
|
+
- lib/punchblock/event/asterisk/ami/event.rb
|
|
247
278
|
- lib/punchblock/event/complete.rb
|
|
248
279
|
- lib/punchblock/event/dtmf.rb
|
|
249
280
|
- lib/punchblock/event/end.rb
|
|
250
|
-
- lib/punchblock/event/info.rb
|
|
251
281
|
- lib/punchblock/event/joined.rb
|
|
252
282
|
- lib/punchblock/event/offer.rb
|
|
253
283
|
- lib/punchblock/event/ringing.rb
|
|
254
284
|
- lib/punchblock/event/unjoined.rb
|
|
255
285
|
- lib/punchblock/has_headers.rb
|
|
256
286
|
- lib/punchblock/header.rb
|
|
287
|
+
- lib/punchblock/key_value_pair_node.rb
|
|
257
288
|
- lib/punchblock/media_container.rb
|
|
258
289
|
- lib/punchblock/media_node.rb
|
|
259
290
|
- lib/punchblock/protocol_error.rb
|
|
260
291
|
- lib/punchblock/rayo_node.rb
|
|
261
292
|
- lib/punchblock/ref.rb
|
|
293
|
+
- lib/punchblock/translator.rb
|
|
294
|
+
- lib/punchblock/translator/asterisk.rb
|
|
295
|
+
- lib/punchblock/translator/asterisk/ami_action.rb
|
|
296
|
+
- lib/punchblock/translator/asterisk/call.rb
|
|
297
|
+
- lib/punchblock/translator/asterisk/component.rb
|
|
262
298
|
- lib/punchblock/version.rb
|
|
263
299
|
- log/.gitkeep
|
|
264
300
|
- punchblock.gemspec
|
|
@@ -275,6 +311,8 @@ files:
|
|
|
275
311
|
- spec/punchblock/command/unjoin_spec.rb
|
|
276
312
|
- spec/punchblock/command/unmute_spec.rb
|
|
277
313
|
- spec/punchblock/command_node_spec.rb
|
|
314
|
+
- spec/punchblock/component/asterisk/agi/command_spec.rb
|
|
315
|
+
- spec/punchblock/component/asterisk/ami/action_spec.rb
|
|
278
316
|
- spec/punchblock/component/input_spec.rb
|
|
279
317
|
- spec/punchblock/component/output_spec.rb
|
|
280
318
|
- spec/punchblock/component/record_spec.rb
|
|
@@ -283,12 +321,13 @@ files:
|
|
|
283
321
|
- spec/punchblock/component/tropo/say_spec.rb
|
|
284
322
|
- spec/punchblock/component/tropo/transfer_spec.rb
|
|
285
323
|
- spec/punchblock/component_spec.rb
|
|
324
|
+
- spec/punchblock/connection/asterisk_spec.rb
|
|
286
325
|
- spec/punchblock/connection/xmpp_spec.rb
|
|
287
326
|
- spec/punchblock/event/answered_spec.rb
|
|
327
|
+
- spec/punchblock/event/asterisk/ami/event_spec.rb
|
|
288
328
|
- spec/punchblock/event/complete_spec.rb
|
|
289
329
|
- spec/punchblock/event/dtmf_spec.rb
|
|
290
330
|
- spec/punchblock/event/end_spec.rb
|
|
291
|
-
- spec/punchblock/event/info_spec.rb
|
|
292
331
|
- spec/punchblock/event/joined_spec.rb
|
|
293
332
|
- spec/punchblock/event/offer_spec.rb
|
|
294
333
|
- spec/punchblock/event/ringing_spec.rb
|
|
@@ -296,8 +335,11 @@ files:
|
|
|
296
335
|
- spec/punchblock/header_spec.rb
|
|
297
336
|
- spec/punchblock/protocol_error_spec.rb
|
|
298
337
|
- spec/punchblock/ref_spec.rb
|
|
338
|
+
- spec/punchblock/translator/asterisk/ami_action_spec.rb
|
|
339
|
+
- spec/punchblock/translator/asterisk/call_spec.rb
|
|
340
|
+
- spec/punchblock/translator/asterisk/component_spec.rb
|
|
341
|
+
- spec/punchblock/translator/asterisk_spec.rb
|
|
299
342
|
- spec/spec_helper.rb
|
|
300
|
-
has_rdoc: true
|
|
301
343
|
homepage: http://github.com/adhearsion/punchblock
|
|
302
344
|
licenses:
|
|
303
345
|
- MIT
|
|
@@ -319,7 +361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
319
361
|
version: 1.3.7
|
|
320
362
|
requirements: []
|
|
321
363
|
rubyforge_project: punchblock
|
|
322
|
-
rubygems_version: 1.
|
|
364
|
+
rubygems_version: 1.8.10
|
|
323
365
|
signing_key:
|
|
324
366
|
specification_version: 3
|
|
325
367
|
summary: Punchblock is a telephony middleware library
|
|
@@ -337,6 +379,8 @@ test_files:
|
|
|
337
379
|
- spec/punchblock/command/unjoin_spec.rb
|
|
338
380
|
- spec/punchblock/command/unmute_spec.rb
|
|
339
381
|
- spec/punchblock/command_node_spec.rb
|
|
382
|
+
- spec/punchblock/component/asterisk/agi/command_spec.rb
|
|
383
|
+
- spec/punchblock/component/asterisk/ami/action_spec.rb
|
|
340
384
|
- spec/punchblock/component/input_spec.rb
|
|
341
385
|
- spec/punchblock/component/output_spec.rb
|
|
342
386
|
- spec/punchblock/component/record_spec.rb
|
|
@@ -345,12 +389,13 @@ test_files:
|
|
|
345
389
|
- spec/punchblock/component/tropo/say_spec.rb
|
|
346
390
|
- spec/punchblock/component/tropo/transfer_spec.rb
|
|
347
391
|
- spec/punchblock/component_spec.rb
|
|
392
|
+
- spec/punchblock/connection/asterisk_spec.rb
|
|
348
393
|
- spec/punchblock/connection/xmpp_spec.rb
|
|
349
394
|
- spec/punchblock/event/answered_spec.rb
|
|
395
|
+
- spec/punchblock/event/asterisk/ami/event_spec.rb
|
|
350
396
|
- spec/punchblock/event/complete_spec.rb
|
|
351
397
|
- spec/punchblock/event/dtmf_spec.rb
|
|
352
398
|
- spec/punchblock/event/end_spec.rb
|
|
353
|
-
- spec/punchblock/event/info_spec.rb
|
|
354
399
|
- spec/punchblock/event/joined_spec.rb
|
|
355
400
|
- spec/punchblock/event/offer_spec.rb
|
|
356
401
|
- spec/punchblock/event/ringing_spec.rb
|
|
@@ -358,4 +403,9 @@ test_files:
|
|
|
358
403
|
- spec/punchblock/header_spec.rb
|
|
359
404
|
- spec/punchblock/protocol_error_spec.rb
|
|
360
405
|
- spec/punchblock/ref_spec.rb
|
|
406
|
+
- spec/punchblock/translator/asterisk/ami_action_spec.rb
|
|
407
|
+
- spec/punchblock/translator/asterisk/call_spec.rb
|
|
408
|
+
- spec/punchblock/translator/asterisk/component_spec.rb
|
|
409
|
+
- spec/punchblock/translator/asterisk_spec.rb
|
|
361
410
|
- spec/spec_helper.rb
|
|
411
|
+
has_rdoc:
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module Punchblock
|
|
2
|
-
class Event
|
|
3
|
-
class Info < Event
|
|
4
|
-
register :info, :core
|
|
5
|
-
|
|
6
|
-
def event_name
|
|
7
|
-
children.select { |c| c.is_a? Nokogiri::XML::Element }.first.name.to_sym
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def inspect_attributes # :nodoc:
|
|
11
|
-
[:event_name] + super
|
|
12
|
-
end
|
|
13
|
-
end # Info
|
|
14
|
-
end
|
|
15
|
-
end # Punchblock
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
module Punchblock
|
|
4
|
-
class Event
|
|
5
|
-
describe Info do
|
|
6
|
-
it 'registers itself' do
|
|
7
|
-
RayoNode.class_from_registration(:info, 'urn:xmpp:rayo:1').should == Info
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
describe "from a stanza" do
|
|
11
|
-
let :stanza do
|
|
12
|
-
<<-MESSAGE
|
|
13
|
-
<info xmlns='urn:xmpp:rayo:1'>
|
|
14
|
-
<something/>
|
|
15
|
-
</info>
|
|
16
|
-
MESSAGE
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
subject { RayoNode.import parse_stanza(stanza).root, '9f00061', '1' }
|
|
20
|
-
|
|
21
|
-
it { should be_instance_of Info }
|
|
22
|
-
|
|
23
|
-
it_should_behave_like 'event'
|
|
24
|
-
|
|
25
|
-
its(:event_name) { should == :something }
|
|
26
|
-
its(:xmlns) { should == 'urn:xmpp:rayo:1' }
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end # Punchblock
|