ruby_rabbitmq_janus 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -6
  3. data/lib/rrj/errors/error.rb +3 -1
  4. data/lib/rrj/errors/janus/janus.rb +10 -11
  5. data/lib/rrj/errors/janus/responses/admin.rb +1 -1
  6. data/lib/rrj/errors/janus/responses/event.rb +1 -1
  7. data/lib/rrj/errors/janus/responses/standard.rb +1 -1
  8. data/lib/rrj/errors/rabbit/rabbit.rb +47 -18
  9. data/lib/rrj/errors/tools/tools.rb +45 -9
  10. data/lib/rrj/info.rb +1 -1
  11. data/lib/rrj/rabbit/connect.rb +5 -3
  12. data/lib/rrj/tools/gem/config/gem.rb +1 -1
  13. data/lib/rrj/tools/gem/config/janus.rb +2 -0
  14. data/lib/rrj/tools/gem/config/queues.rb +8 -0
  15. data/lib/rrj/tools/gem/config/rabbit.rb +2 -0
  16. data/spec/ruby_rabbitmq_janus/process/concurrencies/concurrency_spec.rb +2 -1
  17. data/spec/ruby_rabbitmq_janus/process/concurrencies/event_admin_spec.rb +2 -1
  18. data/spec/ruby_rabbitmq_janus/process/concurrencies/event_spec.rb +2 -1
  19. data/spec/spec_helper.rb +6 -0
  20. data/tmp/coverage/index.html +1823 -1607
  21. metadata +17 -33
  22. data/lib/rrj/errors/base/admin.rb +0 -24
  23. data/lib/rrj/errors/base/base.rb +0 -5
  24. data/lib/rrj/errors/base/init.rb +0 -46
  25. data/lib/rrj/errors/base/task.rb +0 -32
  26. data/lib/rrj/errors/janus/messages/admin.rb +0 -33
  27. data/lib/rrj/errors/janus/messages/message.rb +0 -51
  28. data/lib/rrj/errors/janus/messages/standard.rb +0 -33
  29. data/lib/rrj/errors/janus/responses/base.rb +0 -15
  30. data/lib/rrj/errors/janus/transactions/admin.rb +0 -37
  31. data/lib/rrj/errors/janus/transactions/handle.rb +0 -52
  32. data/lib/rrj/errors/janus/transactions/session.rb +0 -38
  33. data/lib/rrj/errors/janus/transactions/transaction.rb +0 -23
  34. data/lib/rrj/errors/rabbit/base_event.rb +0 -25
  35. data/lib/rrj/errors/rabbit/connect.rb +0 -65
  36. data/lib/rrj/errors/rabbit/listener/base.rb +0 -46
  37. data/lib/rrj/errors/rabbit/listener/from.rb +0 -19
  38. data/lib/rrj/errors/rabbit/listener/from_admin.rb +0 -19
  39. data/lib/rrj/errors/rabbit/propertie.rb +0 -37
  40. data/lib/rrj/errors/rabbit/publisher/admin.rb +0 -32
  41. data/lib/rrj/errors/rabbit/publisher/base.rb +0 -39
  42. data/lib/rrj/errors/rabbit/publisher/exclusive.rb +0 -33
  43. data/lib/rrj/errors/rabbit/publisher/keepalive.rb +0 -19
  44. data/lib/rrj/errors/rabbit/publisher/non_exclusive.rb +0 -33
  45. data/lib/rrj/errors/tools/gem/cluster.rb +0 -42
  46. data/lib/rrj/errors/tools/gem/config.rb +0 -121
  47. data/lib/rrj/errors/tools/gem/log.rb +0 -81
  48. data/lib/rrj/errors/tools/gem/option.rb +0 -44
  49. data/lib/rrj/errors/tools/gem/request.rb +0 -23
  50. data/lib/rrj/errors/tools/replaces/replace.rb +0 -30
  51. data/lib/rrj/errors/tools/replaces/type.rb +0 -30
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: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-19 00:00:00.000000000 Z
11
+ date: 2021-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -240,6 +240,20 @@ dependencies:
240
240
  - - ">="
241
241
  - !ruby/object:Gem::Version
242
242
  version: '0'
243
+ - !ruby/object:Gem::Dependency
244
+ name: rspec-retry
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
243
257
  - !ruby/object:Gem::Dependency
244
258
  name: rubocop
