ruby_rabbitmq_janus 1.2.9 → 2.0.0.pre.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/README.md +145 -32
  4. data/config/default.yml +2 -0
  5. data/config/requests.md +2 -1
  6. data/config/requests/admin/add_token.json +6 -0
  7. data/config/requests/admin/allow_token.json +6 -0
  8. data/config/requests/admin/disallow_token.json +6 -0
  9. data/config/requests/admin/handle_info.json +1 -1
  10. data/config/requests/admin/handles.json +1 -1
  11. data/config/requests/admin/remove_token.json +6 -0
  12. data/config/requests/admin/sessions.json +1 -1
  13. data/config/requests/admin/set_locking_debug.json +6 -0
  14. data/config/requests/admin/{log_level.json → set_log_level.json} +1 -1
  15. data/config/requests/admin/tokens.json +5 -0
  16. data/config/requests/base/attach.json +1 -1
  17. data/config/requests/base/create.json +1 -1
  18. data/config/requests/base/destroy.json +1 -1
  19. data/config/requests/base/detach.json +1 -1
  20. data/config/requests/base/info.json +1 -1
  21. data/config/requests/base/keepalive.json +1 -1
  22. data/config/requests/peer/answer.json +1 -1
  23. data/config/requests/peer/offer.json +1 -1
  24. data/config/requests/peer/trickle.json +1 -1
  25. data/lib/generators/ruby_rabbitmq_janus/initializer_generator.rb +3 -0
  26. data/lib/rrj/admin.rb +34 -0
  27. data/lib/rrj/errors/error.rb +2 -1
  28. data/lib/rrj/errors/init.rb +6 -0
  29. data/lib/rrj/errors/janus/janus.rb +1 -0
  30. data/lib/rrj/errors/janus/janus_message.rb +8 -4
  31. data/lib/rrj/errors/janus/janus_processus_keepalive.rb +1 -0
  32. data/lib/rrj/errors/janus/janus_response.rb +27 -6
  33. data/lib/rrj/errors/janus/janus_transaction.rb +4 -0
  34. data/lib/rrj/errors/rabbit/rabbit.rb +3 -1
  35. data/lib/rrj/errors/tools/config.rb +1 -0
  36. data/lib/rrj/info.rb +1 -1
  37. data/lib/rrj/init.rb +37 -169
  38. data/lib/rrj/janus/messages/admin.rb +1 -2
  39. data/lib/rrj/janus/messages/message.rb +4 -4
  40. data/lib/rrj/janus/messages/standard.rb +3 -5
  41. data/lib/rrj/janus/processus/concurrency.rb +1 -1
  42. data/lib/rrj/janus/processus/keepalive.rb +10 -4
  43. data/lib/rrj/janus/responses/admin.rb +31 -0
  44. data/lib/rrj/janus/responses/event.rb +23 -5
  45. data/lib/rrj/janus/responses/response.rb +2 -0
  46. data/lib/rrj/janus/responses/standard.rb +26 -5
  47. data/lib/rrj/janus/transactions/admin.rb +22 -26
  48. data/lib/rrj/janus/transactions/handle.rb +13 -8
  49. data/lib/rrj/janus/transactions/session.rb +25 -7
  50. data/lib/rrj/janus/transactions/transaction.rb +2 -1
  51. data/lib/rrj/rabbit/connect.rb +2 -3
  52. data/lib/rrj/rabbit/publish/admin.rb +1 -6
  53. data/lib/rrj/rabbit/publish/base_publisher.rb +6 -11
  54. data/lib/rrj/rabbit/publish/exclusive.rb +1 -0
  55. data/lib/rrj/rabbit/publish/listener.rb +10 -27
  56. data/lib/rrj/rabbit/publish/non_exclusive.rb +2 -6
  57. data/lib/rrj/rabbit/publish/publisher.rb +4 -17
  58. data/lib/rrj/tools/{config.rb → gem/config.rb} +5 -5
  59. data/lib/rrj/tools/{log.rb → gem/log.rb} +21 -6
  60. data/lib/rrj/tools/gem/option.rb +57 -0
  61. data/lib/rrj/tools/{requests.rb → gem/requests.rb} +0 -0
  62. data/lib/rrj/tools/replaces/admin.rb +7 -13
  63. data/lib/rrj/tools/replaces/handle.rb +61 -0
  64. data/lib/rrj/tools/replaces/replace.rb +57 -27
  65. data/lib/rrj/tools/replaces/session.rb +34 -0
  66. data/lib/rrj/tools/replaces/type.rb +63 -11
  67. data/lib/rrj/tools/tools.rb +4 -3
  68. data/lib/ruby_rabbitmq_janus.rb +1 -0
  69. data/spec/request/admin/request_handle_info_spec.rb +13 -7
  70. data/spec/request/admin/request_handles_spec.rb +20 -0
  71. data/spec/request/admin/request_sessions_spec.rb +5 -4
  72. data/spec/request/admin/request_set_locking_debug_spec.rb +16 -0
  73. data/spec/request/admin/request_set_log_level_spec.rb +16 -0
  74. data/spec/request/admin/request_tokens_spec.rb +13 -0
  75. data/spec/request/base/request_attach_spec.rb +6 -9
  76. data/spec/request/base/request_create_spec.rb +5 -3
  77. data/spec/request/base/request_destroy_spec.rb +5 -3
  78. data/spec/request/base/request_detach_spec.rb +6 -7
  79. data/spec/request/base/request_info_spec.rb +5 -3
  80. data/spec/request/base/request_keepalive_spec.rb +5 -3
  81. data/spec/request/peer/request_offer_spec.rb +18 -92
  82. data/spec/request/peer/request_trickle_spec.rb +9 -28
  83. data/spec/request/peer/request_trickles_spec.rb +23 -0
  84. data/spec/rrj/responses/responses_admin_spec.rb +39 -0
  85. data/spec/rrj/responses/responses_event_spec.rb +25 -0
  86. data/spec/rrj/responses/responses_response_spec.rb +31 -0
  87. data/spec/rrj/responses/responses_standard_spec.rb +43 -0
  88. data/spec/rrj/rrj_config_spec.rb +7 -7
  89. data/spec/rrj/rrj_rabbitmq_spec.rb +1 -1
  90. data/spec/rrj/tools/replace_admin_spec.rb +86 -0
  91. data/spec/rrj/tools/replace_handle_spec.rb +78 -0
  92. data/spec/rrj/tools/replace_session_spec.rb +66 -0
  93. data/spec/rrj/tools/replace_spec.rb +69 -0
  94. data/spec/rrj/tools/type_spec.rb +150 -0
  95. data/spec/spec_helper.rb +46 -7
  96. data/spec/support/examples_request.rb +33 -61
  97. data/spec/support/examples_response.rb +30 -0
  98. data/spec/support/schemas/request/admin/handles.json +15 -0
  99. data/spec/support/schemas/request/admin/set_locking_debug.json +13 -0
  100. data/spec/support/schemas/request/admin/set_log_level.json +11 -0
  101. data/spec/support/schemas/request/admin/tokens.json +13 -0
  102. data/spec/support/type.rb +66 -0
  103. metadata +41 -69
  104. data/config/requests/peer/trickles.json +0 -7
  105. data/lib/rrj/tools/replaces/standard.rb +0 -101
  106. data/spec/fixtures/config/requests/admin/handle_info.json +0 -3
  107. data/spec/fixtures/config/requests/admin/handles.json +0 -3
  108. data/spec/fixtures/config/requests/admin/log_level.json +0 -3
  109. data/spec/fixtures/config/requests/admin/sessions.json +0 -3
  110. data/spec/fixtures/config/requests/base/attach.json +0 -3
  111. data/spec/fixtures/config/requests/base/create.json +0 -4
  112. data/spec/fixtures/config/requests/base/destroy.json +0 -3
  113. data/spec/fixtures/config/requests/base/detach.json +0 -3
  114. data/spec/fixtures/config/requests/base/info.json +0 -3
  115. data/spec/fixtures/config/requests/base/keepalive.json +0 -3
  116. data/spec/fixtures/config/requests/peer/answer.json +0 -3
  117. data/spec/fixtures/config/requests/peer/offer.json +0 -3
  118. data/spec/fixtures/config/requests/peer/trickle.json +0 -3
data/spec/spec_helper.rb CHANGED
@@ -39,14 +39,53 @@ RSpec.configure do |config|
39
39
  end
40
40
 
41
41
  # Configure requests test before sending request
42
- config.before(:example) do
43
- Singleton.__init__(RubyRabbitmqJanus::Tools::Log)
44
- Singleton.__init__(RubyRabbitmqJanus::Tools::Config)
45
- Singleton.__init__(RubyRabbitmqJanus::Tools::Requests)
46
- Singleton.__init__(RubyRabbitmqJanus::Janus::Concurrencies::Keepalive)
47
- @gateway = RubyRabbitmqJanus::RRJ.new
48
- end
42
+ config.before(:example, level: :base) { gateway }
43
+ config.before(:example, level: :peer) { gateway }
44
+ config.before(:example, level: :admin) { gateway_admin }
45
+ config.before(:example, name: :response) { gateway }
46
+ config.before(:example, name: :admin) { gateway_admin }
47
+ config.before(:example, name: :event) { gateway }
48
+ config.before(:example, name: :standard) { gateway }
49
49
 
50
50
  # Exclude request with tag broken
51
51
  config.filter_run_excluding broken: true
52
52
  end
53
+
54
+ # :reek:UtilityFunction
55
+ def singleton
56
+ Singleton.__init__(RubyRabbitmqJanus::Tools::Log)
57
+ Singleton.__init__(RubyRabbitmqJanus::Tools::Config)
58
+ Singleton.__init__(RubyRabbitmqJanus::Tools::Requests)
59
+ Singleton.__init__(RubyRabbitmqJanus::Janus::Concurrencies::Keepalive)
60
+ end
61
+
62
+ def gateway
63
+ singleton
64
+ @gateway = RubyRabbitmqJanus::RRJ.new
65
+ @response = nil
66
+ @options = {}
67
+ end
68
+
69
+ def gateway_admin
70
+ singleton
71
+ @gateway = RubyRabbitmqJanus::RRJAdmin.new
72
+ @response = nil
73
+ @options = {}
74
+ end
75
+
76
+ def gateway_event
77
+ actions = EventTest.new.actions
78
+ @event = RubyRabbitmq::Janus::Concurencies::Event.instance
79
+ @event.run(&actions)
80
+ gateway
81
+ end
82
+
83
+ # Test events response
84
+ class EventTest
85
+ def actions
86
+ lambda do |reason, payload|
87
+ p "Reason : #{reason}"
88
+ p "Payload : #{payload}"
89
+ end
90
+ end
91
+ end
@@ -1,93 +1,65 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Simple request
4
- shared_examples 'message_simple should match json empty' do
5
- let(:message) { @gateway.message_simple(@type) }
6
-
3
+ shared_examples 'empty response' do
7
4
  it 'should match JSON empty' do
