lib/ext/dir.rb in git-multi-1.0.5 vs lib/ext/dir.rb in git-multi-1.0.6

- old
+ new

@@ -1,10 +1,10 @@ class Dir def git_repos(subdir = '*') - Dir.glob(File.join(self.path, subdir, '*', '.git')).map { |path_to_git_dir| - path_to_git_repo = File.dirname(path_to_git_dir) # without "/.git" - repo_name = path_to_git_repo[/[^\/]+\/[^\/]+\z/] # e.g. "pvdb/git-multi" - def repo_name.full_name() self ; end # awesome duck-typing! + Dir.glob(File.join(path, subdir, '*', '.git')).map { |path_to_git_dir| + path_to_git_repo = File.dirname(path_to_git_dir) # without "/.git" + repo_name = path_to_git_repo[%r{[^\/]+\/[^\/]+\z}] # e.g. "pvdb/git-multi" + def repo_name.full_name() self; end repo_name } end end