lib/capistrano/notifier/base.rb in capistrano-notifier-0.2.1 vs lib/capistrano/notifier/base.rb in capistrano-notifier-0.2.2

- old
+ new

@@ -16,20 +16,20 @@ def cap @cap end def git_current_revision - cap.current_revision[0,7] if cap.respond_to? :current_revision + cap.current_revision.try(:[], 0,7) if cap.respond_to?(:current_revision) end def git_log return unless git_range `git log #{git_range} --no-merges --format=format:"%h %s (%an)"` end def git_previous_revision - cap.previous_revision[0,7] if cap.respond_to? :previous_revision + cap.previous_revision.try(:[], 0,7) if cap.respond_to?(:previous_revision) end def git_range return unless git_previous_revision && git_current_revision