ruby_rabbitmq_janus 2.5.1 → 2.6.0.pre.226

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/ruby_rabbitmq_janus +67 -0
  4. data/config/default.md +3 -0
  5. data/config/default.yml +6 -0
  6. data/lib/rrj/binary.rb +56 -0
  7. data/lib/rrj/errors/rabbit/base_event.rb +21 -0
  8. data/lib/rrj/errors/rabbit/listener/base.rb +29 -0
  9. data/lib/rrj/errors/rabbit/listener/from.rb +17 -0
  10. data/lib/rrj/errors/rabbit/listener/from_admin.rb +17 -0
  11. data/lib/rrj/errors/rabbit/listener/janus_instance.rb +17 -0
  12. data/lib/rrj/errors/rabbit/publisher/admin.rb +32 -0
  13. data/lib/rrj/errors/rabbit/publisher/base.rb +31 -0
  14. data/lib/rrj/errors/rabbit/publisher/exclusive.rb +33 -0
  15. data/lib/rrj/errors/rabbit/publisher/janus_instance.rb +23 -0
  16. data/lib/rrj/errors/rabbit/publisher/keepalive.rb +17 -0
  17. data/lib/rrj/errors/rabbit/publisher/non_exclusive.rb +33 -0
  18. data/lib/rrj/errors/rabbit/rabbit.rb +12 -6
  19. data/lib/rrj/info.rb +6 -5
  20. data/lib/rrj/init.rb +2 -2
  21. data/lib/rrj/janus/messages/message.rb +1 -1
  22. data/lib/rrj/janus/processus/event.rb +1 -1
  23. data/lib/rrj/janus/processus/keepalive/keepalive_thread.rb +3 -2
  24. data/lib/rrj/janus/responses/janus_instance.rb +28 -0
  25. data/lib/rrj/janus/responses/response.rb +1 -1
  26. data/lib/rrj/janus/transactions/admin.rb +1 -1
  27. data/lib/rrj/janus/transactions/handle.rb +1 -1
  28. data/lib/rrj/janus/transactions/transaction.rb +2 -2
  29. data/lib/rrj/models/concerns/janus_instance_callbacks.rb +9 -5
  30. data/lib/rrj/models/concerns/janus_instance_methods.rb +12 -0
  31. data/lib/rrj/rabbit/base_event.rb +47 -0
  32. data/lib/rrj/rabbit/connect.rb +12 -12
  33. data/lib/rrj/rabbit/{publish/listener.rb → listener/base.rb} +16 -18
  34. data/lib/rrj/rabbit/listener/from.rb +30 -0
  35. data/lib/rrj/rabbit/{publish/listener_admin.rb → listener/from_admin.rb} +6 -4
  36. data/lib/rrj/rabbit/listener/janus_instance.rb +36 -0
  37. data/lib/rrj/rabbit/{publish/publisher_admin.rb → publisher/admin.rb} +5 -10
  38. data/lib/rrj/rabbit/{publish/publisher.rb → publisher/base.rb} +10 -8
  39. data/lib/rrj/rabbit/{publish → publisher}/exclusive.rb +3 -3
  40. data/lib/rrj/rabbit/publisher/janus_instance.rb +27 -0
  41. data/lib/rrj/rabbit/{publish → publisher}/keepalive.rb +4 -2
  42. data/lib/rrj/rabbit/{publish → publisher}/non_exclusive.rb +3 -7
  43. data/lib/rrj/rabbit/rabbit.rb +1 -1
  44. data/lib/rrj/tools/gem/cluster.rb +0 -17
  45. data/lib/rrj/tools/gem/config.rb +9 -0
  46. data/lib/rrj/tools/gem/log.rb +3 -4
  47. data/lib/rrj/tools/gem/option.rb +2 -12
  48. data/lib/rrj/tools/replaces/admin.rb +4 -4
  49. data/lib/rrj/tools/replaces/handle.rb +6 -6
  50. data/lib/rrj/tools/replaces/replace.rb +6 -6
  51. data/lib/rrj/tools/replaces/session.rb +4 -4
  52. data/spec/factories/janus_instance.rb +1 -1
  53. data/spec/request/admin/request_allow_token_spec.rb +1 -0
  54. data/spec/request/admin/request_disallow_token_spec.rb +1 -0
  55. data/spec/request/admin/request_handle_info_spec.rb +1 -0
  56. data/spec/request/admin/request_list_handles_spec.rb +1 -0
  57. data/spec/request/admin/request_list_sessions_spec.rb +1 -0
  58. data/spec/request/admin/request_start_pcap_spec.rb +1 -0
  59. data/spec/request/admin/request_start_text2pcap_spec.rb +1 -0
  60. data/spec/request/admin/request_stop_pcap_spec.rb +1 -0
  61. data/spec/request/admin/request_stop_text2pcap_spec.rb +1 -0
  62. data/spec/request/base/request_attach_spec.rb +1 -1
  63. data/spec/request/base/request_create_spec.rb +2 -2
  64. data/spec/request/base/request_destroy_spec.rb +1 -1
  65. data/spec/request/base/request_detach_spec.rb +1 -1
  66. data/spec/request/base/request_info_spec.rb +2 -2
  67. data/spec/request/base/request_keepalive_spec.rb +1 -1
  68. data/spec/request/peer/request_offer_spec.rb +1 -1
  69. data/spec/request/peer/request_trickle_spec.rb +1 -1
  70. data/spec/request/peer/request_trickles_spec.rb +1 -1
  71. data/spec/rrj/{rrj_spec.rb → ruby_rabbitmq_janus_spec.rb} +21 -11
  72. data/spec/{thread/concurencies_spec.rb → ruby_rabbitmq_janus/janus/concurrencies/concurrency_spec.rb} +1 -1
  73. data/spec/{thread → ruby_rabbitmq_janus/janus/concurrencies}/keepalive_initializer_spec.rb +3 -2
  74. data/spec/{thread → ruby_rabbitmq_janus/janus/concurrencies}/keepalive_thread_spec.rb +3 -3
  75. data/spec/{thread → ruby_rabbitmq_janus/janus/concurrencies}/keepalive_timer_spec.rb +1 -1
  76. data/spec/{rrj/messages/messages_admin_spec.rb → ruby_rabbitmq_janus/janus/messages/admin_spec.rb} +1 -1
  77. data/spec/{rrj/messages/messages_message_spec.rb → ruby_rabbitmq_janus/janus/messages/message_spec.rb} +2 -1
  78. data/spec/{rrj/messages/messages_standard_spec.rb → ruby_rabbitmq_janus/janus/messages/standard_spec.rb} +1 -1
  79. data/spec/{rrj/responses/responses_admin_spec.rb → ruby_rabbitmq_janus/janus/responses/admin_spec.rb} +1 -1
  80. data/spec/{rrj/responses/responses_event_spec.rb → ruby_rabbitmq_janus/janus/responses/event_spec.rb} +3 -2
  81. data/spec/{rrj/responses/responses_response_spec.rb → ruby_rabbitmq_janus/janus/responses/response_spec.rb} +3 -3
  82. data/spec/{rrj/responses/responses_standard_spec.rb → ruby_rabbitmq_janus/janus/responses/standard_spec.rb} +4 -3
  83. data/spec/{rrj → ruby_rabbitmq_janus}/models/janus_instance_definition_spec.rb +2 -2
  84. data/spec/{rrj/models/janus_instance_transaction_spec.rb → ruby_rabbitmq_janus/models/janus_instance_spec.rb} +10 -9
  85. data/spec/{rrj → ruby_rabbitmq_janus}/rabbit/connect_spec.rb +1 -1
  86. data/spec/ruby_rabbitmq_janus/rabbit/listener/from_spec.rb +15 -0
  87. data/spec/{rrj → ruby_rabbitmq_janus}/rabbit/propertie_2_spec.rb +3 -3
  88. data/spec/{rrj → ruby_rabbitmq_janus}/rabbit/propertie_spec.rb +3 -3
  89. data/spec/ruby_rabbitmq_janus/rabbit/publisher/admin_spec.rb +12 -0
  90. data/spec/{rrj/rabbit/publish/base_publisher_spec.rb → ruby_rabbitmq_janus/rabbit/publisher/base_spec.rb} +3 -3
  91. data/spec/{rrj/rabbit/publish → ruby_rabbitmq_janus/rabbit/publisher}/exclusive_spec.rb +0 -0
  92. data/spec/{rrj/rabbit/publish → ruby_rabbitmq_janus/rabbit/publisher}/non_exclusive_spec.rb +0 -0
  93. data/spec/{rrj/tools/gem/rrj_cluster_spec.rb → ruby_rabbitmq_janus/tools/cluster_spec.rb} +1 -21
  94. data/spec/{rrj/tools/gem/rrj_config_spec.rb → ruby_rabbitmq_janus/tools/config_spec.rb} +26 -14
  95. data/spec/{rrj/tools/gem/rrj_log_spec.rb → ruby_rabbitmq_janus/tools/log_spec.rb} +10 -10
  96. data/spec/{rrj/tools/replace/replace_admin_spec.rb → ruby_rabbitmq_janus/tools/replaces/admin_spec.rb} +15 -15
  97. data/spec/{rrj/tools/replace/replace_handle_spec.rb → ruby_rabbitmq_janus/tools/replaces/handle_spec.rb} +14 -14
  98. data/spec/{rrj/tools/replace → ruby_rabbitmq_janus/tools/replaces}/replace_spec.rb +16 -17
  99. data/spec/{rrj/tools/replace/replace_session_spec.rb → ruby_rabbitmq_janus/tools/replaces/session_spec.rb} +14 -14
  100. data/spec/{rrj/tools/replace → ruby_rabbitmq_janus/tools}/type_spec.rb +19 -19
  101. data/spec/spec_helper.rb +1 -1
  102. data/spec/support/examples_request.rb +1 -1
  103. data/spec/support/type.rb +3 -3
  104. metadata +83 -59
  105. data/lib/rrj/errors/rabbit/publish/admin.rb +0 -30
  106. data/lib/rrj/errors/rabbit/publish/base_publisher.rb +0 -23
  107. data/lib/rrj/errors/rabbit/publish/exclusive.rb +0 -31
  108. data/lib/rrj/errors/rabbit/publish/listener.rb +0 -30
  109. data/lib/rrj/errors/rabbit/publish/non_exclusive.rb +0 -31
  110. data/lib/rrj/errors/rabbit/publish/publisher.rb +0 -38
  111. data/lib/rrj/rabbit/publish/base_publisher.rb +0 -50
  112. data/spec/rrj/rabbit/publish/admin_spec.rb +0 -12
  113. data/spec/rrj/rabbit/publish/listener_spec.rb +0 -15
  114. data/spec/rrj/rabbit/publish/publisher_spec.rb +0 -13
@@ -2,67 +2,66 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe 'RubyRabbitmqJanus::Log', type: :tools, name: :replace do
5
+ describe RubyRabbitmqJanus::Tools::Replaces::Replace, type: :tools, name: :replace do
6
6
  subject(:replace) do
7
7
  # Get request JSON file
8
8
  rqe = RubyRabbitmqJanus::Tools::Requests.instance.requests['test::type']
9
9
  # Open request file
10
- RubyRabbitmqJanus::Tools::Replaces::Replace.new(JSON.parse(File.read(rqe)),
11
- options)
10
+ described_class.new(JSON.parse(File.read(rqe)), options)
12
11
  end
13
12
 
14
- context 'replace classic element' do
13
+ context 'when replace classic element' do
15
14
  let(:options) { { 'replace' => {}, 'add' => {} } }
16
15
 
17
- context 'transform request' do
16
+ context 'with ransform request' do
18
17
  it { expect(replace.transform_request).to be_kind_of(Hash) }
19
18
  end
20
19
 
21
- context 'transform request session_id' do
20
+ context 'with ransform request session_id' do
22
21
  include_examples 'test replace in request nil', 'session_id'
23
22
  end
24
23
 
25
- context 'transform request transaction' do
24
+ context 'with ransform request transaction' do
26
25
  include_examples 'test replace in request nil', 'transaction'
27
26
  end
28
27
 
29
- context 'transform request handle_id' do
28
+ context 'with ransform request handle_id' do
30
29
  include_examples 'test replace in request nil', 'handle_id'
31
30
  end
32
31
 
33
- context 'transform request plugin' do
32
+ context 'with ransform request plugin' do
34
33
  include_examples 'test replace in request nil', 'plugin'
35
34
  end
36
35
 
37
- context 'transform request candidate' do
36
+ context 'with ransform request candidate' do
38
37
  include_examples 'test replace in request nil', 'candidate'
39
38
  end
40
39
 
41
- context 'transform request candidates' do
40
+ context 'with ransform request candidates' do
42
41
  include_examples 'test replace in request nil', 'candidates'
43
42
  end
44
43
 
45
- context 'transform request audio' do
44
+ context 'with ransform request audio' do
46
45
  include_examples 'test replace in request nil', 'audio'
47
46
  end
48
47
 
49
- context 'transform request plugin1' do
48
+ context 'with ransform request plugin1' do
50
49
  include_examples 'test replace in request nil', 'plugin1'
51
50
  end
52
51
 
53
- context 'transform request first_plugin' do
52
+ context 'with ransform request first_plugin' do
54
53
  include_examples 'test replace in request nil', 'first_plugin'
55
54
  end
56
55
 
57
- context 'transform request sdp' do
56
+ context 'with ransform request sdp' do
58
57
  include_examples 'test replace in request nil', 'sdp'
59
58
  end
60
59
 
61
- context 'transform request debug' do
60
+ context 'with ransform request debug' do
62
61
  include_examples 'test replace in request nil', 'debug'
63
62
  end
64
63
 
65
- context 'transform request level' do
64
+ context 'with ransform request level' do
66
65
  include_examples 'test replace in request nil', 'level'
67
66
  end
68
67
  end
@@ -2,16 +2,15 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe 'RubyRabbitmqJanus::Log', type: :tools, name: :replace_session do
5
+ describe RubyRabbitmqJanus::Tools::Replaces::Session, type: :tools, name: :replace_session do
6
6
  subject(:replace) do
7
7
  # Get request JSON file
8
8
  rqe = RubyRabbitmqJanus::Tools::Requests.instance.requests['test::replace']
9
9
  # Open request file
10
- RubyRabbitmqJanus::Tools::Replaces::Session.new(JSON.parse(File.read(rqe)),
11
- options)
10
+ described_class.new(JSON.parse(File.read(rqe)), options)
12
11
  end
13
12
 
14
- context 'replace classic element' do
13
+ context 'when replace classic element' do
15
14
  let(:opt_session) { Random.rand(123_456_789..987_654_321) }
16
15
  let(:opt_plugin) { 'janus.plugin.echotest' }
17
16
  let(:options) do
@@ -22,44 +21,45 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :replace_session do
22
21
  }
23
22
  end
24
23
 
25
- context 'transform request' do
24
+ context 'with ransform request' do
26
25
  it { expect(replace.transform_request).to be_kind_of(Hash) }
27
26
  end
28
27
 
29
- context 'transform request session_id' do
28
+ context 'with ransform request session_id' do
30
29
  include_examples 'test replace in request', 'session_id', Integer
31
30
  end
32
31
 
33
- context 'transform request transaction' do
32
+ context 'with ransform request transaction' do
34
33
  include_examples 'test replace in request nil', 'transaction'
35
34
  end
36
35
 
37
- context 'transform request handle_id' do
36
+ context 'with ransform request handle_id' do
38
37
  include_examples 'test replace in request nil', 'handle_id'
39
38
  end
40
39
 
41
- context 'transform request plugin' do
40
+ context 'with ransform request plugin' do
42
41
  include_examples 'test replace in request', 'plugin', String
43
42
  end
44
43
 
45
- context 'transform request candidates' do
44
+ context 'with ransform request candidates' do
46
45
  include_examples 'test replace in request nil', 'candidates'
47
46
  end
48
47
 
49
- context 'transform request audio' do
48
+ context 'with ransform request audio' do
50
49
  include_examples 'test replace in request nil', 'audio'
51
50
  end
52
51
 
53
- context 'transform request sdp' do
52
+ context 'with ransform request sdp' do
54
53
  let(:key) { 'jsep' }
54
+
55
55
  include_examples 'test replace in request nil', 'sdp'
56
56
  end
57
57
 
58
- context 'transform request debug' do
58
+ context 'with ransform request debug' do
59
59
  include_examples 'test replace in request nil', 'debug'
60
60
  end
61
61
 
62
- context 'transform request level' do
62
+ context 'with ransform request level' do
63
63
  include_examples 'test replace in request nil', 'level'
64
64
  end
65
65
  end
@@ -2,57 +2,57 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
5
+ describe RubyRabbitmqJanus::Tools::Type, type: :tools, name: :type do
6
6
  subject(:converter) do
7
7
  # Get request JSON file
8
8
  rqe = RubyRabbitmqJanus::Tools::Requests.instance.requests['test::type']
9
9
  # Open request file
10
- RubyRabbitmqJanus::Tools::Type.new(JSON.parse(File.read(rqe)))
10
+ described_class.new(JSON.parse(File.read(rqe)))
11
11
  end
12
12
 
13
- context 'convert transaction' do
13
+ context 'when convert transaction' do
14
14
  let(:key) { 'transaction' }
15
15
  let(:value) { /.*[A-Z0-9]/ }
16
16
 
17
17
  include_examples 'match convert type', String, 10
18
18
  end
19
19
 
20
- context 'convert string' do
20
+ context 'when convert string' do
21
21
  let(:key) { 'sdp' }
22
22
  let(:value) { 'v=0\r\no=[..more sdp stuff..]' }
23
23
 
24
24
  include_examples 'test convert type', String
25
25
  end
26
26
 
27
- context 'convert number' do
27
+ context 'when convert number' do
28
28
  let(:key) { 'handle_id' }
29
29
  let(:value) { Random.rand(123_456_789..987_654_321) }
30
30
 
31
31
  include_examples 'test convert type', Integer
32
32
  end
33
33
 
34
- context 'convert integer' do
34
+ context 'when convert integer' do
35
35
  let(:key) { 'session_id' }
36
36
  let(:value) { Random.rand(123_456_789..987_654_321) }
37
37
 
38
38
  include_examples 'test convert type', Integer
39
39
  end
40
40
 
41
- context 'convert boolean true' do
41
+ context 'when convert boolean true' do
42
42
  let(:key) { 'audio' }
43
43
  let(:value) { true }
44
44
 
45
45
  include_examples 'test convert type', TrueClass
46
46
  end
47
47
 
48
- context 'convert boolean false' do
48
+ context 'when convert boolean false' do
49
49
  let(:key) { 'audio' }
50
50
  let(:value) { false }
51
51
 
52
52
  include_examples 'test convert type', FalseClass
53
53
  end
54
54
 
55
- context 'convert boolean "true"' do
55
+ context 'when convert boolean "true"' do
56
56
  let(:key) { 'audio' }
57
57
  let(:value) { 'true' }
58
58
  let(:value_return) { true }
@@ -60,7 +60,7 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
60
60
  include_examples 'test convert type', TrueClass
61
61
  end
62
62
 
63
- context 'convert boolean "false"' do
63
+ context 'when convert boolean "false"' do
64
64
  let(:key) { 'audio' }
65
65
  let(:value) { 'false' }
66
66
  let(:value_return) { false }
@@ -68,28 +68,28 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
68
68
  include_examples 'test convert type', FalseClass
69
69
  end
70
70
 
71
- context 'convert plugin #0' do
71
+ context 'when convert plugin #0' do
72
72
  let(:key) { 'first_plugin' }
73
73
  let(:value) { 'janus.plugin.echotest' }
74
74
 
75
75
  include_examples 'test convert type', String
76
76
  end
77
77
 
78
- context 'convert plugin #1' do
78
+ context 'when convert plugin #1' do
79
79
  let(:key) { 'plugin1' }
80
80
  let(:value) { 'janus.plugin.videoroom' }
81
81
 
82
82
  include_examples 'test convert type', String
83
83
  end
84
84
 
85
- context 'convert plugin #2' do
85
+ context 'when convert plugin #2' do
86
86
  let(:key) { 'plugin' }
87
87
  let(:value) { 'janus.plugin.sip' }
88
88
 
89
89
  include_examples 'test convert type', String
90
90
  end
91
91
 
92
- context 'convert array with one data' do
92
+ context 'when convert array with one data' do
93
93
  let(:key) { 'candidate' }
94
94
  let(:value) { { super: 'top', array: 'alone' } }
95
95
  let(:value_return) { [key, value] }
@@ -97,7 +97,7 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
97
97
  include_examples 'test convert type', Array
98
98
  end
99
99
 
100
- context 'convert array with many data' do
100
+ context 'when convert array with many data' do
101
101
  let(:size) { 2 }
102
102
  let(:key) { 'candidates' }
103
103
  let(:value) do
@@ -111,7 +111,7 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
111
111
  include_examples 'test convert type array', Array, 2
112
112
  end
113
113
 
114
- context 'convert array random value candidate' do
114
+ context 'when convert array random value candidate' do
115
115
  let(:size) { Random.rand(2..99) }
116
116
  let(:key) { 'candidates' }
117
117
  let(:value) do
@@ -125,7 +125,7 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
125
125
  include_examples 'test convert type array', Array
126
126
  end
127
127
 
128
- context 'convert array with one data' do
128
+ context 'when convert array with one data' do
129
129
  let(:key) { 'candidates' }
130
130
  let(:value) { [{ one: 'data', and: 'smiley', cool: ':-)' }] }
131
131
  let(:value_hash) { value[0] }
@@ -134,14 +134,14 @@ describe 'RubyRabbitmqJanus::Log', type: :tools, name: :type do
134
134
  include_examples 'test convert type hash', Array
135
135
  end
136
136
 
137
- context 'convert debug' do
137
+ context 'when convert debug' do
138
138
  let(:key) { 'debug' }
139
139
  let(:value) { false }
140
140
 
141
141
  include_examples 'test convert type', FalseClass
142
142
  end
143
143
 
144
- context 'convert level' do
144
+ context 'when convert level' do
145
145
  let(:key) { 'level' }
146
146
  let(:value) { Random.rand(1..7) }
147
147
 
data/spec/spec_helper.rb CHANGED
@@ -59,7 +59,7 @@ RSpec.configure do |config|
59
59
  config.include FactoryGirl::Syntax::Methods
60
60
 
61
61
  # Configure Initializer RRJ and create session with Janus Instance
62
- config.before(:example) do |example|
62
+ config.before do |example|
63
63
  unless example.metadata[:type].match?(/tools/)
64
64
  after_load_database
65
65
  initializer_rrj(example.metadata)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  shared_examples 'empty response' do
4
- it 'should match JSON empty' do
4
+ it 'matches JSON empty' do
5
5
  message
6
6
  expect(@response.to_json).to eq('{}')
7
7
  end
data/spec/support/type.rb CHANGED
@@ -31,7 +31,7 @@ shared_examples 'test replace in request' do |element, type|
31
31
  let(:transform) { replace.transform_request }
32
32
  let(:value) { defined?(value_return) ? value_return : element }
33
33
 
34
- include_examples 'keys', element
34
+ include_examples 'with keys', element
35
35
 
36
36
  it { expect(keys).to be_kind_of(type) }
37
37
  it { expect(keys).to eql(options[value]) }
@@ -40,7 +40,7 @@ end
40
40
  shared_examples 'test replace in request nil' do |element|
41
41
  let(:transform) { replace.transform_request }
42
42
 
43
- include_examples 'keys', element
43
+ include_examples 'with keys', element
44
44
 
45
45
  it 'option should equal nil' do
46
46
  expect(options[element]).to be(nil)
@@ -55,7 +55,7 @@ shared_examples 'test replace in request nil' do |element|
55
55
  end
56
56
  end
57
57
 
58
- shared_examples 'keys' do |element|
58
+ shared_context 'with keys' do |element|
59
59
  let(:keys) do
60
60
  if defined?(key)
61
61
  transform[key][element]
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.5.1
4
+ version: 2.6.0.pre.226
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-03-15 00:00:00.000000000 Z
11
+ date: 2019-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '4.5'
215
+ version: 5.4.0
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '4.5'
222
+ version: 5.4.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: rspec
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -240,28 +240,42 @@ dependencies:
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: 0.65.0
243
+ version: 0.73.0
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: 0.65.0
250
+ version: 0.73.0
251
+ - !ruby/object:Gem::Dependency
252
+ name: rubocop-performance
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '1.4'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '1.4'
251
265
  - !ruby/object:Gem::Dependency
252
266
  name: rubocop-rspec
253
267
  requirement: !ruby/object:Gem::Requirement
254
268
  requirements:
255
269
  - - "~>"
256
270
  - !ruby/object:Gem::Version
257
- version: '1.32'
271
+ version: '1.34'
258
272
  type: :development
259
273
  prerelease: false
260
274
  version_requirements: !ruby/object:Gem::Requirement
261
275
  requirements:
262
276
  - - "~>"
263
277
  - !ruby/object:Gem::Version
264
- version: '1.32'
278
+ version: '1.34'
265
279
  - !ruby/object:Gem::Dependency
266
280
  name: sqlite3
267
281
  requirement: !ruby/object:Gem::Requirement
@@ -382,7 +396,8 @@ description: |2
382
396
  decoded and returned through the Rails API.
383
397
  email:
384
398
  - jeremy@dazzl.tv
385
- executables: []
399
+ executables:
400
+ - ruby_rabbitmq_janus
386
401
  extensions: []
387
402
  extra_rdoc_files: []
388
403
  files:
@@ -390,6 +405,7 @@ files:
390
405
  - LICENSE
391
406
  - README.md
392
407
  - Rakefile
408
+ - bin/ruby_rabbitmq_janus
393
409
  - config/default.md
394
410
  - config/default.yml
395
411
  - config/requests.md
@@ -432,6 +448,7 @@ files:
432
448
  - lib/generators/ruby_rabbitmq_janus/templates/initializer.rb
433
449
  - lib/generators/ruby_rabbitmq_janus/templates/migration.rb
434
450
  - lib/rrj/admin.rb
451
+ - lib/rrj/binary.rb
435
452
  - lib/rrj/errors/base/admin.rb
436
453
  - lib/rrj/errors/base/base.rb
437
454
  - lib/rrj/errors/base/init.rb
@@ -455,14 +472,19 @@ files:
455
472
  - lib/rrj/errors/janus/transactions/handle.rb
456
473
  - lib/rrj/errors/janus/transactions/session.rb
457
474
  - lib/rrj/errors/janus/transactions/transaction.rb
475
+ - lib/rrj/errors/rabbit/base_event.rb
458
476
  - lib/rrj/errors/rabbit/connect.rb
477
+ - lib/rrj/errors/rabbit/listener/base.rb
478
+ - lib/rrj/errors/rabbit/listener/from.rb
479
+ - lib/rrj/errors/rabbit/listener/from_admin.rb
480
+ - lib/rrj/errors/rabbit/listener/janus_instance.rb
459
481
  - lib/rrj/errors/rabbit/propertie.rb
460
- - lib/rrj/errors/rabbit/publish/admin.rb
461
- - lib/rrj/errors/rabbit/publish/base_publisher.rb
462
- - lib/rrj/errors/rabbit/publish/exclusive.rb
463
- - lib/rrj/errors/rabbit/publish/listener.rb
464
- - lib/rrj/errors/rabbit/publish/non_exclusive.rb
465
- - lib/rrj/errors/rabbit/publish/publisher.rb
482
+ - lib/rrj/errors/rabbit/publisher/admin.rb
483
+ - lib/rrj/errors/rabbit/publisher/base.rb
484
+ - lib/rrj/errors/rabbit/publisher/exclusive.rb
485
+ - lib/rrj/errors/rabbit/publisher/janus_instance.rb
486
+ - lib/rrj/errors/rabbit/publisher/keepalive.rb
487
+ - lib/rrj/errors/rabbit/publisher/non_exclusive.rb
466
488
  - lib/rrj/errors/rabbit/rabbit.rb
