class EacLauncher::Stereotypes::GitSubtree
Public Class Methods
color()
click to toggle source
# File lib/eac_launcher/stereotypes/git_subtree.rb, line 22 def color :green end
match?(path)
click to toggle source
# File lib/eac_launcher/stereotypes/git_subtree.rb, line 12 def match?(path) return false if other_git_stereotype?(path) return false unless other_nogit_stereotype?(path) parent = parent_git(path.parent_path) return false unless parent ::Git.open(parent.real).remote(path.real.basename).url ? true : false end
other_git_stereotype?(path)
click to toggle source
# File lib/eac_launcher/stereotypes/git_subtree.rb, line 36 def other_git_stereotype?(path) ::EacLauncher::Stereotypes::Git.match?(path) || ::EacLauncher::Stereotypes::GitSubrepo.match?(path) end
other_nogit_stereotype?(path)
click to toggle source
# File lib/eac_launcher/stereotypes/git_subtree.rb, line 41 def other_nogit_stereotype?(path) EacLauncher::Stereotype.nogit_stereotypes.any? { |s| s.match?(path) } end
parent_git(parent_path)
click to toggle source
# File lib/eac_launcher/stereotypes/git_subtree.rb, line 26 def parent_git(parent_path) return nil unless parent_path if ::EacLauncher::Stereotypes::Git.match?(parent_path) parent_path else parent_git(parent_path.parent_path) end end