adhearsion-asterisk 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -2
- data/CHANGELOG.md +3 -0
- data/Gemfile +0 -1
- data/Guardfile +1 -1
- data/adhearsion-asterisk.gemspec +0 -1
- data/lib/adhearsion/asterisk.rb +0 -5
- data/lib/adhearsion/asterisk/call_controller_methods.rb +2 -0
- data/lib/adhearsion/asterisk/config_generator.rb +4 -5
- data/lib/adhearsion/asterisk/queue_proxy.rb +3 -5
- data/lib/adhearsion/asterisk/version.rb +1 -1
- data/spec/adhearsion/asterisk/call_controller_methods_spec.rb +1 -1
- data/spec/adhearsion/asterisk/config_generators/agents_spec.rb +2 -2
- data/spec/adhearsion/asterisk/config_generators/queues_spec.rb +9 -9
- data/spec/adhearsion/asterisk/config_generators/voicemail_spec.rb +1 -1
- data/spec/adhearsion/asterisk/plugin_spec.rb +1 -1
- data/spec/adhearsion/asterisk/queue_proxy/agent_proxy_spec.rb +2 -2
- data/spec/adhearsion/asterisk/queue_proxy/queue_agents_list_proxy_spec.rb +2 -2
- data/spec/adhearsion/asterisk/queue_proxy_spec.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fad46f1b884dc030a946704f0c3c498afad3b7cd
|
4
|
+
data.tar.gz: b954e46179755d1b3cd583f0636fde91cc639066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15a1a3cf39c15181f02cc664b9d7ace9744bbda587686b61519e8d69a62e0e69c1d1c2bf7d1779f90918b6ffc6406c3c3115ee5ef866469043afdd8a02a63d43
|
7
|
+
data.tar.gz: e99a00e50859a3aeb92082ba1bba6ebf0c448fb4f6a97fb70a78cf0cf3bca68635d6fbfbd6b5094597ae8fdad68484f8a66da7ac069f73960e93b9ab85a678bc
|
data/.travis.yml
CHANGED
@@ -2,8 +2,12 @@ language: ruby
|
|
2
2
|
rvm:
|
3
3
|
- 1.9.2
|
4
4
|
- 1.9.3
|
5
|
-
- jruby-19mode
|
6
|
-
- rbx-19mode
|
5
|
+
- jruby-19mode
|
6
|
+
- rbx-19mode
|
7
7
|
- ruby-head
|
8
|
+
matrix:
|
9
|
+
allow_failures:
|
10
|
+
- rvm: rbx-19mode
|
11
|
+
- rvm: ruby-head
|
8
12
|
notifications:
|
9
13
|
irc: "irc.freenode.org#adhearsion"
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Guardfile
CHANGED
data/adhearsion-asterisk.gemspec
CHANGED
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
s.add_runtime_dependency %q<adhearsion>, ["~> 2.0"]
|
22
|
-
s.add_runtime_dependency %q<activesupport>, ["~> 3.0"]
|
23
22
|
s.add_runtime_dependency %q<jruby-openssl> if RUBY_PLATFORM == 'java'
|
24
23
|
|
25
24
|
s.add_development_dependency %q<bundler>, ["~> 1.0"]
|
data/lib/adhearsion/asterisk.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'adhearsion'
|
2
|
-
require 'active_support/dependencies/autoload'
|
3
2
|
require 'adhearsion/asterisk/version'
|
4
3
|
require 'adhearsion/asterisk/call_controller_methods'
|
5
4
|
require 'adhearsion/asterisk/has_agi_context'
|
@@ -7,10 +6,6 @@ require 'adhearsion/asterisk/plugin'
|
|
7
6
|
|
8
7
|
module Adhearsion
|
9
8
|
module Asterisk
|
10
|
-
extend ActiveSupport::Autoload
|
11
|
-
|
12
|
-
autoload :QueueProxy
|
13
|
-
|
14
9
|
#
|
15
10
|
# Execute an AMI action synchronously
|
16
11
|
#
|
@@ -1,11 +1,10 @@
|
|
1
|
+
require 'adhearsion/asterisk/config_generator/agents'
|
2
|
+
require 'adhearsion/asterisk/config_generator/queues'
|
3
|
+
require 'adhearsion/asterisk/config_generator/voicemail'
|
4
|
+
|
1
5
|
module Adhearsion
|
2
6
|
module Asterisk
|
3
7
|
class ConfigGenerator
|
4
|
-
extend ActiveSupport::Autoload
|
5
|
-
|
6
|
-
autoload :Agents
|
7
|
-
autoload :Queues
|
8
|
-
autoload :Voicemail
|
9
8
|
|
10
9
|
SECTION_TITLE = /(\[[\w_-]+\])/
|
11
10
|
|
@@ -1,12 +1,10 @@
|
|
1
|
+
require 'adhearsion/asterisk/queue_proxy/agent_proxy'
|
2
|
+
require 'adhearsion/asterisk/queue_proxy/queue_agents_list_proxy'
|
3
|
+
|
1
4
|
module Adhearsion
|
2
5
|
module Asterisk
|
3
6
|
class QueueProxy
|
4
7
|
|
5
|
-
extend ActiveSupport::Autoload
|
6
|
-
|
7
|
-
autoload :AgentProxy
|
8
|
-
autoload :QueueAgentsListProxy
|
9
|
-
|
10
8
|
class << self
|
11
9
|
def format_join_hash_key_arguments(options)
|
12
10
|
bad_argument = lambda do |(key, value)|
|
@@ -244,12 +244,12 @@ describe "AgentsConfigGeneratorTestHelper" do
|
|
244
244
|
end
|
245
245
|
|
246
246
|
it "generated_config_has_pair() works properly with one pair" do
|
247
|
-
@agents =
|
247
|
+
@agents = double "A fake agents with just one pair", :conf => "foo=bar"
|
248
248
|
generated_config_has_pair(:foo => "bar").should be true
|
249
249
|
end
|
250
250
|
|
251
251
|
it "generated_config_has_pair() works properly with two pairs" do
|
252
|
-
@agents =
|
252
|
+
@agents = double "A fake agents with just one pair"
|
253
253
|
@agents.should_receive(:conf).twice.and_return("[general]\n\nqaz=qwerty\nagent => 1,2,3")
|
254
254
|
|
255
255
|
generated_config_has_pair(:qaz => "qwerty").should be true
|
@@ -134,7 +134,7 @@ describe "The private, helper methods in QueueDefinition" do
|
|
134
134
|
end
|
135
135
|
|
136
136
|
it '#boolean should convert a boolean into "yes" or "no"' do
|
137
|
-
mock_of_properties =
|
137
|
+
mock_of_properties = double "mock of the properties instance variable of a QueueDefinition"
|
138
138
|
mock_of_properties.should_receive(:[]=).once.with("icanhascheezburger", "yes")
|
139
139
|
queue.should_receive(:properties).and_return mock_of_properties
|
140
140
|
queue.send(:boolean, "icanhascheezburger" => true)
|
@@ -147,38 +147,38 @@ describe "The private, helper methods in QueueDefinition" do
|
|
147
147
|
end
|
148
148
|
|
149
149
|
it '#int should coerce a String into a Numeric if possible' do
|
150
|
-
mock_of_properties =
|
150
|
+
mock_of_properties = double "mock of the properties instance variable of a QueueDefinition"
|
151
151
|
mock_of_properties.should_receive(:[]=).once.with("chimpanzee", 1337)
|
152
152
|
queue.should_receive(:properties).and_return mock_of_properties
|
153
153
|
queue.send(:int, "chimpanzee" => "1337")
|
154
154
|
end
|
155
155
|
|
156
156
|
it '#string should add the argument directly to the properties' do
|
157
|
-
mock_of_properties =
|
157
|
+
mock_of_properties = double "mock of the properties instance variable of a QueueDefinition"
|
158
158
|
mock_of_properties.should_receive(:[]=).once.with("eins", "zwei")
|
159
159
|
queue.should_receive(:properties).and_return mock_of_properties
|
160
160
|
queue.send(:string, "eins" => "zwei")
|
161
161
|
end
|
162
162
|
|
163
163
|
it '#one_of() should add its successful match to the properties attribute' do
|
164
|
-
mock_properties =
|
164
|
+
mock_properties = double "mock of the properties instance variable of a QueueDefinition"
|
165
165
|
mock_properties.should_receive(:[]=).once.with(:doesnt_matter, 5)
|
166
166
|
queue.should_receive(:properties).once.and_return mock_properties
|
167
167
|
queue.send(:one_of, 1..100, :doesnt_matter => 5)
|
168
168
|
end
|
169
169
|
|
170
170
|
it "one_of() should convert booleans to yes/no" do
|
171
|
-
mock_properties =
|
171
|
+
mock_properties = double "mock of the properties instance variable of a QueueDefinition"
|
172
172
|
mock_properties.should_receive(:[]=).once.with(:doesnt_matter, 'yes')
|
173
173
|
queue.should_receive(:properties).once.and_return mock_properties
|
174
174
|
queue.send(:one_of, [true, false, :strict], :doesnt_matter => true)
|
175
175
|
|
176
|
-
mock_properties =
|
176
|
+
mock_properties = double "mock of the properties instance variable of a QueueDefinition"
|
177
177
|
mock_properties.should_receive(:[]=).once.with(:doesnt_matter, :strict)
|
178
178
|
queue.should_receive(:properties).once.and_return mock_properties
|
179
179
|
queue.send(:one_of, [true, false, :strict], :doesnt_matter => :strict)
|
180
180
|
|
181
|
-
mock_properties =
|
181
|
+
mock_properties = double "mock of the properties instance variable of a QueueDefinition"
|
182
182
|
mock_properties.should_receive(:[]=).once.with(:doesnt_matter, 'no')
|
183
183
|
queue.should_receive(:properties).once.and_return mock_properties
|
184
184
|
queue.send(:one_of, [true, false, :strict], :doesnt_matter => false)
|
@@ -311,10 +311,10 @@ describe "ConfigGeneratorTestHelper" do
|
|
311
311
|
attr_reader :queues
|
312
312
|
|
313
313
|
it "generated_config_has_pair() works properly" do
|
314
|
-
@queues =
|
314
|
+
@queues = double "A fake queues with just one pair", :to_s => "foo=bar"
|
315
315
|
generated_config_has_pair(:foo => "bar").should be true
|
316
316
|
|
317
|
-
@queues =
|
317
|
+
@queues = double "A fake queues with just one pair"
|
318
318
|
@queues.should_receive(:to_s).twice.and_return("[general]\n\nqaz=qwerty\nagent => 1,2,3")
|
319
319
|
generated_config_has_pair(:qaz => "qwerty").should be true
|
320
320
|
generated_config_has_pair(:foo => "bar").should be false
|
@@ -76,7 +76,7 @@ describe 'Defining email-related Voicemail settings' do
|
|
76
76
|
it 'the body must not be allowed to exceed 512 characters' do
|
77
77
|
the_following_code {
|
78
78
|
email.body "X" * 512
|
79
|
-
}.should_not raise_error
|
79
|
+
}.should_not raise_error
|
80
80
|
|
81
81
|
the_following_code {
|
82
82
|
email.body "X" * 513
|
@@ -4,7 +4,7 @@ module Adhearsion::Asterisk
|
|
4
4
|
describe 'plugin loading' do
|
5
5
|
before(:all) { Adhearsion::Plugin.init_plugins }
|
6
6
|
|
7
|
-
let(:mock_call) {
|
7
|
+
let(:mock_call) { double(:call).as_null_object }
|
8
8
|
|
9
9
|
it 'should extend Adhearsion::CallController with Asterisk methods' do
|
10
10
|
Adhearsion::CallController.new(mock_call).should respond_to :play_time
|
@@ -4,8 +4,8 @@ module Adhearsion::Asterisk
|
|
4
4
|
class QueueProxy
|
5
5
|
describe AgentProxy do
|
6
6
|
let(:queue_name) { 'foobar' }
|
7
|
-
let(:mock_ee) {
|
8
|
-
let(:mock_queue) {
|
7
|
+
let(:mock_ee) { double 'Adhearsion::DialPlan::ExecutionEnvironment' }
|
8
|
+
let(:mock_queue) { double('QueueProxy', :environment => mock_ee, :name => queue_name).as_null_object }
|
9
9
|
|
10
10
|
let(:agent_id) { 123 }
|
11
11
|
|
@@ -5,8 +5,8 @@ module Adhearsion::Asterisk
|
|
5
5
|
describe QueueAgentsListProxy do
|
6
6
|
let(:queue_name) { 'foobar' }
|
7
7
|
let(:agent_channel) { "Agent/123" }
|
8
|
-
let(:mock_ee) {
|
9
|
-
let(:mock_queue) {
|
8
|
+
let(:mock_ee) { double 'Adhearsion::DialPlan::ExecutionEnvironment' }
|
9
|
+
let(:mock_queue) { double('QueueProxy', :environment => mock_ee, :name => queue_name).as_null_object }
|
10
10
|
|
11
11
|
subject { QueueAgentsListProxy.new mock_queue, true }
|
12
12
|
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
module Adhearsion::Asterisk
|
4
4
|
describe QueueProxy do
|
5
5
|
let(:queue_name) { 'foobar' }
|
6
|
-
let(:mock_ee) {
|
6
|
+
let(:mock_ee) { double 'Adhearsion::DialPlan::ExecutionEnvironment' }
|
7
7
|
|
8
8
|
subject { QueueProxy.new queue_name, mock_ee }
|
9
9
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adhearsion-asterisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Langfeld
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-12-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: adhearsion
|
@@ -26,20 +26,6 @@ dependencies:
|
|
26
26
|
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '2.0'
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: activesupport
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ~>
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '3.0'
|
36
|
-
type: :runtime
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '3.0'
|
43
29
|
- !ruby/object:Gem::Dependency
|
44
30
|
name: bundler
|
45
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
218
|
version: '0'
|
233
219
|
requirements: []
|
234
220
|
rubyforge_project: adhearsion-asterisk
|
235
|
-
rubygems_version: 2.0.
|
221
|
+
rubygems_version: 2.0.14
|
236
222
|
signing_key:
|
237
223
|
specification_version: 4
|
238
224
|
summary: Asterisk specific features for Adhearsion
|