freeswitcher 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +5 -2
- data/CHANGELOG +349 -263
- data/MANIFEST +4 -1
- data/README +1 -1
- data/Rakefile +1 -0
- data/examples/inbound_event_socket.rb +1 -1
- data/freeswitcher.gemspec +7 -7
- data/lib/fsr.rb +11 -6
- data/lib/fsr/cmd/uuid_dump.rb +27 -0
- data/lib/fsr/listener/inbound.rb +2 -0
- data/lib/fsr/listener/mock.rb +23 -0
- data/lib/fsr/listener/outbound.rb +0 -1
- data/lib/fsr/version.rb +1 -1
- data/spec/fsr/cmd/uuid_dump.rb +13 -0
- data/spec/fsr/listener/inbound.rb +45 -5
- data/spec/fsr/listener/outbound.rb +109 -9
- data/spec/fsr/loading.rb +1 -1
- data/spec/fsr_listener_helper.rb +22 -0
- data/tasks/setup.rake +12 -4
- metadata +8 -5
- data/tasks/rcov.rake +0 -23
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.join(File.expand_path("../", __FILE__), "../lib/fsr")
|
2
|
+
require FSR::ROOT/".."/:spec/:helper
|
3
|
+
require FSR::ROOT/:fsr/:listener/:outbound
|
4
|
+
gem "tmm1-em-spec"
|
5
|
+
require "em/spec"
|
6
|
+
require "fileutils"
|
7
|
+
|
8
|
+
|
9
|
+
# Shared contexts to make describing listener behavior easier
|
10
|
+
shared :fsr_listener do
|
11
|
+
def outbound_socket(listener, from, opts = {})
|
12
|
+
FSR::Log.outputters = Log4r::FileOutputter.new('spec', :filename => ($spec_log = "/tmp/fsr#{Time.now.to_i}_spec.log"), :level => Log4r::DEBUG)
|
13
|
+
FSR::Log.info "Spec Time #{Time.now} file: #{$spec_log}"
|
14
|
+
listener.receive_data("Content-Length: 0\nCaller-Caller-ID-Number: #{from}#{opts ? "\n" + opts.map{|k,v| "#{k}: #{v}" }.join("\n") : ""}\n\n")
|
15
|
+
yield
|
16
|
+
ensure
|
17
|
+
if (spec = Pathname($spec_log)).file?
|
18
|
+
puts "Socket Complete: Log Follows \n#{spec.read}"
|
19
|
+
Pathname($spec_log).delete
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/tasks/setup.rake
CHANGED
@@ -4,13 +4,21 @@ task :setup => :gem_installer do
|
|
4
4
|
# core
|
5
5
|
gem 'eventmachine'
|
6
6
|
|
7
|
-
# spec
|
8
|
-
gem 'bacon'
|
9
|
-
gem 'rcov'
|
10
|
-
|
11
7
|
# doc
|
12
8
|
gem 'yard'
|
13
9
|
|
14
10
|
setup
|
15
11
|
end
|
16
12
|
end
|
13
|
+
|
14
|
+
desc 'install all possible dependencies'
|
15
|
+
task :setup_spec => :setup do
|
16
|
+
GemInstaller.new do
|
17
|
+
# spec
|
18
|
+
gem 'bacon'
|
19
|
+
|
20
|
+
gem 'tmm1-em-spec', :lib => "em/spec"
|
21
|
+
|
22
|
+
setup
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freeswitcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jayson Vaughn
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-
|
15
|
+
date: 2009-07-03 00:00:00 -05:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -125,7 +125,7 @@ description: &id001 |
|
|
125
125
|
|
126
126
|
end
|
127
127
|
|
128
|
-
FSR.start_ies!(IesDemo, :host => "localhost", :port => 8021)
|
128
|
+
FSR.start_ies!(IesDemo, :host => "localhost", :port => 8021, :auth => "ClueCon")
|
129
129
|
|
130
130
|
|
131
131
|
An example of using FSR::CommandSocket to originate a new call in irb:
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- lib/fsr/cmd/sofia/status.rb
|
200
200
|
- lib/fsr/cmd/sofia_contact.rb
|
201
201
|
- lib/fsr/cmd/status.rb
|
202
|
+
- lib/fsr/cmd/uuid_dump.rb
|
202
203
|
- lib/fsr/command_socket.rb
|
203
204
|
- lib/fsr/database.rb
|
204
205
|
- lib/fsr/database/call_limit.rb
|
@@ -212,6 +213,7 @@ files:
|
|
212
213
|
- lib/fsr/listener/header_and_content_response.rb
|
213
214
|
- lib/fsr/listener/inbound.rb
|
214
215
|
- lib/fsr/listener/inbound/event.rb
|
216
|
+
- lib/fsr/listener/mock.rb
|
215
217
|
- lib/fsr/listener/outbound.rb
|
216
218
|
- lib/fsr/model/call.rb
|
217
219
|
- lib/fsr/version.rb
|
@@ -223,13 +225,13 @@ files:
|
|
223
225
|
- tasks/gem_installer.rake
|
224
226
|
- tasks/install_dependencies.rake
|
225
227
|
- tasks/manifest.rake
|
226
|
-
- tasks/rcov.rake
|
227
228
|
- tasks/release.rake
|
228
229
|
- tasks/reversion.rake
|
229
230
|
- tasks/setup.rake
|
230
231
|
- tasks/spec.rake
|
231
232
|
- tasks/yard.rake
|
232
233
|
- spec/helper.rb
|
234
|
+
- spec/fsr_listener_helper.rb
|
233
235
|
has_rdoc: true
|
234
236
|
homepage: http://code.rubyists.com/projects/fs
|
235
237
|
licenses: []
|
@@ -254,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
256
|
requirements: []
|
255
257
|
|
256
258
|
rubyforge_project: freeswitcher
|
257
|
-
rubygems_version: 1.3.
|
259
|
+
rubygems_version: 1.3.4
|
258
260
|
signing_key:
|
259
261
|
specification_version: 3
|
260
262
|
summary: A library for interacting with the "FreeSWITCH":http://freeswitch.org telephony platform
|
@@ -278,6 +280,7 @@ test_files:
|
|
278
280
|
- spec/fsr/cmd/originate.rb
|
279
281
|
- spec/fsr/cmd/sofia.rb
|
280
282
|
- spec/fsr/cmd/sofia/profile.rb
|
283
|
+
- spec/fsr/cmd/uuid_dump.rb
|
281
284
|
- spec/fsr/listener.rb
|
282
285
|
- spec/fsr/listener/header_and_content_response.rb
|
283
286
|
- spec/fsr/listener/inbound.rb
|
data/tasks/rcov.rake
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
desc 'code coverage'
|
2
|
-
task :rcov => :clean do
|
3
|
-
specs = PROJECT_SPECS
|
4
|
-
|
5
|
-
ignore = %w[ gem rack bacon ]
|
6
|
-
|
7
|
-
if RUBY_VERSION >= '1.8.7'
|
8
|
-
ignore << 'begin_with' << 'end_with'
|
9
|
-
end
|
10
|
-
if RUBY_VERSION < '1.9'
|
11
|
-
ignore << 'fiber'
|
12
|
-
end
|
13
|
-
|
14
|
-
ignored = ignore.join(',')
|
15
|
-
|
16
|
-
cmd = "rcov --aggregate coverage.data --sort coverage -t --%s -x '#{ignored}' %s"
|
17
|
-
|
18
|
-
while spec = specs.shift
|
19
|
-
puts '', "Gather coverage for #{spec} ..."
|
20
|
-
html = specs.empty? ? 'html' : 'no-html'
|
21
|
-
sh(cmd % [html, spec])
|
22
|
-
end
|
23
|
-
end
|