This file is indexed.

/usr/lib/ruby/vendor_ruby/amqp/integration/rails.rb is in ruby-amqp 0.9.5-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require "yaml"

module AMQP
  module Integration
    class Rails

      def self.start(options_or_uri = {}, &block)
        yaml     = YAML.load_file(File.join(::Rails.root, "config", "amqp.yml"))
        settings = yaml.fetch(::Rails.env, Hash.new).symbolize_keys

        arg      = if options_or_uri.is_a?(Hash)
                     settings.merge(options_or_uri)[:uri]
                   else
                     settings[:uri] || options_or_uri
                   end

        EventMachine.next_tick do
          AMQP.start(arg, &block)
        end
      end
    end # Rails
  end # Integration
end # AMQP