ruby_rabbitmq_janus 2.7.2 → 3.0.0.pre.327

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: f8cd8e183a908beb88b5ef9b72c26abe734a2960731a45729052ea125bc56fb9
4
- data.tar.gz: cee2236899732c8e0e0b7dba5a8d05865bcc5149f4dd3ecb37285c9692f014c2
3
+ metadata.gz: d9c64b31ea647aa1d9fadaf8698b8c3afd6b50be1d25c29fee2dc765fa2c806e
4
+ data.tar.gz: 11606929018663804e10767760ee42a2f44853aba64d91fcb6de90ce9e635e7e
5
5
  SHA512:
6
- metadata.gz: 68a9a355d4b8abe1c621bf9e034514ddb59a24b20d5b722c9e7707dc8c8aa992401257278f5055fe93aa0dfac4a2e938c01decda259d500ebd7eae57ed492204
7
- data.tar.gz: 522c291938d5c11be25951550f6a669c2a4448f5f80394d017014fb583324a00b6cc9f45b28d45a7307646ba827d6583d11c6a5b0656a0beece1d4b9ce43d20f
6
+ metadata.gz: 97b1232c7f56ec1f77a2604facf57952b206a47382b20872ae2892302cdc114bb43f12af7f9186f70ba048e62e04644addc699bd8943e355e9719d4626d76fda
7
+ data.tar.gz: '06719336042761afd96fdcd8526c58c7b7af898b48de625eae1d24e33d69413e02325f406d2edea0a5769bba3ba843df20009546dde7cccc727a9689d834154f'
data/README.md CHANGED
@@ -118,7 +118,7 @@ require 'ruby_rabbitmq_janus'
118
118
  t = RubyRabbitmqJanus::RRJ.new
119
119
 
120
120
  # Ask info Janus Instance
121
- t.start_transaction do |transaction|
121
+ t.session_endpoint_public do |transaction|
122
122
  transaction.publish_message('base::info')
123
123
  end
124
124
 
@@ -134,8 +134,9 @@ require 'ruby_rabbitmq_janus'
134
134
  t = RubyRabbitmqJanus::RRJAdmin.new
135
135
 
136
136
  # Ask info sessions in Janus Instance
137
- t.start_transaction_admin do |transaction|
138
- transaction.publish_message('admin::sessions')
137
+ options = { instance: 42 }
138
+ t.admin_endpoint(options) do |transaction|
139
+ transaction.publish_message('admin::sessions', options)
139
140
  end
140
141
 
141
142
  => @request={"janus"=>"success" ... "sessions"=>[123, 456, 789]}
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # :reek:UtilityFunction
4
+
3
5
  module RubyRabbitmqJanus
4
6
  # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
5
7
 
@@ -14,25 +16,6 @@ module RubyRabbitmqJanus
14
16
  #
15
17
  # @see https://janus.conf.meetecho.com/docs/admin.html
16
18
  class RRJAdmin < RRJ
17
- # Create a transaction between apps and Janus for request without handle
18
- #
19
- # @param [Hash] options
20
- # Give a session number for use another session in Janus
21
- #
22
- # @example Get Janus session
23
- # @rrj.start_transaction_admin do |transaction|
24
- # response = transaction.publish_message('admin:sessions').sessions
25
- # end
26
- #
27
- # @since 2.0.0
28
- # @deprecated Use {#admin_endpoint} instead.
29
- def start_transaction_admin(options = {})
30
- transaction = Janus::Transactions::Admin.new(options)
31
- transaction.connect { yield(transaction) }
32
- rescue
33
- raise Errors::RRJAdmin::StartTransactionAdmin, options
34
- end
35
-
36
19
  # Create a transaction between Apps and Janus
37
20
  #
38
21
  # @param [Hash] options
@@ -13,7 +13,7 @@ module RubyRabbitmqJanus
13
13
  end
14
14
 
15
15
  module RRJAdmin
16
- # Error for RRJAdmin#start_transaction_admin
16
+ # Error for RRJAdmin#admin_endpoint
17
17
  class StartTransactionAdmin < RubyRabbitmqJanus::Errors::BaseRRJAdmin
18
18
  def initialize(opts)
19
19
  super "Transaction admin failed with -- #{opts}", :fatal
@@ -20,14 +20,14 @@ module RubyRabbitmqJanus
20
20
  end
21
21
  end
22
22
 
23
- # Error for RRJ#start_transaction
23
+ # Error for RRJ#session_endpoint_public
24
24
  class StartTransaction < RubyRabbitmqJanus::Errors::BaseRRJ
25
25
  def initialize(exclu, opts)
26
26
  super "Transaction failed with -- #{opts} in queue #{exclu}", :fatal
27
27
  end
28
28
  end
29
29
 
30
- # Error for RRJ#start_transaction_handle
30
+ # Error for RRJ#session_endpoint_public_handle
31
31
  class StartTransactionHandle < RubyRabbitmqJanus::Errors::BaseRRJ
32
32
  def initialize(exclu, opts)
33
33
  super "Transaction handle failed with -- #{opts} in queue #{exclu}",
@@ -20,7 +20,7 @@ module RubyRabbitmqJanus
20
20
  end
21
21
  end
22
22
 
23
- # Error for RRJTask#start_transaction_handle
23
+ # Error for RRJTask#handle_endpoint_public
24
24
  class StartTransactionHandle < BaseRRJTask
25
25
  def initialize(exclu, opts)
26
26
  super '[Task] Transaction admin failed with -- ' \
@@ -6,7 +6,7 @@
6
6
  # Define constant to gem.
7
7
  module RubyRabbitmqJanus
8
8
  # Define version to gem
9
- VERSION = '2.7.2'
9
+ VERSION = '3.0.0'
10
10
 
11
11
  # Name to gem
12
12
  GEM_NAME = 'ruby_rabbitmq_janus'
@@ -11,11 +11,11 @@ require 'erb'
11
11
  require 'rrj/tools/bin/config'
12
12
  require 'rrj/tools/gem/log'
13
13
 
14
+ # :reek:UtilityFunction
15
+
14
16
  Log = RubyRabbitmqJanus::Tools::Logger.create unless defined?(Log)
15
17
  RubyRabbitmqJanus::Tools::Logger.start
16
18
 
17
- # :reek:TooManyStatements
18
-
19
19
  # Primary module for this gem
20
20
  module RubyRabbitmqJanus
21
21
  # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
@@ -47,28 +47,6 @@ module RubyRabbitmqJanus
47
47
  raise Errors::RRJ::InstanciateGem, exception
48
48
  end
49
49
 
50
- # Start a transaction with Janus. Request use session_id information.
51
- #
52
- # @param [Boolean] exclusive Choose if message is storage in exclusive queue
53
- # @param [Hash] options
54
- # Give a session number for use another session in Janus
55
- #
56
- # @example Get Janus information
57
- # @rrj.start_transaction do |transaction|
58
- # response = transaction.publish_message('base::info').to_hash
59
- # end
60
- #
61
- # @since 2.0.0
62
- # @deprecated Use {#session_endpoint_public} or
63
- # {#session_endpoint_private} instead.
64
- def start_transaction(exclusive = true, options = {})
65
- session = @option.use_current_session?(options)
66
- transaction = Janus::Transactions::Session.new(exclusive, session)
67
- transaction.connect { yield(transaction) }
68
- rescue
69
- raise Errors::RRJ::StartTransaction.new(exclusive, options)
70
- end
71
-
72
50
  # Create a transaction between Apps and Janus in queue public
73
51
  #
74
52
  # @params [Hash] options
@@ -123,45 +101,6 @@ module RubyRabbitmqJanus
123
101
  transaction.connect { yield(transaction) }
124
102
  end
125
103
 
