cobench 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cobench +7 -2
- data/lib/cobench/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: 6fbe7145f065a7c65776e187ebe08795e6bf43d96461b47da21bfc33cf241f23
|
4
|
+
data.tar.gz: 4ded5cf401303b0107f08ad06e839fdf17303c4de7aa8c7a35607a8d361d2a4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 230046c4cd9da1cd3efec5720bbc7c8da1829e6eef8c8cf3e54d031f124bec8ae8c9393bacfc52a5c86dccc1dfe9cb7061950eb61d392c96f4191cc512e04552
|
7
|
+
data.tar.gz: 338a370eaaecd73ae8ed886bec1ef9971924012be9e6d87c99881ec85e1954fdd6759bb6625684c38cdf5bb21b2558a4d344e526b3f1e11fdf9344f312ea64a9
|
data/bin/cobench
CHANGED
@@ -79,6 +79,11 @@ def div(a, b)
|
|
79
79
|
a / b
|
80
80
|
end
|
81
81
|
|
82
|
+
def actual(ms)
|
83
|
+
return ms[:actual] if ms.key?(:actual)
|
84
|
+
ms[:total]
|
85
|
+
end
|
86
|
+
|
82
87
|
def build_xml(opts, loog)
|
83
88
|
if opts.token?
|
84
89
|
api = Octokit::Client.new(:access_token => opts[:token])
|
@@ -155,11 +160,11 @@ def build_xml(opts, loog)
|
|
155
160
|
end
|
156
161
|
averages = {
|
157
162
|
'HpP': {
|
158
|
-
f: lambda { |ms| div(ms['HoC']
|
163
|
+
f: lambda { |ms| div(actual(ms['HoC']), actual(ms['Pulls'])) },
|
159
164
|
title: 'HoC per Pull'
|
160
165
|
},
|
161
166
|
'HpC': {
|
162
|
-
f: lambda { |ms| div(ms['HoC']
|
167
|
+
f: lambda { |ms| div(actual(ms['HoC']), actual(ms['Commits'])) },
|
163
168
|
title: 'HoC per Commit'
|
164
169
|
}
|
165
170
|
}
|
data/lib/cobench/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobench
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|