lib/cerberus/scm/git.rb in cerberus-0.7.9 vs lib/cerberus/scm/git.rb in cerberus-0.8.0

- old
+ new

@@ -69,10 +69,12 @@ puts cmd if @config[:verbose] `#{cmd}` end def extract_commit_info( commit=remote_head ) - message = execute("log", "#{ commit } -1 --pretty='format:%an(%ae)|%ai|%H|%s%n%n%b'").split("|") + message = String.new.respond_to?(:force_encoding) ? + execute("log", "#{ commit } -1 --pretty='format:%an(%ae)|%ai|%H|%s%n%n%b'").force_encoding('utf-8').split("|") : + execute("log", "#{ commit } -1 --pretty='format:%an(%ae)|%ai|%H|%s%n%n%b'").split("|") return { :author => message[0], :date => message[1], :revision => message[2], :message => message[3] } end def last_tested_revision # TODO Is there a better way to extract the last tested commit?