126
- # Start a transaction with Janus. Request used session_id/handle_id
127
- # information.
128
- #
129
- # @param [Boolean] exclusive Choose if message is storage in exclusive queue
130
- # @param [Hash] options
131
- # Give a session number for use another session in Janus
132
- #
133
- # @note Use transaction.detach for closing handle in Janus
134
- #
135
- # @example Send request trickles for exclusive queue
136
- # @cde = { 'sdpMid' => '...', sdpMLineIndex => 0, 'candidate' => '...' }
137
- # @rrj.start_transaction_handle do |transaction|
138
- # transaction.publish_message('base::trickle', @cde)
139
- # end
140
- #
141
- # @example Send request trickles for non exclusive queue
142
- # @cde = { 'sdpMid' => '...', sdpMLineIndex => 0, 'candidate' => '...' }
143
- # @rrj.start_transaction_handle(false) do |transaction|
144
- # transaction.publish_message('base::trickle', @cde)
145
- # end
146
- #
147
- # @return [Fixnum] Handle used for transaction
148
- #
149
- # @since 2.0.0
150
- # @deprecated Use {#handle_endpoint_public}
151
- # or {#handle_endpoint_private} instead.
152
- def start_transaction_handle(exclusive = true, options = {})
153
- session = @option.use_current_session?(options)
154
- handle = @option.use_current_handle?(options)
155
- instance = options['instance'] || 1
156
- transaction = Janus::Transactions::Handle.new(exclusive,
157
- session,
158
- handle,
159
- instance)
160
- transaction.connect { yield(transaction) }
161
- rescue
162
- raise Errors::RRJ::StartTransactionHandle, exclusive, options
163
- end
164
-
165
104
  # Create a transaction between Apps and Janus in private queue
166
105
  #
167
106
  # @param [Hash] options
@@ -13,27 +13,21 @@ module RubyRabbitmqJanus
13
13
  RubyRabbitmqJanus::Tools::Config.instance
14
14
  end
15
15
 
16
- # @deprecated
17
- def start_transaction(_exclusive, _options)
16
+ def session_endpoint_public(_options)
18
17
  yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
19
18
  end
20
19
 
21
- # @deprecated
22
- def start_transaction_handle(_exclusive, _options)
20
+ def handle_endpoint_public(_options)
23
21
  transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
24
22
  yield(transaction)
25
23
  transaction.response
26
24
  end
27
25
 
28
- # @deprecated
29
- def start_transaction_admin(_options)
26
+ def admin_endpoint(_options)
30
27
  yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
31
28
  end
32
29
 
33
- alias session_endpoint_public start_transaction
34
- alias session_endpoint_private start_transaction
35
- alias handle_endpoint_public start_transaction_handle
36
- alias handle_endpoint_private start_transaction_handle
37
- alias admin_endpoint start_transaction_admin
30
+ alias session_endpoint_private session_endpoint_public
31
+ alias handle_endpoint_private handle_endpoint_public
38
32
  end
39
33
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # :reek:TooManyStatements
4
- # :reek:BooleanParameter
5
3
  # :reek:UtilityFunction
6
4
 
7
5
  module RubyRabbitmqJanus
@@ -18,26 +16,6 @@ module RubyRabbitmqJanus
18
16
  raise Errors::RRJTask::Initialize
19
17
  end
20
18
 
21
- # Start a transaction with Janus. Request use session_id information.
22
- #
23
- # @param [Hash] options
24
- # Give a session number for use another session in Janus
25
- #
26
- # @example Get Janus information
27
- # @rrj.start_transaction do |transaction|
28
- # response = transaction.publish_message('base::info').to_hash
29
- # end
30
- #
31
- # @since 2.1.0
32
- # @deprecated Use {#session_endpoint_private} instead
33
- def start_transaction(options = {})
34
- transaction = Janus::Transactions::Session.new(true,
35
- options['session_id'])
36
- transaction.connect { yield(transaction) }
37
- rescue
38
- raise Errors::RRJ::StartTransaction.new(true, options)
39
- end
40
-
41
19
  # Create a transaction between Apps and Janus in queue private
