punchblock 1.9.4 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -2
- data/CHANGELOG.md +17 -0
- data/Gemfile +1 -0
- data/Guardfile +4 -0
- data/README.markdown +6 -0
- data/Rakefile +16 -0
- data/benchmarks/ami_event_name_comparison.rb +14 -0
- data/benchmarks/channel.rb +27 -0
- data/lib/punchblock/client.rb +2 -6
- data/lib/punchblock/command/accept.rb +3 -24
- data/lib/punchblock/command/answer.rb +3 -24
- data/lib/punchblock/command/dial.rb +24 -76
- data/lib/punchblock/command/hangup.rb +3 -19
- data/lib/punchblock/command/join.rb +21 -70
- data/lib/punchblock/command/mute.rb +3 -3
- data/lib/punchblock/command/redirect.rb +6 -39
- data/lib/punchblock/command/reject.rb +14 -54
- data/lib/punchblock/command/unjoin.rb +8 -40
- data/lib/punchblock/command/unmute.rb +3 -3
- data/lib/punchblock/command_node.rb +0 -17
- data/lib/punchblock/component/asterisk/agi/command.rb +20 -127
- data/lib/punchblock/component/asterisk/ami/action.rb +30 -117
- data/lib/punchblock/component/component_node.rb +1 -1
- data/lib/punchblock/component/input.rb +89 -268
- data/lib/punchblock/component/output.rb +106 -154
- data/lib/punchblock/component/prompt.rb +51 -0
- data/lib/punchblock/component/record.rb +41 -130
- data/lib/punchblock/component.rb +1 -0
- data/lib/punchblock/connection/asterisk.rb +31 -4
- data/lib/punchblock/connection/xmpp.rb +6 -14
- data/lib/punchblock/core_ext/blather/stanza.rb +1 -1
- data/lib/punchblock/event/active_speaker.rb +2 -10
- data/lib/punchblock/event/answered.rb +3 -3
- data/lib/punchblock/event/asterisk/ami/event.rb +15 -47
- data/lib/punchblock/event/complete.rb +26 -48
- data/lib/punchblock/event/dtmf.rb +3 -13
- data/lib/punchblock/event/end.rb +10 -11
- data/lib/punchblock/event/joined.rb +5 -25
- data/lib/punchblock/event/offer.rb +4 -25
- data/lib/punchblock/event/ringing.rb +3 -3
- data/lib/punchblock/event/unjoined.rb +5 -25
- data/lib/punchblock/event.rb +0 -10
- data/lib/punchblock/has_headers.rb +20 -26
- data/lib/punchblock/rayo_node.rb +46 -23
- data/lib/punchblock/ref.rb +39 -18
- data/lib/punchblock/translator/asterisk/agi_app.rb +15 -0
- data/lib/punchblock/translator/asterisk/agi_command.rb +3 -1
- data/lib/punchblock/translator/asterisk/ami_error_converter.rb +20 -0
- data/lib/punchblock/translator/asterisk/call.rb +60 -39
- data/lib/punchblock/translator/asterisk/channel.rb +41 -0
- data/lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb +4 -1
- data/lib/punchblock/translator/asterisk/component/asterisk/ami_action.rb +4 -4
- data/lib/punchblock/translator/asterisk/component/composed_prompt.rb +62 -0
- data/lib/punchblock/translator/asterisk/component/input.rb +1 -0
- data/lib/punchblock/translator/asterisk/component/mrcp_native_prompt.rb +56 -0
- data/lib/punchblock/translator/asterisk/component/mrcp_prompt.rb +53 -0
- data/lib/punchblock/translator/asterisk/component/mrcp_recog_prompt.rb +99 -0
- data/lib/punchblock/translator/asterisk/component/output.rb +30 -22
- data/lib/punchblock/translator/asterisk/component/record.rb +8 -6
- data/lib/punchblock/translator/asterisk/component.rb +6 -5
- data/lib/punchblock/translator/asterisk/unimrcp_app.rb +26 -0
- data/lib/punchblock/translator/asterisk.rb +24 -28
- data/lib/punchblock/translator/dtmf_recognizer.rb +39 -20
- data/lib/punchblock/translator/freeswitch/call.rb +15 -14
- data/lib/punchblock/translator/freeswitch/component/abstract_output.rb +5 -4
- data/lib/punchblock/translator/freeswitch/component/flite_output.rb +1 -1
- data/lib/punchblock/translator/freeswitch/component/input.rb +5 -0
- data/lib/punchblock/translator/freeswitch/component/output.rb +2 -2
- data/lib/punchblock/translator/freeswitch/component/record.rb +19 -13
- data/lib/punchblock/translator/freeswitch/component/tts_output.rb +2 -2
- data/lib/punchblock/translator/freeswitch/component.rb +2 -5
- data/lib/punchblock/translator/freeswitch.rb +2 -2
- data/lib/punchblock/translator/input_component.rb +33 -13
- data/lib/punchblock/uri_list.rb +21 -0
- data/lib/punchblock/version.rb +1 -1
- data/lib/punchblock.rb +4 -3
- data/punchblock.gemspec +7 -3
- data/spec/punchblock/client/component_registry_spec.rb +1 -1
- data/spec/punchblock/client_spec.rb +10 -26
- data/spec/punchblock/command/accept_spec.rb +41 -7
- data/spec/punchblock/command/answer_spec.rb +51 -7
- data/spec/punchblock/command/dial_spec.rb +56 -14
- data/spec/punchblock/command/hangup_spec.rb +41 -7
- data/spec/punchblock/command/join_spec.rb +53 -11
- data/spec/punchblock/command/mute_spec.rb +19 -4
- data/spec/punchblock/command/redirect_spec.rb +40 -10
- data/spec/punchblock/command/reject_spec.rb +43 -11
- data/spec/punchblock/command/unjoin_spec.rb +40 -9
- data/spec/punchblock/command/unmute_spec.rb +19 -4
- data/spec/punchblock/command_node_spec.rb +0 -4
- data/spec/punchblock/component/asterisk/agi/command_spec.rb +16 -39
- data/spec/punchblock/component/asterisk/ami/action_spec.rb +50 -53
- data/spec/punchblock/component/component_node_spec.rb +3 -5
- data/spec/punchblock/component/input_spec.rb +194 -61
- data/spec/punchblock/component/output_spec.rb +194 -62
- data/spec/punchblock/component/prompt_spec.rb +132 -0
- data/spec/punchblock/component/record_spec.rb +70 -32
- data/spec/punchblock/connection/asterisk_spec.rb +17 -3
- data/spec/punchblock/connection/freeswitch_spec.rb +4 -4
- data/spec/punchblock/connection/xmpp_spec.rb +20 -38
- data/spec/punchblock/event/answered_spec.rb +12 -10
- data/spec/punchblock/event/asterisk/ami/event_spec.rb +27 -22
- data/spec/punchblock/event/complete_spec.rb +15 -19
- data/spec/punchblock/event/dtmf_spec.rb +5 -6
- data/spec/punchblock/event/end_spec.rb +20 -10
- data/spec/punchblock/event/joined_spec.rb +8 -7
- data/spec/punchblock/event/offer_spec.rb +41 -12
- data/spec/punchblock/event/ringing_spec.rb +12 -10
- data/spec/punchblock/event/started_speaking_spec.rb +5 -6
- data/spec/punchblock/event/stopped_speaking_spec.rb +5 -6
- data/spec/punchblock/event/unjoined_spec.rb +7 -7
- data/spec/punchblock/ref_spec.rb +86 -9
- data/spec/punchblock/translator/asterisk/call_spec.rb +317 -154
- data/spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb +28 -5
- data/spec/punchblock/translator/asterisk/component/asterisk/ami_action_spec.rb +15 -13
- data/spec/punchblock/translator/asterisk/component/composed_prompt_spec.rb +237 -0
- data/spec/punchblock/translator/asterisk/component/input_spec.rb +171 -14
- data/spec/punchblock/translator/asterisk/component/mrcp_native_prompt_spec.rb +652 -0
- data/spec/punchblock/translator/asterisk/component/mrcp_prompt_spec.rb +646 -0
- data/spec/punchblock/translator/asterisk/component/output_spec.rb +127 -77
- data/spec/punchblock/translator/asterisk/component/record_spec.rb +17 -8
- data/spec/punchblock/translator/asterisk/component/stop_by_redirect_spec.rb +2 -2
- data/spec/punchblock/translator/asterisk/component_spec.rb +3 -7
- data/spec/punchblock/translator/asterisk_spec.rb +20 -24
- data/spec/punchblock/translator/freeswitch/call_spec.rb +103 -99
- data/spec/punchblock/translator/freeswitch/component/flite_output_spec.rb +17 -8
- data/spec/punchblock/translator/freeswitch/component/input_spec.rb +26 -14
- data/spec/punchblock/translator/freeswitch/component/output_spec.rb +30 -52
- data/spec/punchblock/translator/freeswitch/component/record_spec.rb +23 -19
- data/spec/punchblock/translator/freeswitch/component/tts_output_spec.rb +18 -8
- data/spec/punchblock/translator/freeswitch/component_spec.rb +4 -8
- data/spec/punchblock/translator/freeswitch_spec.rb +11 -14
- data/spec/punchblock/uri_list_spec.rb +49 -0
- data/spec/punchblock_spec.rb +11 -1
- data/spec/spec_helper.rb +7 -11
- data/spec/support/mock_connection_with_event_handler.rb +1 -1
- metadata +104 -24
- data/lib/punchblock/header.rb +0 -9
- data/lib/punchblock/key_value_pair_node.rb +0 -51
- data/spec/punchblock/header_spec.rb +0 -11
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:
|
4
|
+
version: 2.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Goecke
|
@@ -10,22 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-08-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: niceogiri
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '1.1'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '1.1'
|
29
15
|
- !ruby/object:Gem::Dependency
|
30
16
|
name: nokogiri
|
31
17
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,16 +50,22 @@ dependencies:
|
|
64
50
|
name: activesupport
|
65
51
|
requirement: !ruby/object:Gem::Requirement
|
66
52
|
requirements:
|
67
|
-
- -
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 3.0.0
|
56
|
+
- - <
|
68
57
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
58
|
+
version: 5.0.0
|
70
59
|
type: :runtime
|
71
60
|
prerelease: false
|
72
61
|
version_requirements: !ruby/object:Gem::Requirement
|
73
62
|
requirements:
|
74
|
-
- -
|
63
|
+
- - '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 3.0.0
|
66
|
+
- - <
|
75
67
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
68
|
+
version: 5.0.0
|
77
69
|
- !ruby/object:Gem::Dependency
|
78
70
|
name: state_machine
|
79
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,6 +152,34 @@ dependencies:
|
|
160
152
|
version: '1.1'
|
161
153
|
- !ruby/object:Gem::Dependency
|
162
154
|
name: ruby_speech
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '2.0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '2.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: virtus
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: ruby_jid
|
163
183
|
requirement: !ruby/object:Gem::Requirement
|
164
184
|
requirements:
|
165
185
|
- - ~>
|
@@ -298,6 +318,48 @@ dependencies:
|
|
298
318
|
- - ~>
|
299
319
|
- !ruby/object:Gem::Version
|
300
320
|
version: '0.9'
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: coveralls
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - '>='
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '0'
|
328
|
+
type: :development
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - '>='
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '0'
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: guard-rake
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - '>='
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: '0'
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - '>='
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '0'
|
349
|
+
- !ruby/object:Gem::Dependency
|
350
|
+
name: benchmark_suite
|
351
|
+
requirement: !ruby/object:Gem::Requirement
|
352
|
+
requirements:
|
353
|
+
- - '>='
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: '0'
|
356
|
+
type: :development
|
357
|
+
prerelease: false
|
358
|
+
version_requirements: !ruby/object:Gem::Requirement
|
359
|
+
requirements:
|
360
|
+
- - '>='
|
361
|
+
- !ruby/object:Gem::Version
|
362
|
+
version: '0'
|
301
363
|
description: Like Rack is to Rails and Sinatra, Punchblock provides a consistent API
|
302
364
|
on top of several underlying third-party call control protocols.
|
303
365
|
email: punchblock@adhearsion.com
|
@@ -315,6 +377,8 @@ files:
|
|
315
377
|
- LICENSE.txt
|
316
378
|
- README.markdown
|
317
379
|
- Rakefile
|
380
|
+
- benchmarks/ami_event_name_comparison.rb
|
381
|
+
- benchmarks/channel.rb
|
318
382
|
- lib/punchblock.rb
|
319
383
|
- lib/punchblock/actor_has_guarded_handlers.rb
|
320
384
|
- lib/punchblock/client.rb
|
@@ -340,6 +404,7 @@ files:
|
|
340
404
|
- lib/punchblock/component/component_node.rb
|
341
405
|
- lib/punchblock/component/input.rb
|
342
406
|
- lib/punchblock/component/output.rb
|
407
|
+
- lib/punchblock/component/prompt.rb
|
343
408
|
- lib/punchblock/component/record.rb
|
344
409
|
- lib/punchblock/component/stop.rb
|
345
410
|
- lib/punchblock/connection.rb
|
@@ -369,23 +434,29 @@ files:
|
|
369
434
|
- lib/punchblock/event/stopped_speaking.rb
|
370
435
|
- lib/punchblock/event/unjoined.rb
|
371
436
|
- lib/punchblock/has_headers.rb
|
372
|
-
- lib/punchblock/header.rb
|
373
|
-
- lib/punchblock/key_value_pair_node.rb
|
374
437
|
- lib/punchblock/protocol_error.rb
|
375
438
|
- lib/punchblock/rayo_node.rb
|
376
439
|
- lib/punchblock/ref.rb
|
377
440
|
- lib/punchblock/translator.rb
|
378
441
|
- lib/punchblock/translator/asterisk.rb
|
442
|
+
- lib/punchblock/translator/asterisk/agi_app.rb
|
379
443
|
- lib/punchblock/translator/asterisk/agi_command.rb
|
444
|
+
- lib/punchblock/translator/asterisk/ami_error_converter.rb
|
380
445
|
- lib/punchblock/translator/asterisk/call.rb
|
446
|
+
- lib/punchblock/translator/asterisk/channel.rb
|
381
447
|
- lib/punchblock/translator/asterisk/component.rb
|
382
448
|
- lib/punchblock/translator/asterisk/component/asterisk.rb
|
383
449
|
- lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb
|
384
450
|
- lib/punchblock/translator/asterisk/component/asterisk/ami_action.rb
|
451
|
+
- lib/punchblock/translator/asterisk/component/composed_prompt.rb
|
385
452
|
- lib/punchblock/translator/asterisk/component/input.rb
|
453
|
+
- lib/punchblock/translator/asterisk/component/mrcp_native_prompt.rb
|
454
|
+
- lib/punchblock/translator/asterisk/component/mrcp_prompt.rb
|
455
|
+
- lib/punchblock/translator/asterisk/component/mrcp_recog_prompt.rb
|
386
456
|
- lib/punchblock/translator/asterisk/component/output.rb
|
387
457
|
- lib/punchblock/translator/asterisk/component/record.rb
|
388
458
|
- lib/punchblock/translator/asterisk/component/stop_by_redirect.rb
|
459
|
+
- lib/punchblock/translator/asterisk/unimrcp_app.rb
|
389
460
|
- lib/punchblock/translator/dtmf_recognizer.rb
|
390
461
|
- lib/punchblock/translator/freeswitch.rb
|
391
462
|
- lib/punchblock/translator/freeswitch/call.rb
|
@@ -397,6 +468,7 @@ files:
|
|
397
468
|
- lib/punchblock/translator/freeswitch/component/record.rb
|
398
469
|
- lib/punchblock/translator/freeswitch/component/tts_output.rb
|
399
470
|
- lib/punchblock/translator/input_component.rb
|
471
|
+
- lib/punchblock/uri_list.rb
|
400
472
|
- lib/punchblock/version.rb
|
401
473
|
- punchblock.gemspec
|
402
474
|
- spec/capture_warnings.rb
|
@@ -418,6 +490,7 @@ files:
|
|
418
490
|
- spec/punchblock/component/component_node_spec.rb
|
419
491
|
- spec/punchblock/component/input_spec.rb
|
420
492
|
- spec/punchblock/component/output_spec.rb
|
493
|
+
- spec/punchblock/component/prompt_spec.rb
|
421
494
|
- spec/punchblock/component/record_spec.rb
|
422
495
|
- spec/punchblock/connection/asterisk_spec.rb
|
423
496
|
- spec/punchblock/connection/freeswitch_spec.rb
|
@@ -433,13 +506,15 @@ files:
|
|
433
506
|
- spec/punchblock/event/started_speaking_spec.rb
|
434
507
|
- spec/punchblock/event/stopped_speaking_spec.rb
|
435
508
|
- spec/punchblock/event/unjoined_spec.rb
|
436
|
-
- spec/punchblock/header_spec.rb
|
437
509
|
- spec/punchblock/protocol_error_spec.rb
|
438
510
|
- spec/punchblock/ref_spec.rb
|
439
511
|
- spec/punchblock/translator/asterisk/call_spec.rb
|
440
512
|
- spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb
|
441
513
|
- spec/punchblock/translator/asterisk/component/asterisk/ami_action_spec.rb
|
514
|
+
- spec/punchblock/translator/asterisk/component/composed_prompt_spec.rb
|
442
515
|
- spec/punchblock/translator/asterisk/component/input_spec.rb
|
516
|
+
- spec/punchblock/translator/asterisk/component/mrcp_native_prompt_spec.rb
|
517
|
+
- spec/punchblock/translator/asterisk/component/mrcp_prompt_spec.rb
|
443
518
|
- spec/punchblock/translator/asterisk/component/output_spec.rb
|
444
519
|
- spec/punchblock/translator/asterisk/component/record_spec.rb
|
445
520
|
- spec/punchblock/translator/asterisk/component/stop_by_redirect_spec.rb
|
@@ -453,6 +528,7 @@ files:
|
|
453
528
|
- spec/punchblock/translator/freeswitch/component/tts_output_spec.rb
|
454
529
|
- spec/punchblock/translator/freeswitch/component_spec.rb
|
455
530
|
- spec/punchblock/translator/freeswitch_spec.rb
|
531
|
+
- spec/punchblock/uri_list_spec.rb
|
456
532
|
- spec/punchblock_spec.rb
|
457
533
|
- spec/spec_helper.rb
|
458
534
|
- spec/support/mock_connection_with_event_handler.rb
|
@@ -500,6 +576,7 @@ test_files:
|
|
500
576
|
- spec/punchblock/component/component_node_spec.rb
|
501
577
|
- spec/punchblock/component/input_spec.rb
|
502
578
|
- spec/punchblock/component/output_spec.rb
|
579
|
+
- spec/punchblock/component/prompt_spec.rb
|
503
580
|
- spec/punchblock/component/record_spec.rb
|
504
581
|
- spec/punchblock/connection/asterisk_spec.rb
|
505
582
|
- spec/punchblock/connection/freeswitch_spec.rb
|
@@ -515,13 +592,15 @@ test_files:
|
|
515
592
|
- spec/punchblock/event/started_speaking_spec.rb
|
516
593
|
- spec/punchblock/event/stopped_speaking_spec.rb
|
517
594
|
- spec/punchblock/event/unjoined_spec.rb
|
518
|
-
- spec/punchblock/header_spec.rb
|
519
595
|
- spec/punchblock/protocol_error_spec.rb
|
520
596
|
- spec/punchblock/ref_spec.rb
|
521
597
|
- spec/punchblock/translator/asterisk/call_spec.rb
|
522
598
|
- spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb
|
523
599
|
- spec/punchblock/translator/asterisk/component/asterisk/ami_action_spec.rb
|
600
|
+
- spec/punchblock/translator/asterisk/component/composed_prompt_spec.rb
|
524
601
|
- spec/punchblock/translator/asterisk/component/input_spec.rb
|
602
|
+
- spec/punchblock/translator/asterisk/component/mrcp_native_prompt_spec.rb
|
603
|
+
- spec/punchblock/translator/asterisk/component/mrcp_prompt_spec.rb
|
525
604
|
- spec/punchblock/translator/asterisk/component/output_spec.rb
|
526
605
|
- spec/punchblock/translator/asterisk/component/record_spec.rb
|
527
606
|
- spec/punchblock/translator/asterisk/component/stop_by_redirect_spec.rb
|
@@ -535,6 +614,7 @@ test_files:
|
|
535
614
|
- spec/punchblock/translator/freeswitch/component/tts_output_spec.rb
|
536
615
|
- spec/punchblock/translator/freeswitch/component_spec.rb
|
537
616
|
- spec/punchblock/translator/freeswitch_spec.rb
|
617
|
+
- spec/punchblock/uri_list_spec.rb
|
538
618
|
- spec/punchblock_spec.rb
|
539
619
|
- spec/spec_helper.rb
|
540
620
|
- spec/support/mock_connection_with_event_handler.rb
|
data/lib/punchblock/header.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module KeyValuePairNode
|
4
|
-
def self.included(klass)
|
5
|
-
klass.class_exec do
|
6
|
-
##
|
7
|
-
# @param [String] name
|
8
|
-
# @param [String] value
|
9
|
-
#
|
10
|
-
def self.new(name, value = '')
|
11
|
-
super(self.name.split('::').last.downcase.to_sym).tap do |new_node|
|
12
|
-
case name
|
13
|
-
when Nokogiri::XML::Node
|
14
|
-
new_node.inherit name
|
15
|
-
else
|
16
|
-
new_node.name = name
|
17
|
-
new_node.value = value
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# The Header's name
|
25
|
-
# @return [Symbol]
|
26
|
-
def name
|
27
|
-
read_attr :name
|
28
|
-
end
|
29
|
-
|
30
|
-
# Set the Header's name
|
31
|
-
# @param [Symbol] name the new name for the param
|
32
|
-
def name=(name)
|
33
|
-
write_attr :name, name
|
34
|
-
end
|
35
|
-
|
36
|
-
# The Header's value
|
37
|
-
# @return [String]
|
38
|
-
def value
|
39
|
-
read_attr :value
|
40
|
-
end
|
41
|
-
|
42
|
-
# Set the Header's value
|
43
|
-
# @param [String] value the new value for the param
|
44
|
-
def value=(value)
|
45
|
-
write_attr :value, value
|
46
|
-
end
|
47
|
-
|
48
|
-
def inspect_attributes # :nodoc:
|
49
|
-
[:name, :value] + super
|
50
|
-
end
|
51
|
-
end
|