punchblock 1.3.0 → 1.4.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/lib/punchblock.rb +1 -1
- data/lib/punchblock/connection.rb +1 -0
- data/lib/punchblock/connection/asterisk.rb +0 -1
- data/lib/punchblock/connection/freeswitch.rb +49 -0
- data/lib/punchblock/event/offer.rb +1 -1
- data/lib/punchblock/translator.rb +5 -0
- data/lib/punchblock/translator/asterisk.rb +16 -28
- data/lib/punchblock/translator/asterisk/call.rb +4 -21
- data/lib/punchblock/translator/asterisk/component.rb +0 -5
- data/lib/punchblock/translator/asterisk/component/asterisk/agi_command.rb +0 -3
- data/lib/punchblock/translator/asterisk/component/asterisk/ami_action.rb +0 -1
- data/lib/punchblock/translator/asterisk/component/input.rb +7 -97
- data/lib/punchblock/translator/asterisk/component/output.rb +0 -4
- data/lib/punchblock/translator/asterisk/component/record.rb +0 -2
- data/lib/punchblock/translator/freeswitch.rb +153 -0
- data/lib/punchblock/translator/freeswitch/call.rb +265 -0
- data/lib/punchblock/translator/freeswitch/component.rb +92 -0
- data/lib/punchblock/translator/freeswitch/component/abstract_output.rb +57 -0
- data/lib/punchblock/translator/freeswitch/component/flite_output.rb +17 -0
- data/lib/punchblock/translator/freeswitch/component/input.rb +29 -0
- data/lib/punchblock/translator/freeswitch/component/output.rb +56 -0
- data/lib/punchblock/translator/freeswitch/component/record.rb +79 -0
- data/lib/punchblock/translator/freeswitch/component/tts_output.rb +26 -0
- data/lib/punchblock/translator/input_component.rb +108 -0
- data/lib/punchblock/version.rb +1 -1
- data/punchblock.gemspec +3 -2
- data/spec/punchblock/connection/freeswitch_spec.rb +90 -0
- data/spec/punchblock/translator/asterisk/call_spec.rb +23 -2
- data/spec/punchblock/translator/asterisk/component/input_spec.rb +3 -3
- data/spec/punchblock/translator/asterisk_spec.rb +1 -1
- data/spec/punchblock/translator/freeswitch/call_spec.rb +922 -0
- data/spec/punchblock/translator/freeswitch/component/flite_output_spec.rb +279 -0
- data/spec/punchblock/translator/freeswitch/component/input_spec.rb +312 -0
- data/spec/punchblock/translator/freeswitch/component/output_spec.rb +369 -0
- data/spec/punchblock/translator/freeswitch/component/record_spec.rb +373 -0
- data/spec/punchblock/translator/freeswitch/component/tts_output_spec.rb +285 -0
- data/spec/punchblock/translator/freeswitch/component_spec.rb +118 -0
- data/spec/punchblock/translator/freeswitch_spec.rb +597 -0
- data/spec/punchblock_spec.rb +11 -0
- data/spec/spec_helper.rb +1 -0
- metadata +52 -7
data/spec/punchblock_spec.rb
CHANGED
|
@@ -24,6 +24,17 @@ describe Punchblock do
|
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
context 'with :freeswitch' do
|
|
28
|
+
it 'sets up an Freeswitch connection, passing options, and a client with the connection attached' do
|
|
29
|
+
mock_connection = stub_everything 'Connection'
|
|
30
|
+
options = {:username => 'foo', :password => 'bar'}
|
|
31
|
+
Punchblock::Connection::Freeswitch.expects(:new).once.with(options).returns mock_connection
|
|
32
|
+
client = Punchblock.client_with_connection :freeswitch, options
|
|
33
|
+
client.should be_a Punchblock::Client
|
|
34
|
+
client.connection.should be mock_connection
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
27
38
|
context 'with :yate' do
|
|
28
39
|
it 'raises ArgumentError' do
|
|
29
40
|
options = {:username => 'foo', :password => 'bar'}
|
data/spec/spec_helper.rb
CHANGED
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: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2012-07
|
|
14
|
+
date: 2012-08-07 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: niceogiri
|
|
@@ -100,7 +100,7 @@ dependencies:
|
|
|
100
100
|
requirements:
|
|
101
101
|
- - ~>
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.
|
|
103
|
+
version: '1.3'
|
|
104
104
|
type: :runtime
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -108,7 +108,7 @@ dependencies:
|
|
|
108
108
|
requirements:
|
|
109
109
|
- - ~>
|
|
110
110
|
- !ruby/object:Gem::Version
|
|
111
|
-
version: '1.
|
|
111
|
+
version: '1.3'
|
|
112
112
|
- !ruby/object:Gem::Dependency
|
|
113
113
|
name: celluloid
|
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -116,7 +116,7 @@ dependencies:
|
|
|
116
116
|
requirements:
|
|
117
117
|
- - ! '>='
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: 0.
|
|
119
|
+
version: 0.11.0
|
|
120
120
|
type: :runtime
|
|
121
121
|
prerelease: false
|
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -124,7 +124,7 @@ dependencies:
|
|
|
124
124
|
requirements:
|
|
125
125
|
- - ! '>='
|
|
126
126
|
- !ruby/object:Gem::Version
|
|
127
|
-
version: 0.
|
|
127
|
+
version: 0.11.0
|
|
128
128
|
- !ruby/object:Gem::Dependency
|
|
129
129
|
name: ruby_ami
|
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -147,6 +147,22 @@ dependencies:
|
|
|
147
147
|
- - ! '>='
|
|
148
148
|
- !ruby/object:Gem::Version
|
|
149
149
|
version: 1.2.1
|
|
150
|
+
- !ruby/object:Gem::Dependency
|
|
151
|
+
name: ruby_fs
|
|
152
|
+
requirement: !ruby/object:Gem::Requirement
|
|
153
|
+
none: false
|
|
154
|
+
requirements:
|
|
155
|
+
- - ~>
|
|
156
|
+
- !ruby/object:Gem::Version
|
|
157
|
+
version: '1.0'
|
|
158
|
+
type: :runtime
|
|
159
|
+
prerelease: false
|
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
161
|
+
none: false
|
|
162
|
+
requirements:
|
|
163
|
+
- - ~>
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: '1.0'
|
|
150
166
|
- !ruby/object:Gem::Dependency
|
|
151
167
|
name: ruby_speech
|
|
152
168
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -369,6 +385,7 @@ files:
|
|
|
369
385
|
- lib/punchblock/connection.rb
|
|
370
386
|
- lib/punchblock/connection/asterisk.rb
|
|
371
387
|
- lib/punchblock/connection/connected.rb
|
|
388
|
+
- lib/punchblock/connection/freeswitch.rb
|
|
372
389
|
- lib/punchblock/connection/generic_connection.rb
|
|
373
390
|
- lib/punchblock/connection/xmpp.rb
|
|
374
391
|
- lib/punchblock/core_ext/blather/stanza.rb
|
|
@@ -410,6 +427,16 @@ files:
|
|
|
410
427
|
- lib/punchblock/translator/asterisk/component/output.rb
|
|
411
428
|
- lib/punchblock/translator/asterisk/component/record.rb
|
|
412
429
|
- lib/punchblock/translator/asterisk/component/stop_by_redirect.rb
|
|
430
|
+
- lib/punchblock/translator/freeswitch.rb
|
|
431
|
+
- lib/punchblock/translator/freeswitch/call.rb
|
|
432
|
+
- lib/punchblock/translator/freeswitch/component.rb
|
|
433
|
+
- lib/punchblock/translator/freeswitch/component/abstract_output.rb
|
|
434
|
+
- lib/punchblock/translator/freeswitch/component/flite_output.rb
|
|
435
|
+
- lib/punchblock/translator/freeswitch/component/input.rb
|
|
436
|
+
- lib/punchblock/translator/freeswitch/component/output.rb
|
|
437
|
+
- lib/punchblock/translator/freeswitch/component/record.rb
|
|
438
|
+
- lib/punchblock/translator/freeswitch/component/tts_output.rb
|
|
439
|
+
- lib/punchblock/translator/input_component.rb
|
|
413
440
|
- lib/punchblock/version.rb
|
|
414
441
|
- punchblock.gemspec
|
|
415
442
|
- spec/capture_warnings.rb
|
|
@@ -433,6 +460,7 @@ files:
|
|
|
433
460
|
- spec/punchblock/component/output_spec.rb
|
|
434
461
|
- spec/punchblock/component/record_spec.rb
|
|
435
462
|
- spec/punchblock/connection/asterisk_spec.rb
|
|
463
|
+
- spec/punchblock/connection/freeswitch_spec.rb
|
|
436
464
|
- spec/punchblock/connection/xmpp_spec.rb
|
|
437
465
|
- spec/punchblock/event/answered_spec.rb
|
|
438
466
|
- spec/punchblock/event/asterisk/ami/event_spec.rb
|
|
@@ -457,6 +485,14 @@ files:
|
|
|
457
485
|
- spec/punchblock/translator/asterisk/component/stop_by_redirect_spec.rb
|
|
458
486
|
- spec/punchblock/translator/asterisk/component_spec.rb
|
|
459
487
|
- spec/punchblock/translator/asterisk_spec.rb
|
|
488
|
+
- spec/punchblock/translator/freeswitch/call_spec.rb
|
|
489
|
+
- spec/punchblock/translator/freeswitch/component/flite_output_spec.rb
|
|
490
|
+
- spec/punchblock/translator/freeswitch/component/input_spec.rb
|
|
491
|
+
- spec/punchblock/translator/freeswitch/component/output_spec.rb
|
|
492
|
+
- spec/punchblock/translator/freeswitch/component/record_spec.rb
|
|
493
|
+
- spec/punchblock/translator/freeswitch/component/tts_output_spec.rb
|
|
494
|
+
- spec/punchblock/translator/freeswitch/component_spec.rb
|
|
495
|
+
- spec/punchblock/translator/freeswitch_spec.rb
|
|
460
496
|
- spec/punchblock_spec.rb
|
|
461
497
|
- spec/spec_helper.rb
|
|
462
498
|
- spec/support/mock_connection_with_event_handler.rb
|
|
@@ -475,7 +511,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
475
511
|
version: '0'
|
|
476
512
|
segments:
|
|
477
513
|
- 0
|
|
478
|
-
hash:
|
|
514
|
+
hash: 2536698351368430325
|
|
479
515
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
480
516
|
none: false
|
|
481
517
|
requirements:
|
|
@@ -510,6 +546,7 @@ test_files:
|
|
|
510
546
|
- spec/punchblock/component/output_spec.rb
|
|
511
547
|
- spec/punchblock/component/record_spec.rb
|
|
512
548
|
- spec/punchblock/connection/asterisk_spec.rb
|
|
549
|
+
- spec/punchblock/connection/freeswitch_spec.rb
|
|
513
550
|
- spec/punchblock/connection/xmpp_spec.rb
|
|
514
551
|
- spec/punchblock/event/answered_spec.rb
|
|
515
552
|
- spec/punchblock/event/asterisk/ami/event_spec.rb
|
|
@@ -534,6 +571,14 @@ test_files:
|
|
|
534
571
|
- spec/punchblock/translator/asterisk/component/stop_by_redirect_spec.rb
|
|
535
572
|
- spec/punchblock/translator/asterisk/component_spec.rb
|
|
536
573
|
- spec/punchblock/translator/asterisk_spec.rb
|
|
574
|
+
- spec/punchblock/translator/freeswitch/call_spec.rb
|
|
575
|
+
- spec/punchblock/translator/freeswitch/component/flite_output_spec.rb
|
|
576
|
+
- spec/punchblock/translator/freeswitch/component/input_spec.rb
|
|
577
|
+
- spec/punchblock/translator/freeswitch/component/output_spec.rb
|
|
578
|
+
- spec/punchblock/translator/freeswitch/component/record_spec.rb
|
|
579
|
+
- spec/punchblock/translator/freeswitch/component/tts_output_spec.rb
|
|
580
|
+
- spec/punchblock/translator/freeswitch/component_spec.rb
|
|
581
|
+
- spec/punchblock/translator/freeswitch_spec.rb
|
|
537
582
|
- spec/punchblock_spec.rb
|
|
538
583
|
- spec/spec_helper.rb
|
|
539
584
|
- spec/support/mock_connection_with_event_handler.rb
|