245
259
  requirement: !ruby/object:Gem::Requirement
@@ -483,45 +497,15 @@ files:
483
497
  - lib/generators/ruby_rabbitmq_janus/templates/initializer.rb
484
498
  - lib/generators/ruby_rabbitmq_janus/templates/migration.rb
485
499
  - lib/rrj/admin.rb
486
- - lib/rrj/errors/base/admin.rb
487
- - lib/rrj/errors/base/base.rb
488
- - lib/rrj/errors/base/init.rb
489
- - lib/rrj/errors/base/task.rb
490
500
  - lib/rrj/errors/error.rb
491
501
  - lib/rrj/errors/janus/janus.rb
492
- - lib/rrj/errors/janus/messages/admin.rb
493
- - lib/rrj/errors/janus/messages/message.rb
494
- - lib/rrj/errors/janus/messages/standard.rb
495
502
  - lib/rrj/errors/janus/responses/admin.rb
496
- - lib/rrj/errors/janus/responses/base.rb
497
503
  - lib/rrj/errors/janus/responses/code.rb
498
504
  - lib/rrj/errors/janus/responses/event.rb
499
505
  - lib/rrj/errors/janus/responses/standard.rb
500
- - lib/rrj/errors/janus/transactions/admin.rb
501
- - lib/rrj/errors/janus/transactions/handle.rb
502
- - lib/rrj/errors/janus/transactions/session.rb
503
- - lib/rrj/errors/janus/transactions/transaction.rb
504
506
  - lib/rrj/errors/process/event.rb
505
507
  - lib/rrj/errors/process/event_admin.rb
506
- - lib/rrj/errors/rabbit/base_event.rb
507
- - lib/rrj/errors/rabbit/connect.rb
508
- - lib/rrj/errors/rabbit/listener/base.rb
509
- - lib/rrj/errors/rabbit/listener/from.rb
510
- - lib/rrj/errors/rabbit/listener/from_admin.rb
511
- - lib/rrj/errors/rabbit/propertie.rb
512
- - lib/rrj/errors/rabbit/publisher/admin.rb
513
- - lib/rrj/errors/rabbit/publisher/base.rb
514
- - lib/rrj/errors/rabbit/publisher/exclusive.rb
515
- - lib/rrj/errors/rabbit/publisher/keepalive.rb
516
- - lib/rrj/errors/rabbit/publisher/non_exclusive.rb
517
508
  - lib/rrj/errors/rabbit/rabbit.rb
518
- - lib/rrj/errors/tools/gem/cluster.rb
519
- - lib/rrj/errors/tools/gem/config.rb
520
- - lib/rrj/errors/tools/gem/log.rb
521
- - lib/rrj/errors/tools/gem/option.rb
522
- - lib/rrj/errors/tools/gem/request.rb
523
- - lib/rrj/errors/tools/replaces/replace.rb
524
- - lib/rrj/errors/tools/replaces/type.rb
525
509
  - lib/rrj/errors/tools/tools.rb
526
510
  - lib/rrj/info.rb
527
511
  - lib/rrj/init.rb
@@ -776,7 +760,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
776
760
  - !ruby/object:Gem::Version
777
761
  version: '0'
778
762
  requirements: []
779
- rubygems_version: 3.1.2
763
+ rubygems_version: 3.0.3
780
764
  signing_key:
781
765
  specification_version: 4
