This file is indexed.

/usr/lib/ruby/vendor_ruby/qrack/queue.rb is in ruby-bunny 0.7.8-1.

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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# encoding: utf-8

module Qrack

  # Queue ancestor class
  class Queue

    # @return [AMQ::Client::Consumer] Default consumer (registered with {Queue#subscribe}).
    attr_accessor :default_consumer

    attr_reader :name, :client

    attr_accessor :delivery_tag


    # Returns consumer count from {Queue#status}.
    def consumer_count
      s = status
      s[:consumer_count]
    end

    # Returns message count from {Queue#status}.
    def message_count
      s = status
      s[:message_count]
    end

    # Publishes a message to the queue via the default nameless '' direct exchange.

    # @return [NilClass] nil
    # @deprecated
    # @note This method will be removed before 0.8 release.
    def publish(data, opts = {})
      Bunny.deprecation_warning("Qrack::Queue#publish", "0.8", "Use direct_exchange = bunny.exchange(''); direct_exchange.publish('message', key: queue.name) if you want to publish directly to one given queue. For more informations see https://github.com/ruby-amqp/bunny/issues/15 and for more theoretical explanation check http://bit.ly/nOF1CK")
      exchange.publish(data, opts)
    end

  end

end