ruby_rabbitmq_janus 3.0.0.pre.385 → 4.0.0.pre.939113634

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -6
  3. data/config/default.yml +5 -5
  4. data/lib/rrj/errors/error.rb +3 -1
  5. data/lib/rrj/errors/janus/janus.rb +10 -11
  6. data/lib/rrj/errors/janus/responses/admin.rb +1 -1
  7. data/lib/rrj/errors/janus/responses/event.rb +1 -1
  8. data/lib/rrj/errors/janus/responses/standard.rb +1 -1
  9. data/lib/rrj/errors/rabbit/rabbit.rb +40 -13
  10. data/lib/rrj/errors/tools/tools.rb +45 -9
  11. data/lib/rrj/info.rb +1 -1
  12. data/lib/rrj/models/active_record.rb +1 -3
  13. data/lib/rrj/rabbit/connect.rb +7 -5
  14. data/lib/rrj/rails.rb +2 -2
  15. data/lib/rrj/tools/gem/config.rb +1 -1
  16. data/lib/rrj/tools/gem/config/gem.rb +1 -1
  17. data/lib/rrj/tools/gem/config/janus.rb +2 -0
  18. data/lib/rrj/tools/gem/config/queues.rb +8 -0
  19. data/lib/rrj/tools/gem/config/rabbit.rb +2 -0
  20. data/lib/rrj/tools/replaces/replace.rb +2 -2
  21. data/spec/config/database.yml +1 -0
  22. data/spec/ruby_rabbitmq_janus/models/janus_instance_instance_spec.rb +1 -1
  23. data/spec/ruby_rabbitmq_janus/rrj_admin_add_token_spec.rb +1 -0
  24. data/spec/ruby_rabbitmq_janus/rrj_admin_allow_token_spec.rb +1 -0
  25. data/spec/ruby_rabbitmq_janus/rrj_admin_disallow_token_spec.rb +1 -0
  26. data/spec/ruby_rabbitmq_janus/rrj_admin_handle_info_spec.rb +1 -0
  27. data/spec/ruby_rabbitmq_janus/{rrj_admin_list_handles_spec.Rb → rrj_admin_list_handles_spec.rb} +1 -0
  28. data/spec/ruby_rabbitmq_janus/rrj_admin_list_sessions_spec.rb +1 -0
  29. data/spec/ruby_rabbitmq_janus/rrj_admin_list_tokens_spec.rb +1 -0
  30. data/spec/ruby_rabbitmq_janus/rrj_admin_remove_token_spec.rb +1 -0
  31. data/spec/ruby_rabbitmq_janus/rrj_admin_set_libnice_debug_spec.rb +1 -0
  32. data/spec/ruby_rabbitmq_janus/rrj_admin_set_locking_debug_spec.rb +1 -0
  33. data/spec/ruby_rabbitmq_janus/rrj_admin_set_log_colors_spec.rb +1 -0
  34. data/spec/ruby_rabbitmq_janus/rrj_admin_set_log_level_spec.rb +1 -0
  35. data/spec/ruby_rabbitmq_janus/rrj_admin_set_log_timestamps_spec.rb +1 -0
  36. data/spec/ruby_rabbitmq_janus/rrj_admin_set_max_nack_queue_spec.rb +1 -0
  37. data/spec/ruby_rabbitmq_janus/rrj_admin_set_no_media_timer_spec.rb +1 -0
  38. data/spec/ruby_rabbitmq_janus/rrj_admin_set_session_timeout_spec.rb +1 -0
  39. data/spec/ruby_rabbitmq_janus/rrj_admin_start_pcap_spec.rb +1 -0
  40. data/spec/ruby_rabbitmq_janus/rrj_admin_start_text2pcap_spec.rb +1 -0
  41. data/spec/ruby_rabbitmq_janus/rrj_admin_stop_pcap_spec.rb +1 -0
  42. data/spec/ruby_rabbitmq_janus/rrj_admin_stop_text2pcap_spec.rb +1 -0
  43. data/spec/ruby_rabbitmq_janus/rrj_answer_spec.rb +1 -0
  44. data/spec/ruby_rabbitmq_janus/rrj_attach_spec.rb +1 -0
  45. data/spec/ruby_rabbitmq_janus/rrj_create_spec.rb +1 -0
  46. data/spec/ruby_rabbitmq_janus/rrj_destroy_spec.rb +1 -0
  47. data/spec/ruby_rabbitmq_janus/rrj_detach_spec.rb +1 -0
  48. data/spec/ruby_rabbitmq_janus/rrj_info_spec.rb +1 -0
  49. data/spec/ruby_rabbitmq_janus/rrj_keepalive_spec.rb +1 -0
  50. data/spec/ruby_rabbitmq_janus/rrj_offer_spec.rb +1 -0
  51. data/spec/ruby_rabbitmq_janus/rrj_trickle_spec.rb +1 -0
  52. data/spec/ruby_rabbitmq_janus/rrj_trickles_spec.rb +2 -1
  53. data/spec/spec_helper.rb +11 -32
  54. metadata +150 -139
  55. data/lib/rrj/errors/base/admin.rb +0 -24
  56. data/lib/rrj/errors/base/base.rb +0 -5
  57. data/lib/rrj/errors/base/init.rb +0 -46
  58. data/lib/rrj/errors/base/task.rb +0 -32
  59. data/lib/rrj/errors/janus/messages/admin.rb +0 -33
  60. data/lib/rrj/errors/janus/messages/message.rb +0 -51
  61. data/lib/rrj/errors/janus/messages/standard.rb +0 -33
  62. data/lib/rrj/errors/janus/responses/base.rb +0 -15
  63. data/lib/rrj/errors/janus/transactions/admin.rb +0 -37
  64. data/lib/rrj/errors/janus/transactions/handle.rb +0 -52
  65. data/lib/rrj/errors/janus/transactions/session.rb +0 -38
  66. data/lib/rrj/errors/janus/transactions/transaction.rb +0 -23
  67. data/lib/rrj/errors/rabbit/base_event.rb +0 -25
  68. data/lib/rrj/errors/rabbit/connect.rb +0 -65
  69. data/lib/rrj/errors/rabbit/listener/base.rb +0 -46
  70. data/lib/rrj/errors/rabbit/listener/from.rb +0 -19
  71. data/lib/rrj/errors/rabbit/listener/from_admin.rb +0 -19
  72. data/lib/rrj/errors/rabbit/propertie.rb +0 -37
  73. data/lib/rrj/errors/rabbit/publisher/admin.rb +0 -32
  74. data/lib/rrj/errors/rabbit/publisher/base.rb +0 -39
  75. data/lib/rrj/errors/rabbit/publisher/exclusive.rb +0 -33
  76. data/lib/rrj/errors/rabbit/publisher/keepalive.rb +0 -19
  77. data/lib/rrj/errors/rabbit/publisher/non_exclusive.rb +0 -33
  78. data/lib/rrj/errors/tools/gem/cluster.rb +0 -42
  79. data/lib/rrj/errors/tools/gem/config.rb +0 -121
  80. data/lib/rrj/errors/tools/gem/log.rb +0 -81
  81. data/lib/rrj/errors/tools/gem/option.rb +0 -44
  82. data/lib/rrj/errors/tools/gem/request.rb +0 -23
  83. data/lib/rrj/errors/tools/replaces/replace.rb +0 -30
  84. data/lib/rrj/errors/tools/replaces/type.rb +0 -30
  85. data/tmp/coverage/assets/0.10.2/application.css +0 -799
  86. data/tmp/coverage/assets/0.10.2/application.js +0 -1707
  87. data/tmp/coverage/assets/0.10.2/colorbox/border.png +0 -0
  88. data/tmp/coverage/assets/0.10.2/colorbox/controls.png +0 -0
  89. data/tmp/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
  90. data/tmp/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
  91. data/tmp/coverage/assets/0.10.2/favicon_green.png +0 -0
  92. data/tmp/coverage/assets/0.10.2/favicon_red.png +0 -0
  93. data/tmp/coverage/assets/0.10.2/favicon_yellow.png +0 -0
  94. data/tmp/coverage/assets/0.10.2/loading.gif +0 -0
  95. data/tmp/coverage/assets/0.10.2/magnify.png +0 -0
  96. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  97. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  98. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  99. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  100. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  101. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  102. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  103. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  104. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
  105. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  106. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
  107. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
  108. data/tmp/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  109. data/tmp/coverage/index.html +0 -21303
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Rabbit
6
- module Listener
7
- # Base class error for listeners
8
- class BaseError < BaseRabbit
9
- def initialize(message, level = :fatal)
10
- super("[Listener] #{message}", level)
11
- end
12
- end
13
-
14
- module Base
15
- # Error initializer for listeners
16
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::Listener::BaseError
17
- def initialize
18
- super 'Error in initialize'
19
- end
20
- end
21
-
22
- # Error listen event
23
- class ListenEvents < RubyRabbitmqJanus::Errors::Rabbit::Listener::BaseError
24
- def initialize(queue)
25
- super "Error when listen events to queue '#{queue}'"
26
- end
27
- end
28
-
29
- # Error when response is empty
30
- class ResponseEmpty < RubyRabbitmqJanus::Errors::Rabbit::Listener::BaseError
31
- def initialize(response)
32
- super "Response is empty ! (#{response})"
33
- end
34
- end
35
-
36
- # Error when response is nil
37
- class ResponseNil < RubyRabbitmqJanus::Errors::Rabbit::Listener::BaseError
38
- def initialize(response)
39
- super "Response is nil ! (#{response})"
40
- end
41
- end
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :reek:IrresponsibleModule
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- module Rabbit
8
- module Listener
9
- module From
10
- class ListenEvents < RubyRabbitmqJanus::Errors::Rabbit::Listener::BaseError
11
- def initialize(error)
12
- super "Error for listen events in RabbitMQ public queue, #{error}"
13
- end
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :reek:IrresponsibleModule
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- module Rabbit
8
- module Listener
9
- module FromAdmin
10
- class ListenEvents < RubyRabbitmqJanus::Errors::Rabbit::Listener::BaseError
11
- def initialize(error)
12
- super "Error for listen events in RabbitMQ public queue, #{error}"
13
- end
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Rabbit
6
- # Define a super class for all error in Option class
7
- class BasePropertie < BaseRabbit
8
- def initialize(message, level = :fatal)
9
- super("[Propertie] #{message}", level)
10
- end
11
- end
12
-
13
- module Propertie
14
- # Error for Rabbit::Propertie#initialize
15
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BasePropertie
16
- def initialize
17
- super 'Error in initializer'
18
- end
19
- end
20
-
21
- # Error for Rabbit::Propertie#options
22
- class Options < RubyRabbitmqJanus::Errors::Rabbit::BasePropertie
23
- def initialize
24
- super 'Error for create hash to propertie message'
25
- end
26
- end
27
-
28
- # Error for Rabbit::Propertie#options_admin
29
- class OptionsAdmin < RubyRabbitmqJanus::Errors::Rabbit::BasePropertie
30
- def initialize
31
- super 'Error for create hash to propertie message admin'
32
- end
33
- end
34
- end
35
- end
36
- end
37
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Rabbit
6
- module Publisher
7
- # Define a super class for all errors in Rabbit::Publisher::PublisherAdmin
8
- class BasePublisherAdmin < BaseErrorPublisher
9
- def initialize(message, level = :fatal)
10
- super "[Admin] #{message}", level
11
- end
12
- end
13
-
14
- module Admin
15
- # Error for Rabbit::Publisher::PublisherAdmin#initialize
16
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublisherAdmin
17
- def initialize
18
- super 'Error in initializer'
19
- end
20
- end
21
-
22
- # Error for Rabbit::Publisher::PublisherAdmin#publish
23
- class Publish < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublisherAdmin
24
- def initialize
25
- super 'Error for publish message'
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :reek:IrresponsibleModule
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- module Rabbit
8
- module Publisher
9
- # Define a super class for all errors in Rabbit::BaseEvent
10
- class BaseErrorPublisher < BaseRabbit
11
- def initialize(message, level = :fatal)
12
- super "[Publisher] #{message}", level
13
- end
14
- end
15
-
16
- module Base
17
- # Error for Rabbit::BaseEvent#initialize
18
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BaseErrorPublisher
19
- def initialize
20
- super 'Error in initializer'
21
- end
22
- end
23
-
24
- class Publish < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BaseErrorPublisher
25
- def initialize
26
- super 'Error for publishing message'
27
- end
28
- end
29
-
30
- class TestCorrelation < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BaseErrorPublisher
31
- def initialize(message, propertie)
32
- super "Correlation doesn't equal (msg: #{message}) != (prp: #{propertie})"
33
- end
34
- end
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Rabbit
6
- module Publisher
7
- # Define a super class for all errors in
8
- # Rabbit::Publisher::Exclusive
9
- class BasePublishExclusive < BaseErrorPublisher
10
- def initialize(message, level = :fatal)
11
- super "[Exclusive] #{message}", level
12
- end
13
- end
14
-
15
- module Exclusive
16
- # Error for Rabbit::Publisher::Exclusive#initialize
17
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublishExclusive
18
- def initialize
19
- super 'Error in initializer'
20
- end
21
- end
22
-
23
- # Error for Rabbit::Publisher::Exclusive#publish
24
- class Publish < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublishExclusive
25
- def initialize
26
- super 'Error for publish message'
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :reek:IrresponsibleModule
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- module Rabbit
8
- module Publisher
9
- module Keepalive
10
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublishExclusive
11
- def initialize
12
- super 'Error in initializer'
13
- end
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyRabbitmqJanus
4
- module Errors
5
- module Rabbit
6
- module Publisher
7
- # Define a super class for all errors in
8
- # Rabbit::Publisher::NonExclusive
9
- class BasePublishNonExclusive < BaseErrorPublisher
10
- def initialize(message, level = :fatal)
11
- super "[Non Exclusive] #{message}", level
12
- end
13
- end
14
-
15
- module PublishNonExclusive
16
- # Error for Rabbit::Publisher::NonExclusive#initialize
17
- class Initialize < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublishNonExclusive
18
- def initialize
19
- super 'Error in initializer'
20
- end
21
- end
22
-
23
- # Error for Rabbit::Publisher::NonExclusive#publish
24
- class Publish < RubyRabbitmqJanus::Errors::Rabbit::Publisher::BasePublishNonExclusive
25
- def initialize
26
- super 'Error for publish message'
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :reek:IrresponsibleModule
4
-
5
- module RubyRabbitmqJanus
6
- module Errors
7
- module Tools
8
- # Define a super class for all error in Tools::Option class
9
- class BaseCluster < BaseTools
10
- def initialize(message, level = :fatal)
11
- super("[Cluster]#{message}", level)
12
- end
13
- end
14
-
15
- module Cluster
16
- class CreateSession < RubyRabbitmqJanus::Errors::Tools::BaseCluster
17
- def initialize
18
- super '[CreateSession] Error during create session (just one instance to Janus)'
19
- end
20
- end
21
-
22
- class QueueTo < RubyRabbitmqJanus::Errors::Tools::BaseCluster
23
- def initialize
24
- super '[QueueTo] Error for create string queue_to'
25
- end
26
- end
27
-
28
- class QueueAdminTo < RubyRabbitmqJanus::Errors::Tools::BaseCluster
29
- def initialize
30
- super '[QueueAdminTo] Error for create string queue_admin_to'
31
- end
32
- end
33
-
34
- class RestartInstance < RubyRabbitmqJanus::Errors::Tools::BaseCluster
35
- def initialize
36
- super '[RestartInstance] Error for restart Janus Instance'
37
- end
38
- end
39
- end
40
- end
41
- end
42
- end
@@ -1,121 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :reek:IrresponsibleModule
4
-
5
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
6
-
7
- module RubyRabbitmqJanus
8
- module Errors
9
- module Tools
10
- class BaseConfig < BaseTools
11
- def initialize(message, level = :fatal)
12
- super("[Config]#{message}", level)
13
- end
14
- end
15
-
16
- module Config
17
- class Initialize < RubyRabbitmqJanus::Errors::Tools::BaseConfig
18
- def initialize
19
- super '[Initialize] Error when initialize configuration to RRJ Gem'
20
- end
21
- end
22
-
23
- class QueueFrom < RubyRabbitmqJanus::Errors::Tools::BaseConfig
24
- def initialize
25
- super '[QueueFrom] Error for reading standard queue from'
26
- end
27
- end
28
-
29
- class QueueTo < RubyRabbitmqJanus::Errors::Tools::BaseConfig
30
- def initialize
31
- super '[QueueTo] Error for reading standard queue to'
32
- end
33
- end
34
-
35
- class QueueAdminFrom < RubyRabbitmqJanus::Errors::Tools::BaseConfig
36
- def initialize
37
- super '[QueueAdminFrom] Error for reading admin queue from'
38
- end
39
- end
40
-
41
- class QueueAdminTo < RubyRabbitmqJanus::Errors::Tools::BaseConfig
42
- def initialize
43
- super '[QueueAdminTo] Error for reading admin queue to'
44
- end
45
- end
46
-
47
- class LogLevel < RubyRabbitmqJanus::Errors::Tools::BaseConfig
48
- def initialize
49
- super '[LogLevel] Error for reading option level', :warn
50
- end
51
- end
52
-
53
- class LogLevelRabbit < RubyRabbitmqJanus::Errors::Tools::BaseConfig
54
- def initialize
55
- super '[LogLevelRabbit] Error for reading option level for rabbitmq', :warn
56
- end
57
- end
58
-
59
- class AdminPassword < RubyRabbitmqJanus::Errors::Tools::BaseConfig
60
- def initialize
61
- super '[AdminPassword] Error for reading option admin password', :warn
62
- end
63
- end
64
-
65
- class TimeToLive < RubyRabbitmqJanus::Errors::Tools::BaseConfig
66
- def initialize
67
- super '[TimeToLive] Keepalive TTL option is not reading in config file', :warn
68
- end
69
- end
70
-
71
- class PluginAt < RubyRabbitmqJanus::Errors::Tools::BaseConfig
72
- def initialize(parameter)
73
- super "[PluginAt] Plugin is not found in configuration file, with parameter #{parameter}", :warn
74
- end
75
- end
76
-
77
- class Cluster < RubyRabbitmqJanus::Errors::Tools::BaseConfig
78
- def initialize(parameter)
79
- super "[Cluster] Cluster parameter is missing, with parameter #{parameter}", :warn
80
- end
81
- end
82
-
83
- class LogType < RubyRabbitmqJanus::Errors::Tools::BaseConfig
84
- def initialize
85
- super '[LogType] Error with Log Type', :fatal
86
- end
87
- end
88
-
89
- class LogOption < RubyRabbitmqJanus::Errors::Tools::BaseConfig
90
- def initialize
91
- super '[LogOption] Error with Log Option', :fatal
92
- end
93
- end
94
-
95
- class Environment < RubyRabbitmqJanus::Errors::Tools::BaseConfig
96
- def initialize
97
- super '[Environment] Error with environment option', :fatal
98
- end
99
- end
100
-
101
- class ORM < RubyRabbitmqJanus::Errors::Tools::BaseConfig
102
- def initialize
103
- super '[ORM] Error with Object Relational Mapping option', :fatal
104
- end
105
- end
106
-
107
- class ProgramName < RubyRabbitmqJanus::Errors::Tools::BaseConfig
108
- def initialize
109
- super '[ProgramName] Error with ProgramName option', :fatal
110
- end
111
- end
112
-
113
- class Rabbitmq < RubyRabbitmqJanus::Errors::Tools::BaseConfig
114
- def initialize(value)
115
- super "[RabbitMQConfig] Missing RabbitMQ configuration for key : #{value}", :fatal
116
- end
117
- end
118
- end
119
- end
120
- end
121
- end