This file is indexed.

/usr/lib/ruby/vendor_ruby/mini_magick.rb is in ruby-mini-magick 3.8.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
require 'mini_magick/command_builder'
require 'mini_magick/errors'
require 'mini_magick/image'
require 'mini_magick/utilities'

module MiniMagick
  @validate_on_create = true
  @validate_on_write = true

  class << self
    attr_accessor :processor
    attr_accessor :processor_path
    attr_accessor :timeout
    attr_accessor :debug
    attr_accessor :validate_on_create
    attr_accessor :validate_on_write

    ##
    # Tries to detect the current processor based if any of the processors
    # exist. Mogrify have precedence over gm by default.
    #
    # === Returns
    # * [Symbol] The detected procesor
    def processor
      @processor ||= [:mogrify, :gm].detect do |processor|
        MiniMagick::Utilities.which(processor.to_s)
      end
    end

    ##
    # Discovers the imagemagick version based on mogrify's output.
    #
    # === Returns
    # * The imagemagick version
    def image_magick_version
      @@version ||= Gem::Version.create(`mogrify --version`.split(' ')[2].split('-').first)
    end

    ##
    # The minimum allowed imagemagick version
    #
    # === Returns
    # * The minimum imagemagick version
    def minimum_image_magick_version
      @@minimum_version ||= Gem::Version.create('6.6.3')
    end

    ##
    # Checks whether the imagemagick's version is valid
    #
    # === Returns
    # * [Boolean]
    def valid_version_installed?
      image_magick_version >= minimum_image_magick_version
    end

    ##
    # Checks whether the current processory is mogrify.
    #
    # === Returns
    # * [Boolean]
    def mogrify?
      processor && processor.to_sym == :mogrify
    end

    ##
    # Checks whether the current processor is graphicsmagick.
    #
    # === Returns
    # * [Boolean]
    def gm?
      processor && processor.to_sym == :gm
    end
  end
end