git_goggles 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/git_goggles/repository.rb +11 -11
- data/lib/git_goggles/version.rb +1 -1
- metadata +1 -1
@@ -11,8 +11,8 @@ module GitGoggles
|
|
11
11
|
def branch(branch_name)
|
12
12
|
if branch = _repo.branches.find { |branch| branch.name == branch_name }
|
13
13
|
{
|
14
|
-
:name => branch.name,
|
15
|
-
:latest_commit => branch.commit.sha
|
14
|
+
:name => branch.name.encode('utf-8'),
|
15
|
+
:latest_commit => branch.commit.sha.encode('utf-8')
|
16
16
|
}
|
17
17
|
end
|
18
18
|
end
|
@@ -22,9 +22,9 @@ module GitGoggles
|
|
22
22
|
|
23
23
|
_repo.commits('master', 100).each do |commit|
|
24
24
|
output << {
|
25
|
-
:author => "#{commit.author.name} <#{commit.author.email}>",
|
26
|
-
:message => commit.message,
|
27
|
-
:sha => commit.id
|
25
|
+
:author => "#{commit.author.name.encode('utf-8')} <#{commit.author.email.encode('utf-8')}>",
|
26
|
+
:message => commit.message.encode('utf-8'),
|
27
|
+
:sha => commit.id.encode('utf-8')
|
28
28
|
}
|
29
29
|
end
|
30
30
|
|
@@ -34,10 +34,10 @@ module GitGoggles
|
|
34
34
|
def commit(sha)
|
35
35
|
if commit = _repo.commit(sha)
|
36
36
|
{
|
37
|
-
:author => "#{commit.author.name} <#{commit.author.email}>",
|
38
|
-
:message => commit.message,
|
39
|
-
:date => commit.date.to_s,
|
40
|
-
:diffs => commit.diffs.map(&:diff)
|
37
|
+
:author => "#{commit.author.name.encode('utf-8')} <#{commit.author.email.encode('utf-8')}>",
|
38
|
+
:message => commit.message.encode('utf-8'),
|
39
|
+
:date => commit.date.to_s.encode('utf-8'),
|
40
|
+
:diffs => commit.diffs.map(&:diff).encode('utf-8')
|
41
41
|
}
|
42
42
|
end
|
43
43
|
end
|
@@ -53,8 +53,8 @@ module GitGoggles
|
|
53
53
|
def tag(tag_name)
|
54
54
|
if tag = _repo.tags.find { |tag| tag.name == tag_name }
|
55
55
|
{
|
56
|
-
:name => tag.name,
|
57
|
-
:commit => tag.commit.sha
|
56
|
+
:name => tag.name.encode('utf-8'),
|
57
|
+
:commit => tag.commit.sha.encode('utf-8')
|
58
58
|
}
|
59
59
|
end
|
60
60
|
end
|
data/lib/git_goggles/version.rb
CHANGED