ruby_rabbitmq_janus 2.7.1 → 2.7.2.pre.284
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/default.md +0 -1
- data/config/default.yml +0 -2
- data/lib/rrj/binary.rb +0 -5
- data/lib/rrj/errors/error.rb +1 -0
- data/lib/rrj/errors/janus/janus.rb +0 -2
- data/lib/rrj/errors/{janus/processus → process}/concurency.rb +6 -6
- data/lib/rrj/errors/process/event.rb +30 -0
- data/lib/rrj/errors/{janus/processus → process}/keepalive/initializer.rb +8 -8
- data/lib/rrj/errors/{janus/processus → process}/keepalive/thread.rb +8 -8
- data/lib/rrj/errors/{janus/processus → process}/keepalive/timer.rb +6 -6
- data/lib/rrj/errors/process/keepalive.rb +21 -0
- data/lib/rrj/info.rb +1 -1
- data/lib/rrj/janus/janus.rb +0 -1
- data/lib/rrj/models/active_record.rb +5 -3
- data/lib/rrj/models/concerns/{janus_instance_callbacks.rb → callbacks.rb} +14 -5
- data/lib/rrj/models/concerns/{janus_instance_methods.rb → instances.rb} +3 -29
- data/lib/rrj/models/concerns/methods.rb +36 -0
- data/lib/rrj/models/concerns/{janus_instance_validations.rb → validations.rb} +2 -2
- data/lib/rrj/models/mongoid.rb +5 -3
- data/lib/rrj/{janus/processus → process}/concurrency.rb +6 -6
- data/lib/rrj/{janus/processus → process}/event.rb +3 -3
- data/lib/rrj/{janus/processus → process}/event_admin.rb +1 -1
- data/lib/rrj/{janus/processus → process}/keepalive/keepalive_initializer.rb +8 -8
- data/lib/rrj/{janus/processus → process}/keepalive/keepalive_message.rb +1 -1
- data/lib/rrj/{janus/processus → process}/keepalive/keepalive_thread.rb +7 -7
- data/lib/rrj/{janus/processus → process}/keepalive/keepalive_timer.rb +5 -5
- data/lib/rrj/rabbit/listener/base.rb +4 -11
- data/lib/rrj/rails.rb +1 -1
- data/lib/rrj/tools/bin/model.rb +0 -1
- data/lib/rrj/tools/gem/config/gem.rb +3 -1
- data/lib/rrj/tools/gem/config.rb +10 -4
- data/lib/rrj/tools/gem/log.rb +2 -1
- data/lib/rrj/tools/gem/option.rb +0 -9
- data/lib/ruby_rabbitmq_janus.rb +3 -0
- data/spec/config/initializer.rb +1 -1
- data/spec/factories/janus_instance.rb +1 -1
- data/spec/ruby_rabbitmq_janus/models/janus_instance_definition_spec.rb +6 -8
- data/spec/ruby_rabbitmq_janus/models/janus_instance_spec.rb +4 -4
- data/spec/ruby_rabbitmq_janus/{janus → process}/concurrencies/concurrency_spec.rb +1 -1
- data/spec/ruby_rabbitmq_janus/{janus → process}/concurrencies/keepalive_initializer_spec.rb +2 -2
- data/spec/ruby_rabbitmq_janus/{janus → process}/concurrencies/keepalive_thread_spec.rb +4 -4
- data/spec/ruby_rabbitmq_janus/{janus → process}/concurrencies/keepalive_timer_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -10
- metadata +34 -41
- data/lib/rrj/errors/janus/processus/event.rb +0 -30
- data/lib/rrj/errors/janus/processus/keepalive.rb +0 -21
@@ -9,7 +9,7 @@
|
|
9
9
|
# :reek:TooManyMethods
|
10
10
|
|
11
11
|
module RubyRabbitmqJanus
|
12
|
-
module
|
12
|
+
module Process
|
13
13
|
module Concurrencies
|
14
14
|
# Object thread for manage keep a live with Janus Instance
|
15
15
|
#
|
@@ -27,7 +27,7 @@ module RubyRabbitmqJanus
|
|
27
27
|
::Log.info "Keepalive thread id is #{__id__}"
|
28
28
|
super(&block)
|
29
29
|
rescue
|
30
|
-
raise Errors::
|
30
|
+
raise Errors::Process::KeepaliveThread::Initializer
|
31
31
|
end
|
32
32
|
|
33
33
|
# Initialize a transaction with Janus Instance.
|
@@ -36,7 +36,7 @@ module RubyRabbitmqJanus
|
|
36
36
|
@publisher = publisher
|
37
37
|
@session = response_session
|
38
38
|
rescue
|
39
|
-
raise Errors::
|
39
|
+
raise Errors::Process::KeepaliveThread::InitializeJanusSession
|
40
40
|
end
|
41
41
|
|
42
42
|
# Restart session
|
@@ -51,7 +51,7 @@ module RubyRabbitmqJanus
|
|
51
51
|
::Log.error 'Janus Instance Model is gone, giving up'
|
52
52
|
end
|
53
53
|
rescue
|
54
|
-
raise Errors::
|
54
|
+
raise Errors::Process::KeepaliveThread::RestartSession
|
55
55
|
end
|
56
56
|
|
57
57
|
# Start a timer for TTL
|
@@ -74,7 +74,7 @@ module RubyRabbitmqJanus
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
rescue
|
77
|
-
raise Errors::
|
77
|
+
raise Errors::Process::KeepaliveThread::Start
|
78
78
|
end
|
79
79
|
# rubocop:enable Metrics/AbcSize
|
80
80
|
|
@@ -83,7 +83,7 @@ module RubyRabbitmqJanus
|
|
83
83
|
cleanup
|
84
84
|
super
|
85
85
|
rescue
|
86
|
-
raise Errors::
|
86
|
+
raise Errors::Process::KeepaliveThread::Kill
|
87
87
|
end
|
88
88
|
|
89
89
|
# :reek:TooManyStatements
|
@@ -101,7 +101,7 @@ module RubyRabbitmqJanus
|
|
101
101
|
"thread [#{__id__}] will die."
|
102
102
|
end
|
103
103
|
rescue
|
104
|
-
raise Errors::
|
104
|
+
raise Errors::Process::KeepaliveThread::InstanceIsDown
|
105
105
|
end
|
106
106
|
|
107
107
|
private
|
@@ -6,7 +6,7 @@ require 'timers'
|
|
6
6
|
# :reek:DuplicateMethodCall
|
7
7
|
|
8
8
|
module RubyRabbitmqJanus
|
9
|
-
module
|
9
|
+
module Process
|
10
10
|
module Concurrencies
|
11
11
|
# @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
|
12
12
|
#
|
@@ -28,7 +28,7 @@ module RubyRabbitmqJanus
|
|
28
28
|
@timers = Timers::Group.new
|
29
29
|
@timer = nil
|
30
30
|
rescue
|
31
|
-
raise Errors::
|
31
|
+
raise Errors::Process::KeepaliveTimer::Initializer
|
32
32
|
end
|
33
33
|
|
34
34
|
# Execute a loop with timer for sending keepalive message
|
@@ -37,7 +37,7 @@ module RubyRabbitmqJanus
|
|
37
37
|
@timer = @timers.now_and_every(@time_to_live) { prepare_loop(&block) }
|
38
38
|
loop { @timers.wait }
|
39
39
|
rescue
|
40
|
-
raise Errors::
|
40
|
+
raise Errors::Process::KeepaliveTimer::LoopKeepalive
|
41
41
|
end
|
42
42
|
|
43
43
|
# Test if session is present/exist in Janus Instance
|
@@ -46,7 +46,7 @@ module RubyRabbitmqJanus
|
|
46
46
|
rescue Timeout::Error
|
47
47
|
block.binding.receiver.instance_is_down
|
48
48
|
rescue
|
49
|
-
raise Errors::
|
49
|
+
raise Errors::Process::KeepaliveTimer::Session
|
50
50
|
end
|
51
51
|
|
52
52
|
# Stop timer to keepalive thread
|
@@ -54,7 +54,7 @@ module RubyRabbitmqJanus
|
|
54
54
|
@timer.cancel
|
55
55
|
@timer = nil
|
56
56
|
rescue
|
57
|
-
raise Errors::
|
57
|
+
raise Errors::Process::KeepaliveTimer::StopTimer
|
58
58
|
end
|
59
59
|
|
60
60
|
private
|
@@ -9,7 +9,7 @@ module RubyRabbitmqJanus
|
|
9
9
|
class Base < RubyRabbitmqJanus::Rabbit::BaseEvent
|
10
10
|
# Define an publisher
|
11
11
|
#
|
12
|
-
# @param [String] rabbit Information connection to
|
12
|
+
# @param [String] rabbit Information connection to RabbitMQ server
|
13
13
|
def initialize(rabbit)
|
14
14
|
super()
|
15
15
|
@rabbit = rabbit.channel
|
@@ -42,17 +42,10 @@ module RubyRabbitmqJanus
|
|
42
42
|
{ block: false, manual_ack: true, arguments: { 'x-priority': 2 } }
|
43
43
|
end
|
44
44
|
|
45
|
-
|
46
|
-
def log_message_id(propertie)
|
47
|
-
message_id = propertie.message_id
|
48
|
-
::Log.info "[X] Message reading with ID #{message_id}"
|
49
|
-
end
|
50
|
-
|
51
|
-
def info_subscribe(info, prop, payload)
|
45
|
+
def info_subscribe(info, _prop, payload)
|
52
46
|
::Log.debug info
|
53
|
-
::Log.info
|
54
|
-
|
55
|
-
::Log.debug payload
|
47
|
+
::Log.info '[X] Message reading'
|
48
|
+
::Log.info payload
|
56
49
|
end
|
57
50
|
end
|
58
51
|
end
|
data/lib/rrj/rails.rb
CHANGED
@@ -18,7 +18,7 @@ module RubyRabbitmqJanus
|
|
18
18
|
|
19
19
|
Log.info 'Listen public queue in thread'
|
20
20
|
actions = RubyRabbitmqJanus::ActionEvents.new.actions
|
21
|
-
RubyRabbitmqJanus::
|
21
|
+
RubyRabbitmqJanus::Process::Concurrencies::Event.instance.run(&actions)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/rrj/tools/bin/model.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# :reek:UtilityFunction
|
4
|
+
|
3
5
|
module RubyRabbitmqJanus
|
4
6
|
module Tools
|
5
7
|
# Subclass for Config
|
@@ -47,7 +49,7 @@ module RubyRabbitmqJanus
|
|
47
49
|
|
48
50
|
# @return [String] Get program name or GEM_NAME
|
49
51
|
def program_name
|
50
|
-
|
52
|
+
ENV['PROGRAM_NAME'] || RubyRabbitmqJanus::GEM_NAME
|
51
53
|
end
|
52
54
|
|
53
55
|
# @return [String] Get path for json files contains a Janus response
|
data/lib/rrj/tools/gem/config.rb
CHANGED
@@ -4,10 +4,12 @@ require 'singleton'
|
|
4
4
|
require 'rrj/errors/error'
|
5
5
|
require 'yaml'
|
6
6
|
require 'erb'
|
7
|
-
|
8
|
-
require 'rrj
|
9
|
-
|
10
|
-
|
7
|
+
%w[gem rabbit queues janus].each do |file|
|
8
|
+
require File.join('rrj', 'tools', 'gem', 'config', file)
|
9
|
+
end
|
10
|
+
%w[callbacks methods instances validations].each do |file|
|
11
|
+
require File.join('rrj', 'models', 'concerns', file)
|
12
|
+
end
|
11
13
|
|
12
14
|
# rubocop:disable Naming/MemoizedInstanceVariableName
|
13
15
|
module RubyRabbitmqJanus
|
@@ -69,3 +71,7 @@ module RubyRabbitmqJanus
|
|
69
71
|
end
|
70
72
|
end
|
71
73
|
# rubocop:enable Naming/MemoizedInstanceVariableName
|
74
|
+
#
|
75
|
+
require File.join('rrj',
|
76
|
+
'models',
|
77
|
+
RubyRabbitmqJanus::Tools::Config.instance.orm)
|
data/lib/rrj/tools/gem/log.rb
CHANGED
@@ -22,8 +22,9 @@ module RubyRabbitmqJanus
|
|
22
22
|
module Logger
|
23
23
|
def self.start
|
24
24
|
Log.info '### Start bin Ruby Rabbit Janus ###'
|
25
|
+
Log.info "Program : #{RubyRabbitmqJanus::Tools::Config.instance.pg}"
|
25
26
|
Log.info "RRJ Version : #{RubyRabbitmqJanus::VERSION}"
|
26
|
-
Log.
|
27
|
+
Log.debug "\r\n#{RubyRabbitmqJanus::BANNER}"
|
27
28
|
end
|
28
29
|
|
29
30
|
def self.create
|
data/lib/rrj/tools/gem/option.rb
CHANGED
@@ -1,14 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'rrj/models/concerns/janus_instance_callbacks'
|
4
|
-
require 'rrj/models/concerns/janus_instance_methods'
|
5
|
-
require 'rrj/models/concerns/janus_instance_validations'
|
6
|
-
if RubyRabbitmqJanus::Tools::Config.instance.orm.eql?('mongoid')
|
7
|
-
require 'rrj/models/mongoid'
|
8
|
-
else
|
9
|
-
require 'rrj/models/active_record'
|
10
|
-
end
|
11
|
-
|
12
3
|
# :reek:FeatureEnvy
|
13
4
|
|
14
5
|
module RubyRabbitmqJanus
|
data/lib/ruby_rabbitmq_janus.rb
CHANGED
@@ -16,6 +16,9 @@ require 'rrj/rabbit/rabbit'
|
|
16
16
|
# Define actions with janus
|
17
17
|
require 'rrj/janus/janus'
|
18
18
|
|
19
|
+
# Define process create on fly for manage keepalive and public queu
|
20
|
+
require 'rrj/process/concurrency'
|
21
|
+
|
19
22
|
# Define errors in gems
|
20
23
|
require 'rrj/errors/error'
|
21
24
|
|
data/spec/config/initializer.rb
CHANGED
@@ -11,7 +11,8 @@ describe RubyRabbitmqJanus::Models::JanusInstance, type: :model,
|
|
11
11
|
'session_id' => 'session',
|
12
12
|
'thread_id' => 'thread',
|
13
13
|
'thread_id_adm' => 'thread_adm',
|
14
|
-
'instance' => '_id'
|
14
|
+
'instance' => '_id',
|
15
|
+
'title' => 'name'
|
15
16
|
}
|
16
17
|
end
|
17
18
|
let(:parameter_sqlite) do
|
@@ -19,21 +20,18 @@ describe RubyRabbitmqJanus::Models::JanusInstance, type: :model,
|
|
19
20
|
'instance' => 'id',
|
20
21
|
'session_id' => 'session',
|
21
22
|
'thread_id_adm' => 'thread_adm',
|
22
|
-
'thread_id' => 'thread'
|
23
|
+
'thread_id' => 'thread',
|
24
|
+
'title' => 'name'
|
23
25
|
}
|
24
26
|
end
|
25
27
|
|
26
28
|
context 'when Janus Instance model definition' do
|
27
29
|
if ENV['MONGO'].match?('true')
|
28
30
|
it { expect(model.attribute_names).to include('_id') }
|
29
|
-
it
|
30
|
-
expect(model.aliased_fields).to eq(parameter_mongo)
|
31
|
-
end
|
31
|
+
it { expect(model.aliased_fields).to eq(parameter_mongo) }
|
32
32
|
else
|
33
33
|
it { expect(model.attribute_names).to include('id') }
|
34
|
-
it
|
35
|
-
expect(model.attribute_aliases).to eq(parameter_sqlite)
|
36
|
-
end
|
34
|
+
it { expect(model.attribute_aliases).to eq(parameter_sqlite) }
|
37
35
|
end
|
38
36
|
it { expect(model.attribute_names).to include('session') }
|
39
37
|
it { expect(model.attribute_names).to include('enable') }
|
@@ -28,8 +28,8 @@ describe RubyRabbitmqJanus::Models::JanusInstance, type: :model,
|
|
28
28
|
|
29
29
|
context 'when many janus instances' do
|
30
30
|
before do
|
31
|
-
|
32
|
-
|
31
|
+
FactoryBot.create_list(:janus_instance, 5, enable: false)
|
32
|
+
FactoryBot.create(:janus_instance, janus_id)
|
33
33
|
end
|
34
34
|
|
35
35
|
let(:one) { model.enabled.first }
|
@@ -41,7 +41,7 @@ describe RubyRabbitmqJanus::Models::JanusInstance, type: :model,
|
|
41
41
|
end
|
42
42
|
|
43
43
|
context 'when Janus Instance enable' do
|
44
|
-
let(:janus) {
|
44
|
+
let(:janus) { FactoryBot.create(:janus_instance, janus_id) }
|
45
45
|
|
46
46
|
it { expect(janus.valid?).to be_a(TrueClass) }
|
47
47
|
it { expect(janus.session).to be_nil }
|
@@ -51,7 +51,7 @@ describe RubyRabbitmqJanus::Models::JanusInstance, type: :model,
|
|
51
51
|
end
|
52
52
|
|
53
53
|
context 'when Janus Instance disable' do
|
54
|
-
let(:janus) {
|
54
|
+
let(:janus) { FactoryBot.create(:janus_instance, enable: false) }
|
55
55
|
|
56
56
|
it { expect(janus.valid?).to be_a(TrueClass) }
|
57
57
|
it { expect(janus.session).to be_nil }
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe RubyRabbitmqJanus::
|
5
|
+
describe RubyRabbitmqJanus::Process::Concurrencies::Concurrency, type: :thread, name: :concurrency do
|
6
6
|
let(:concurrency) { described_class.new }
|
7
7
|
|
8
8
|
it { expect(concurrency.send(:rabbit)).to be_a(RubyRabbitmqJanus::Rabbit::Connect) }
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe RubyRabbitmqJanus::
|
5
|
+
describe RubyRabbitmqJanus::Process::Concurrencies::KeepaliveInitializer, type: :thread, name: :keepalive_initializer do
|
6
6
|
let(:instance) { RubyRabbitmqJanus::Models::JanusInstance.find((ENV['MONGO'].match?('true') ? %w[1 2] : [1, 2]).sample) }
|
7
7
|
let(:concurrency) { described_class.new(instance) }
|
8
8
|
|
9
9
|
it { expect(concurrency.send(:rabbit)).to be_a(RubyRabbitmqJanus::Rabbit::Connect) }
|
10
10
|
it { expect(concurrency.send(:lock)).to be_a(Mutex) }
|
11
11
|
it { expect(concurrency.send(:condition)).to be_a(ConditionVariable) }
|
12
|
-
it { expect(concurrency.instance_variable_get(:@thread)).to be_a(RubyRabbitmqJanus::
|
12
|
+
it { expect(concurrency.instance_variable_get(:@thread)).to be_a(RubyRabbitmqJanus::Process::Concurrencies::KeepaliveThread) }
|
13
13
|
end
|
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe RubyRabbitmqJanus::
|
5
|
+
describe RubyRabbitmqJanus::Process::Concurrencies::KeepaliveThread, type: :thread, name: :keepalive_thread do
|
6
6
|
let(:instance) { RubyRabbitmqJanus::Models::JanusInstance.find((ENV['MONGO'].match?('true') ? %w[1 2] : [1, 2]).sample) }
|
7
|
-
let(:rabbit) { RubyRabbitmqJanus::
|
7
|
+
let(:rabbit) { RubyRabbitmqJanus::Process::Concurrencies::Concurrency.new.send(:rabbit) }
|
8
8
|
let(:concurrency) { described_class.new(instance, rabbit) { nil } }
|
9
9
|
|
10
10
|
it { expect(concurrency.instance_variable_get(:@session)).to be(nil) }
|
11
11
|
it { expect(concurrency.instance_variable_get(:@publisher)).to be(nil) }
|
12
12
|
it { expect(concurrency.instance_variable_get(:@rabbit)).to be_a(RubyRabbitmqJanus::Rabbit::Connect) }
|
13
|
-
it { expect(concurrency.instance_variable_get(:@timer)).to be_a(RubyRabbitmqJanus::
|
14
|
-
it { expect(concurrency.instance_variable_get(:@message)).to be_a(RubyRabbitmqJanus::
|
13
|
+
it { expect(concurrency.instance_variable_get(:@timer)).to be_a(RubyRabbitmqJanus::Process::Concurrencies::KeepaliveTimer) }
|
14
|
+
it { expect(concurrency.instance_variable_get(:@message)).to be_a(RubyRabbitmqJanus::Process::Concurrencies::KeepaliveMessage) }
|
15
15
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe RubyRabbitmqJanus::
|
5
|
+
describe RubyRabbitmqJanus::Process::Concurrencies::KeepaliveTimer, type: :thread, name: :keepalive_timer do
|
6
6
|
let(:concurrency) { described_class.new }
|
7
7
|
|
8
8
|
it { expect(concurrency.send(:time_to_live)).to be_a(Integer) }
|
data/spec/spec_helper.rb
CHANGED
@@ -4,23 +4,16 @@ require 'bundler/setup'
|
|
4
4
|
require 'pry'
|
5
5
|
require 'json-schema-rspec'
|
6
6
|
require 'rails'
|
7
|
-
require '
|
7
|
+
require 'factory_bot'
|
8
8
|
require 'database_cleaner'
|
9
9
|
ENV['MONGO'] = 'true' if ENV['MONGO'].nil?
|
10
|
-
|
11
|
-
require 'mongoid'
|
12
|
-
else
|
13
|
-
require_relative '../lib/rrj/tools/gem/config'
|
14
|
-
RubyRabbitmqJanus::Tools::Config.instance.options['gem']['orm'] = 'active_record'
|
15
|
-
require 'active_record'
|
16
|
-
end
|
10
|
+
require ENV['MONGO'].match?('true') ? 'mongoid' : 'active_record'
|
17
11
|
require 'timeout'
|
18
12
|
|
19
13
|
require 'ruby_rabbitmq_janus'
|
20
14
|
require 'config/initializer'
|
21
15
|
require 'config/database'
|
22
16
|
require 'config/instance'
|
23
|
-
Dir['spec/factories/*.rb'].each { |f| require File.expand_path(f) }
|
24
17
|
|
25
18
|
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
|
26
19
|
|
@@ -62,7 +55,12 @@ RSpec.configure do |config|
|
|
62
55
|
config.filter_run_excluding broken: true
|
63
56
|
|
64
57
|
# Configure Factory Girl
|
65
|
-
config.include
|
58
|
+
config.include FactoryBot::Syntax::Methods
|
59
|
+
|
60
|
+
# Load factory bot definition
|
61
|
+
config.before(:suite) do
|
62
|
+
FactoryBot.find_definitions
|
63
|
+
end
|
66
64
|
|
67
65
|
# Configure Initializer RRJ and create session with Janus Instance
|
68
66
|
config.before do |example|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_rabbitmq_janus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.2.pre.284
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VAILLANT Jeremy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -81,33 +81,25 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: factory_bot
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
90
|
-
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '4.8'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: fuubar
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
89
|
+
version: '5.1'
|
90
|
+
- - ">="
|
102
91
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
92
|
+
version: 5.1.1
|
104
93
|
type: :development
|
105
94
|
prerelease: false
|
106
95
|
version_requirements: !ruby/object:Gem::Requirement
|
107
96
|
requirements:
|
108
97
|
- - "~>"
|
109
98
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
99
|
+
version: '5.1'
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 5.1.1
|
111
103
|
- !ruby/object:Gem::Dependency
|
112
104
|
name: json-schema
|
113
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -458,12 +450,6 @@ files:
|
|
458
450
|
- lib/rrj/errors/janus/messages/admin.rb
|
459
451
|
- lib/rrj/errors/janus/messages/message.rb
|
460
452
|
- lib/rrj/errors/janus/messages/standard.rb
|
461
|
-
- lib/rrj/errors/janus/processus/concurency.rb
|
462
|
-
- lib/rrj/errors/janus/processus/event.rb
|
463
|
-
- lib/rrj/errors/janus/processus/keepalive.rb
|
464
|
-
- lib/rrj/errors/janus/processus/keepalive/initializer.rb
|
465
|
-
- lib/rrj/errors/janus/processus/keepalive/thread.rb
|
466
|
-
- lib/rrj/errors/janus/processus/keepalive/timer.rb
|
467
453
|
- lib/rrj/errors/janus/responses/admin.rb
|
468
454
|
- lib/rrj/errors/janus/responses/event.rb
|
469
455
|
- lib/rrj/errors/janus/responses/response.rb
|
@@ -472,6 +458,12 @@ files:
|
|
472
458
|
- lib/rrj/errors/janus/transactions/handle.rb
|
473
459
|
- lib/rrj/errors/janus/transactions/session.rb
|
474
460
|
- lib/rrj/errors/janus/transactions/transaction.rb
|
461
|
+
- lib/rrj/errors/process/concurency.rb
|
462
|
+
- lib/rrj/errors/process/event.rb
|
463
|
+
- lib/rrj/errors/process/keepalive.rb
|
464
|
+
- lib/rrj/errors/process/keepalive/initializer.rb
|
465
|
+
- lib/rrj/errors/process/keepalive/thread.rb
|
466
|
+
- lib/rrj/errors/process/keepalive/timer.rb
|
475
467
|
- lib/rrj/errors/rabbit/base_event.rb
|
476
468
|
- lib/rrj/errors/rabbit/connect.rb
|
477
469
|
- lib/rrj/errors/rabbit/listener/base.rb
|
@@ -500,13 +492,6 @@ files:
|
|
500
492
|
- lib/rrj/janus/messages/admin.rb
|
501
493
|
- lib/rrj/janus/messages/message.rb
|
502
494
|
- lib/rrj/janus/messages/standard.rb
|
503
|
-
- lib/rrj/janus/processus/concurrency.rb
|
504
|
-
- lib/rrj/janus/processus/event.rb
|
505
|
-
- lib/rrj/janus/processus/event_admin.rb
|
506
|
-
- lib/rrj/janus/processus/keepalive/keepalive_initializer.rb
|
507
|
-
- lib/rrj/janus/processus/keepalive/keepalive_message.rb
|
508
|
-
- lib/rrj/janus/processus/keepalive/keepalive_thread.rb
|
509
|
-
- lib/rrj/janus/processus/keepalive/keepalive_timer.rb
|
510
495
|
- lib/rrj/janus/responses/admin.rb
|
511
496
|
- lib/rrj/janus/responses/event.rb
|
512
497
|
- lib/rrj/janus/responses/janus_instance.rb
|
@@ -519,10 +504,18 @@ files:
|
|
519
504
|
- lib/rrj/janus/transactions/session.rb
|
520
505
|
- lib/rrj/janus/transactions/transaction.rb
|
521
506
|
- lib/rrj/models/active_record.rb
|
522
|
-
- lib/rrj/models/concerns/
|
523
|
-
- lib/rrj/models/concerns/
|
524
|
-
- lib/rrj/models/concerns/
|
507
|
+
- lib/rrj/models/concerns/callbacks.rb
|
508
|
+
- lib/rrj/models/concerns/instances.rb
|
509
|
+
- lib/rrj/models/concerns/methods.rb
|
510
|
+
- lib/rrj/models/concerns/validations.rb
|
525
511
|
- lib/rrj/models/mongoid.rb
|
512
|
+
- lib/rrj/process/concurrency.rb
|
513
|
+
- lib/rrj/process/event.rb
|
514
|
+
- lib/rrj/process/event_admin.rb
|
515
|
+
- lib/rrj/process/keepalive/keepalive_initializer.rb
|
516
|
+
- lib/rrj/process/keepalive/keepalive_message.rb
|
517
|
+
- lib/rrj/process/keepalive/keepalive_thread.rb
|
518
|
+
- lib/rrj/process/keepalive/keepalive_timer.rb
|
526
519
|
- lib/rrj/rabbit/base_event.rb
|
527
520
|
- lib/rrj/rabbit/connect.rb
|
528
521
|
- lib/rrj/rabbit/listener/base.rb
|
@@ -608,10 +601,6 @@ files:
|
|
608
601
|
- spec/responses/admin_set_log_level.json
|
609
602
|
- spec/responses/base_info.json
|
610
603
|
- spec/rrj/ruby_rabbitmq_janus_spec.rb
|
611
|
-
- spec/ruby_rabbitmq_janus/janus/concurrencies/concurrency_spec.rb
|
612
|
-
- spec/ruby_rabbitmq_janus/janus/concurrencies/keepalive_initializer_spec.rb
|
613
|
-
- spec/ruby_rabbitmq_janus/janus/concurrencies/keepalive_thread_spec.rb
|
614
|
-
- spec/ruby_rabbitmq_janus/janus/concurrencies/keepalive_timer_spec.rb
|
615
604
|
- spec/ruby_rabbitmq_janus/janus/messages/admin_spec.rb
|
616
605
|
- spec/ruby_rabbitmq_janus/janus/messages/message_spec.rb
|
617
606
|
- spec/ruby_rabbitmq_janus/janus/messages/standard_spec.rb
|
@@ -621,6 +610,10 @@ files:
|
|
621
610
|
- spec/ruby_rabbitmq_janus/janus/responses/standard_spec.rb
|
622
611
|
- spec/ruby_rabbitmq_janus/models/janus_instance_definition_spec.rb
|
623
612
|
- spec/ruby_rabbitmq_janus/models/janus_instance_spec.rb
|
613
|
+
- spec/ruby_rabbitmq_janus/process/concurrencies/concurrency_spec.rb
|
614
|
+
- spec/ruby_rabbitmq_janus/process/concurrencies/keepalive_initializer_spec.rb
|
615
|
+
- spec/ruby_rabbitmq_janus/process/concurrencies/keepalive_thread_spec.rb
|
616
|
+
- spec/ruby_rabbitmq_janus/process/concurrencies/keepalive_timer_spec.rb
|
624
617
|
- spec/ruby_rabbitmq_janus/rabbit/connect_spec.rb
|
625
618
|
- spec/ruby_rabbitmq_janus/rabbit/listener/from_spec.rb
|
626
619
|
- spec/ruby_rabbitmq_janus/rabbit/propertie_2_spec.rb
|
@@ -696,12 +689,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
696
689
|
requirements:
|
697
690
|
- - ">="
|
698
691
|
- !ruby/object:Gem::Version
|
699
|
-
version:
|
692
|
+
version: 2.5.0
|
700
693
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
701
694
|
requirements:
|
702
|
-
- - "
|
695
|
+
- - ">"
|
703
696
|
- !ruby/object:Gem::Version
|
704
|
-
version:
|
697
|
+
version: 1.3.1
|
705
698
|
requirements: []
|
706
699
|
rubygems_version: 3.0.6
|
707
700
|
signing_key:
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RubyRabbitmqJanus
|
4
|
-
module Errors
|
5
|
-
module Janus
|
6
|
-
# Define a super class for all error in Janus::Concurency::Event class
|
7
|
-
class BaseEvent < RubyRabbitmqJanus::Errors::Janus::BaseConcurency
|
8
|
-
def initialize(message)
|
9
|
-
super "[Event] #{message}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
module Event
|
14
|
-
# Error for Janus::Concurency::Event#initialize
|
15
|
-
class Initializer < RubyRabbitmqJanus::Errors::Janus::BaseEvent
|
16
|
-
def initializer
|
17
|
-
super 'Error Event initializer'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# Error for Janus::Concurency::Event#run
|
22
|
-
class Run < RubyRabbitmqJanus::Errors::Janus::BaseEvent
|
23
|
-
def initializer
|
24
|
-
super 'Error running block code'
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
|
4
|
-
# @see RubyRabbitmqJanus::Janus::Keepalive Keepalive thread
|
5
|
-
|
6
|
-
module RubyRabbitmqJanus
|
7
|
-
module Errors
|
8
|
-
module Janus
|
9
|
-
# Define a super class for all error in Janus::Concurency::Keepalive
|
10
|
-
class BaseKeepalive < RubyRabbitmqJanus::Errors::Janus::BaseConcurency
|
11
|
-
def initialize(message)
|
12
|
-
super "[Keepalive]#{message}"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'rrj/errors/janus/processus/keepalive/initializer'
|
20
|
-
require 'rrj/errors/janus/processus/keepalive/thread'
|
21
|
-
require 'rrj/errors/janus/processus/keepalive/timer'
|