librevox 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +2 -2
- data/lib/librevox/command_socket.rb +4 -0
- data/lib/librevox/response.rb +5 -1
- data/librevox.gemspec +3 -3
- data/spec/librevox/spec_response.rb +5 -0
- metadata +11 -6
data/LICENSE
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
(c) 2009
|
2
|
-
(c) 2011, 2012 Firmafon ApS <info@firmafon.dk>
|
1
|
+
(c) 2009-2013 Harry Vangberg <harry@vangberg.name>
|
2
|
+
(c) 2011, 2012, 2013 Firmafon ApS <info@firmafon.dk>
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person
|
5
5
|
obtaining a copy of this software and associated documentation
|
data/lib/librevox/response.rb
CHANGED
@@ -20,7 +20,11 @@ module Librevox
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def content= content
|
23
|
-
@content = content.respond_to?(:match) && content.match(/:/)
|
23
|
+
@content = if content.respond_to?(:match) && content.match(/:/)
|
24
|
+
headers_2_hash(content).merge(:body => content.split("\n\n", 2)[1].to_s)
|
25
|
+
else
|
26
|
+
content
|
27
|
+
end
|
24
28
|
@content.each {|k,v| v.chomp! if v.is_a?(String)}
|
25
29
|
end
|
26
30
|
|
data/librevox.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "librevox"
|
3
|
-
s.version = "0.
|
4
|
-
s.date = "
|
3
|
+
s.version = "0.6"
|
4
|
+
s.date = "2013-01-21"
|
5
5
|
s.summary = "Ruby library for interacting with FreeSWITCH."
|
6
6
|
s.email = "harry@vangberg.name"
|
7
7
|
s.homepage = "http://github.com/vangberg/librevox"
|
@@ -33,5 +33,5 @@ open source telephony platform FreeSwitch."
|
|
33
33
|
"spec/librevox/listener/spec_inbound.rb",
|
34
34
|
"spec/librevox/listener/spec_outbound.rb"
|
35
35
|
]
|
36
|
-
s.add_dependency "eventmachine", "
|
36
|
+
s.add_dependency "eventmachine", ">= 0.12.10"
|
37
37
|
end
|
@@ -59,4 +59,9 @@ describe Response do
|
|
59
59
|
response = Response.new("Content-Type: api/response", "Foo-Bar: Baz")
|
60
60
|
response.command_reply?.should.be.false
|
61
61
|
end
|
62
|
+
|
63
|
+
should "parse body from command reply" do
|
64
|
+
response = Response.new("Content-Type: command/reply", "Foo-Bar: Baz\n\nMessage body")
|
65
|
+
response.content[:body].should.equal "Message body"
|
66
|
+
end
|
62
67
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librevox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,19 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 0.12.10
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.12.10
|
25
30
|
description: ! 'EventMachine-based Ruby library for interacting with the
|
26
31
|
|
27
32
|
open source telephony platform FreeSwitch.'
|
@@ -70,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
75
|
version: '0'
|
71
76
|
requirements: []
|
72
77
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.8.
|
78
|
+
rubygems_version: 1.8.23
|
74
79
|
signing_key:
|
75
80
|
specification_version: 3
|
76
81
|
summary: Ruby library for interacting with FreeSWITCH.
|