8
- expect(message.to_json).to eq('{}')
5
+ message
6
+ expect(@response.to_json).to eq('{}')
9
7
  end
10
8
  end
11
9
 
12
- shared_examples 'message_simple should match json schema' do
13
- let(:message) { @gateway.message_simple(@type, true) }
14
-
10
+ shared_examples 'schema response' do
15
11
  it do
16
- expect(message.to_json).to match_json_schema(@type)
12
+ message
13
+ expect(@response.to_json).to match_json_schema(@type)
17
14
  end
18
15
  end
19
16
 
20
- # Session request
21
- shared_examples 'message_session should match json empty' do
22
- let(:message) { @gateway.message_session(@type, {}, false) }
23
-
24
- it 'should match JSON empty' do
25
- expect(message.to_json).to eq('{}')
17
+ shared_examples 'transaction should match json empty' do
18
+ let(:message) do
19
+ @gateway.start_transaction(false) do |transaction|
20
+ @response = transaction.publish_message(@type)
21
+ end
26
22
  end
27
- end
28
-
29
- shared_examples 'message_session should match json schema' do
30
- let(:message) { @gateway.message_session(@type) }
31
23
 
32
- it do
33
- expect(message.to_json).to match_json_schema(@type)
34
- end
24
+ include_examples 'empty response'
35
25
  end
36
26
 
37
- # Handle request
38
- shared_examples 'message_handle should match json schema' do
39
- it do
40
- @gateway.start_handle(true) do |transaction|
41
- m = @gateway.message_handle(@type, transaction, @options)
42
- expect(m.to_json).to match_json_schema(@type)
27
+ shared_examples 'transaction should match json schema' do
28
+ let(:message) do
29
+ @gateway.start_transaction do |transaction|
30
+ @response = transaction.publish_message(@type)
43
31
  end
44
32
  end
45
- end
46
33
 
47
- shared_examples 'message_handle should match json empty' do
48
- it do
49
- @gateway.start_handle(false) do |transaction|
50
- options = options.nil? ? { replace: {}, add: {} } : options
51
- m = @gateway.message_handle(@type, transaction, options)
52
- expect(m.to_json).to eq('{}')
53
- end
54
- end
34
+ include_examples 'schema response'
55
35
  end
56
36
 
57
- # Handle admin
58
- shared_examples 'message_handle_admin should match json schema' do
37
+ shared_examples 'transaction handle should match json schema' do
59
38
  let(:message) do
60
- @gateway.message_admin(@type)
39
+ @gateway.start_transaction_handle do |transaction|
40
+ @response = transaction.publish_message(@type, @options)
41
+ end
61
42
  end
62
43
 
63
- it do
64
- expect(message.to_json).to match_json_schema(@type)
65
- end
44
+ include_examples 'schema response'
66
45
  end
67
46
 
68
- shared_examples 'message_admin should match json schema' do
47
+ shared_examples 'transaction handle should match json empty' do
69
48
  let(:message) do
70
- @gateway.message_admin(@type)
49
+ @gateway.start_transaction_handle(false) do |transaction|
50
+ @response = transaction.publish_message(@type, @options)
51
+ end
71
52
  end
72
53
 
73
- it do
74
- expect(message.to_json).to match_json_schema(@type)
75
- end
54
+ include_examples 'empty response'
76
55
  end
77
56
 
78
- # Simple request
79
- shared_examples 'peer message_simple should match json empty' do
80
- let(:message) { @gateway.message_simple(@type) }
81
-
82
- it 'should match JSON empty' do
83
- expect(message.to_json).to eq('{}')
57
+ shared_examples 'transaction admin should match json schema' do
58
+ let(:message) do
59
+ @gateway.start_transaction_admin do |transaction|
60
+ @response = transaction.publish_message(@type, @options)
61
+ end
84
62
  end
85
- end
86
63
 
