Merge pull request #37 from edubkendo/glob_fix
Fixes glob to work with 2.0.0
This commit is contained in:
@@ -124,7 +124,7 @@ class Homesick < Thor
|
|||||||
home_path = home_dir + file
|
home_path = home_dir + file
|
||||||
ln_s absolute_path, home_path
|
ln_s absolute_path, home_path
|
||||||
end
|
end
|
||||||
|
|
||||||
inside castle_path do
|
inside castle_path do
|
||||||
git_add absolute_path
|
git_add absolute_path
|
||||||
end
|
end
|
||||||
@@ -181,7 +181,7 @@ class Homesick < Thor
|
|||||||
end
|
end
|
||||||
|
|
||||||
def all_castles
|
def all_castles
|
||||||
dirs = Pathname.glob("#{repos_dir}/**/*/.git")
|
dirs = Pathname.glob("#{repos_dir}/**/.git", File::FNM_DOTMATCH)
|
||||||
# reject paths that lie inside another castle, like git submodules
|
# reject paths that lie inside another castle, like git submodules
|
||||||
return dirs.reject do |dir|
|
return dirs.reject do |dir|
|
||||||
dirs.any? {|other| dir != other && dir.fnmatch(other.parent.join('*').to_s) }
|
dirs.any? {|other| dir != other && dir.fnmatch(other.parent.join('*').to_s) }
|
||||||
@@ -205,7 +205,7 @@ class Homesick < Thor
|
|||||||
git_submodule_update
|
git_submodule_update
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def commit_castle(castle)
|
def commit_castle(castle)
|
||||||
check_castle_existance(castle, "commit")
|
check_castle_existance(castle, "commit")
|
||||||
inside repos_dir.join(castle) do
|
inside repos_dir.join(castle) do
|
||||||
|
|||||||
Reference in New Issue
Block a user