42
20
  #
43
21
  # @params [Hash] options
@@ -61,26 +39,11 @@ module RubyRabbitmqJanus
61
39
  transaction.connect { yield(transaction) }
62
40
  end
63
41
 
64
- # For task is impossible to calling this method.
42
+ # For task is possible to calling this method, but no action is executed
65
43
  def session_endpoint_public(_options)
66
44
  nil
67
45
  end
68
46
 
69
- # Create a transaction between apps and janus with a handle
70
- #
71
- # @since 2.1.0
72
- def start_transaction_handle(exclusive = true, options = {})
73
- janus = session_instance(options)
74
- handle = 0 # Create always a new handle
75
- transaction = Janus::Transactions::Handle.new(exclusive,
76
- janus.session,
77
- handle,
78
- janus.instance)
79
- transaction.connect { yield(transaction) }
80
- rescue
81
- raise Errors::RRJTask::StartTransactionHandle.new(exclusive, options)
82
- end
83
-
84
47
  # For task is impossible to calling this method
85
48
  def handle_endpoint_public(_options)
86
49
  nil
@@ -9,16 +9,6 @@ module RubyRabbitmqJanus
9
9
  #
10
10
  # Used wit sidekiq/console/CI execution for admin queue in Janus gateway
11
11
  class RRJTaskAdmin < RRJTask
12
- # Create a transaction between apps and Janus
13
- #
14
- # @deprecated Use {#admin_endpoint} instead.
15
- def start_transaction_admin(options = {})
16
- transaction = Janus::Transactions::Admin.new(options)
17
- transaction.connect { yield(transaction) }
18
- rescue
19
- raise Errors::RRJAdmin::StartTransactionAdmin, options
20
- end
21
-
22
12
  # Create a transaction between Apps and Janus
23
13
  #
24
14
  # This transaction is sending to admin/monitor API.
@@ -15,7 +15,7 @@ end
15
15
 
16
16
  def attach_base
17
17
  res = nil
18
- @gateway.start_transaction(true, @session_instance) do |tr|
18
+ @gateway.session_endpoint_private(@session_instance) do |tr|
19
19
  res = tr.publish_message('base::attach', @session_instance)
20
20
  end
21
21
  @options.merge!('handle_id' => res.sender).merge!(@session_instance)
@@ -23,7 +23,7 @@ end
23
23
 
24
24
  def attach_admin
25
25
  res = nil
26
- @gateway.start_transaction_admin(@session_instance) do |tr|
26
+ @gateway.admin_endpoint(@session_instance) do |tr|
27
27
  res = tr.publish_message('base::attach', @session_instance)
28
28
  end
29
29
  @options.merge!('handle_id' => res.sender).merge!(@session_instance)
@@ -31,7 +31,7 @@ end
31
31
 
32
32
  def session
33
33
  res = nil
34
- @gateway.start_transaction(true, @instance) do |tr|
34
+ @gateway.session_endpoint_private(@instance) do |tr|
35
35
  res = tr.publish_message('base::create', @instance)
36
36
  end
37
37
  @options.merge!('session_id' => res.session).merge!(@instance)
@@ -12,10 +12,10 @@ describe 'RubyRabbitmqJanus::RRJ -- message type attach' do
12
12
  @options = @session_instance
13
13
  end
14
14
 
15
- describe '#start_transaction', type: :request,
16
- level: :base,
17
- broken: true,
18
- name: :attach do
15
+ describe '#session_endpoint_public', type: :request,
16
+ level: :base,
17
+ broken: true,
18
+ name: :attach do
19
19
  context 'when queue is exclusive' do
20
20
  include_examples 'transaction should match json schema'
21
21
  end
@@ -8,9 +8,9 @@ describe 'RubyRabbitmqJanus::RRJ -- message type create', broken: true do
8
8
  @type = 'base::create'
9
9
  end
10
10
 
11
- describe '#start_transaction', type: :request,
12
- level: :base,
13
- name: :create do
11
+ describe '#session_endpoint_public', type: :request,
12
+ level: :base,
13
+ name: :create do
14
14
  context 'when queue is exclusive' do
15
15
  include_examples 'transaction should match json schema'
16
16
  end
@@ -9,9 +9,9 @@ describe 'RubyRabbitmqJanus::RRJ -- message type destroy' do
9
9
  @type = 'base::destroy'
10
10
  end
11
11
 
12
- describe '#start_transaction', type: :request,
13
- level: :base,
14
- name: :destroy do
12
+ describe '#session_endpoint_public', type: :request,
13
+ level: :base,
14
+ name: :destroy do
15
15
  context 'when queue is exclusive' do
16
16
  include_examples 'transaction should match json schema'
17
17
  end
@@ -12,10 +12,10 @@ describe 'RubyRabbitmqJanus::RRJ -- mesage type detach' do
12
12
  @type = 'base::detach'
13
13
  end
14
14
 
15
- describe '#start_transaction_handle', type: :request,
16
- level: :base,
17
- broken: true,
18
- name: :detach do
15
+ describe '#handle_endpoint_public', type: :request,
16
+ level: :base,
17
+ broken: true,
18
+ name: :detach do
19
19
  context 'when queue is exclusive' do
20
20
  include_examples 'transaction handle should match json schema'
21
21
  end
@@ -8,9 +8,9 @@ describe 'RubyRabbitmqJanus::RRJ -- message type info', broken: true do
8
8
  @type = 'base::info'
9
9
  end
10
10
 
11
- describe '#start_transaction', type: :request,
12
- level: :base,
13
- name: :info do
11
+ describe '#session_endpoint_public', type: :request,
12
+ level: :base,
13
+ name: :info do
14
14
  context 'when queue is exclusive' do
15
15
  include_examples 'transaction should match json schema'
16
16
  end
@@ -9,9 +9,9 @@ describe 'RubyRabbitmqJanus::RRJ -- message type keepalive' do
9
9
  @type = 'base::keepalive'
10
10
  end
11
11
 
12
- describe '#start_transaction', type: :request,
13
- level: :base,
14
- name: :keepalive do
12
+ describe '#session_endpoint_public', type: :request,
13
+ level: :base,
14
+ name: :keepalive do
15
15
  context 'when queue is exclusive' do
16
16
  include_examples 'transaction should match json schema'
17
17
  end
@@ -12,10 +12,10 @@ describe 'RubyRabbitmqJanus::RRJ -- message type offer' do
12
12
  @options.merge!('sdp' => SDP_OFFER).merge!(@session_instance)
13
13
  end
14
14
 
15
- describe '#start_transaction_handle', type: :request,
16
- level: :peer,
17
- broken: true,
18
- name: :offer do
15
+ describe '#handle_endpoint_public', type: :request,
16
+ level: :peer,
17
+ broken: true,
18
+ name: :offer do
19
19
  context 'when queue is exclusive' do
20
20
  it_behaves_like 'transaction handle should match json schema'
21
21
  end
@@ -15,10 +15,10 @@ describe 'RubyRabbitmqJanus::RRJ -- message type trickle' do
15
15
  @options.merge!('candidate' => candidate)
16
16
  end
17
17
 
18
- describe '#start_transaction_handle', type: :request,
19
- level: :base,
20
- broken: true,
21
- name: :trickle do
18
+ describe '#handle_endpoint_public', type: :request,
19
+ level: :base,
20
+ broken: true,
21
+ name: :trickle do
22
22
  context 'when queue is exclusive' do
23
23
  include_examples 'transaction handle should match json schema'
24
24
  end
@@ -15,10 +15,10 @@ describe 'RubyRabbitmqJanus::RRJ -- message type trickles' do
15
15
  @options.merge!('candidates' => [candidate, candidate, candidate])
16
16
  end
17
17
 