87
- shared_examples 'peer message_simple should match json schema' do
88
- let(:message) { @gateway.message_simple(@type, true) }
89
-
90
- it do
91
- expect(message.to_json).to match_json_schema(@type)
92
- end
64
+ include_examples 'schema response'
93
65
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples 'response is' do |type|
4
+ it do
5
+ message
6
+ expect(response).to be_kind_of(type)
7
+ end
8
+ end
9
+
10
+ shared_examples 'response with sender is' do |klass|
11
+ let(:message) do
12
+ @gateway.start_transaction do |transaction|
13
+ opts = { 'handle_id' => @response.sender }
14
+ @response = transaction.publish_message(type, opts)
15
+ end
16
+ end
17
+
18
+ include_examples 'response is', klass
19
+ end
20
+
21
+ shared_examples 'admin response with sender is' do |klass|
22
+ let(:message) do
23
+ @gateway.start_transaction_admin do |transaction|
24
+ opts = { 'handle_id' => @response.sender }
25
+ @response = transaction.publish_message(type, opts)
26
+ end
27
+ end
28
+
29
+ include_examples 'response is', klass
30
+ end
@@ -0,0 +1,15 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "janus": { "type": "string", "pattern": "success" },
5
+ "transaction": { "type": "string" },
6
+ "handles": { "type": "Array" },
7
+ "session_id": { "type": "integer" }
8
+ },
9
+ "required": [
10
+ "janus",
11
+ "transaction",
12
+ "session_id",
13
+ "handles"
14
+ ]
15
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "janus": { "type": "string", "pattern": "success" },
5
+ "transaction": { "type": "string" },
6
+ "locking_debug": { "type": "boolean" }
7
+ },
8
+ "required": [
9
+ "janus",
10
+ "transaction",
11
+ "locking_debug"
12
+ ]
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "janus": { "type": "string", "pattern": "success" },
5
+ "transaction": { "type": "string" }
6
+ },
7
+ "required": [
8
+ "janus",
9
+ "transaction"
10
+ ]
11
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "janus": { "type": "string", "pattern": "success" },
5
+ "transaction": { "type": "string" },
6
+ "tokens": { "type": "Array" }
7
+ },
8
+ "required": [
9
+ "janus",
10
+ "transaction",
11
+ "tokens"
12
+ ]
13
+ }
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples 'test convert type' do |klass|
4
+ let(:option) { { key => value } }
5
+ let(:value_test) { defined?(value_return) ? value_return : value }
6
+
7
+ it { expect(converter.convert(key, option)).to be_kind_of(klass) }
8
+ it { expect(converter.convert(key, option)).to eql(value_test) }
9
+ end
10
+
11
+ shared_examples 'match convert type' do |klass, size|
12
+ it { expect(converter.convert(key)).to be_kind_of(klass) }
13
+ it { expect(converter.convert(key)).to match(value) }
14
+ it { expect(converter.convert(key).length).to eql(size) }
15
+ end
16
+
17
+ shared_examples 'test convert type array' do |klass|
18
+ include_examples 'test convert type', klass
19
+
20
+ it { expect(value.count).to eql(size) }
21
+ end
22
+
23
+ shared_examples 'test convert type hash' do |klass|
24
+ include_examples 'test convert type', klass
25
+
26
+ it { expect(value_test[1]).to be_kind_of(Hash) }
27
+ it { expect(value_test[1]).to eql(value_hash) }
28
+ end
29
+
30
+ shared_examples 'test replace in request' do |element, type|
31
+ let(:transform) { replace.transform_request }
32
+ let(:value) { defined?(value_return) ? value_return : element }
33
+
34
+ include_examples 'keys', element
35
+
36
+ it { expect(keys).to be_kind_of(type) }
37
+ it { expect(keys).to eql(options[value]) }
38
+ end
39
+
40
+ shared_examples 'test replace in request nil' do |element|
41
+ let(:transform) { replace.transform_request }
42
+
43
+ include_examples 'keys', element
44
+
45
+ it 'option should equal nil' do
46
+ expect(options[element]).to be(nil)
47
+ end
48
+
49
+ it 'result be a kind of String' do
50
+ expect(keys).to be_kind_of(String)
51
+ end
52
+
53
+ it 'result should not equal to nil' do
54
+ expect(keys).not_to be_nil
55
+ end
56
+ end
57
+
58
+ shared_examples 'keys' do |element|
59
+ let(:keys) do
60
+ if defined?(key)
61
+ transform[key][element]
62
+ else
63
+ transform[element]
64
+ end
65
+ end
66
+ end
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: 1.2.9
4
+ version: 2.0.0.pre.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -45,9 +45,6 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.5'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 3.5.0
51
48
  type: :development
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -55,9 +52,6 @@ dependencies:
55
52
  - - "~>"
56
53
  - !ruby/object:Gem::Version
57
54
  version: '3.5'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 3.5.0
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: overcommit
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -106,20 +100,14 @@ dependencies:
106
100
  requirements:
107
101
  - - "~>"
108
102
  - !ruby/object:Gem::Version
109
- version: '4.2'
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: 4.2.4
103
+ version: '4.5'
113
104
  type: :development
114
105
  prerelease: false
115
106
  version_requirements: !ruby/object:Gem::Requirement
116
107
  requirements:
117
108
  - - "~>"
118
109
  - !ruby/object:Gem::Version
119
- version: '4.2'
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: 4.2.4
110
+ version: '4.5'
123
111
  - !ruby/object:Gem::Dependency
124
112
  name: fuubar
125
113
  requirement: !ruby/object:Gem::Requirement
@@ -169,9 +157,6 @@ dependencies:
169
157
  - - "~>"
170
158
  - !ruby/object:Gem::Version
171
159
  version: '2.6'
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: 2.6.2
175
160
  type: :development
176
161
  prerelease: false
177
162
  version_requirements: !ruby/object:Gem::Requirement
@@ -179,9 +164,6 @@ dependencies:
179
164
  - - "~>"
180
165
  - !ruby/object:Gem::Version
181
166
  version: '2.6'
182
- - - ">="
183
- - !ruby/object:Gem::Version
184
- version: 2.6.2
185
167
  - !ruby/object:Gem::Dependency
186
168
  name: json-schema-rspec
187
169
  requirement: !ruby/object:Gem::Requirement
@@ -203,9 +185,6 @@ dependencies:
203
185
  - - "~>"
204
186
  - !ruby/object:Gem::Version
205
187
  version: '4.2'
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: 4.2.7.1
209
188
  type: :development
210
189
  prerelease: false
211
190
  version_requirements: !ruby/object:Gem::Requirement
@@ -213,9 +192,6 @@ dependencies:
213
192
  - - "~>"
214
193
  - !ruby/object:Gem::Version
215
194
  version: '4.2'
216
- - - ">="
217
- - !ruby/object:Gem::Version
218
- version: 4.2.7.1
219
195
  - !ruby/object:Gem::Dependency
220
196
  name: travis
221
197
  requirement: !ruby/object:Gem::Requirement
@@ -223,9 +199,6 @@ dependencies:
223
199
  - - "~>"
224
200
  - !ruby/object:Gem::Version
225
201
  version: '1.8'
226
- - - ">="
227
- - !ruby/object:Gem::Version
228
- version: 1.8.4
229
202
  type: :development
230
203
  prerelease: false
231
204
  version_requirements: !ruby/object:Gem::Requirement
@@ -233,9 +206,6 @@ dependencies:
233
206
  - - "~>"
234
207
  - !ruby/object:Gem::Version
235
208
  version: '1.8'
236
- - - ">="
237
- - !ruby/object:Gem::Version
238
- version: 1.8.4
239
209
  - !ruby/object:Gem::Dependency
240
210
  name: bunny
241
211
  requirement: !ruby/object:Gem::Requirement
@@ -278,20 +248,6 @@ dependencies:
278
248
  - - "~>"
279
249
  - !ruby/object:Gem::Version
280
250
  version: 0.2.2
281
- - !ruby/object:Gem::Dependency
282
- name: semaphore
283
- requirement: !ruby/object:Gem::Requirement
284
- requirements:
285
- - - "~>"
286
- - !ruby/object:Gem::Version
287
- version: 0.0.1
288
- type: :runtime
289
- prerelease: false
290
- version_requirements: !ruby/object:Gem::Requirement
291
- requirements:
292
- - - "~>"
293
- - !ruby/object:Gem::Version
294
- version: 0.0.1
295
251
  description: |
296
252
  This gem is used to communicate to a server Janus through RabbitMQ software
297
253
  (Message-oriented middleware). It waiting a messages to Rails API who send to
@@ -311,10 +267,16 @@ files:
311
267
  - config/default.md
312
268
  - config/default.yml
313
269
  - config/requests.md
270
+ - config/requests/admin/add_token.json
271
+ - config/requests/admin/allow_token.json
272
+ - config/requests/admin/disallow_token.json
314
273
  - config/requests/admin/handle_info.json
315
274
  - config/requests/admin/handles.json
316
- - config/requests/admin/log_level.json
275
+ - config/requests/admin/remove_token.json
317
276
  - config/requests/admin/sessions.json
277
+ - config/requests/admin/set_locking_debug.json
278
+ - config/requests/admin/set_log_level.json
279
+ - config/requests/admin/tokens.json
318
280
  - config/requests/base/attach.json
319
281
  - config/requests/base/create.json
320
282
  - config/requests/base/destroy.json
@@ -324,12 +286,12 @@ files:
324
286
  - config/requests/peer/answer.json
325
287
  - config/requests/peer/offer.json
326
288
  - config/requests/peer/trickle.json
327
- - config/requests/peer/trickles.json
328
289
  - lib/generators/ruby_rabbitmq_janus/configuration_generator.rb
329
290
  - lib/generators/ruby_rabbitmq_janus/create_request_generator.rb
330
291
  - lib/generators/ruby_rabbitmq_janus/default_request_generator.rb
331
292
  - lib/generators/ruby_rabbitmq_janus/initializer_generator.rb
332
293
  - lib/generators/ruby_rabbitmq_janus/install_generator.rb
294
+ - lib/rrj/admin.rb
333
295
  - lib/rrj/errors/error.rb
334
296
  - lib/rrj/errors/init.rb
335
297
  - lib/rrj/errors/janus/janus.rb
@@ -349,6 +311,7 @@ files:
349
311
  - lib/rrj/janus/processus/concurrency.rb
350
312
  - lib/rrj/janus/processus/event.rb
351
313
  - lib/rrj/janus/processus/keepalive.rb
314
+ - lib/rrj/janus/responses/admin.rb
352
315
  - lib/rrj/janus/responses/event.rb
353
316
  - lib/rrj/janus/responses/response.rb
354
317
  - lib/rrj/janus/responses/standard.rb
@@ -365,30 +328,23 @@ files:
365
328
  - lib/rrj/rabbit/publish/non_exclusive.rb
366
329
  - lib/rrj/rabbit/publish/publisher.rb
367
330
  - lib/rrj/rabbit/rabbit.rb
368
- - lib/rrj/tools/config.rb
369
- - lib/rrj/tools/log.rb
331
+ - lib/rrj/tools/gem/config.rb
332
+ - lib/rrj/tools/gem/log.rb
333
+ - lib/rrj/tools/gem/option.rb
334
+ - lib/rrj/tools/gem/requests.rb
370
335
  - lib/rrj/tools/replaces/admin.rb
336
+ - lib/rrj/tools/replaces/handle.rb
371
337
  - lib/rrj/tools/replaces/replace.rb
372
- - lib/rrj/tools/replaces/standard.rb
338
+ - lib/rrj/tools/replaces/session.rb
373
339
  - lib/rrj/tools/replaces/type.rb
374
- - lib/rrj/tools/requests.rb
375
340
  - lib/rrj/tools/tools.rb
376
341
  - lib/ruby_rabbitmq_janus.rb
377
- - spec/fixtures/config/requests/admin/handle_info.json
378
- - spec/fixtures/config/requests/admin/handles.json
379
- - spec/fixtures/config/requests/admin/log_level.json
380
- - spec/fixtures/config/requests/admin/sessions.json
381
- - spec/fixtures/config/requests/base/attach.json
382
- - spec/fixtures/config/requests/base/create.json
383
- - spec/fixtures/config/requests/base/destroy.json
384
- - spec/fixtures/config/requests/base/detach.json
385
- - spec/fixtures/config/requests/base/info.json
386
- - spec/fixtures/config/requests/base/keepalive.json
387
- - spec/fixtures/config/requests/peer/answer.json
388
- - spec/fixtures/config/requests/peer/offer.json
389
- - spec/fixtures/config/requests/peer/trickle.json
390
342
  - spec/request/admin/request_handle_info_spec.rb
343
+ - spec/request/admin/request_handles_spec.rb
391
344
  - spec/request/admin/request_sessions_spec.rb
345
+ - spec/request/admin/request_set_locking_debug_spec.rb
346
+ - spec/request/admin/request_set_log_level_spec.rb
347
+ - spec/request/admin/request_tokens_spec.rb
392
348
  - spec/request/base/request_attach_spec.rb
393
349
  - spec/request/base/request_create_spec.rb
394
350
  - spec/request/base/request_destroy_spec.rb
@@ -397,18 +353,33 @@ files:
397
353
  - spec/request/base/request_keepalive_spec.rb
398
354
  - spec/request/peer/request_offer_spec.rb
399
355
  - spec/request/peer/request_trickle_spec.rb
356
+ - spec/request/peer/request_trickles_spec.rb
357
+ - spec/rrj/responses/responses_admin_spec.rb
358
+ - spec/rrj/responses/responses_event_spec.rb
359
+ - spec/rrj/responses/responses_response_spec.rb
360
+ - spec/rrj/responses/responses_standard_spec.rb
400
361
  - spec/rrj/rrj_config_spec.rb
401
362
  - spec/rrj/rrj_log_spec.rb
402
363
  - spec/rrj/rrj_rabbitmq_spec.rb
403
364
  - spec/rrj/rrj_spec.rb
365
+ - spec/rrj/tools/replace_admin_spec.rb
366
+ - spec/rrj/tools/replace_handle_spec.rb
367
+ - spec/rrj/tools/replace_session_spec.rb
368
+ - spec/rrj/tools/replace_spec.rb
369
+ - spec/rrj/tools/type_spec.rb
404
370
  - spec/spec_helper.rb
405
371
  - spec/support/aruba.rb
406
372
  - spec/support/examples_config.rb
407
373
  - spec/support/examples_request.rb
374
+ - spec/support/examples_response.rb
408
375
  - spec/support/schemas/config/config.json
409
376
  - spec/support/schemas/config/rabbit.json
410
377
  - spec/support/schemas/request/admin/handle_info.json
378
+ - spec/support/schemas/request/admin/handles.json
411
379
  - spec/support/schemas/request/admin/sessions.json
380
+ - spec/support/schemas/request/admin/set_locking_debug.json
381
+ - spec/support/schemas/request/admin/set_log_level.json
382
+ - spec/support/schemas/request/admin/tokens.json
412
383
  - spec/support/schemas/request/base/attach.json
413
384
  - spec/support/schemas/request/base/create.json
414
385
  - spec/support/schemas/request/base/destroy.json
@@ -418,6 +389,7 @@ files:
418
389
  - spec/support/schemas/request/peer/answer.json
419
390
  - spec/support/schemas/request/peer/offer.json
420
391
  - spec/support/schemas/request/peer/trickle.json
392
+ - spec/support/type.rb
421
393
  homepage: https://github.com/dazzl-tv/ruby-rabbitmq-janus
422
394
  licenses:
423
395
  - MIT
@@ -450,9 +422,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
450
422
  version: '0'
451
423
  required_rubygems_version: !ruby/object:Gem::Requirement
452
424
  requirements:
453
- - - ">="
425
+ - - ">"
454
426
  - !ruby/object:Gem::Version
455
- version: '0'
427
+ version: 1.3.1
456
428
  requirements: []
457
429
  rubyforge_project:
458
430
  rubygems_version: 2.5.1