simplecov-html 0.11.0.beta2 → 0.11.0

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: 5a029a180a134f18ccae22b1a9040b22258c5aefa763147873a95c9c1ba46e09
4
- data.tar.gz: a0eded12611371f636eb5680438797ea0fc3f9c674e878fc298bbcb5ddd9ae50
3
+ metadata.gz: d594be7e34adc2ed339f5a6df223c55cc58082d31bd023905184eb61bf678e75
4
+ data.tar.gz: c32f8b988081ea79136aa7f36a381a8f534dd2d96b860328e3021187aa602ebb
5
5
  SHA512:
6
- metadata.gz: 98a6a8af89ec6e73d74322a7097ecc36b83adfc21560d1596c15d0d4ea84e275b8bb05b7ef1b2393c237b42d59417691dddda60b53876279fba3e6f6a5089b9b
7
- data.tar.gz: fd852fe6346d84284b435095bab0ecabe488fe53a8b87483706856aa858cdac14bf764ffbc79c652f912caa3333049885bba02bad4bdfefff97414d27e261978
6
+ metadata.gz: e907b2fe612c02ceb6400afdabab01968730551e72c7e7247fcd07f5ac206b9a13fac25eff83027b2a27e8e137c9593adffde43b69674a1a50522db988ddc472
7
+ data.tar.gz: '08de96a271d330ac91eecf9b60cfe99027cbd5fff212041a6e32964c19aab6ef198fdf59a0f4d832f4fc13318ca628521094df7953213499fac13a37b5b63b3c'
@@ -1,6 +1,18 @@
1
- 0.11.0.beta2 (unreleased)
1
+ 0.11.0 (2020-01-28)
2
2
  =======
3
3
 
4
+ This release goes together with simplecov 0.18 to bring branch coverage support to you. Please also check the notes of the beta releases.
5
+
6
+ ## Enhancements
7
+ * Display total branch coverage percentage in the overview (if branch coverage enabled)
8
+
9
+ 0.11.0.beta2 (2020-01-19)
10
+ =======
11
+
12
+ ## Enhancements
13
+ * changed display of branch coverage to be `branch_type: hit_count` which should be more expressive and more intuitive
14
+ * Cached lookup of whether we're doing branch coverage or not (should be faster)
15
+
4
16
  ## Bugfixes
5
17
  * Fixed sorting of percent column (regression in previous release)
6
18
 
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simplecov-html (0.11.0.beta2)
4
+ simplecov-html (0.11.0)
5
5
 
6
6
  PATH
7
7
  remote: /home/tobi/github/simplecov
8
8
  specs:
9
- simplecov (0.18.0.beta2)
9
+ simplecov (0.18.0)
10
10
  docile (~> 1.1)
11
- simplecov-html (~> 0.11.0.beta2)
11
+ simplecov-html (~> 0.11.0)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
@@ -90,6 +90,10 @@ module SimpleCov
90
90
  template("file_list").result(binding)
91
91
  end
92
92
 
93
+ def covered_percent(percent)
94
+ template("covered_percent").result(binding)
95
+ end
96
+
93
97
  def coverage_css_class(covered_percent)
94
98
  if covered_percent > 90
95
99
  "green"
@@ -3,7 +3,7 @@
3
3
  module SimpleCov
4
4
  module Formatter
5
5
  class HTMLFormatter
6
- VERSION = "0.11.0.beta2"
6
+ VERSION = "0.11.0"
7
7
  end
8
8
  end
9
9
  end
@@ -0,0 +1,3 @@
1
+ <span class="<%= coverage_css_class(percent) %>">
2
+ <%= percent.round(2) %>%
3
+ </span>
@@ -2,9 +2,7 @@
2
2
  <h2>
3
3
  <span class="group_name"><%= title %></span>
4
4
  (<span class="covered_percent">
5
- <span class="<%= coverage_css_class(source_files.covered_percent) %>">
6
- <%= source_files.covered_percent.round(2) %>%
7
- </span>
5
+ <%= covered_percent(source_files.covered_percent) %>
8
6
  </span>
9
7
  covered at
10
8
  <span class="covered_strength">
@@ -25,6 +23,7 @@
25
23
  <b><%= source_files.lines_of_code %></b> relevant lines,
26
24
  <span class="green"><b><%= source_files.covered_lines %></b> lines covered</span> and
27
25
  <span class="red"><b><%= source_files.missed_lines %></b> lines missed. </span>
26
+ (<%= covered_percent(source_files.covered_percent) %>)
28
27
  </div>
29
28
 
30
29
  <% if branchable_result? %>
@@ -32,6 +31,7 @@
32
31
  <span><b><%= source_files.total_branches %></b> total branches, </span>
33
32
  <span class="green"><b><%= source_files.covered_branches %></b> branches covered</span> and
34
33
  <span class="red"><b><%= source_files.missed_branches %></b> branches missed.</span>
34
+ (<%= covered_percent(source_files.branch_covered_percent) %>)
35
35
  </div>
36
36
  <% end %>
37
37
 
@@ -62,7 +62,7 @@
62
62
  <td><%= source_file.covered_lines.count + source_file.missed_lines.count %></td>
63
63
  <td><%= source_file.covered_lines.count %></td>
64
64
  <td><%= source_file.missed_lines.count %></td>
65
- <td><%= source_file.covered_strength %></td>
65
+ <td><%= source_file.covered_strength.round(2) %></td>
66
66
  <% if branchable_result? %>
67
67
  <td class="<%= coverage_css_class(source_file.branches_coverage_percent) %> strong t-file__branch-coverage"><%= source_file.branches_coverage_percent.round(2).to_s %> %</td>
68
68
  <td><%= source_file.total_branches.count %></td>
@@ -2,17 +2,13 @@
2
2
  <div class="header">
3
3
  <h3><%= shortened_filename source_file %></h3>
4
4
  <h4>
5
- <span class="<%= coverage_css_class(source_file.covered_percent) %>">
6
- <%= source_file.covered_percent.round(2).to_s %> %
7
- </span>
5
+ <%= covered_percent(source_file.covered_percent) %>
8
6
  lines covered
9
7
  </h4>
10
8
 
11
9
  <% if branchable_result? %>
12
10
  <h4>
13
- <span class="<%= coverage_css_class(source_file.branches_coverage_percent) %>">
14
- <%= source_file.branches_coverage_percent.round(2).to_s %> %
15
- </span>
11
+ <%= covered_percent(source_file.branches_coverage_percent) %>
16
12
  branches covered
17
13
  </h4>
18
14
  <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.beta2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Olszowka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-19 00:00:00.000000000 Z
11
+ date: 2020-01-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Default HTML formatter for SimpleCov code coverage tool for ruby 2.4+
14
14
  email:
@@ -71,6 +71,7 @@ files:
71
71
  - simplecov-html.gemspec
72
72
  - test/helper.rb
73
73
  - test/test_simple_cov-html.rb
74
+ - views/covered_percent.erb
74
75
  - views/file_list.erb
75
76
  - views/layout.erb
76
77
  - views/source_file.erb
@@ -89,9 +90,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
90
  version: '2.4'
90
91
  required_rubygems_version: !ruby/object:Gem::Requirement
91
92
  requirements:
92
- - - ">"
93
+ - - ">="
93
94
  - !ruby/object:Gem::Version
94
- version: 1.3.1
95
+ version: '0'
95
96
  requirements: []
96
97
  rubygems_version: 3.0.3
97
98
  signing_key: