Sha256: 1c83f197cb533cdc1fa6c5fe7c753102120ccacecf71b3b4397ac102d700991b

Contents?: true

Size: 718 Bytes

Versions: 2

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

module Coconductor
  module Projects
    class FSProject < Licensee::Projects::FSProject
      include Coconductor::Projects::Project

      private

      # Returns the set of unique paths to search for project files
      # in order from @dir -> @root
      def search_directories
        search_enumerator.map(&:to_path)
                         .push(@root) # ensure root is included in the search
                         .concat(subdirs)
                         .uniq # don't include the root twice if @dir == @root
      end

      def subdirs
        Coconductor::Projects::Project::DIRS.map do |dir|
          File.expand_path dir, @dir
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
coconductor-0.10.1 lib/coconductor/projects/fs_project.rb
coconductor-0.10.0 lib/coconductor/projects/fs_project.rb