This file is indexed.

/usr/lib/ruby/vendor_ruby/specinfra/runner.rb is in ruby-specinfra 2.66.0-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
module Specinfra
  class Runner
    def self.method_missing(meth, *args)
      backend   = Specinfra.backend
      processor = Specinfra::Processor
      
      if ! os.include?(:family) || os[:family] != 'windows'
        if processor.respond_to?(meth)
          processor.send(meth, *args)
        elsif backend.respond_to?(meth)
          backend.send(meth, *args)
        else
          run(meth, *args)
        end
      else
        if backend.respond_to?(meth)
          backend.send(meth, *args)
        else
          run(meth, *args)
        end
      end
    end

    private
    def self.run(meth, *args)
      cmd = Specinfra.command.get(meth, *args)
      ret = Specinfra.backend.run_command(cmd)
      if meth.to_s =~ /^check/
        ret.success?
      else
        ret
      end
    end
  end
end