class GitIssues
Constants
- Log
Attributes
providers[R]
Public Class Methods
new()
click to toggle source
# File lib/git-issues.rb, line 11 def initialize @providers = RepoProviders.new end
version()
click to toggle source
# File lib/git-issues/version.rb, line 2 def self.version '0.1.5' end
Public Instance Methods
gitReposFor(path)
click to toggle source
# File lib/git-issues.rb, line 15 def gitReposFor path p = File::expand_path(path) git_path = File::join(p, '.git') git_conf = File::join(git_path, 'config') if not File::directory?(git_path) Log.error "This is not a git repository (path: #{p})" return [] end if not File::file?(git_conf) Log.error "Missing git configuration file (missing: #{git_conf})" return [] end config = ParseConfig.new(git_conf) remotes = config.params.keys.find_all{|i|i.start_with?('remote ')} remote_repos = remotes.map{|r| config.params[r]['url']} @providers.map_urls_to_provider( remote_repos ) end