Sha256: 6f5b8cd4da7b3bc49d83a22b8e58d62bf1ba34b20fd17a7570725c208d8dc59f

Contents?: true

Size: 753 Bytes

Versions: 12

Compression:

Stored size: 753 Bytes

Contents

# frozen_string_literal: true

require 'rails'
require 'action_view'

module RubyRabbitmqJanus
  # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>

  # # Rails
  #
  # Use option to rails for prepapre application with RRJ.
  # Initialize public queue to janus instance.
  class Rails < ::Rails::Engine
    config.after_initialize do
      Log.debug '[RRJ] After initializer'
      require File.join(Dir.pwd,
                        RubyRabbitmqJanus::Tools::Config.instance.listener_path)

      Log.info 'Listen public queue in thread'
      actions = RubyRabbitmqJanus::ActionEvents.new.actions
      RubyRabbitmqJanus::Janus::Concurrencies::Event.instance.run(&actions)
    end
  end
end

require ::File.expand_path('config/environment', Dir.pwd)

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.7.1 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.7.1.pre.274 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.7.0.pre.272 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.7.0 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.7.0.pre.269 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.7.0.pre.267 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.6.0 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.6.0.pre.263 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.6.0.pre.261 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.6.0.pre.260 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.6.0.pre.259 lib/rrj/rails.rb
ruby_rabbitmq_janus-2.6.0.pre.258 lib/rrj/rails.rb