cobench 0.0.16 → 0.0.17

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: 48f017fb5f4994354ad835b809870f6c804bf3350cd22b443e29f2dfda0f1276
4
- data.tar.gz: a57ba22b48e7760415921e4c80fb52c407e95ad84c1c3d5da4e1b2de76538f5e
3
+ metadata.gz: 4b84694d76fb95dc4c62d1c4ba42d4d4bee5c8c193c33c241b02964d44816e91
4
+ data.tar.gz: a56793bef0c5d3bdda384ddd553a47cf135c51cead18e73ed984a7a5f4922077
5
5
  SHA512:
6
- metadata.gz: 845946fc2dfb68de3ef780a35b2063311e38104f337a235067f88d2ab00bf3b309e30025e1bb3dd2091ca2d43af80e18a8332258f6085dedf96f9f3de39889ef
7
- data.tar.gz: 9133dcf17b4d1ca286e70c46b122dfd458c6bce44f1f247bae74a4b5b7604db34c90a74493eb5ac49a05fa74626c5ab5ee14f09751d23ec5143052122173b5e6
6
+ metadata.gz: 4fee03b92b8a370f39bc207012bf777b54f459c903b08e25e75e469d98f458d599c85f2bccb51892c165b837192a3450da23d545f84c33263c07bf7469ed6261
7
+ data.tar.gz: 71bb57a42b734c46f865beda63815ad1984964bf96a690a4c94c9e67ca6eb32199a59c7efb12e0c5fa99423cd54f7087aa72c2443864ea96ad091fb2e7124bc3
data/assets/index.xsl CHANGED
@@ -50,6 +50,9 @@ SOFTWARE.
50
50
  header { text-align: center; }
51
51
  footer { text-align: center; font-size: 0.8em; line-height: 1.2em; color: gray; }
52
52
  article { width: 60em; border: 0; }
53
+ td.avatar { vertical-align: middle; text-align: center; }
54
+ td.avatar img { width: 1.5em; height: 1.5em; vertical-align: middle; }
55
+ .subtitle { font-size: 0.8em; line-height: 1em; color: gray; }
53
56
  .sorter { cursor: pointer; }
54
57
  </style>
55
58
  </head>
@@ -57,7 +60,9 @@ SOFTWARE.
57
60
  <section>
58
61
  <header>
59
62
  <p>
60
- <img src="https://raw.githubusercontent.com/yegor256/cobench/master/logo.svg" style="width:64px"/>
63
+ <a href="">
64
+ <img src="https://raw.githubusercontent.com/yegor256/cobench/master/logo.svg" style="width:64px"/>
65
+ </a>
61
66
  </p>
62
67
  </header>
63
68
  <article>
@@ -82,12 +87,12 @@ SOFTWARE.
82
87
  <xsl:text>Git commits</xsl:text>
83
88
  </a>
84
89
  <xsl:text> authored by the user. </xsl:text>
85
- <xsl:text>"HoC" is the total number of user's hits of code. </xsl:text>
90
+ <xsl:text>"HoC" is the total number of user's </xsl:text>
86
91
  <a href="https://www.yegor256.com/2014/11/14/hits-of-code.html">
87
92
  <xsl:text>hits of code</xsl:text>
88
93
  </a>
89
94
  <xsl:text>. </xsl:text>
90
- <xsl:text>"Issues" is the total number of issues. </xsl:text>
95
+ <xsl:text>"Issues" is the total number of issues submitted by the user. </xsl:text>
91
96
  <a href="https://docs.github.com/en/issues">
92
97
  <xsl:text>issues</xsl:text>
93
98
  </a>
@@ -96,14 +101,14 @@ SOFTWARE.
96
101
  <a href="https://docs.github.com/en/pull-requests">
97
102
  <xsl:text>pull requests</xsl:text>
98
103
  </a>
99
- <xsl:text> created by the user and merged. </xsl:text>
100
- <xsl:text>"Reviews" is the total number of merged pull requests reviewed by the user. </xsl:text>
101
- <xsl:text>"Score" is an arithmetic summary of all other numbers with multipliers: </xsl:text>
104
+ <xsl:text> created by the user and already merged. </xsl:text>
105
+ <xsl:text>"Reviews" is the total number of merged pull requests that were reviewed by the user. </xsl:text>
106
+ <xsl:text>"Score" is an arithmetic summary of all metrics with multipliers: </xsl:text>
102
107
  <xsl:text>one Pull costs 100 points, </xsl:text>
103
- <xsl:text>one Issue 50 points, </xsl:text>
104
- <xsl:text>one Review 40 points, </xsl:text>
105
- <xsl:text>one Commit 5 points, </xsl:text>
106
- <xsl:text>one HoC 1 point.</xsl:text>
108
+ <xsl:text>one Issue 50 points, </xsl:text>
109
+ <xsl:text>one Review 40 points, </xsl:text>
110
+ <xsl:text>one Commit 5 points, </xsl:text>
111
+ <xsl:text>one HoC — just 1 point.</xsl:text>
107
112
  </p>
108
113
  <p>
109
114
  <xsl:text>The numbers you see reflect the activity of the last </xsl:text>
@@ -121,6 +126,7 @@ SOFTWARE.
121
126
  <xsl:template match="cobench/titles">
122
127
  <thead>
123
128
  <tr>
129
+ <th/>
124
130
  <th/>
125
131
  <xsl:for-each select="title[generate-id() = generate-id(key('titles', .)[1])]">
126
132
  <xsl:sort select="."/>
@@ -138,11 +144,18 @@ SOFTWARE.
138
144
  </xsl:template>
139
145
  <xsl:template match="coder">
140
146
  <tr>
147
+ <td class="avatar">
148
+ <img src="https://socatar.com/github/{@id}/64-64"/>
149
+ </td>
141
150
  <td>
142
151
  <a href="https://github.com/{@id}">
143
152
  <xsl:text>@</xsl:text>
144
153
  <xsl:value-of select="@id"/>
145
154
  </a>
155
+ <br/>
156
+ <span class="subtitle">
157
+ <xsl:value-of select="@details"/>
158
+ </span>
146
159
  </td>
147
160
  <xsl:for-each select="metrics/m">
148
161
  <xsl:sort select="@id"/>
data/bin/cobench CHANGED
@@ -154,7 +154,7 @@ begin
154
154
  end
155
155
  xml.coders do
156
156
  data.each do |u, ms|
157
- xml.coder(id: u) do
157
+ xml.coder(id: u, details: api.user(u).name) do
158
158
  xml.metrics do
159
159
  ms.each do |k, v|
160
160
  xml.m(id: k, href: v[:href]) do
data/features/cli.feature CHANGED
@@ -15,3 +15,14 @@ Feature: Simple Reporting
15
15
  Then Stdout contains "XML saved to"
16
16
  And Exit code is zero
17
17
 
18
+ Scenario: Simple report with defaults
19
+ Given I have a ".cobench" file with content:
20
+ """
21
+ --verbose
22
+
23
+ --coder=john
24
+ """
25
+ When I run bin/cobench with "--dry"
26
+ Then Stdout contains "XML saved to"
27
+ And Exit code is zero
28
+
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2022 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Cobench
26
- VERSION = '0.0.16'.freeze
26
+ VERSION = '0.0.17'.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.16
4
+ version: 0.0.17
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-15 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace