Sha256: c71b5af1d9b00fe419404e8eee0021e578b6461b1d18ffe3c38939a6ea7c29a2

Contents?: true

Size: 505 Bytes

Versions: 15

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

15 entries across 15 versions & 1 rubygems

Version Path
annotaterb-4.13.0 lib/annotate_rb/config_finder.rb
annotaterb-4.12.0 lib/annotate_rb/config_finder.rb
annotaterb-4.11.0 lib/annotate_rb/config_finder.rb
annotaterb-4.10.2 lib/annotate_rb/config_finder.rb
annotaterb-4.10.1 lib/annotate_rb/config_finder.rb
annotaterb-4.10.0 lib/annotate_rb/config_finder.rb
annotaterb-4.9.0 lib/annotate_rb/config_finder.rb
annotaterb-4.7.0 lib/annotate_rb/config_finder.rb
annotaterb-4.6.0 lib/annotate_rb/config_finder.rb
annotaterb-4.5.0 lib/annotate_rb/config_finder.rb
annotaterb-4.4.1 lib/annotate_rb/config_finder.rb
annotaterb-4.4.0 lib/annotate_rb/config_finder.rb
annotaterb-4.3.1 lib/annotate_rb/config_finder.rb
annotaterb-4.3.0 lib/annotate_rb/config_finder.rb
annotaterb-4.2.0 lib/annotate_rb/config_finder.rb