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 +4 -4
- data/config/default.md +2 -1
- data/config/default.yml +2 -1
- data/lib/rrj/rails.rb +12 -4
- data/lib/rrj/tools/bin/init.rb +1 -2
- data/lib/rrj/tools/gem/config/gem.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a89995ee83a710973b4e2fbb3789a5de1a176177dfa6852cf3116a006fe72b51
|
|
4
|
+
data.tar.gz: e843a311bbf1f1c7aedc407898e96c65b3ee68523f68feb352cea4988dcfbe62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
12
|
-
# Initialize public queue to
|
|
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
|
-
|
|
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
|
data/lib/rrj/tools/bin/init.rb
CHANGED
|
@@ -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']['
|
|
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'
|