tdx 0.2.6 → 0.2.7

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
  SHA1:
3
- metadata.gz: 68d11ea43666fcba743422938f2601d134729df8
4
- data.tar.gz: 9010264c48eaa44be853ba28429b6791d7fc3025
3
+ metadata.gz: 8822d54719e4ebd4345f9157dc287e7332fcadaf
4
+ data.tar.gz: 8f758413580f26844bf634bef6e9fcfaf4f7542c
5
5
  SHA512:
6
- metadata.gz: 61a83ceae6741bb1dceecb7b25d9b8843360bc24ffd93e9d67e782df9c4667da6f1b995f74018861265de997a2c22b28f8080bf413a8c4311b6129971319ec9a
7
- data.tar.gz: aa159cf35de15d1e93d4ef80d7f9fb2d422672463e33113a0b74dc9b43021000a622c0ae02e11dcf8ba584957a655bff7e768df5611771bf9d6d50936f40f1a5
6
+ metadata.gz: 4770e249fe8e108daeda336c404cc4be4f8a282d4591a24f3f96b52a3d8f82b8da1de320a1b96aed814651096d14224fbfdcd02da515e268e09dd61efa841054
7
+ data.tar.gz: 545c2b9c38e7c6203e08bdb70ec50d0f21351a77b5800554a107251e5b3aa53ad9b74429ce8d9d244ad5a539fb2b28f50ba1aa4fdf58c1ac64a368ff5a8ce55d
data/lib/tdx/base.rb CHANGED
@@ -88,23 +88,38 @@ module TDX
88
88
  svg = Tempfile.new('tdx')
89
89
  gpi = [
90
90
  "set output \"#{svg.path}\"",
91
- 'set terminal svg size 700, 260',
91
+ 'set terminal svg size 720, 360',
92
+ 'set lmargin 7',
93
+ 'set rmargin 5',
92
94
  'set termoption font "monospace,10"',
93
95
  'set xdata time',
96
+ 'set border lc rgb "gray"',
97
+ 'set style fill solid',
98
+ 'set boxwidth 0.75 relative',
94
99
  'set timefmt "%Y-%m"',
95
- 'set ytics format "%.0f" textcolor rgb "black"',
96
- 'set y2tics format "%.0f" textcolor rgb "orange"',
97
100
  'set grid linecolor rgb "gray"',
98
- 'set xtics format "%b/%y" font "monospace,8" textcolor rgb "black"',
99
101
  'set autoscale y',
102
+ 'set multiplot layout 2,1',
103
+ 'set ytics format "%.0fK" textcolor rgb "black"',
104
+ 'set y2tics format "%.0f" textcolor rgb "#DA6D1A"',
100
105
  'set autoscale y2',
101
- 'set style fill solid',
102
- 'set boxwidth 0.75 relative',
106
+ 'unset xtics',
107
+ [
108
+ "plot \"#{dat.path}\"",
109
+ ' u 1:($2/1000) w l t "Code" lw 2 lc rgb "#2B7947"',
110
+ ', "" u 1:($3/1000) w l t "Tests" lw 2 lc rgb "#C80604"',
111
+ ', "" u 1:4 w l t "Issues" lc rgb "#DA6D1A" axes x1y2'
112
+ ].join(' '),
113
+ 'unset y2tics',
114
+ 'unset title',
115
+ 'set tmargin 0',
116
+ 'set xtics format "%b/%y" font "monospace,8" textcolor rgb "gray"',
117
+ 'set ytics format "%.0f%%" textcolor rgb "#C80604"',
103
118
  [
104
- "plot \"#{dat.path}\" u 1:2 w l t \"code\" lc rgb \"#81b341\"",
105
- ', "" u 1:3 w l t "tests" lc rgb "red"',
106
- ', "" u 1:4 w l t "Issues" lc rgb "orange" axes x1y2'
107
- ].join(' ')
119
+ "plot \"#{dat.path}\"",
120
+ 'u 1:(100*$3/($2+$3)) pt 7 ps 1 lc rgb "#C80604" notitle'
121
+ ].join(' '),
122
+ 'unset multiplot'
108
123
  ]
109
124
  Exec.new("gnuplot -e '#{gpi.join('; ')}'").stdout
110
125
  FileUtils.rm_rf(path)
data/lib/tdx/version.rb CHANGED
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2017 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module TDX
28
- VERSION = '0.2.6'.freeze
28
+ VERSION = '0.2.7'.freeze
29
29
  end
data/test/test_tdx.rb CHANGED
@@ -56,12 +56,13 @@ class TestPDD < Minitest::Test
56
56
  end
57
57
 
58
58
  def test_real_github_repo
59
- assert(
60
- TDX::Base.new(
61
- 'https://github.com/yegor256/empty.git',
62
- opts(['--tests', 'src/test/**/*'])
63
- ).svg.include?('<path ')
64
- )
59
+ f = '/tmp/tdx.svg'
60
+ svg = TDX::Base.new(
61
+ 'https://github.com/yegor256/empty.git',
62
+ opts(['--tests', 'src/test/**/*'])
63
+ ).svg
64
+ File.write(f, svg)
65
+ assert(svg.include?('<path '))
65
66
  end
66
67
 
67
68
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko