obst 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/obst/touched_files.rb +16 -3
- data/lib/obst/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1ea9ec553aec1048f197a4313bb6f5bdb82767e78fe793764127e1b798ee5b7
|
4
|
+
data.tar.gz: 8cfa17989074c75b146f5979cd30e33ea05a062cc3e1347efb1677dd6c4c2a44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13b20ea98bc4cedacfee5a11b267f3f2a263fbcadd9d7a3de83061c17af55257701801dca6cabb687236b2c193bd2accfd99d53a9a8ed121471486e6484473c8
|
7
|
+
data.tar.gz: a2cda68907af8dd8c15f1f31d00afb977e297e3461bf5bbafc7adbccfc9c06801407dd7a68c0898b19a6585e0c8d6ffa86e598e7be2961e09d5a40cb8d1f8df6
|
data/lib/obst/touched_files.rb
CHANGED
@@ -49,10 +49,23 @@ module Obst
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def list_files(record)
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
group_by_final_status = Hash.new{ |h, k| h[k] = [] }
|
53
|
+
record.statuses.each_pair{ |name, status| group_by_final_status[status.final] << name }
|
54
|
+
|
55
|
+
[
|
56
|
+
[:new, :a, '#2db7b5'],
|
57
|
+
[:mod, :m, '#d3be03'],
|
58
|
+
[:del, :d, '#c71585']
|
59
|
+
].each do |long, short, color|
|
60
|
+
files = group_by_final_status[short]
|
61
|
+
next if files.empty?
|
62
|
+
inline_str = inline(files)
|
63
|
+
@buffer << "\t- <font color='#{color}'>#{long} #{files.count}:</font> #{inline_str}"
|
55
64
|
end
|
56
65
|
end
|
66
|
+
|
67
|
+
def inline(files)
|
68
|
+
files.sort!.map{ |name| "[[#{name}]]" }.join(' / ')
|
69
|
+
end
|
57
70
|
end
|
58
71
|
end
|
data/lib/obst/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|