ruby_rabbitmq_janus 2.6.0.pre.246 → 2.6.0.pre.247

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: 91b38bd476021288dadfc1a47a4c2226d5690544b9993542944dd1f9f18759c7
4
- data.tar.gz: 68afeed194a61a7a0fc43398cf798bc95f59041fad368de7f54cbab9535310fe
3
+ metadata.gz: 0403e680765b24268400bab862938a771432959961a9071a87a7491f1880eb00
4
+ data.tar.gz: 222fcf4697c1aeef809dd131c3d6dfe922aa6cf0357c132097e691958b4b9b6e
5
5
  SHA512:
6
- metadata.gz: a7eade36b3abe79be1d5f56dc19328b86c01fd8b156285819aeaab34e1d3a7dd822fad37ec741face0c5974fe2426ced0d02c9c694e5be399d16a20d9bed6876
7
- data.tar.gz: 795ee29c47503a800ab093cf1d51852a897f326066be3ace3c3e9803b6b02b37b848b1a74948bf5b5833ea10fd78207ee839360e77a89a3e23b0a6cca55c8f64
6
+ metadata.gz: f4c5c93c62f7028515dcc21fe0b5f30bd5b977e997692d4b76a20524705902e8f56964a43a3e6e46d30c56e71e6793034dbe595bf429974b172229044305f84f
7
+ data.tar.gz: 8c7f474b45d0ed4958625ccc3056bd7efdc9c3ca457c469e453198f1ce89da5947f35b749337dfb2e9cea5a690d8d45fbbf9b45fb5a1c617e9989bdd0cf57817
data/lib/rrj/rails.rb ADDED
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails'
4
+ require 'action_view'
5
+
6
+ module RubyRabbitmqJanus
7
+ # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
8
+
9
+ # # Rails
10
+ #
11
+ # Use option to rails for prepapre application with RRJ.
12
+ # Initialize public queue to janus instance.
13
+ class Rails < ::Rails::Engine
14
+ config.after_initialize do
15
+ Log.debug '[RRJ] After initializer'
16
+ Log.debug "Load file : #{File.join(Dir.pwd, LISTENER_PATH)}"
17
+ require File.join(Dir.pwd, LISTENER_PATH)
18
+
19
+ Log.info 'Listen public queue in thread'
20
+ actions = RubyRabbitmqJanus::ActionEvents.new.actions
21
+ RubyRabbitmqJanus::Janus::Concurrencies::Event.instance.run(&actions)
22
+ end
23
+ end
24
+ end
25
+
26
+ require ::File.expand_path('config/environment', Dir.pwd)
@@ -2,7 +2,6 @@
2
2
 
3
3
  # Arguments
4
4
  #
5
- # --verbose
6
5
  # --log <path>
7
6
 
8
7
  def arg_log(path, class_name)
@@ -11,17 +10,11 @@ def arg_log(path, class_name)
11
10
  @logger_path = "#{Dir.pwd}/#{path}"
12
11
  end
13
12
 
14
- def arg_verbose
15
- @verbose = true
16
- end
17
-
18
13
  ARGV.each_with_index do |argument, position|
19
14
  case argument
20
15
  when '--log'
21
16
  arg_log(ARGV[position + 1],
22
17
  ARGV[position + 2])
23
- when --'verbose'
24
- arg_verbose
25
18
  else
26
19
  next
27
20
  end
@@ -15,5 +15,4 @@ ORM = check_variable('ORM')
15
15
  LISTENER_PATH = check_variable('LISTENER_PATH')
16
16
  PROGRAM = check_variable('PROGRAM_NAME')
17
17
 
18
- @verbose = false
19
18
  @logger_class = true
@@ -16,7 +16,7 @@ require 'ruby_rabbitmq_janus'
16
16
  # rubocop:enable Naming/ConstantName
17
17
 
18
18
  Log.info "RRJ Version : #{RubyRabbitmqJanus::VERSION}"
19
- Log.info RubyRabbitmqJanus::BANNER
19
+ Log.info "\r\n#{RubyRabbitmqJanus::BANNER}"
20
20
 
21
21
  require File.join(File.dirname(__FILE__), '..', '..', 'binary')
22
22
 
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.6.0.pre.246
4
+ version: 2.6.0.pre.247
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-08-22 00:00:00.000000000 Z
11
+ date: 2019-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -549,6 +549,7 @@ files:
549
549
  - lib/rrj/rabbit/publisher/keepalive.rb
550
550
  - lib/rrj/rabbit/publisher/non_exclusive.rb
551
551
  - lib/rrj/rabbit/rabbit.rb
552
+ - lib/rrj/rails.rb
552
553
  - lib/rrj/railtie.rb
553
554
  - lib/rrj/rspec.rb
554
555
  - lib/rrj/task.rb