ruby_rabbitmq_janus 3.0.0.pre.385 → 4.0.0.pre.939113634
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -6
- data/config/default.yml +5 -5
- data/lib/rrj/errors/error.rb +3 -1
- data/lib/rrj/errors/janus/janus.rb +10 -11
- data/lib/rrj/errors/janus/responses/admin.rb +1 -1
- data/lib/rrj/errors/janus/responses/event.rb +1 -1
- data/lib/rrj/errors/janus/responses/standard.rb +1 -1
- data/lib/rrj/errors/rabbit/rabbit.rb +40 -13
- data/lib/rrj/errors/tools/tools.rb +45 -9
- data/lib/rrj/info.rb +1 -1
- data/lib/rrj/models/active_record.rb +1 -3
- data/lib/rrj/rabbit/connect.rb +7 -5
- data/lib/rrj/rails.rb +2 -2
- data/lib/rrj/tools/gem/config.rb +1 -1
- data/lib/rrj/tools/gem/config/gem.rb +1 -1
- data/lib/rrj/tools/gem/config/janus.rb +2 -0
- data/lib/rrj/tools/gem/config/queues.rb +8 -0
- data/lib/rrj/tools/gem/config/rabbit.rb +2 -0
- data/lib/rrj/tools/replaces/replace.rb +2 -2
- data/spec/config/database.yml +1 -0
- data/spec/ruby_rabbitmq_janus/models/janus_instance_instance_spec.rb +1 -1
- data/spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_allow_token_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_disallow_token_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_handle_info_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/{rrj_admin_list_handles_spec.Rb → rrj_admin_list_handles_spec.rb} +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_list_sessions_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_list_tokens_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_remove_token_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_libnice_debug_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_locking_debug_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_log_colors_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_log_level_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_log_timestamps_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_max_nack_queue_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_no_media_timer_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_set_session_timeout_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_start_pcap_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_start_text2pcap_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_stop_pcap_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_admin_stop_text2pcap_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_answer_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_attach_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_create_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_destroy_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_detach_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_info_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_keepalive_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_offer_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_trickle_spec.rb +1 -0
- data/spec/ruby_rabbitmq_janus/rrj_trickles_spec.rb +2 -1
- data/spec/spec_helper.rb +11 -32
- metadata +150 -139
- data/lib/rrj/errors/base/admin.rb +0 -24
- data/lib/rrj/errors/base/base.rb +0 -5
- data/lib/rrj/errors/base/init.rb +0 -46
- data/lib/rrj/errors/base/task.rb +0 -32
- data/lib/rrj/errors/janus/messages/admin.rb +0 -33
- data/lib/rrj/errors/janus/messages/message.rb +0 -51
- data/lib/rrj/errors/janus/messages/standard.rb +0 -33
- data/lib/rrj/errors/janus/responses/base.rb +0 -15
- data/lib/rrj/errors/janus/transactions/admin.rb +0 -37
- data/lib/rrj/errors/janus/transactions/handle.rb +0 -52
- data/lib/rrj/errors/janus/transactions/session.rb +0 -38
- data/lib/rrj/errors/janus/transactions/transaction.rb +0 -23
- data/lib/rrj/errors/rabbit/base_event.rb +0 -25
- data/lib/rrj/errors/rabbit/connect.rb +0 -65
- data/lib/rrj/errors/rabbit/listener/base.rb +0 -46
- data/lib/rrj/errors/rabbit/listener/from.rb +0 -19
- data/lib/rrj/errors/rabbit/listener/from_admin.rb +0 -19
- data/lib/rrj/errors/rabbit/propertie.rb +0 -37
- data/lib/rrj/errors/rabbit/publisher/admin.rb +0 -32
- data/lib/rrj/errors/rabbit/publisher/base.rb +0 -39
- data/lib/rrj/errors/rabbit/publisher/exclusive.rb +0 -33
- data/lib/rrj/errors/rabbit/publisher/keepalive.rb +0 -19
- data/lib/rrj/errors/rabbit/publisher/non_exclusive.rb +0 -33
- data/lib/rrj/errors/tools/gem/cluster.rb +0 -42
- data/lib/rrj/errors/tools/gem/config.rb +0 -121
- data/lib/rrj/errors/tools/gem/log.rb +0 -81
- data/lib/rrj/errors/tools/gem/option.rb +0 -44
- data/lib/rrj/errors/tools/gem/request.rb +0 -23
- data/lib/rrj/errors/tools/replaces/replace.rb +0 -30
- data/lib/rrj/errors/tools/replaces/type.rb +0 -30
- data/tmp/coverage/assets/0.10.2/application.css +0 -799
- data/tmp/coverage/assets/0.10.2/application.js +0 -1707
- data/tmp/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/tmp/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/tmp/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/tmp/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/tmp/coverage/assets/0.10.2/favicon_green.png +0 -0
- data/tmp/coverage/assets/0.10.2/favicon_red.png +0 -0
- data/tmp/coverage/assets/0.10.2/favicon_yellow.png +0 -0
- data/tmp/coverage/assets/0.10.2/loading.gif +0 -0
- data/tmp/coverage/assets/0.10.2/magnify.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/tmp/coverage/index.html +0 -21303
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f1ce541747c48d06da968f51438155d38ce84c15f59b7610cb41e42ee588897
|
4
|
+
data.tar.gz: 10bb4edc2d13ff934c787f84454fde5844738051c9eb118738bcf66ecbbeaa6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6810f9782b8fcec0cb691e0bafc50708c970812b27a2c0a24d9a4327377746d2aec51a9c4bc3ef416ba1bb5df378c8f79e70d53f69e6ce881d93539ba268f2e0
|
7
|
+
data.tar.gz: 205ee2eee6067cba8698fe8a20a849f2575b880144089ee20655c53e8396a39d9bdbb89284f828eabe6ab66955e7dbd5b933096d29088e1696ba21bed71c4118
|
data/README.md
CHANGED
@@ -33,7 +33,6 @@ This gem is product by [Dazzl.tv](http://dazzl.tv)
|
|
33
33
|
* [Read documentation](#read-documentation)
|
34
34
|
* [Generate developer documentation](#generate-developer-documentation)
|
35
35
|
* [Contributing](#contributing)
|
36
|
-
* [Plus](#plus)
|
37
36
|
|
38
37
|
## How to use
|
39
38
|
|
@@ -281,8 +280,3 @@ Bug reports and pull requests are welcome on GitHub at
|
|
281
280
|
https://github.com/dazzl-tv/ruby-rabbitmq-janus This project is intended to be a
|
282
281
|
safe, welcoming space for collaboration, and contributors are expected to adhere
|
283
282
|
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
284
|
-
|
285
|
-
## Plus
|
286
|
-
|
287
|
-
Janus Admin Monitor project use this gem for manage data in Janus Meetecho with
|
288
|
-
Admin/Monitor API.
|
data/config/default.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Rabbit information connection
|
2
2
|
rabbit:
|
3
3
|
# Precise RabbitMQ host - Default 'localhost'
|
4
|
-
host:
|
4
|
+
host: rabbit
|
5
5
|
# Precise RabbitMQ port - Default '5672'
|
6
6
|
port: 5672
|
7
7
|
# Precise RabbitMQ vhost - Default '/'
|
@@ -13,7 +13,7 @@ rabbit:
|
|
13
13
|
# Password for admin request
|
14
14
|
admin_pass: janusoverlord
|
15
15
|
# Logger level for rabbitmq message
|
16
|
-
level:
|
16
|
+
level: error
|
17
17
|
|
18
18
|
# RabbitMQ Queue information
|
19
19
|
queues:
|
@@ -53,12 +53,12 @@ gem:
|
|
53
53
|
log:
|
54
54
|
# Define level to log
|
55
55
|
# UNKNOW, FATAL, ERROR, WARN, INFO, DEBUG
|
56
|
-
level:
|
56
|
+
level: info
|
57
57
|
# Precise type logger
|
58
58
|
# stdout : Output standard.
|
59
59
|
# file : Create log file in path 'log/ruby-rabbitmq-janus.log'.
|
60
60
|
# remote : Use RemoteSyslogLogger (for papertrail)
|
61
|
-
type:
|
61
|
+
type: stdout
|
62
62
|
# Used with type. Complete missing data :
|
63
63
|
# stdout : no option
|
64
64
|
# file : filename used
|
@@ -73,7 +73,7 @@ gem:
|
|
73
73
|
environment : 'development'
|
74
74
|
# Precise ORM used :
|
75
75
|
# mongoid or active_record
|
76
|
-
orm: 'mongoid'
|
76
|
+
orm: <%= ENV['MONGO'].eql?('true') ? 'mongoid' : 'active_record' %>
|
77
77
|
# Read response json for RSpec
|
78
78
|
response_path: 'spec/supports/rrj/responses'
|
79
79
|
# Number of process read public queue
|
data/lib/rrj/errors/error.rb
CHANGED
@@ -34,9 +34,11 @@ module RubyRabbitmqJanus
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
require 'rrj/errors/base/base'
|
38
37
|
require 'rrj/errors/janus/janus'
|
38
|
+
|
39
39
|
require 'rrj/errors/process/event'
|
40
40
|
require 'rrj/errors/process/event_admin'
|
41
|
+
|
41
42
|
require 'rrj/errors/tools/tools'
|
43
|
+
|
42
44
|
require 'rrj/errors/rabbit/rabbit'
|
@@ -1,17 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
module RubyRabbitmqJanus
|
4
|
+
module Errors
|
5
|
+
class BaseJanus < RRJError
|
6
|
+
def initialize(klass, message, level = :warn)
|
7
|
+
super "[Response][#{klass}] #{message}", level
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
6
12
|
|
7
|
-
require 'rrj/errors/janus/responses/base'
|
8
|
-
|
9
|
-
require 'rrj/errors/janus/responses/code'
|
10
13
|
require 'rrj/errors/janus/responses/admin'
|
14
|
+
require 'rrj/errors/janus/responses/code'
|
11
15
|
require 'rrj/errors/janus/responses/event'
|
12
16
|
require 'rrj/errors/janus/responses/standard'
|
13
|
-
|
14
|
-
require 'rrj/errors/janus/transactions/transaction'
|
15
|
-
require 'rrj/errors/janus/transactions/admin'
|
16
|
-
require 'rrj/errors/janus/transactions/handle'
|
17
|
-
require 'rrj/errors/janus/transactions/session'
|
@@ -8,19 +8,46 @@ module RubyRabbitmqJanus
|
|
8
8
|
super "[Rabbit]#{message}", level
|
9
9
|
end
|
10
10
|
end
|
11
|
-
end
|
12
|
-
end
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
module Connect
|
13
|
+
# Error when transaction hs no block
|
14
|
+
class MissingAction < RubyRabbitmqJanus::Errors::BaseRabbit
|
15
|
+
def initialize
|
16
|
+
super 'Transaction failed, missing block'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# Error When transaction timeout
|
21
|
+
class TransactionTimeout < RubyRabbitmqJanus::Errors::BaseRabbit
|
22
|
+
def initialize(error)
|
23
|
+
super error
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Listener
|
29
|
+
# Error when response is empty
|
30
|
+
class ResponseEmpty < RubyRabbitmqJanus::Errors::BaseRabbit
|
31
|
+
def initialize(response)
|
32
|
+
super "Response is empty ! (#{response})"
|
33
|
+
end
|
34
|
+
end
|
17
35
|
|
18
|
-
|
19
|
-
|
20
|
-
|
36
|
+
# Error when response is nil
|
37
|
+
class ResponseNil < RubyRabbitmqJanus::Errors::BaseRabbit
|
38
|
+
def initialize(response)
|
39
|
+
super "Response is nil ! (#{response})"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
21
43
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
44
|
+
module Publisher
|
45
|
+
# Error when correlation string is not equal
|
46
|
+
class TestCorrelation < RubyRabbitmqJanus::Errors::BaseRabbit
|
47
|
+
def initialize(message, propertie)
|
48
|
+
super "Correlation doesn't equal (msg: #{message}) != (prp: #{propertie})"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -6,17 +6,53 @@ module RubyRabbitmqJanus
|
|
6
6
|
# Define a super class for all error in Option class
|
7
7
|
class BaseTools < RRJError
|
8
8
|
def initialize(message, level = :fatal)
|
9
|
-
super("[Tools]#{message}", level)
|
9
|
+
super("[Tools][Config]#{message}", level)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module Config
|
14
|
+
class QueueFrom < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
15
|
+
def initialize
|
16
|
+
super '[QueueFrom] Error for reading standard queue from'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class QueueTo < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
21
|
+
def initialize
|
22
|
+
super '[QueueTo] Error for reading standard queue to'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class QueueAdminFrom < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
27
|
+
def initialize
|
28
|
+
super '[QueueAdminFrom] Error for reading admin queue from'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class QueueAdminTo < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
33
|
+
def initialize
|
34
|
+
super '[QueueAdminTo] Error for reading admin queue to'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class Plugins < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
39
|
+
def initialize
|
40
|
+
super "[Plugins] Error for reading plugins at #{index}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class AdminPassword < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
45
|
+
def initialize
|
46
|
+
super '[AdminPassword] Error for reading option admin password', :warn
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
class Rabbitmq < RubyRabbitmqJanus::Errors::Tools::BaseTools
|
51
|
+
def initialize(value)
|
52
|
+
super "[RabbitMQConfig] Missing RabbitMQ configuration for key : #{value}", :fatal
|
53
|
+
end
|
10
54
|
end
|
11
55
|
end
|
12
56
|
end
|
13
57
|
end
|
14
58
|
end
|
15
|
-
|
16
|
-
require 'rrj/errors/tools/gem/cluster'
|
17
|
-
require 'rrj/errors/tools/gem/log'
|
18
|
-
require 'rrj/errors/tools/gem/option'
|
19
|
-
require 'rrj/errors/tools/gem/request'
|
20
|
-
|
21
|
-
require 'rrj/errors/tools/replaces/replace'
|
22
|
-
require 'rrj/errors/tools/replaces/type'
|
data/lib/rrj/info.rb
CHANGED
@@ -32,11 +32,9 @@ module RubyRabbitmqJanus
|
|
32
32
|
#
|
33
33
|
# @return [Hash] Current model
|
34
34
|
#
|
35
|
-
# rubocop:disable Style/HashTransformValues
|
36
35
|
def unset(attributes)
|
37
|
-
|
36
|
+
[attributes.map { |key, _value| [key, nil] }].to_h
|
38
37
|
end
|
39
|
-
# rubocop:enable Style/HashTransformValues
|
40
38
|
end
|
41
39
|
end
|
42
40
|
end
|
data/lib/rrj/rabbit/connect.rb
CHANGED
@@ -15,7 +15,7 @@ module RubyRabbitmqJanus
|
|
15
15
|
|
16
16
|
# Create an transaction with rabbitmq and close after response is received
|
17
17
|
def transaction_short(&block)
|
18
|
-
raise Errors::
|
18
|
+
raise RubyRabbitmqJanus::Errors::Connect::MissingAction unless block
|
19
19
|
|
20
20
|
response = nil
|
21
21
|
|
@@ -23,7 +23,8 @@ module RubyRabbitmqJanus
|
|
23
23
|
response = transaction_long(&block)
|
24
24
|
end
|
25
25
|
rescue Timeout::Error
|
26
|
-
::
|
26
|
+
raise RubyRabbitmqJanus::Errors::Connect::TransactionTimeout, \
|
27
|
+
'The "Short transaction" have raised Timeout exception.'
|
27
28
|
ensure
|
28
29
|
close
|
29
30
|
response
|
@@ -31,14 +32,15 @@ module RubyRabbitmqJanus
|
|
31
32
|
|
32
33
|
# Create an transaction with rabbitmq and not close
|
33
34
|
def transaction_long
|
34
|
-
raise Errors::
|
35
|
+
raise RubyRabbitmqJanus::Errors::Connect::MissingAction unless block_given?
|
35
36
|
|
36
|
-
Timeout.timeout(
|
37
|
+
Timeout.timeout(60) do
|
37
38
|
start
|
38
39
|
yield
|
39
40
|
end
|
40
41
|
rescue Timeout::Error
|
41
|
-
::
|
42
|
+
raise RubyRabbitmqJanus::Errors::Connect::TransactionTimeout, \
|
43
|
+
'The "Long transaction" have raised Timeout exception.'
|
42
44
|
end
|
43
45
|
|
44
46
|
# Opening a connection with RabbitMQ
|
data/lib/rrj/rails.rb
CHANGED
@@ -22,8 +22,8 @@ module RubyRabbitmqJanus
|
|
22
22
|
|
23
23
|
Log.debug "[RRJ] Create process : #{number}"
|
24
24
|
process = RubyRabbitmqJanus::Process::Concurrencies
|
25
|
-
actions =
|
26
|
-
admin_actions =
|
25
|
+
actions = ActionEvents.new.actions
|
26
|
+
admin_actions = ActionAdminEvents.new.actions
|
27
27
|
|
28
28
|
listeners = []
|
29
29
|
(1..number).each do
|
data/lib/rrj/tools/gem/config.rb
CHANGED
@@ -12,7 +12,7 @@ module RubyRabbitmqJanus
|
|
12
12
|
module ConfigGem
|
13
13
|
# @return [Boolean] Read option file for a janus cluster section
|
14
14
|
def cluster
|
15
|
-
@options['gem']['cluster']['enabled'].to_s.match?('true')
|
15
|
+
@options['gem']['cluster']['enabled'].to_s.match?('true') || false
|
16
16
|
end
|
17
17
|
|
18
18
|
# @return [Symbol] read configuration for log level used in this gem
|
@@ -19,6 +19,8 @@ module RubyRabbitmqJanus
|
|
19
19
|
# @return [String] read configuration for plugin with index
|
20
20
|
def plugin_at(index = 0)
|
21
21
|
@options['janus']['plugins'][index].to_s
|
22
|
+
rescue
|
23
|
+
raise RubyRabbitmqJanus::Errors::Tools::Plugins, index
|
22
24
|
end
|
23
25
|
|
24
26
|
alias ttl time_to_live
|
@@ -11,21 +11,29 @@ module RubyRabbitmqJanus
|
|
11
11
|
# @return [String] Get to name queue_from (pattern)
|
12
12
|
def queue_from
|
13
13
|
@options['queues']['standard']['from'].to_s
|
14
|
+
rescue
|
15
|
+
raise RubyRabbitmqJanus::Errors::Tools::QueueFrom
|
14
16
|
end
|
15
17
|
|
16
18
|
# @return [String] Get to name queue_to (pattern)
|
17
19
|
def queue_to
|
18
20
|
@options['queues']['standard']['to'].to_s
|
21
|
+
rescue
|
22
|
+
raise RubyRabbitmqJanus::Errors::Tools::QueueTo
|
19
23
|
end
|
20
24
|
|
21
25
|
# @return [String] Get to name queue_admin_from (pattern)
|
22
26
|
def queue_admin_from
|
23
27
|
@options['queues']['admin']['from'].to_s
|
28
|
+
rescue
|
29
|
+
raise RubyRabbitmqJanus::Errors::Tools::QueueAdminFrom
|
24
30
|
end
|
25
31
|
|
26
32
|
# @return [String] Get to name queue_admin_from (pattern)
|
27
33
|
def queue_admin_to
|
28
34
|
@options['queues']['admin']['to'].to_s
|
35
|
+
rescue
|
36
|
+
raise RubyRabbitmqJanus::Errors::Tools::QueueAdminTo
|
29
37
|
end
|
30
38
|
end
|
31
39
|
end
|
@@ -13,6 +13,8 @@ module RubyRabbitmqJanus
|
|
13
13
|
# @return [String] read configuration fir queue admin
|
14
14
|
def admin_pass
|
15
15
|
@options['rabbit']['admin_pass'].to_s
|
16
|
+
rescue
|
17
|
+
raise RubyRabbitmqJanus::Errors::Tools::AdminPassword
|
16
18
|
end
|
17
19
|
|
18
20
|
# @return [Symbol] read configuration for bunny log level
|
data/spec/config/database.yml
CHANGED
@@ -16,7 +16,7 @@ describe RubyRabbitmqJanus::Models::JanusInstance, type: :model,
|
|
16
16
|
let(:id) { first.id }
|
17
17
|
|
18
18
|
context 'when Janus instances are activated.' do
|
19
|
-
let(:instances) { FactoryBot.create_list(:janus_instance, size) }
|
19
|
+
let(:instances) { FactoryBot.create_list(:janus_instance, size, enable: true) }
|
20
20
|
let(:count_enabled) { size }
|
21
21
|
let(:count_destroyed) { 0 }
|
22
22
|
let(:count_disabled) { 0 }
|