782
766
  summary: Ruby RabbitMQ Janus
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
4
-
5
- module RubyRabbitmqJanus
6
- # Define all error in gem
7
- module Errors
8
- # Define a super class for all errors in RRJ Class
9
- class BaseRRJAdmin < RRJError
10
- def initalize(message, level)
11
- super "[RRJAdmin] #{message}", level
12
- end
13
- end
14
-
15
- module RRJAdmin
16
- # Error for RRJAdmin#admin_endpoint
17
- class StartTransactionAdmin < RubyRabbitmqJanus::Errors::BaseRRJAdmin
18
- def initialize(opts)
19
- super "Transaction admin failed with -- #{opts}", :fatal
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rrj/errors/base/init'
4
- require 'rrj/errors/base/admin'
5
- require 'rrj/errors/base/task'
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
4
-
5
- module RubyRabbitmqJanus
6
- # Define all error in gem
7
- module Errors
8
- # Define a super class for all errors in RRJ Class
9
- class BaseRRJ < RRJError
10
- def initalize(message, level)
11
- super "[RRJ] #{message}", level
12
- end
13
- end
14
-
15
- module RRJ
16
- # Error for RRJ#initialize
17
- class InstanciateGem < RubyRabbitmqJanus::Errors::BaseRRJ
18
- def initialize(message)
19
- super "Gem is not instanciate correctly : #{message}", :fatal
20
- end
21
- end
22
-
23
- # Error for RRJ#session_endpoint_public
24
- class StartTransaction < RubyRabbitmqJanus::Errors::BaseRRJ
25
- def initialize(exclu, opts)
26
- super "Transaction failed with -- #{opts} in queue #{exclu}", :fatal
27
- end
28
- end
29
-
30
- # Error for RRJ#session_endpoint_public_handle
31
- class StartTransactionHandle < RubyRabbitmqJanus::Errors::BaseRRJ
32
- def initialize(exclu, opts)
33
- super "Transaction handle failed with -- #{opts} in queue #{exclu}",
34
- :fatal
35
- end
36
- end
37
-
38
- # Error for RRJ#cleanup_connection
39
- class CleanupConnection < RubyRabbitmqJanus::Errors::BaseRRJ
40
- def initialize
41
- super 'Error for cleanup Janus Instances', :warn
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
4
-
5
- module RubyRabbitmqJanus
6
- # Define all error in gem
7
- module Errors
8
- # Define a super class for all errors in RRJ Class
9
- class BaseRRJTask < RRJError
10
- def initialize(message, level = :fatal)
11
- super "[RRJAdmin]#{message}", level
12
- end
13
- end
14
-
15
- module RRJTask
16
- # Error for RRJTask#initialize
17
- class Initialize < BaseRRJTask
18
- def initialize
19
- super '[Task] Error in initializer'
20
- end
21
- end
22
-
23
- # Error for RRJTask#handle_endpoint_public
24
- class StartTransactionHandle < BaseRRJTask
25
- def initialize(exclu, opts)
26
- super '[Task] Transaction admin failed with -- ' \
27
- "#{opts} in queue #{exclu}", :fatal
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- # Define errors to message sending and response to janus
8
- module Janus
9
- # Define a super class for all error in Janus::MessageAdmin
10
- class BaseMessageAdmin < BaseMessage
11
- def initialize(message, level = :fatal)
12
- super "[Admin] #{message}", level
13
- end
14
- end
15
-
16
- module MessageAdmin
17
- # Error Janus::MessageAdmin#initialize
18
- class Initializer < BaseMessageAdmin
19
- def initialize
20
- super 'Error in initializer'
21
- end
22
- end
23
-
24
- # Error Janus::MessageAdmin#options
25
- class Options < BaseMessageAdmin
26
- def initialize
27
- super 'Return properties message admin failed'
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,51 +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::Message
7
- class BaseMessage < RubyRabbitmqJanus::Errors::RRJError
8
- def initialize(message, level)
9
- super "[Message]#{message}", level
10
- end
11
- end
12
-
13
- module Message
14
- # Error for Janus::Message#initialize
15
- class Initializer < RubyRabbitmqJanus::Errors::Janus::BaseMessage
16
- def initialize
17
- super 'Error in initalizer'
18
- end
19
- end
20
-
21
- # Error for Janus::Message#to_json
22
- class ToJson < RubyRabbitmqJanus::Errors::Janus::BaseMessage
23
- def initialize
24
- super 'Error transform to json'
25
- end
26
- end
27
-
28
- # Error for Janus::Message#to_nice_json
29
- class ToNiceJson < RubyRabbitmqJanus::Errors::Janus::BaseMessage
30
- def initialize
31
- super 'Error transform to nice json'
32
- end
33
- end
34
-
35
- # Error for Janus::Message#to_hash
36
- class ToHash < RubyRabbitmqJanus::Errors::Janus::BaseMessage
37
- def initialize
38
- super 'Error transform to hash'
39
- end
40
- end
41
-
42
- # Error for Janus::Message#correlation
43
- class Correlation < RubyRabbitmqJanus::Errors::Janus::BaseMessage
44
- def initialize
45
- super 'Error return correlation information'
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- # Define errors to message sending and response to janus
8
- module Janus
9
- # Define a super class for all error in Janus::Message
10
- class BaseMessageStandard < BaseMessage
11
- def initialize(message, level = :fatal)
12
- super "[Standard] #{message}", level
13
- end
14
- end
15
-
16
- module MessageStandard
17
- # Error for Janus::MessageStandard#initialize
18
- class Initializer < BaseMessageStandard
19
- def initialize
20
- super 'Error in initializer'
21
- end
22
- end
23
-
24
- # Error for Janus::MessageStandard#option
25
- class Option < BaseMessageStandard
26
- def initialize
27
- super 'Return properties message admin failed'
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Janus
6
- module Responses
7
- class Base < RubyRabbitmqJanus::Errors::RRJError
8
- def initialize(klass, message, level = :warn)
9
- super "[Response][#{klass}] #{message}", level
10
- end
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Janus
6
- # Define a super class for error in Janus::Transactions::TransactionAdmin
7
- class BaseTransactionAdmin < BaseTransaction
8
- def initialize(message, level = :fatal)
9
- super "[Admin] #{message}", level
10
- end
11
- end
12
-
13
- module TransactionAdmin
14
- # Error for Janus::Transactions::TransactionAdmin#initialize
15
- class Initialize < BaseTransactionAdmin
16
- def initialize
17
- super 'Error in initializer'
18
- end
19
- end
20
-
21
- # Error for Janus::Transactions::TransactionAdmin#connect
22
- class Connect < BaseTransactionAdmin
23
- def initialize
24
- super 'Error to connection RabbitMQ'
25
- end
26
- end
27
-
28
- # Error for Janus::Transactions::TransactionAdmin#publish_message
29
- class PublishMessage < BaseTransactionAdmin
30
- def initialize
31
- super 'Error for publishing message in RabbitMQ'
32
- end
33
- end
34
- end
35
- end
36
- end
37
- end
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Janus
6
- # Define a super class for error in Janus::Transactions::TransactionHandle
7
- class BaseTransactionHandle < BaseTransaction
8
- def initialize(message, level = :fatal)
9
- super "[Handle] #{message}", level
10
- end
11
- end
12
-
13
- module TransactionHandle
14
- # Error for Janus::Transactions::TransactionHandle#initialize
15
- class Initialize < Errors::Janus::BaseTransactionHandle
16
- def initialize
17
- super 'Error in initializer'
18
- end
19
- end
20
-
21
- # Error for Janus::Transactions::TransactionHandle#connect
22
- class Connect < Errors::Janus::BaseTransactionHandle
23
- def initialize
24
- super 'Error for connect to RabbitMQ'
25
- end
26
- end
27
-
28
- # Error for Janus::Transactions::TransactionHandle#publish_message
29
- class PublishMessage < Errors::Janus::BaseTransactionHandle
30
- def initialize
31
- super 'Error for publishing message'
32
- end
33
- end
34
-
35
- # Error for Janus::Transactions::TransactionHandle#detach
36
- class Detach < Errors::Janus::BaseTransactionHandle
37
- def initialize
38
- super 'Error for sending message to type detach'
39
- end
40
- end
41
-
42
- # Error for Janus::Transactions::TransactionHandle#detach_for_deleteing
43
- class DetachForDeleting < Errors::Janus::BaseTransactionHandle
44
- def initialize
45
- super 'Error for sending message detach ' \
46
- 'and update in database Janus instance'
47
- end
48
- end
49
- end
50
- end
51
- end
52
- end
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Janus
6
- # Define a super class for all errors in
7
- # Janus::Transactions::TransactionSessions
8
- class BaseTransactionSessions < BaseTransaction
9
- def initialize(message, level = :fatal)
10
- super "[Sessions] #{message}", level
11
- end
12
- end
13
-
14
- module TransactionSessions
15
- # Error for Janus::Transactions::TransactionSessions#initialize
16
- class Initialize < BaseTransactionSessions
17
- def initialize
18
- super 'Error in initializer'
19
- end
20
- end
21
-
22
- # Error for Janus::Transactions::TransactionSessions#connect
23
- class Connect < BaseTransactionSessions
24
- def initialize
25
- super 'Error for connect to RabbitMQ'
26
- end
27
- end
28
-
29
- # Error for Janus::Transactions::TransactionSessions#publish_message
30
- class PublishMessage < BaseTransactionSessions
31
- def initialize
32
- super 'Error for publishing message'
33
- end
34
- end
35
- end
36
- end
37
- end
38
- end