adhearsion 2.4.0.beta1 → 2.4.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -3
- data/README.markdown +1 -1
- data/lib/adhearsion/call.rb +33 -8
- data/lib/adhearsion/call_controller.rb +9 -0
- data/lib/adhearsion/call_controller/dial.rb +145 -32
- data/lib/adhearsion/console.rb +1 -1
- data/lib/adhearsion/generators/app/templates/README.md +20 -1
- data/lib/adhearsion/generators/app/templates/config/adhearsion.rb +4 -2
- data/lib/adhearsion/initializer.rb +2 -0
- data/lib/adhearsion/process.rb +2 -0
- data/lib/adhearsion/version.rb +1 -1
- data/spec/adhearsion/call_controller/dial_spec.rb +808 -6
- data/spec/adhearsion/call_controller_spec.rb +7 -0
- data/spec/adhearsion/process_spec.rb +14 -0
- metadata +2 -2
@@ -64,6 +64,8 @@ module Adhearsion
|
|
64
64
|
end
|
65
65
|
|
66
66
|
context "when a block is specified" do
|
67
|
+
let(:value) { :bar }
|
68
|
+
|
67
69
|
let :block do
|
68
70
|
Proc.new { foo value }
|
69
71
|
end
|
@@ -75,6 +77,11 @@ module Adhearsion
|
|
75
77
|
subject.should_receive(:foo).once.with(:bar)
|
76
78
|
subject.run
|
77
79
|
end
|
80
|
+
|
81
|
+
it "should make the block's context available" do
|
82
|
+
subject.should_receive(:foo).once.with(:bar)
|
83
|
+
subject.run
|
84
|
+
end
|
78
85
|
end
|
79
86
|
end
|
80
87
|
|
@@ -98,5 +98,19 @@ module Adhearsion
|
|
98
98
|
::Process.should_receive(:exit).once.with(1)
|
99
99
|
Adhearsion::Process.force_stop
|
100
100
|
end
|
101
|
+
|
102
|
+
describe "#fqdn" do
|
103
|
+
it "should be a string" do
|
104
|
+
Adhearsion::Process.fqdn.should be_a String
|
105
|
+
end
|
106
|
+
|
107
|
+
context "when networking issues crop up" do
|
108
|
+
before { Socket.stub(:gethostbyname).and_raise(SocketError) }
|
109
|
+
|
110
|
+
it "should still be a string" do
|
111
|
+
Adhearsion::Process.fqdn.should be_a String
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
101
115
|
end
|
102
116
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adhearsion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.0.
|
4
|
+
version: 2.4.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Phillips
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-08-
|
14
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|