cobench 0.0.40 → 0.0.42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8dad898dc02a5e517e24c6fe0b0a8e3ff7d4e06de2e0f732956bb350bc1ea26
4
- data.tar.gz: 4e1a29fc050bafb9d3a8c203fce03a58cfbb4687f9c2b4034faddcc33f8357de
3
+ metadata.gz: e3f6075e885b8ae6592e440f2b0c5bcbc702ddae8a4738a959585d155c71af50
4
+ data.tar.gz: 4835fba74c1b7153c23d39f69f8c3751a13e2ee717905193bc8985d9c7487a91
5
5
  SHA512:
6
- metadata.gz: 42b9c779e397ce17698bd5285ce8f687834fe757cc2b615148e481bac0157110d9dfd30afb912452cd2dd4339b57f1511260fb0667e78ffdf829fe896bb7f95e
7
- data.tar.gz: 072c0c7d39ecd51754ae545dfc426a8a8e054cde1fdef7d202859ffd0c858208e9ce00ae0b173f631ca50914ec257990a15b6d8c279efcdf4311d2bc101eb3b6
6
+ metadata.gz: feb3e7c23bf53bb06016c980e4a15fbe36981457cd67586efa2dc464c14a4a196ce7fa136053347adda6c360591690fc5b1f36110b43537522ff0e511cbb7ce1
7
+ data.tar.gz: 5329e4bcff3b33bd5f3596b08e3663d2b765fcce5f950f383f60bf42d0b435202b72f44ecfaa7ea19ca0633bd3e1c293aeb4ede602ff412677bcd905e473e2f4
data/assets/index.xsl CHANGED
@@ -130,15 +130,6 @@ SOFTWARE.
130
130
  </article>
131
131
  <footer>
132
132
  <p>
133
- <xsl:text>The page was generated by </xsl:text>
134
- <a href="https://github.com/yegor256/cobench">
135
- <xsl:text>cobench</xsl:text>
136
- <xsl:text> </xsl:text>
137
- <xsl:value-of select="$version"/>
138
- </a>
139
- <xsl:text> on </xsl:text>
140
- <xsl:value-of select="cobench/@time"/>
141
- <xsl:text>. </xsl:text>
142
133
  <xsl:text>"Commits" is the total number of non-merge </xsl:text>
143
134
  <a href="https://github.com/git-guides/git-commit">
144
135
  <xsl:text>Git commits</xsl:text>
@@ -208,6 +199,16 @@ SOFTWARE.
208
199
  <xsl:text>.</xsl:text>
209
200
  </p>
210
201
  <p>
202
+ <xsl:text>The page was generated by </xsl:text>
203
+ <a href="https://github.com/yegor256/cobench">
204
+ <xsl:text>cobench</xsl:text>
205
+ <xsl:text> </xsl:text>
206
+ <xsl:value-of select="$version"/>
207
+ </a>
208
+ <xsl:text> on </xsl:text>
209
+ <xsl:value-of select="cobench/@time"/>
210
+ <xsl:text>. </xsl:text>
211
+ <br/>
211
212
  <xsl:text>The numbers you see reflect the activity of the last </xsl:text>
212
213
  <b>
213
214
  <xsl:value-of select="cobench/@days"/>
data/bin/cobench CHANGED
@@ -82,7 +82,8 @@ end
82
82
 
83
83
  def zero?(ms)
84
84
  return true if ms.nil?
85
- return true if ms.key?(:actual) == 0
85
+ return true if ms[:total] == 0
86
+ return true if ms.key?(:actual) && ms[:actual] == 0
86
87
  false
87
88
  end
88
89
 
@@ -122,7 +123,7 @@ def build_xml(opts, loog)
122
123
  if opts.dry?
123
124
  measures = [
124
125
  { title: 'Issues', total: Random.new.rand(100), href: 'https://github.com/' },
125
- { title: 'Pulls', total: Random.new.rand(100) },
126
+ { title: 'Pulls', total: 0 },
126
127
  { title: 'Commits', total: Random.new.rand(100) },
127
128
  { title: 'HoC', total: Random.new.rand(100) },
128
129
  { title: 'HoC', total: Random.new.rand(100) },
@@ -176,22 +177,22 @@ def build_xml(opts, loog)
176
177
  data[u]['Score'] = { total: score }
177
178
  end
178
179
  averages = {
179
- 'CpP': {
180
+ 'CpP' => {
180
181
  f: lambda { |ms| div(actual(ms['Commits']), actual(ms['Pulls'])) },
181
182
  title: 'Commits per Pull Request',
182
183
  hideZero: lambda { |ms| zero?(ms['Commits']) || zero?(ms['Pulls']) }
183
184
  },
184
- 'HpP': {
185
+ 'HpP' => {
185
186
  f: lambda { |ms| div(actual(ms['HoC']), actual(ms['Pulls'])) },
186
187
  title: 'HoC per Pull Request',
187
188
  hideZero: lambda { |ms| zero?(ms['HoC']) || zero?(ms['Pulls']) }
188
189
  },
189
- 'HpC': {
190
+ 'HpC' => {
190
191
  f: lambda { |ms| div(actual(ms['HoC']), actual(ms['Commits'])) },
191
192
  title: 'HoC per Commit',
192
193
  hideZero: lambda { |ms| zero?(ms['HoC']) || zero?(ms['Commits']) }
193
194
  },
194
- 'MpRP': {
195
+ 'MpRP' => {
195
196
  f: lambda { |ms| div(actual(ms['Msgs']), actual(ms['Reviews']) + actual(ms['Pulls'])) },
196
197
  title: 'Messages per Review+Pulls',
197
198
  hideZero: lambda { |ms| zero?(ms['Msgs']) || (zero?(ms['Reviews']) && zero?(ms['Pulls'])) }
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2022 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Cobench
26
- VERSION = '0.0.40'.freeze
26
+ VERSION = '0.0.42'.freeze
27
27
  end
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.40
4
+ version: 0.0.42
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-26 00:00:00.000000000 Z
11
+ date: 2022-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace