asterisk-ari-client 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/asterisk-ari-client.gemspec +2 -0
- data/lib/ari/resource.rb +3 -1
- data/lib/asterisk/ari/client/version.rb +1 -1
- data/test/test_helper.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ced2496e519a26e6291bb719686a52645aad490
|
4
|
+
data.tar.gz: 2b0c8f8f38e6394ec90499079dfeb6321b470ebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f8f6d269307b5d89289d9760352e975005ff7044cbc48befae9868b6875b48e7f82cef0dc97407358fccf4e2eafde7fd94f0a032514eec5c8712e4e4c561c1e
|
7
|
+
data.tar.gz: fdf3eb413dffb79596790731a993b4908ab4afa8105527e4fac9b601ee87844ac22ffacbfabae2ea03cf790d14ffd1c7a23ce9384b7a488ec409c2f8a5cfd423
|
data/asterisk-ari-client.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = ">= 1.9"
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler"
|
22
24
|
spec.add_development_dependency "rake"
|
23
25
|
|
data/lib/ari/resource.rb
CHANGED
@@ -14,7 +14,9 @@ module Ari
|
|
14
14
|
|
15
15
|
def add_listener(type, params = {}, &block)
|
16
16
|
client.class.instance_listeners[type.to_sym] ||= []
|
17
|
-
client.class.instance_listeners[type.to_sym]
|
17
|
+
unless client.class.instance_listeners[type.to_sym].any? { |l| l.id == self.id }
|
18
|
+
client.class.instance_listeners[type.to_sym] << self
|
19
|
+
end
|
18
20
|
client.add_listener "#{type}-#{self.id}", params, &block
|
19
21
|
end
|
20
22
|
alias_method :on, :add_listener
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asterisk-ari-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Svoboda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
253
253
|
requirements:
|
254
254
|
- - ">="
|
255
255
|
- !ruby/object:Gem::Version
|
256
|
-
version: '
|
256
|
+
version: '1.9'
|
257
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
258
258
|
requirements:
|
259
259
|
- - ">="
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
requirements: []
|
263
263
|
rubyforge_project:
|
264
|
-
rubygems_version: 2.4.
|
264
|
+
rubygems_version: 2.4.6
|
265
265
|
signing_key:
|
266
266
|
specification_version: 4
|
267
267
|
summary: Ruby client library for the Asterisk REST Interface (ARI).
|