ruby_rabbitmq_janus 2.7.2.pre.315 → 2.7.2.pre.316

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: 24b27765db5248086e86c2a877fc32705b8c8adc99d0e009c02fa5c610c3cd4d
4
- data.tar.gz: efbf4bd7009b90835ed3aaf5d562a396a2c7e6d054c0cb2ea49e2479bd90928c
3
+ metadata.gz: a89995ee83a710973b4e2fbb3789a5de1a176177dfa6852cf3116a006fe72b51
4
+ data.tar.gz: e843a311bbf1f1c7aedc407898e96c65b3ee68523f68feb352cea4988dcfbe62
5
5
  SHA512:
6
- metadata.gz: ffb3c08464d8dab6d6496a1882a040f7a0b3bec55eccfbb9419c0e84647fdc3f8bcf5d94262ab402b5b972f3085ceb49f1c08e67a99ad76f160d40fac7b010c5
7
- data.tar.gz: 5d2031e3645a6f88a7aab5a04beb667145d05101c4cea6f44f345d6fdf69852808ce7f253f6dce75747123355640a1d6e2eab2029a03181b8674970a5108039d
6
+ metadata.gz: 9066cbe001bea390465dac388a7c0646f4ec83ed7a8b54aa1fa2d6c393cca1074926d3b5bca7a10db6e5647e0fc7e025f04cb1f95f5da31e791b4defe4c87772
7
+ data.tar.gz: bd883fbc9cadcf3622e65302a08273c47397adbedbbcccf5d4ebbe51d0b6ea7e8179469023070f99b83b42c3817d097f046d4be1248620af78a30e2e736b5b38
data/config/default.md CHANGED
@@ -37,7 +37,8 @@ gem:
37
37
  type: file
38
38
  option: ''
39
39
  listener:
40
- path: 'app/ruby_rabbitmq_janus'
40
+ public: 'app/ruby_rabbitmq_janus/action_events'
41
+ admin: 'app/ruby_rabbitmq_janus/action_admin_events'
41
42
  environment: 'development'
42
43
  orm: 'mongoid'
43
44
  response_path: 'spec/supports/rrj/responses'
data/config/default.yml CHANGED
@@ -69,7 +69,8 @@ gem:
69
69
  # Options for listener thread
70
70
  listener:
71
71
  # Represent path to action_events class in project who use this gem
72
- path: 'app/ruby_rabbitmq_janus'
72
+ public: 'app/ruby_rabbitmq_janus/action_events'
73
+ admin: 'app/ruby_rabbitmq_janus/action_admin_events'
73
74
  # Environment to application
74
75
  environment : 'development'
75
76
  # Precise ORM used :
data/lib/rrj/rails.rb CHANGED
@@ -8,17 +8,25 @@ module RubyRabbitmqJanus
8
8
 
9
9
  # # Rails
10
10
  #
11
- # Use option to rails for prepapre application with RRJ.
12
- # Initialize public queue to janus instance.
11
+ # Use option to rails for prepare application with RRJ.
12
+ # Initialize public queue to Janus instance.
13
13
  class Rails < ::Rails::Engine
14
14
  config.after_initialize do
15
15
  Log.debug '[RRJ] After initializer'
16
16
  require File.join(Dir.pwd,
17
17
  RubyRabbitmqJanus::Tools::Config.instance.listener_path)
18
+ require File.join(Dir.pwd,
19
+ RubyRabbitmqJanus::Tools::Config.instance.listener_admin_path)
20
+
21
+ process = RubyRabbitmqJanus::Process::Concurrencies
18
22
 
19
- Log.info 'Listen public queue in thread'
23
+ Log.info '[RRJ] Listen public queue in thread'
20
24
  actions = RubyRabbitmqJanus::ActionEvents.new.actions
21
- RubyRabbitmqJanus::Process::Concurrencies::Event.instance.run(&actions)
25
+ process::Event.instance.run(&actions)
26
+
27
+ Log.info '[RRJ] Listen admin queue in thread'
28
+ admin_actions = RubyRabbitmqJanus::ActionAdminEvents.new.actions
29
+ process::EventAdmin.instance.run(&admin_actions)
22
30
  end
23
31
  end
24
32
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rrj/rails' if defined?(::Rails::Engine)
3
+ require 'rrj/rails'
4
4
 
5
- Log.info 'Listen Public queue to Janus'
6
5
  loop {}
@@ -33,10 +33,16 @@ module RubyRabbitmqJanus
33
33
 
34
34
  # @return [String] Get path to classes in project calling this gem.
35
35
  def listener_path
36
- @options['gem']['listener']['path'].to_s ||
36
+ @options['gem']['listener']['public'].to_s ||
37
37
  'app/ruby_rabbitmq_janus/action_events'
38
38
  end
39
39
 
40
+ # @return [String] Get path to classes in project calling this gem.
41
+ def listener_admin_path
42
+ @options['gem']['listener']['admin'].to_s ||
43
+ 'app/ruby_rabbitmq_janus/action_admin_events'
44
+ end
45
+
40
46
  # @return [String] Environment gem executed.
41
47
  def environment
42
48
  @options['gem']['environment'].to_s || 'development'
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.315
4
+ version: 2.7.2.pre.316
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy