autobuild 1.5.13 → 1.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Changes.txt +3 -0
- data/lib/autobuild.rb +1 -1
- data/lib/autobuild/import/git.rb +15 -4
- metadata +3 -3
data/Changes.txt
CHANGED
data/lib/autobuild.rb
CHANGED
data/lib/autobuild/import/git.rb
CHANGED
@@ -168,11 +168,22 @@ module Autobuild
|
|
168
168
|
end
|
169
169
|
|
170
170
|
def log(from, to)
|
171
|
-
log = `git log --pretty=format:"%h %cr %cn %s" #{from}..#{to}
|
172
|
-
|
173
|
-
|
171
|
+
log = `git log --encoding=UTF-8 --pretty=format:"%h %cr %cn %s" #{from}..#{to}`.chomp
|
172
|
+
|
173
|
+
if log.respond_to?(:encode)
|
174
|
+
log = log.encode
|
175
|
+
end
|
176
|
+
|
177
|
+
encodings = ['UTF-8', 'iso8859-1']
|
178
|
+
begin
|
179
|
+
log.split("\n")
|
180
|
+
rescue
|
181
|
+
if encodings.empty?
|
182
|
+
return "[some log messages have invalid characters, cannot display/parse them]"
|
183
|
+
end
|
184
|
+
log.force_encoding(encodings.pop)
|
185
|
+
retry
|
174
186
|
end
|
175
|
-
log.chomp.split("\n")
|
176
187
|
end
|
177
188
|
end
|
178
189
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 1.5.
|
8
|
+
- 14
|
9
|
+
version: 1.5.14
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sylvain Joyeux
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-23 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|