Permalink
Browse files

add user.email and user.name configs

  • Loading branch information...
DarkSwoop committed Jan 7, 2013
1 parent eec0b35 commit 2e7639f1fa802962ad2d88ed8bede529bfc17ec5
Showing with 14 additions and 1 deletion.
  1. +14 −1 git.rb
View
15 git.rb
@@ -1,5 +1,5 @@
dep 'git-aliases' do
- requires 'git'
+ requires 'git', 'git-user-config'
met? {
met_result = false
tmp_path = "/tmp/git-aliases-test"
@@ -20,6 +20,19 @@
}
end
+dep 'git-user-config' do
+ requires 'git'
+ met? {
+ ["git config --get user.email", "git config --get user.name"].all? do |cmd|
+ raw_shell(cmd).ok?
+ end
+ }
+ meet {
+ log_shell "Adding git config user.email", "git config --global user.email protonet@localhost"
+ log_shell "Adding git config user.name", 'git config --global user.name "protonet"'
+ }
+end
+
dep 'passenger deploy repo' do
requires 'passenger deploy repo exists', 'passenger deploy repo hooks', 'passenger deploy repo always receives'
end

0 comments on commit 2e7639f

Please sign in to comment.