467
489
  - lib/rrj/errors/tools/gem/cluster.rb
468
490
  - lib/rrj/errors/tools/gem/config.rb
@@ -487,6 +509,7 @@ files:
487
509
  - lib/rrj/janus/processus/keepalive/keepalive_timer.rb
488
510
  - lib/rrj/janus/responses/admin.rb
489
511
  - lib/rrj/janus/responses/event.rb
512
+ - lib/rrj/janus/responses/janus_instance.rb
490
513
  - lib/rrj/janus/responses/response.rb
491
514
  - lib/rrj/janus/responses/standard.rb
492
515
  - lib/rrj/janus/transactions/admin.rb
@@ -498,16 +521,19 @@ files:
498
521
  - lib/rrj/models/concerns/janus_instance_methods.rb
499
522
  - lib/rrj/models/concerns/janus_instance_validations.rb
500
523
  - lib/rrj/models/mongoid.rb
524
+ - lib/rrj/rabbit/base_event.rb
501
525
  - lib/rrj/rabbit/connect.rb
526
+ - lib/rrj/rabbit/listener/base.rb
527
+ - lib/rrj/rabbit/listener/from.rb
528
+ - lib/rrj/rabbit/listener/from_admin.rb
529
+ - lib/rrj/rabbit/listener/janus_instance.rb
502
530
  - lib/rrj/rabbit/propertie.rb
503
- - lib/rrj/rabbit/publish/base_publisher.rb
504
- - lib/rrj/rabbit/publish/exclusive.rb
505
- - lib/rrj/rabbit/publish/keepalive.rb
506
- - lib/rrj/rabbit/publish/listener.rb
507
- - lib/rrj/rabbit/publish/listener_admin.rb
508
- - lib/rrj/rabbit/publish/non_exclusive.rb
509
- - lib/rrj/rabbit/publish/publisher.rb
510
- - lib/rrj/rabbit/publish/publisher_admin.rb
531
+ - lib/rrj/rabbit/publisher/admin.rb
532
+ - lib/rrj/rabbit/publisher/base.rb
533
+ - lib/rrj/rabbit/publisher/exclusive.rb
534
+ - lib/rrj/rabbit/publisher/janus_instance.rb
535
+ - lib/rrj/rabbit/publisher/keepalive.rb
536
+ - lib/rrj/rabbit/publisher/non_exclusive.rb
511
537
  - lib/rrj/rabbit/rabbit.rb
512
538
  - lib/rrj/railtie.rb
513
539
  - lib/rrj/task.rb
@@ -562,33 +588,36 @@ files:
562
588
  - spec/request/peer/request_offer_spec.rb
563
589
  - spec/request/peer/request_trickle_spec.rb
564
590
  - spec/request/peer/request_trickles_spec.rb
565
- - spec/rrj/messages/messages_admin_spec.rb
566
- - spec/rrj/messages/messages_message_spec.rb
567
- - spec/rrj/messages/messages_standard_spec.rb
568
- - spec/rrj/models/janus_instance_definition_spec.rb
569
- - spec/rrj/models/janus_instance_transaction_spec.rb
570
- - spec/rrj/rabbit/connect_spec.rb
571
- - spec/rrj/rabbit/propertie_2_spec.rb
572
- - spec/rrj/rabbit/propertie_spec.rb
573
- - spec/rrj/rabbit/publish/admin_spec.rb
574
- - spec/rrj/rabbit/publish/base_publisher_spec.rb
575
- - spec/rrj/rabbit/publish/exclusive_spec.rb
576
- - spec/rrj/rabbit/publish/listener_spec.rb
577
- - spec/rrj/rabbit/publish/non_exclusive_spec.rb
578
- - spec/rrj/rabbit/publish/publisher_spec.rb
579
- - spec/rrj/responses/responses_admin_spec.rb
580
- - spec/rrj/responses/responses_event_spec.rb
581
- - spec/rrj/responses/responses_response_spec.rb
582
- - spec/rrj/responses/responses_standard_spec.rb
583
- - spec/rrj/rrj_spec.rb
584
- - spec/rrj/tools/gem/rrj_cluster_spec.rb
585
- - spec/rrj/tools/gem/rrj_config_spec.rb
586
- - spec/rrj/tools/gem/rrj_log_spec.rb
587
- - spec/rrj/tools/replace/replace_admin_spec.rb
588
- - spec/rrj/tools/replace/replace_handle_spec.rb
589
- - spec/rrj/tools/replace/replace_session_spec.rb
590
- - spec/rrj/tools/replace/replace_spec.rb
591
- - spec/rrj/tools/replace/type_spec.rb
591
+ - spec/rrj/ruby_rabbitmq_janus_spec.rb
592
+ - spec/ruby_rabbitmq_janus/janus/concurrencies/concurrency_spec.rb
593
+ - spec/ruby_rabbitmq_janus/janus/concurrencies/keepalive_initializer_spec.rb
594
+ - spec/ruby_rabbitmq_janus/janus/concurrencies/keepalive_thread_spec.rb
595
+ - spec/ruby_rabbitmq_janus/janus/concurrencies/keepalive_timer_spec.rb
596
+ - spec/ruby_rabbitmq_janus/janus/messages/admin_spec.rb
597
+ - spec/ruby_rabbitmq_janus/janus/messages/message_spec.rb
598
+ - spec/ruby_rabbitmq_janus/janus/messages/standard_spec.rb
599
+ - spec/ruby_rabbitmq_janus/janus/responses/admin_spec.rb
600
+ - spec/ruby_rabbitmq_janus/janus/responses/event_spec.rb
601
+ - spec/ruby_rabbitmq_janus/janus/responses/response_spec.rb
602
+ - spec/ruby_rabbitmq_janus/janus/responses/standard_spec.rb
603
+ - spec/ruby_rabbitmq_janus/models/janus_instance_definition_spec.rb
604
+ - spec/ruby_rabbitmq_janus/models/janus_instance_spec.rb
605
+ - spec/ruby_rabbitmq_janus/rabbit/connect_spec.rb
606
+ - spec/ruby_rabbitmq_janus/rabbit/listener/from_spec.rb
607
+ - spec/ruby_rabbitmq_janus/rabbit/propertie_2_spec.rb
608
+ - spec/ruby_rabbitmq_janus/rabbit/propertie_spec.rb
609
+ - spec/ruby_rabbitmq_janus/rabbit/publisher/admin_spec.rb
610
+ - spec/ruby_rabbitmq_janus/rabbit/publisher/base_spec.rb
611
+ - spec/ruby_rabbitmq_janus/rabbit/publisher/exclusive_spec.rb
612
+ - spec/ruby_rabbitmq_janus/rabbit/publisher/non_exclusive_spec.rb
613
+ - spec/ruby_rabbitmq_janus/tools/cluster_spec.rb
614
+ - spec/ruby_rabbitmq_janus/tools/config_spec.rb
615
+ - spec/ruby_rabbitmq_janus/tools/log_spec.rb
616
+ - spec/ruby_rabbitmq_janus/tools/replaces/admin_spec.rb
617
+ - spec/ruby_rabbitmq_janus/tools/replaces/handle_spec.rb
618
+ - spec/ruby_rabbitmq_janus/tools/replaces/replace_spec.rb
619
+ - spec/ruby_rabbitmq_janus/tools/replaces/session_spec.rb
620
+ - spec/ruby_rabbitmq_janus/tools/type_spec.rb
592
621
  - spec/spec_helper.rb
593
622
  - spec/support/admin_requester.rb
594
623
  - spec/support/aruba.rb
@@ -620,18 +649,13 @@ files:
620
649
  - spec/support/schemas/request/peer/trickle.json
621
650
  - spec/support/sdp.rb
622
651
  - spec/support/type.rb
623
- - spec/thread/concurencies_spec.rb
624
- - spec/thread/keepalive_initializer_spec.rb
625
- - spec/thread/keepalive_thread_spec.rb
626
- - spec/thread/keepalive_timer_spec.rb
627
652
  homepage: https://github.com/dazzl-tv/ruby-rabbitmq-janus
628
653
  licenses:
629
654
  - MIT
630
655
  metadata: {}
631
656
  post_install_message: |-
657
+ https://github.com/dazzl-tv/ruby-rabbitmq-janus
632
658
  # ====================================================== #
633
- # Thanks for installing RRJ ! #
634
- # https://github.com/dazzl-tv/ruby-rabbitmq-janus. #
635
659
  # ;;;;;;;;;;;:. #
636
660
  # ;;;;;;;;;;;;;;;;;; #
637
661
  # ;;;;;;;;;;;:;;;;;;;; #
@@ -656,11 +680,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
656
680
  version: '0'
657
681
  required_rubygems_version: !ruby/object:Gem::Requirement
658
682
  requirements:
659
- - - ">="
683
+ - - ">"
660
684
  - !ruby/object:Gem::Version
661
- version: '0'
685
+ version: 1.3.1
662
686
  requirements: []
663
- rubygems_version: 3.0.3
687
+ rubygems_version: 3.0.4
664
688
  signing_key:
665
689
  specification_version: 4
666
690
  summary: Ruby RabbitMQ Janus