This file is indexed.

/usr/lib/ruby/vendor_ruby/tasks/test_task.rb is in ruby-fog-core 1.42.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
36
37
38
39
40
41
42
require "rake"
require "rake/tasklib"

module Fog
  module Rake
    class TestTask < ::Rake::TaskLib
      def initialize
        desc "Run the mocked tests"
        task :test do
          ::Rake::Task[:mock_tests].invoke
        end

        task :mock_tests do
          tests(true)
        end

        task :real_tests do
          tests(false)
        end
      end

      def tests(mocked)
        Fog::Formatador.display_line
        start = Time.now.to_i
        threads = []
        Thread.main[:results] = []
        Fog.providers.each do |key, value|
          threads << Thread.new do
            Thread.main[:results] << {
              :provider => value,
              :success  => sh("export FOG_MOCK=#{mocked} && bundle exec shindont +#{key}")
            }
          end
        end
        threads.each(&:join)
        Fog::Formatador.display_table(Thread.main[:results].sort { |x, y| x[:provider] <=> y[:provider] })
        Fog::Formatador.display_line("[bold]FOG_MOCK=#{mocked}[/] tests completed in [bold]#{Time.now.to_i - start}[/] seconds")
        Fog::Formatador.display_line
      end
    end
  end
end