adhearsion 2.5.3 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ac84f37abcd4d6065f62cb0cbfbe7221a411467
4
- data.tar.gz: d383c431622464439af224ddbe10e69f3a527bf2
3
+ metadata.gz: 934b35739888ae39b19f72ea09e02289ebc56bb5
4
+ data.tar.gz: 8f84e7ccdc30266aff7fe3ff47854dff86511efb
5
5
  SHA512:
6
- metadata.gz: 386c467d760ee74861f1d4a409ab3f189343e21cdfc43a88649ebd49a0611588876632f6a8ed34ba2b32beb6e1d2e355371fbce3856bbcf0f7bff4f011ef6c9c
7
- data.tar.gz: 358821502c81b271be52f17ce523bb6cdca04f06388743b0051f0c5eb01a74bcae891c9149023a5c3ca416159fa80d19459c29b282c54a94d60d7fcc7d203bad
6
+ metadata.gz: f23fb10c0bdaa93a47f4a4516d756d452a611d07282c8f1396b2c4132f08e7ff1be4af6cec65ebb40a0752d15e6509c04621fb1a13853e4da33f693eae15075d
7
+ data.tar.gz: 5516860dc709922c9d7babe161d5f760a91a1ce20c9af8cdf68ee2ac3d737258a1acd62d896ffb76c45ffd6405c1a3f3c62d0277b93bbe5b69e494593904b149
@@ -1,5 +1,10 @@
1
1
  # [develop](https://github.com/adhearsion/adhearsion)
2
2
 
3
+ # [2.5.4](https://github.com/adhearsion/adhearsion/compare/v2.5.3...v2.5.4) - [2014-07-18](https://rubygems.org/gems/adhearsion/versions/2.5.4)
4
+ * Bugfix: Ignore dead calls when searching by tag
5
+ * Bugfix: Routing a dead call should end cleanly ([#441](https://github.com/adhearsion/adhearsion/issues/441))
6
+ * Bugfix: Ensure config gets correctly loaded by application
7
+
3
8
  # [2.5.3](https://github.com/adhearsion/adhearsion/compare/v2.5.2...v2.5.3) - [2014-04-25](https://rubygems.org/gems/adhearsion/versions/2.5.3)
4
9
  * Bugfix: Do not quiesce until the second SIGTERM, as per documentation ([#483](https://github.com/adhearsion/adhearsion/issues/483))
5
10
  * Bugfix: Consistent support for output options in all output methods ([#481](https://github.com/adhearsion/adhearsion/issues/481))
@@ -38,7 +38,11 @@ module Adhearsion
38
38
 
39
39
  def with_tag(tag)
40
40
  values.find_all do |call|
41
- call.tagged_with? tag
41
+ begin
42
+ call.tagged_with? tag
43
+ rescue Call::ExpiredError
44
+ false
45
+ end
42
46
  end
43
47
  end
44
48
 
@@ -195,17 +195,17 @@ module Adhearsion
195
195
  end
196
196
 
197
197
  def load_config_file
198
- require "#{Adhearsion.config.root}/config/adhearsion.rb"
198
+ load "#{Adhearsion.config.root}/config/adhearsion.rb"
199
199
  end
200
200
 
201
201
  def load_events_file
202
202
  path = "#{Adhearsion.config.root}/config/events.rb"
203
- require path if File.exists?(path)
203
+ load path if File.exists?(path)
204
204
  end
205
205
 
206
206
  def load_routes_file
207
207
  path = "#{Adhearsion.config.root}/config/routes.rb"
208
- require path if File.exists?(path)
208
+ load path if File.exists?(path)
209
209
  end
210
210
 
211
211
  def init_get_logging_appenders
@@ -48,6 +48,8 @@ module Adhearsion
48
48
  end
49
49
  callback.call if callback
50
50
  }
51
+ rescue Call::Hangup, Call::ExpiredError
52
+ logger.info "Call routing could not be completed because call was unavailable."
51
53
  end
52
54
 
53
55
  def evented?
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Adhearsion
4
- VERSION = '2.5.3'
4
+ VERSION = '2.5.4'
5
5
  end
@@ -72,13 +72,25 @@ module Adhearsion
72
72
  end
73
73
  end
74
74
 
75
- it "finding calls by a tag" do
76
- calls.each { |call| subject << call }
75
+ context "tagged calls" do
76
+ it "finding calls by a tag" do
77
+ calls.each { |call| subject << call }
78
+
79
+ tagged_call = calls.last
80
+ tagged_call.tag :moderator
81
+
82
+ subject.with_tag(:moderator).should be == [tagged_call]
83
+ end
84
+
85
+ it "when a call is dead, ignore it in the search" do
86
+ calls.each { |call| subject << call }
77
87
 
78
- tagged_call = calls.last
79
- tagged_call.tag :moderator
88
+ tagged_call = calls.last
89
+ tagged_call.tag :moderator
90
+ Celluloid::Actor.kill tagged_call
80
91
 
81
- subject.with_tag(:moderator).should be == [tagged_call]
92
+ subject.with_tag(:moderator).should be == []
93
+ end
82
94
  end
83
95
 
84
96
  it "finding calls by uri" do
@@ -139,6 +139,14 @@ module Adhearsion
139
139
  latch.wait(2).should be true
140
140
  end
141
141
 
142
+ context "when the call has already ended before routing can begin" do
143
+ before { Celluloid::Actor.kill call }
144
+
145
+ it "should fall through cleanly" do
146
+ expect { route.dispatch call }.not_to raise_error
147
+ end
148
+ end
149
+
142
150
  context "when the CallController mutates its metadata" do
143
151
  let :controller do
144
152
  Class.new CallController do
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.5.3
4
+ version: 2.5.4
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: 2014-04-25 00:00:00.000000000 Z
14
+ date: 2014-07-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport