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.
@@ -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('utf-8'),
15
- :latest_commit => branch.commit.sha.encode('utf-8')
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('utf-8')} <#{commit.author.email.encode('utf-8')}>",
26
- :message => commit.message.encode('utf-8'),
27
- :sha => commit.id.encode('utf-8')
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('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')
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('utf-8'),
57
- :commit => tag.commit.sha.encode('utf-8')
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
@@ -1,3 +1,3 @@
1
1
  module GitGoggles
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_goggles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: