This file is indexed.

/usr/lib/ruby/vendor_ruby/specinfra/helper/configuration.rb is in ruby-specinfra 2.35.1-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
module Specinfra
  module Helper
    module Configuration
      def subject
        example = RSpec.respond_to?(:current_example) ? RSpec.current_example : self.example
        example.metadata[:subject] = described_class
        build_configurations
        super
      end

      # You can create a set of configurations provided to all specs in your spec_helper:
      #
      #   RSpec.configure { |c| c.pre_command = "source ~/.zshrc" }
      #
      # Any configurations you provide with `let(:option_name)` in a spec will
      # automatically be merged on top of the configurations.
      #
      # @example
      #
      #   describe 'Gem' do
      #     let(:pre_command) { "source ~/.zshrc" }
      #
      #     %w(pry awesome_print bundler).each do |p|
      #       describe package(p) do
      #         it { should be_installed.by('gem') }
      #       end
      #     end
      #   end
      def build_configurations
        Specinfra::Configuration.defaults.keys.each do |c|
          if self.respond_to?(c.to_sym)
            value = self.send(c)
          else
            value = RSpec.configuration.send(c) if defined?(RSpec)
          end
          Specinfra::Configuration.instance_variable_set("@#{c}", value)
        end
      end
    end
  end
end