cobench 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/index.xsl +16 -8
- data/bin/cobench +6 -6
- data/lib/cobench/metrics/commits.rb +1 -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: 2ce5d4cd4b43c34d71d56b620f57447c720e5dff7bc282876d73584e8716b458
|
4
|
+
data.tar.gz: 70fa1c91c2c998c04c4789e5ba8162779c10b80abe3f9518f3638e90822b6bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b849b0d6e71364f0aaeede0698382d4d4dd777013d2193d068cda6a2778a7457568c59c480e1e424ad8437c0106956a534d34bb196207513bb4f58b01706a3e4
|
7
|
+
data.tar.gz: 3b45652f5bb5104a0fbbbd4ba68e966184b0593f711febc21b394e1033fe4760c6793b0bfc14bcabc798908f7e97e3f22fa51d06e13da81a7ef7fabc94aaf247
|
data/assets/index.xsl
CHANGED
@@ -140,6 +140,12 @@ SOFTWARE.
|
|
140
140
|
<xsl:text> days</xsl:text>
|
141
141
|
</b>
|
142
142
|
<xsl:text>.</xsl:text>
|
143
|
+
<br/>
|
144
|
+
<xsl:text>The XML with the data </xsl:text>
|
145
|
+
<a href="index.xml">
|
146
|
+
<xsl:text>is here</xsl:text>
|
147
|
+
</a>
|
148
|
+
<xsl:text>.</xsl:text>
|
143
149
|
</p>
|
144
150
|
</footer>
|
145
151
|
</section>
|
@@ -175,10 +181,12 @@ SOFTWARE.
|
|
175
181
|
<xsl:text>@</xsl:text>
|
176
182
|
<xsl:value-of select="@id"/>
|
177
183
|
</a>
|
178
|
-
<
|
179
|
-
|
180
|
-
<
|
181
|
-
|
184
|
+
<xsl:if test="@details">
|
185
|
+
<br/>
|
186
|
+
<span class="subtitle">
|
187
|
+
<xsl:value-of select="@details"/>
|
188
|
+
</span>
|
189
|
+
</xsl:if>
|
182
190
|
</td>
|
183
191
|
<xsl:for-each select="metrics/m">
|
184
192
|
<xsl:sort select="@id"/>
|
@@ -189,13 +197,13 @@ SOFTWARE.
|
|
189
197
|
<xsl:template match="m">
|
190
198
|
<xsl:variable name="body">
|
191
199
|
<xsl:choose>
|
192
|
-
<xsl:when test="@href
|
193
|
-
<xsl:value-of select="."/>
|
194
|
-
</xsl:when>
|
195
|
-
<xsl:otherwise>
|
200
|
+
<xsl:when test="@href">
|
196
201
|
<a href="{@href}">
|
197
202
|
<xsl:value-of select="."/>
|
198
203
|
</a>
|
204
|
+
</xsl:when>
|
205
|
+
<xsl:otherwise>
|
206
|
+
<xsl:value-of select="."/>
|
199
207
|
</xsl:otherwise>
|
200
208
|
</xsl:choose>
|
201
209
|
</xsl:variable>
|
data/bin/cobench
CHANGED
@@ -136,22 +136,22 @@ def build_xml(opts, loog)
|
|
136
136
|
end
|
137
137
|
weights = {
|
138
138
|
'HoC' => 1,
|
139
|
-
'Pulls' =>
|
139
|
+
'Pulls' => 250,
|
140
140
|
'Issues' => 50,
|
141
141
|
'Commits' => 5,
|
142
|
-
'Reviews' =>
|
142
|
+
'Reviews' => 150
|
143
143
|
}
|
144
144
|
data.each do |u, ms|
|
145
145
|
score = ms.map do |t, h|
|
146
146
|
raise "Unknown title '#{t}'" unless weights.key?(t)
|
147
147
|
h[:total] * weights[t]
|
148
148
|
end.inject(0, :+)
|
149
|
-
data[u]['Score'] = { total: score
|
149
|
+
data[u]['Score'] = { total: score }
|
150
150
|
end
|
151
151
|
builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
|
152
152
|
xml.cobench(time: Time.now, days: opts[:days]) do
|
153
153
|
xml.titles do
|
154
|
-
data.map { |_, ms| ms.keys }.flatten.each do |t|
|
154
|
+
data.map { |_, ms| ms.keys }.flatten.uniq.each do |t|
|
155
155
|
xml.title t
|
156
156
|
end
|
157
157
|
end
|
@@ -165,10 +165,10 @@ def build_xml(opts, loog)
|
|
165
165
|
xml.coders do
|
166
166
|
data.each do |u, ms|
|
167
167
|
xml.coder(id: u) do
|
168
|
-
xml.parent.set_attribute('details', api.user(u).name)
|
168
|
+
xml.parent.set_attribute('details', api.user(u).name) unless opts[:dry]
|
169
169
|
xml.metrics do
|
170
170
|
ms.each do |k, v|
|
171
|
-
xml.m(id: k
|
171
|
+
xml.m(id: k) do
|
172
172
|
xml.parent.set_attribute('actual', v[:actual]) unless v[:actual].nil?
|
173
173
|
xml.parent.set_attribute('href', v[:href]) unless v[:href].nil?
|
174
174
|
xml.text v[:total]
|
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.22
|
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-08-
|
11
|
+
date: 2022-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|