|
|
|
@ -26,18 +26,26 @@ if File.exists?(CONFIG_PATH)
|
|
|
|
|
sleep(600)
|
|
|
|
|
`notify-send --app-name=git-ahead-check --icon=flag-red --urgency=normal GIT-AHEAD "Unpushed repos: #{repositoryes.size}"`
|
|
|
|
|
else
|
|
|
|
|
repositoryes.each { |repo|
|
|
|
|
|
print "* #{repo[:ahead]}\t".colorize(:red).mode(:bold)
|
|
|
|
|
print repo[:name].colorize(:yellow)
|
|
|
|
|
|
|
|
|
|
if !ARGV_VARS.short
|
|
|
|
|
print " ["
|
|
|
|
|
print repo[:path].colorize(:light_magenta)
|
|
|
|
|
print "]"
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
repos_table = Tallboy.table do
|
|
|
|
|
header [
|
|
|
|
|
"Ahead".colorize.mode(:bold),
|
|
|
|
|
"Repo name".colorize.mode(:bold),
|
|
|
|
|
if !ARGV_VARS.short
|
|
|
|
|
"Repo path".colorize.mode(:bold)
|
|
|
|
|
end,
|
|
|
|
|
]
|
|
|
|
|
repositoryes.each { |repo|
|
|
|
|
|
row [
|
|
|
|
|
repo[:ahead].colorize(:red).mode(:bold),
|
|
|
|
|
repo[:name].colorize(:yellow),
|
|
|
|
|
if !ARGV_VARS.short
|
|
|
|
|
repo[:path].sub("$HOME", ENV["HOME"]).colorize(:light_magenta)
|
|
|
|
|
end,
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
puts
|
|
|
|
|
puts repos_table
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
Dir.mkdir_p(File.dirname(CONFIG_PATH))
|
|
|
|
|