ruby_rabbitmq_janus 4.0.0.pre.1001181479 → 4.0.1.pre.1265506307

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
  SHA256:
3
- metadata.gz: 36a2a7ddcbcb21949d410e94b7abcebc8f6892f3b77b109cf4ca042be0fed713
4
- data.tar.gz: 7074e5b98ca249157e5ec4324d5b97ec4b67b644160218c1f4d7e0a52234da03
3
+ metadata.gz: 1b073e04180f2b80cd0889bb8128aab5a5f27916cb6c5f6c6914a74581cf6776
4
+ data.tar.gz: 5a039c5519d17e634c22dfb4794115ece4cd4d71cb33899eaa8973554828b150
5
5
  SHA512:
6
- metadata.gz: 4a479590555b93d4db52b3b2e112809e881d0d25e799725cc8ecfcb140d1c4b69278e7df57d18ad00345ca6119f7233f08beac07225afaf22c805fe2c7d6ac01
7
- data.tar.gz: 3173faf1f8704bc114679154ad2958535c58849d466b2dcde46dce7045b1b7d91f8d0f99b3f9a04abbb9b8e169b437e14e08fab6a6f270d794e294b0ef9b8736
6
+ metadata.gz: 0333f87214048088ce3ab23d6efa23b50897eeebc15dad59440880b5ae09620e57b845404e7eb138ea8300bc276be0782583e94da55eb72c462525316842f078
7
+ data.tar.gz: 1c735c7f36e59c8a8a920075342897098fe6919ba85a088998f37facf023df6592cb82a4e6b6f44c217018e18d42d01263d6d6bf40dd3b7986ccabe9508ae055
data/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  [![Linter](https://github.com/dazzl-tv/ruby-rabbitmq-janus/actions/workflows/linter.yml/badge.svg)](https://github.com/dazzl-tv/ruby-rabbitmq-janus/actions/workflows/linter.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/ruby_rabbitmq_janus.svg)](https://badge.fury.io/rb/ruby_rabbitmq_janus)
5
5
  [![Docs](https://inch-ci.org/github/dazzl-tv/ruby-rabbitmq-janus.svg)](https://inch-ci.org/github/dazzl-tv/ruby-rabbitmq-janus)
6
- [![Maintainability](https://api.codeclimate.com/v1/badges/44e8680ad5e96d109be2/maintainability)](https://codeclimate.com/github/dazzl-tv/ruby-rabbitmq-janus/maintainability)
7
- [![Test Coverage](https://api.codeclimate.com/v1/badges/44e8680ad5e96d109be2/test_coverage)](https://codeclimate.com/github/dazzl-tv/ruby-rabbitmq-janus/test_coverage)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/f1eda688803e829438a7/maintainability)](https://codeclimate.com/github/dazzl-tv/ruby-rabbitmq-janus/maintainability)
7
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/f1eda688803e829438a7/test_coverage)](https://codeclimate.com/github/dazzl-tv/ruby-rabbitmq-janus/test_coverage)
8
8
  [![Known Vulnerabilities](https://snyk.io/test/github/dazzl-tv/ruby-rabbitmq-janus/badge.svg)](https://snyk.io/test/github/dazzl-tv/ruby-rabbitmq-janus)
9
9
 
10
10
  Ruby Gem for Janus WebRTC Gateway integration using RabbitMQ message queue
@@ -2,50 +2,52 @@
2
2
 
3
3
  module RubyRabbitmqJanus
4
4
  module Errors
5
- # Define a super class for all error in module Rabbit
6
- class BaseRabbit < RRJError
7
- def initialize(message, level = :fatal)
8
- super "[Rabbit]#{message}", level
5
+ module Rabbit
6
+ # Define a super class for all error in module Rabbit
7
+ class Base < RRJError
8
+ def initialize(message, level = :fatal)
9
+ super "[Rabbit]#{message}", level
10
+ end
9
11
  end
10
- end
11
12
 
12
- module Connect
13
- # Error when transaction hs no block
14
- class MissingAction < RubyRabbitmqJanus::Errors::BaseRabbit
15
- def initialize
16
- super 'Transaction failed, missing block'
13
+ module Connect
14
+ # Error when transaction hs no block
15
+ class MissingAction < RubyRabbitmqJanus::Errors::Rabbit::Base
16
+ def initialize
17
+ super 'Transaction failed, missing block'
18
+ end
17
19
  end
18
- end
19
20
 
20
- # Error When transaction timeout
21
- class TransactionTimeout < RubyRabbitmqJanus::Errors::BaseRabbit
22
- def initialize(error)
23
- super error
21
+ # Error When transaction timeout
22
+ class TransactionTimeout < RubyRabbitmqJanus::Errors::Rabbit::Base
23
+ def initialize(error)
24
+ super error
25
+ end
24
26
  end
25
27
  end
26
- end
27
28
 
28
- module Listener
29
- # Error when response is empty
30
- class ResponseEmpty < RubyRabbitmqJanus::Errors::BaseRabbit
31
- def initialize(response)
32
- super "Response is empty ! (#{response})"
29
+ module Listener
30
+ # Error when response is empty
31
+ class ResponseEmpty < RubyRabbitmqJanus::Errors::Rabbit::Base
32
+ def initialize(response)
33
+ super "Response is empty ! (#{response})"
34
+ end
33
35
  end
34
- end
35
36
 
36
- # Error when response is nil
37
- class ResponseNil < RubyRabbitmqJanus::Errors::BaseRabbit
38
- def initialize(response)
39
- super "Response is nil ! (#{response})"
37
+ # Error when response is nil
38
+ class ResponseNil < RubyRabbitmqJanus::Errors::Rabbit::Base
39
+ def initialize(response)
40
+ super "Response is nil ! (#{response})"
41
+ end
40
42
  end
41
43
  end
42
- end
43
44
 
44
- module Publisher
45
- # Error when correlation string is not equal
46
- class TestCorrelation < RubyRabbitmqJanus::Errors::BaseRabbit
47
- def initialize(message, propertie)
48
- super "Correlation doesn't equal (msg: #{message}) != (prp: #{propertie})"
45
+ module Publisher
46
+ # Error when correlation string is not equal
47
+ class TestCorrelation < RubyRabbitmqJanus::Errors::Rabbit::Base
48
+ def initialize(message, propertie)
49
+ super "Correlation doesn't equal (msg: #{message}) != (prp: #{propertie})"
50
+ end
49
51
  end
50
52
  end
51
53
  end
data/lib/rrj/info.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # Define constant to gem.
7
7
  module RubyRabbitmqJanus
8
8
  # Define version to gem
9
- VERSION = '4.0.0'
9
+ VERSION = '4.0.1'
10
10
 
11
11
  # Name to gem
12
12
  GEM_NAME = 'ruby_rabbitmq_janus'
@@ -15,7 +15,8 @@ module RubyRabbitmqJanus
15
15
 
16
16
  # Create an transaction with rabbitmq and close after response is received
17
17
  def transaction_short(&block)
18
- raise RubyRabbitmqJanus::Errors::Connect::MissingAction unless block
18
+ raise RubyRabbitmqJanus::Errors::Rabbit::Connect::MissingAction \
19
+ unless block
19
20
 
20
21
  response = nil
21
22
 
@@ -23,7 +24,7 @@ module RubyRabbitmqJanus
23
24
  response = transaction_long(&block)
24
25
  end
25
26
  rescue Timeout::Error
26
- raise RubyRabbitmqJanus::Errors::Connect::TransactionTimeout, \
27
+ raise RubyRabbitmqJanus::Errors::Rabbit::Connect::TransactionTimeout, \
27
28
  'The "Short transaction" have raised Timeout exception.'
28
29
  ensure
29
30
  close
@@ -32,7 +33,7 @@ module RubyRabbitmqJanus
32
33
 
33
34
  # Create an transaction with rabbitmq and not close
34
35
  def transaction_long
35
- raise RubyRabbitmqJanus::Errors::Connect::MissingAction \
36
+ raise RubyRabbitmqJanus::Errors::Rabbit::Connect::MissingAction \
36
37
  unless block_given?
37
38
 
38
39
  Timeout.timeout(60) do
@@ -40,7 +41,7 @@ module RubyRabbitmqJanus
40
41
  yield
41
42
  end
42
43
  rescue Timeout::Error
43
- raise RubyRabbitmqJanus::Errors::Connect::TransactionTimeout, \
44
+ raise RubyRabbitmqJanus::Errors::Rabbit::Connect::TransactionTimeout, \
44
45
  'The "Long transaction" have raised Timeout exception.'
45
46
  end
46
47