lib/legit.rb in legit-0.0.2 vs lib/legit.rb in legit-0.0.4
- old
+ new
@@ -6,10 +6,10 @@
def log
system("git log --pretty=format:'%C(yellow)%h%Creset%C(bold cyan)%d%Creset %s %Cgreen(%cr)%Creset %C(bold magenta) <%an>%Creset' --graph --abbrev-commit --date=relative")
end
desc "catch-todos [TODO_FORMAT]", "Abort commit if any todos in TODO_FORMAT found"
- method_options %w[warn -w] => :boolean, :desc => 'Warn and prompt the user to choose whether to abort the commit'
+ method_option :warn, :type => :boolean, :aliases => "-w", :desc => 'Warn and prompt the user to choose whether to abort the commit'
def catch_todos(todo_format = "TODO")
system("git diff --staged | grep '^+' | grep #{todo_format}")
if $?.success?
if options[:warn]