git-commit-notifier 0.12.5 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +1 -1
- data/VERSION +1 -1
- data/lib/git_commit_notifier/diff_to_html.rb +12 -0
- data/lib/git_commit_notifier/git.rb +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5264a69f6678981a62e65cbcac4455a8ed6efcc3
|
4
|
+
data.tar.gz: 12fe72aa75b6317dc3c2c74f33b21bae00751c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ceaed33443036a025fdb6fad63c244d9bbe9114e65f4e5850f1fbeba3cbc0ca4ae29e3eb08b4611335be1166b8bca8ce2b6f98e02f1fde731e36f9692b245c0
|
7
|
+
data.tar.gz: 839f75af16900756c0510af9691f43579598868fde4263e08a05edcaad74a58623f633951b757328fe9b9dd772eb836eaf7c5fef3ae458803fc72288e3bb6123
|
data/CHANGES.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.12.
|
1
|
+
0.12.6
|
@@ -58,6 +58,14 @@ module GitCommitNotifier
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
def to_utf8_strict(str)
|
62
|
+
return str unless str.respond_to?(:force_encoding)
|
63
|
+
str = str.force_encoding(Encoding::UTF_8)
|
64
|
+
return str if str.valid_encoding?
|
65
|
+
str = str.force_encoding(Encoding::BINARY)
|
66
|
+
str.encode("UTF-8", :invalid => :replace, :undef => :replace)
|
67
|
+
end
|
68
|
+
|
61
69
|
def range_info(range)
|
62
70
|
matches = range.match(/^@@ \-(\S+) \+(\S+)/)
|
63
71
|
matches[1..2].map { |m| m.split(',')[0].to_i }
|
@@ -453,6 +461,10 @@ module GitCommitNotifier
|
|
453
461
|
end
|
454
462
|
result[:message] = message
|
455
463
|
|
464
|
+
result.each_key do |key|
|
465
|
+
result[key] = to_utf8_strict result[key]
|
466
|
+
end
|
467
|
+
|
456
468
|
result
|
457
469
|
end
|
458
470
|
|
@@ -5,10 +5,8 @@ class GitCommitNotifier::Git
|
|
5
5
|
class << self
|
6
6
|
def to_utf8(str)
|
7
7
|
return str unless str.respond_to?(:force_encoding)
|
8
|
-
str
|
9
|
-
|
10
|
-
str = str.force_encoding(Encoding::BINARY)
|
11
|
-
str.encode("UTF-8", :invalid => :replace, :undef => :replace)
|
8
|
+
str.force_encoding(Encoding::UTF_8)
|
9
|
+
str
|
12
10
|
end
|
13
11
|
|
14
12
|
# Runs specified command and gets its output.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-commit-notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bodo Tasche
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|