git_goggles 0.0.4 → 0.0.5
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.encode(
|
15
|
-
:latest_commit => branch.commit.sha.encode(
|
14
|
+
:name => branch.name.force_encoding("ISO-8859-1").encode("UTF-8"),
|
15
|
+
:latest_commit => branch.commit.sha.force_encoding("ISO-8859-1").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.encode(
|
26
|
-
:message => commit.message.encode(
|
27
|
-
:sha => commit.id.encode(
|
25
|
+
:author => "#{commit.author.name.force_encoding("ISO-8859-1").encode("UTF-8")} <#{commit.author.email.force_encoding("ISO-8859-1").encode("UTF-8")}>",
|
26
|
+
:message => commit.message.force_encoding("ISO-8859-1").encode("UTF-8"),
|
27
|
+
:sha => commit.id.force_encoding("ISO-8859-1").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.encode(
|
38
|
-
:message => commit.message.encode(
|
39
|
-
:date => commit.date.to_s.encode(
|
40
|
-
:diffs => commit.diffs.map(&:diff).encode(
|
37
|
+
:author => "#{commit.author.name.force_encoding("ISO-8859-1").encode("UTF-8")} <#{commit.author.email.force_encoding("ISO-8859-1").encode("UTF-8")}>",
|
38
|
+
:message => commit.message.force_encoding("ISO-8859-1").encode("UTF-8"),
|
39
|
+
:date => commit.date.to_s.force_encoding("ISO-8859-1").encode("UTF-8"),
|
40
|
+
:diffs => commit.diffs.map(&:diff).force_encoding("ISO-8859-1").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.encode(
|
57
|
-
:commit => tag.commit.sha.encode(
|
56
|
+
:name => tag.name.force_encoding("ISO-8859-1").encode("UTF-8"),
|
57
|
+
:commit => tag.commit.sha.force_encoding("ISO-8859-1").encode("UTF-8")
|
58
58
|
}
|
59
59
|
end
|
60
60
|
end
|
data/lib/git_goggles/version.rb
CHANGED