tasks/git.rb in zfben_rails_rake-0.0.4 vs tasks/git.rb in zfben_rails_rake-0.0.5
- old
+ new
@@ -4,15 +4,15 @@
sys 'git pull'
end
desc 'git commit with your comment'
task :commit, :comment do |task, comment|
- if comment == {}
+ unless defined? comment.comment
comment = 'no comment'
else
comment = comment.comment
end
- sys "git commit -m '#{comment}' -a"
+ sys "git add .;git commit -m '#{comment}' -a"
end
desc 'git push with your comment'
task :push, :comment, :needs => :commit do |task, comment|
sys 'git push'