This file is indexed.

/usr/lib/ruby/vendor_ruby/bundler/vendor/postit/lib/postit/environment.rb is in ruby-bundler 1.13.6-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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require 'bundler/vendor/postit/lib/postit/parser'

module BundlerVendoredPostIt::PostIt
  class Environment
    def initialize(argv)
      @argv = argv
    end

    def env_var_version
      ENV['BUNDLER_VERSION']
    end

    def cli_arg_version
      return unless str = @argv.first
      str = str.dup.force_encoding('BINARY') if str.respond_to?(:force_encoding)
      if Gem::Version.correct?(str)
        @argv.shift
        str
      end
    end

    def gemfile
      ENV['BUNDLE_GEMFILE'] || 'Gemfile'
    end

    def lockfile
      File.expand_path case File.basename(gemfile)
                       when 'gems.rb' then gemfile.sub(/\.rb$/, gemfile)
                       else "#{gemfile}.lock"
                       end
    end

    def lockfile_version
      BundlerVendoredPostIt::PostIt::Parser.new(lockfile).parse
    end

    def bundler_version
      @bundler_version ||= begin
        env_var_version || cli_arg_version ||
          lockfile_version || "#{Gem::Requirement.default}.a"
      end
    end
  end
end