cobench 0.0.9 → 0.0.10

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: 83be84557db1c5b0954853d6ceb77d18fc916628568220c65f9f6b9f0e190883
4
- data.tar.gz: 30c59ad9a54156120fbdb126b2ff33277b402a23d59a1efa50f602dd21e72d19
3
+ metadata.gz: 625fd5b08eece40f4c28722c9258b730336e360cd6d3c51e67a8a6cc969072cd
4
+ data.tar.gz: 5e5e65c72b3568c12edf3cbca87c20526e40704388d31dec0221a5b0fe526a4a
5
5
  SHA512:
6
- metadata.gz: 6e320aea23c4a7bd7bffadb17e235dc24a607ec69ff82c392a07fb403442171a2366a631700a3907cd99246cdd93286c1524ecb469ea1bbf8be68c93689d1053
7
- data.tar.gz: 91fe1ed2ec75767b9bc2f5f67f62785e01bec6662a81ee3e798367af5dde1c96ef665f05897cb25d4caa733bc8675e8aeb975562f35424ad107cf36054c6464c
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 = [{ title: 'Mock', total: Random.new.rand(100), href: 'https://github.com/' }]
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)
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2022 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Cobench
26
- VERSION = '0.0.9'.freeze
26
+ VERSION = '0.0.10'.freeze
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cobench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko