Sha256: eab2ee21306497e4c36c6eb109f92fd29c696d970b650abf55e654242e8bb781
Contents?: true
Size: 855 Bytes
Versions: 17
Compression:
Stored size: 855 Bytes
Contents
module Coconductor module Projects class GitProject < Licensee::Projects::GitProject include Coconductor::Projects::Project private # Returns an array of hashes representing the project's files. # Hashes will have the the following keys: # :name - the file's path relative to the repo root # :oid - the file's OID def files return @files if defined? @files @files = files_from_tree(commit.tree) commit.tree.each_tree do |tree_hash| next unless subdir?(tree_hash) tree = Rugged::Tree.lookup(@repository, tree_hash[:oid]) @files.concat files_from_tree(tree, tree_hash[:name]) if tree end @files end def subdir?(tree) Coconductor::Projects::Project::DIRS.include? "./#{tree[:name]}/" end end end end
Version data entries
17 entries across 17 versions & 1 rubygems