This file is indexed.

/usr/lib/ruby/vendor_ruby/roadie/rails/mail_inliner.rb is in ruby-roadie-rails 1.1.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
module Roadie
  module Rails
    class MailInliner
      attr_reader :email, :options

      def initialize(email, options)
        @email = email
        @options = options
      end

      def execute
        if options
          improve_body if email.content_type =~ /^text\/html/
          improve_html_part(email.html_part) if email.html_part
        end
        email
      end

      private
      def improve_body
        email.body = transform_html(email.body.decoded)
      end

      def improve_html_part(html_part)
        html_part.body = transform_html(html_part.body.decoded)
      end

      def transform_html(old_html)
        DocumentBuilder.build(old_html, options).transform
      end
    end
  end
end