ruby_rabbitmq_janus 2.7.2.pre.305 → 2.7.2.pre.306

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dea6676e72ea73888d0e91bcf0887a261517d00101c66dd1b9310079b86c843
4
- data.tar.gz: 9c0ef094355af887fa9a3010f4d711c32b50b6b5b1084a8609da80f0b88ca2bd
3
+ metadata.gz: ada073a94271720abfa45438672e23973b22ff6b930d1d2ebec2c9f9213f3267
4
+ data.tar.gz: 17ca6cf68ae2f749a423519c87f62123c48a47fa222ee1e07a79756bde5ad4b2
5
5
  SHA512:
6
- metadata.gz: 8457f02e1682337d758a0e434e5fadefd66a210bc3e863d52fb2639edc3d1b524c7308da5af77767b40359787e47d9dd0c6df45e9442261334c88c165c54ac0e
7
- data.tar.gz: 70d0a8449d84f1e5c5d3824d94c12160340b77fbba08ac2e7606f26a7f43ea93de86fa98adb4c482cc4ec970ae889fa3906abd8bebe3bea4463d5d6ebe8f3871
6
+ metadata.gz: b383b65d014a7b2152860a0f402fb92c571d534635036bd07cb29860ca03094c8a6459732dcc223904328c29aa8c970b90697547673569af0d1b7ce7269bf0c3
7
+ data.tar.gz: 9d4edefbcdc02dc93ebd1acd7a1aa19db651ef148596abbe9b32fd03395c91a8dfe809e0b02134976cdc2d7ec6b597223cc036e434d55cd06f6ac852b7b6a505
data/Rakefile CHANGED
@@ -4,7 +4,11 @@ require 'bundler/gem_tasks'
4
4
  require 'rspec/core/rake_task'
5
5
 
6
6
  # Exclude all spec with type :thread
7
- RSpec::Core::RakeTask.new(:spec) do |t|
7
+ RSpec::Core::RakeTask.new(:spec) do |_t|
8
+ end
9
+
10
+ # Exclude all spec with type :thread
11
+ RSpec::Core::RakeTask.new(:classic) do |t|
8
12
  t.rspec_opts = '--tag ~type:thread'
9
13
  end
10
14
 
@@ -14,5 +18,5 @@ RSpec::Core::RakeTask.new(:concurrency) do |t|
14
18
  end
15
19
 
16
20
  task default: :spec
17
-
21
+ task request: :classic
18
22
  task thread: :concurrency
@@ -37,7 +37,6 @@ module Rails
37
37
  PROGRAM = console? ? 'console' : pg_name
38
38
  end
39
39
 
40
-
41
40
  # If you used gem config for manage your ENV variables uncomment this line
42
41
  # @see https://rubygems.org/gems/config
43
42
  Settings.reload!
@@ -57,7 +56,8 @@ Settings.reload!
57
56
  # Reload env variable before start thread RRJ for
58
57
  # listen events in RabbitMQ public queue.
59
58
  # Load class manually.
60
- # It's loaded after initializer so add manually here the listener block.
59
+ # It's loaded after initializer so add
60
+ # manually here the listener block.
61
61
  RubyRabbitmqJanus::RRJAdmin.new
62
62
 
63
63
  # Comment/Remove this line if RRJ listener public queue is executed
@@ -66,11 +66,12 @@ Settings.reload!
66
66
  # Loading classes Actions to rails application
67
67
  require 'actions'
68
68
 
69
- # Send a block code to thread for manage event given by Janus in public queue
69
+ # Send a block code to thread for manage
70
+ # event given by Janus in public queue
70
71
  Rails.configuration.after_initialize do
71
72
  # If you don't want listen a standard queue, comment this block and
72
73
  # "require 'actions'" also
73
- actions = RubyRabbitmqJanus::ActionEvents.new.actions
74
- RubyRabbitmqJanus::Janus::Concurrencies::Event.instance.run(&actions)
74
+ act = RubyRabbitmqJanus::ActionEvents.new.actions
75
+ RubyRabbitmqJanus::Janus::Concurrencies::Event.instance.run(&act)
75
76
  end
76
77
  end
@@ -3,7 +3,7 @@
3
3
  namespace :rrj do
4
4
  namespace :delete do
5
5
  desc 'Delete one instance in database and janus'
6
- task :one_instance, [:instance, :session] => :environment do |_task, args|
6
+ task :one_instance, %i[instance session] => :environment do |_task, args|
7
7
  tags = '[RubyRabbitmqJanus][rrj:delete:one_instance] '
8
8
  timelaps = Time.now.utc
9
9
 
@@ -11,11 +11,11 @@ namespace :rrj do
11
11
  "with session #{args[:session]}"
12
12
 
13
13
  janus_instance = RubyRabbitmqJanus::Models::JanusInstance\
14
- .find_by_session(args[:session])
14
+ .find_by_session(args[:session])
15
15
 
16
- janus_instance.destroy if janus_instance
16
+ janus_instance&.destroy
17
17
 
18
- Rails.logger.info "#{tags}Executed in #{Time.now.utc - timelaps} ms"
18
+ Rails.logger.info "#{tags}Executed in #{Time.now.utc - timelaps} ms"
19
19
  end
20
20
  end
21
21
  end
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.7.2.pre.305
4
+ version: 2.7.2.pre.306
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy