Class: EacLauncher::Stereotypes::GitSubtree
- Inherits:
-
Object
- Object
- EacLauncher::Stereotypes::GitSubtree
show all
- Includes:
- EacLauncher::Stereotype
- Defined in:
- lib/eac_launcher/stereotypes/git_subtree.rb,
lib/eac_launcher/stereotypes/git_subtree/warp.rb,
lib/eac_launcher/stereotypes/git_subtree/publish.rb
Defined Under Namespace
Classes: Publish, Warp
Class Method Summary
collapse
git_stereotypes, included, nogit_stereotypes
Class Method Details
.color ⇒ Object
22
23
24
|
# File 'lib/eac_launcher/stereotypes/git_subtree.rb', line 22
def color
:green
end
|
.match?(path) ⇒ Boolean
12
13
14
15
16
17
18
19
20
|
# 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) ⇒ Boolean
.other_nogit_stereotype?(path) ⇒ Boolean
.parent_git(parent_path) ⇒ Object
26
27
28
29
30
31
32
33
34
|
# 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
|