cobench 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/index.xsl +5 -1
- data/bin/cobench +5 -2
- data/lib/cobench/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 625fd5b08eece40f4c28722c9258b730336e360cd6d3c51e67a8a6cc969072cd
|
|
4
|
+
data.tar.gz: 5e5e65c72b3568c12edf3cbca87c20526e40704388d31dec0221a5b0fe526a4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3a6ffbbe1ba49ece0b153abe1c98e5885295a32aa834c5ba0972ec15e01a3c3dc61d2032f9e3f281614b25567e3f0003357f6fec17728a9e45651739238ce05
|
|
7
|
+
data.tar.gz: bf16dac666f420e6b576fa0a086d2c1dfd84d8193acec2e863c8ed1be140f722db8ac3d186fa8448a7ae9015a2be9b588a56fc1e933c045b034b4eeab4d492a4
|
data/assets/index.xsl
CHANGED
|
@@ -24,6 +24,8 @@ SOFTWARE.
|
|
|
24
24
|
-->
|
|
25
25
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
|
26
26
|
<xsl:output encoding="UTF-8" method="html"/>
|
|
27
|
+
<xsl:param name="version"/>
|
|
28
|
+
<xsl:key name="titles" match="/cobench/titles/title" use="."/>
|
|
27
29
|
<xsl:template match="/">
|
|
28
30
|
<html>
|
|
29
31
|
<head>
|
|
@@ -69,6 +71,8 @@ SOFTWARE.
|
|
|
69
71
|
<xsl:text>The page was generated by </xsl:text>
|
|
70
72
|
<a href="https://github.com/yegor256/cobench">
|
|
71
73
|
<xsl:text>cobench</xsl:text>
|
|
74
|
+
<xsl:text> </xsl:text>
|
|
75
|
+
<xsl:value-of select="$version"/>
|
|
72
76
|
</a>
|
|
73
77
|
<xsl:text> on </xsl:text>
|
|
74
78
|
<xsl:value-of select="cobench/@time"/>
|
|
@@ -91,7 +95,7 @@ SOFTWARE.
|
|
|
91
95
|
<thead>
|
|
92
96
|
<tr>
|
|
93
97
|
<th/>
|
|
94
|
-
<xsl:for-each select="title">
|
|
98
|
+
<xsl:for-each select="title[generate-id() = generate-id(key('titles', .)[1])]">
|
|
95
99
|
<xsl:sort select="."/>
|
|
96
100
|
<th class="sorter num">
|
|
97
101
|
<xsl:value-of select="."/>
|
data/bin/cobench
CHANGED
|
@@ -102,7 +102,10 @@ begin
|
|
|
102
102
|
require_relative f
|
|
103
103
|
m = type.split('::').reduce(Module, :const_get).new(api, u, opts)
|
|
104
104
|
if opts.dry?
|
|
105
|
-
measures = [
|
|
105
|
+
measures = [
|
|
106
|
+
{ title: 'Test1', total: Random.new.rand(100), href: 'https://github.com/' },
|
|
107
|
+
{ title: 'Test2', total: Random.new.rand(100), href: 'https://github.com/' }
|
|
108
|
+
]
|
|
106
109
|
else
|
|
107
110
|
measures = m.take(loog)
|
|
108
111
|
end
|
|
@@ -141,7 +144,7 @@ begin
|
|
|
141
144
|
File.write(index, xml)
|
|
142
145
|
loog.debug("XML saved to #{index} (#{File.size(index)} bytes)")
|
|
143
146
|
xslt = Nokogiri::XSLT(File.read(File.join(__dir__, '../assets/index.xsl')))
|
|
144
|
-
html = xslt.transform(Nokogiri::XML(xml))
|
|
147
|
+
html = xslt.transform(Nokogiri::XML(xml), 'version' => "'#{Cobench::VERSION}'")
|
|
145
148
|
loog.debug(html)
|
|
146
149
|
front = File.join(home, 'index.html')
|
|
147
150
|
File.write(front, html)
|
data/lib/cobench/version.rb
CHANGED