github plugin: check for `ruby`.
I've run into the issue where a stripped down container had no Ruby
installed, which caused `hub` to fail.
Therefore I've added an extra check to verify that `ruby` is in the
commands list before setting up this alias/function.
Diff
1diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
2index 8d45806545fa8110221c551c5e98dc7f2a9d48ec..18fff1755bc00ff8611c3fd9022779ddc58a4a91 100644
3--- a/plugins/github/github.plugin.zsh
4+++ b/plugins/github/github.plugin.zsh
5@@ -1,6 +1,5 @@
6-# hub alias from defunkt
7-# https://github.com/defunkt/hub
8-if [ "$commands[(I)hub]" ]; then
9+# Setup hub function for git, if it is available; http://github.com/defunkt/hub
10+if [ "$commands[(I)hub]" ] && [ "$commands[(I)ruby]" ]; then
11 # eval `hub alias -s zsh`
12 function git(){hub "$@"}
13 fi