18
- describe '#start_transaction_handle', type: :request,
19
- level: :base,
20
- broken: true,
21
- name: :trickles do
18
+ describe '#handle_endpoint_public', type: :request,
19
+ level: :base,
20
+ broken: true,
21
+ name: :trickles do
22
22
  context 'when queue is exclusive' do
23
23
  include_examples 'transaction handle should match json schema'
24
24
  end
@@ -7,7 +7,7 @@ describe RubyRabbitmqJanus::Janus::Responses::Admin, type: :responses,
7
7
  broken: true,
8
8
  name: :admin do
9
9
  let(:message) do
10
- @gateway.start_transaction_admin do |transaction|
10
+ @gateway.admin_endpoint do |transaction|
11
11
  @response = transaction.publish_message(type)
12
12
  end
13
13
  end
@@ -28,7 +28,7 @@ describe RubyRabbitmqJanus::Janus::Responses::Admin, type: :responses,
28
28
 
29
29
  describe '#info' do
30
30
  before do
31
- @gateway.start_transaction do |transaction|
31
+ @gateway.session_endpoint_private do |transaction|
32
32
  @response = transaction.publish_message('base::attach')
33
33
  end
34
34
  end
@@ -7,7 +7,7 @@ describe RubyRabbitmqJanus::Janus::Responses::Event, type: :responses,
7
7
  broken: true do
8
8
  let(:message) do
9
9
  # Transaction not exclusive, response is public queue
10
- @gateway.start_transaction(false) do |transaction|
10
+ @gateway.session_endpoint_public do |transaction|
11
11
  @response = transaction.publish_message(type)
12
12
  end
13
13
  end
@@ -6,7 +6,7 @@ describe RubyRabbitmqJanus::Janus::Responses::Response, type: :responses,
6
6
  name: :response do
7
7
  let(:type) { 'base::info' }
8
8
  let(:message) do
9
- @gateway.start_transaction do |transaction|
9
+ @gateway.session_endpoint_public do |transaction|
10
10
  @response = transaction.publish_message(type)
11
11
  end
12
12
  end
@@ -6,7 +6,7 @@ describe RubyRabbitmqJanus::Janus::Responses::Standard, type: :responses,
6
6
  broken: true,
7
7
  name: :standard do
8
8
  let(:message) do
9
- @gateway.start_transaction do |transaction|
9
+ @gateway.session_endpoint_public do |transaction|
10
10
  @response = transaction.publish_message(type)
11
11
  end
12
12
  end
@@ -29,7 +29,7 @@ describe RubyRabbitmqJanus::Janus::Responses::Standard, type: :responses,
29
29
 
30
30
  context 'when session and sender' do
31
31
  before do
32
- @gateway.start_transaction do |transaction|
32
+ @gateway.session_endpoint_public do |transaction|
33
33
  @response = transaction.publish_message('base::create')
34
34
  end
35
35
  end
@@ -12,7 +12,7 @@ end
12
12
 
13
13
  # Create a session
14
14
  def help_admin_create_session
15
- @gateway.start_transaction(true, @opt_instance) do |transaction|
15
+ @gateway.session_endpoint_public(@opt_instance) do |transaction|
16
16
  session = transaction.publish_message('base::create', @opt_transaction).session
17
17
 
18
18
  @opt_transaction['session_id'] = session
@@ -22,7 +22,7 @@ end
22
22
 
23
23
  # Create a handler (attached to plugin echo test)
24
24
  def help_admin_create_handler
25
- @gateway.start_transaction(true, @opt_instance) do |transaction|
25
+ @gateway.session_endpoint_public(@opt_instance) do |transaction|
26
26
  handler = transaction.publish_message('base::attach', @opt_transaction).sender
27
27
  @opt_transaction['handle_id'] = handler
28
28
  @opt_instance.merge!(@opt_transaction)
@@ -33,7 +33,7 @@ end
33
33
  def help_admin_request_before(type_before, admin_opt = {})
34
34
  @opt_transaction.merge!(admin_opt)
35
35
 
