ruby_rabbitmq_janus 2.0.0.pre.97 → 2.0.0.pre.100

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bfdfed54c591a5d3503fb20030ad4de68722bb0a
4
- data.tar.gz: 6f3bf55297412cf3562efe905996e6782a78d272
3
+ metadata.gz: e3d70c9e422e25013a4fa9508cf4d941fa8d4d1d
4
+ data.tar.gz: e27a0caa265c2a83e683a8542a21c4c43560f7a5
5
5
  SHA512:
6
- metadata.gz: 963d69675530787c2e56a3c2cdaf5c41c5333d97c389ee8212d3035fc7bdd2366baae876d158f6320c672f0168fc0118b2e18420e596d09c29e3d36df2320948
7
- data.tar.gz: 6e9352e010b0b8b057d149bb1842e18951c02408774fe9e47c580cb614c43862453ddecf5bba0c467ba70d02669dbcc1ed76f61f8f7c2c68885f61840fc70f7f
6
+ metadata.gz: 60c1b1ae9af8bb7ea960783bdb425bf7be1d94688c2c97b44dd3094d788a4950c899b95bd3c624f1ca934dee68936b544178ff6cb568fe56fc0ad608af36183b
7
+ data.tar.gz: ec4049c1af08f1a5c4690a100a9e201c34c493bb0e6d038481b3cf7661704e97360b4a3cc6c3156e035668050282e786a13f5d7b727406b3ff123859a23b0069
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Janus::Messages::Admin, type: :messages,
6
+ name: :admin do
7
+ let(:template) { 'base::info' }
8
+ let(:msg_new) { RubyRabbitmqJanus::Janus::Messages::Admin.new(template) }
9
+
10
+ describe '#options' do
11
+ let(:message) { msg_new.options }
12
+
13
+ include_examples 'message is', Hash
14
+ include_examples 'message options keys is'
15
+ end
16
+ end
@@ -8,6 +8,9 @@ describe RubyRabbitmqJanus::Janus::Messages::Standard, type: :messages,
8
8
  let(:msg_new) { RubyRabbitmqJanus::Janus::Messages::Standard.new(template) }
9
9
 
10
10
  describe '#options' do
11
- it { expect(msg_new.options).to be_kind_of(Hash) }
11
+ let(:message) { msg_new.options }
12
+
13
+ include_examples 'message is', Hash
14
+ include_examples 'message options keys is'
12
15
  end
13
16
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Connect, type: :rabbit,
6
+ name: :connect do
7
+ let(:connect) { RubyRabbitmqJanus::Rabbit::Connect.new }
8
+
9
+ describe '#start' do
10
+ it { expect(connect.start.class).to eq(Bunny::Session) }
11
+ end
12
+
13
+ describe '#close' do
14
+ it { expect(connect.close.class).to eq(TrueClass) }
15
+ it { expect(connect.close).to eq(true) }
16
+ end
17
+
18
+ describe '#channel', broken: true do
19
+ it { expect(connect.channel.class).to eq(Bunny::Channel) }
20
+ end
21
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Propertie, type: :rabbit,
6
+ name: :propertie do
7
+ let(:rabbit) { RubyRabbitmqJanus::Rabbit::Propertie.new }
8
+
9
+ describe '#options' do
10
+ it { expect(rabbit.options).to match_json_schema(:rabbit_options) }
11
+ end
12
+
13
+ describe '#options_admin' do
14
+ it do
15
+ expect(rabbit.options_admin).to match_json_schema(:rabbit_options_admin)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Connect, type: :rabbit,
6
+ name: :publisher_admin do
7
+ let(:pusblish) { RubyRabbitmqJanus::Rabbot::Publisher::PublisherAdmin.new }
8
+
9
+ # @todo Complete test publisherAdmin
10
+ describe 'PublisherAdmin' do
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Publisher, type: :rabbit,
6
+ name: :base_publisher do
7
+ let(:publish) { RubyRabbitmqJanus::Rabbit::Publisher::BasePublisher.new }
8
+
9
+ describe 'BasePublisher' do
10
+ describe '#new' do
11
+ it { expect(publish).to have_attributes(response: nil) }
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Publisher, type: :rabbit,
6
+ name: :exclusive do
7
+ let(:publish) { RubyRabbitmqJanus::Rabbit::Publisher::Exclusive.new }
8
+
9
+ # @todo Complete Publisher exclusive test
10
+ describe 'Exclusive' do
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Publisher, type: :rabbit,
6
+ name: :listener do
7
+ let(:publish) do
8
+ rabbit = RubyRabbitmqJanus::Rabbit::Connect.new.rabbit
9
+ RubyRabbitmqJanus::Rabbit::Publisher::Listener.new(rabbit)
10
+ end
11
+
12
+ # @todo Complete spec publisher listener
13
+ describe 'Listener' do
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Publisher, type: :rabbit,
6
+ name: :non_exclusive do
7
+ let(:publish) do
8
+ end
9
+
10
+ # @todo Complete spec publisher Non Exclusive
11
+ describe 'NonExclusive' do
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe RubyRabbitmqJanus::Rabbit::Publisher, type: :rabbit,
6
+ name: :publisher do
7
+ let(:publish) do
8
+ end
9
+
10
+ # @todo Complete spec publisher Publisher
11
+ describe 'Publisher' do
12
+ end
13
+ end
@@ -3,3 +3,9 @@
3
3
  shared_examples 'message is' do |type|
4
4
  it { expect(message).to be_kind_of(type) }
5
5
  end
6
+
7
+ shared_examples 'message options keys is' do
8
+ it do
9
+ expect(message).to include(:routing_key, :correlation_id, :content_type)
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "routing_key": { "type": "string", "pattern": "to-janus-admin" },
5
+ "correlation_id": { "type": "string" },
6
+ "content_type": { "type": "String", "pattern": "application/json" }
7
+ },
8
+ "required": [
9
+ "routing_key",
10
+ "correlation_id",
11
+ "content_type"
12
+ ]
13
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_rabbitmq_janus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.97
4
+ version: 2.0.0.pre.100
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
@@ -354,15 +354,23 @@ files:
354
354
  - spec/request/peer/request_offer_spec.rb
355
355
  - spec/request/peer/request_trickle_spec.rb
356
356
  - spec/request/peer/request_trickles_spec.rb
357
+ - spec/rrj/messages/messages_admin_spec.rb
357
358
  - spec/rrj/messages/messages_message_spec.rb
358
359
  - spec/rrj/messages/messages_standard_spec.rb
360
+ - spec/rrj/rabbit/connect_spec.rb
361
+ - spec/rrj/rabbit/propertie_spec.rb
362
+ - spec/rrj/rabbit/publish/admin_spec.rb
363
+ - spec/rrj/rabbit/publish/base_publisher_spec.rb
364
+ - spec/rrj/rabbit/publish/exclusive_spec.rb
365
+ - spec/rrj/rabbit/publish/listener_spec.rb
366
+ - spec/rrj/rabbit/publish/non_exclusive_spec.rb
367
+ - spec/rrj/rabbit/publish/publisher_spec.rb
359
368
  - spec/rrj/responses/responses_admin_spec.rb
360
369
  - spec/rrj/responses/responses_event_spec.rb
361
370
  - spec/rrj/responses/responses_response_spec.rb
362
371
  - spec/rrj/responses/responses_standard_spec.rb
363
372
  - spec/rrj/rrj_config_spec.rb
364
373
  - spec/rrj/rrj_log_spec.rb
365
- - spec/rrj/rrj_rabbitmq_spec.rb
366
374
  - spec/rrj/rrj_spec.rb
367
375
  - spec/rrj/tools/replace_admin_spec.rb
368
376
  - spec/rrj/tools/replace_handle_spec.rb
@@ -376,7 +384,8 @@ files:
376
384
  - spec/support/examples_request.rb
377
385
  - spec/support/examples_response.rb
378
386
  - spec/support/schemas/config/config.json
379
- - spec/support/schemas/config/rabbit.json
387
+ - spec/support/schemas/config/rabbit_options.json
388
+ - spec/support/schemas/config/rabbit_options_admin.json
380
389
  - spec/support/schemas/request/admin/handle_info.json
381
390
  - spec/support/schemas/request/admin/handles.json
382
391
  - spec/support/schemas/request/admin/sessions.json
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
-
5
- describe 'RubyRabbitmqJanus::RabitMQ', type: :config, name: :rabbit do
6
- it 'Start connection with RabbitMQ server' do
7
- expect(RubyRabbitmqJanus::Rabbit::Connect.new.start.class).to \
8
- eq Bunny::Session
9
- end
10
-
11
- it 'Close connection with RabbitMQ Server' do
12
- expect(RubyRabbitmqJanus::Rabbit::Connect.new.close).to eq(true)
13
- end
14
-
15
- it 'Propertie to message sending in rabbit' do
16
- expect(RubyRabbitmqJanus::Rabbit::Propertie.new.options).to \
17
- match_json_schema(:rabbit)
18
- end
19
- end