Sha256: e2dd849c22b3ce335149d3dce0c0448577f70ff720dad11acabe7f2d427ac57e

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true

require 'find'

module Xezat
  module Detector
    class Python36Docutils
      def detect(variables)
        Find.find(variables[:S]) do |file|
          next unless file.end_with?(File::SEPARATOR + 'configure.ac') || file.end_with?(File::SEPARATOR + 'configure.in')

          File.foreach(file) do |line|
            return true if line.strip.start_with?('AC_CHECK_PROG') && line.index('rst2man').is_a?(Integer)
          end
        end
        false
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xezat-0.2.0 lib/xezat/detector/python36-docutils.rb
xezat-0.1.2 lib/xezat/detector/python36-docutils.rb