36
- @gateway.start_transaction_admin(@opt_instance) do |transaction|
36
+ @gateway.admin_endpoint(@opt_instance) do |transaction|
37
37
  transaction.publish_message(type_before, @opt_transaction)
38
38
  end
39
39
  end
@@ -42,7 +42,7 @@ end
42
42
  def help_admin_request_tested(admin_opt = {})
43
43
  @opt_transaction.merge!(admin_opt)
44
44
 
45
- @gateway.start_transaction_admin(@opt_instance) do |transaction|
45
+ @gateway.admin_endpoint(@opt_instance) do |transaction|
46
46
  @transaction = transaction.publish_message(type, @opt_transaction)
47
47
  end
48
48
  end
@@ -16,7 +16,7 @@ end
16
16
 
17
17
  shared_examples 'transaction should match json empty' do
18
18
  let(:message) do
19
- @gateway.start_transaction(false, @session_instance) do |transaction|
19
+ @gateway.session_endpoint_public(@session_instance) do |transaction|
20
20
  @response = transaction.publish_message(@type, @options)
21
21
  end
22
22
  end
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  shared_examples 'transaction should match json schema' do
28
28
  let(:message) do
29
- @gateway.start_transaction(true, @session_instance) do |transaction|
29
+ @gateway.session_endpoint_private(@session_instance) do |transaction|
30
30
  @response = transaction.publish_message(@type, @options)
31
31
  end
32
32
  end
@@ -36,7 +36,7 @@ end
36
36
 
37
37
  shared_examples 'transaction handle should match json schema' do
38
38
  let(:message) do
39
- @gateway.start_transaction_handle(true, @session_instance) do |transaction|
39
+ @gateway.handle_endpoint_private(@session_instance) do |transaction|
40
40
  @response = transaction.publish_message(@type, @options)
41
41
  end
42
42
  end
@@ -46,7 +46,7 @@ end
46
46
 
47
47
  shared_examples 'transaction handle should match json empty' do
48
48
  let(:message) do
49
- @gateway.start_transaction_handle(false, @session_instance) do |transaction|
49
+ @gateway.handle_endpoint_public(@session_instance) do |transaction|
50
50
  @response = transaction.publish_message(@type, @options)
51
51
  end
52
52
  end
@@ -56,7 +56,7 @@ end
56
56
 
57
57
  shared_examples 'transaction admin should match json schema' do
58
58
  let(:message) do
59
- @gateway.start_transaction_admin(@instance) do |transaction|
59
+ @gateway.admin_endpoint(@instance) do |transaction|
60
60
  @response = transaction.publish_message(@type, @options)
61
61
  end
62
62
  end
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  shared_examples 'response with sender is' do |klass|
11
11
  let(:message) do
12
- @gateway.start_transaction do |transaction|
12
+ @gateway.session_endpoint_public do |transaction|
13
13
  opts = { 'handle_id' => @response.sender }
14
14
  @response = transaction.publish_message(type, opts)
15
15
  end
@@ -20,8 +20,8 @@ end
20
20
 
21
21
  shared_examples 'admin response with sender is' do |klass|
22
22
  let(:message) do
23
- @gateway.start_transaction_admin do |transaction|
24
- opts = { 'handle_id' => @response.sender }
23
+ opts = { 'handle_id' => @response.sender }
24
+ @gateway.admin_endpoint(opts) do |transaction|
25
25
  @response = transaction.publish_message(type, opts)
26
26
  end
27
27
  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: 2.7.2
4
+ version: 3.0.0.pre.327
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-24 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -677,9 +677,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
677
677
  version: 2.5.0
678
678
  required_rubygems_version: !ruby/object:Gem::Requirement
679
679
  requirements:
680
- - - ">="
680
+ - - ">"
681
681
  - !ruby/object:Gem::Version
682
- version: '0'
682
+ version: 1.3.1
683
683
  requirements: []
684
684
  rubygems_version: 3.0.6
685
685
  signing_key: