Sha256: 8fff97d61391d1c0a1955b6b6dbbe92e70129a95ed179920fa96c4137c728e19

Contents?: true

Size: 505 Bytes

Versions: 4

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

module AnnotateRb
  class ConfigFinder
    DOTFILE = '.annotaterb.yml'

    class << self
      def find_project_root
        # We should expect this method to be called from a Rails project root and returning it
        # e.g. "/Users/drwl/personal/annotaterb/dummyapp"
        Dir.pwd
      end

      def find_project_dotfile
        file_path = File.expand_path(DOTFILE, find_project_root)

        return file_path if File.exist?(file_path)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
annotaterb-4.1.1 lib/annotate_rb/config_finder.rb
annotaterb-4.1.0 lib/annotate_rb/config_finder.rb
annotaterb-4.0.0 lib/annotate_rb/config_finder.rb
annotaterb-4.0.0.beta.1 lib/annotate_rb/config_finder.rb