simplecov-html 0.12.3 → 0.13.0
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/CHANGELOG.md +21 -0
- data/Rakefile +11 -2
- data/lib/simplecov-html/version.rb +1 -1
- data/lib/simplecov-html.rb +39 -11
- data/public/application.css +1 -1
- data/public/application.js +7 -7
- data/views/layout.erb +1 -2
- data/views/source_file.erb +5 -2
- metadata +5 -29
- data/.gitignore +0 -26
- data/.rubocop.yml +0 -79
- data/.travis.yml +0 -24
- data/Gemfile +0 -23
- data/Gemfile.lock +0 -59
- data/Guardfile +0 -14
- data/assets/javascripts/application.js +0 -122
- data/assets/javascripts/libraries/jquery-3.4.1.js +0 -10598
- data/assets/javascripts/plugins/highlight.pack.js +0 -1
- data/assets/javascripts/plugins/jquery.colorbox.js +0 -1105
- data/assets/javascripts/plugins/jquery.dataTables.js +0 -15008
- data/assets/javascripts/plugins/jquery.timeago.js +0 -232
- data/assets/stylesheets/application.css +0 -3
- data/assets/stylesheets/plugins/datatables.css +0 -462
- data/assets/stylesheets/plugins/highlight.css +0 -129
- data/assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css +0 -295
- data/assets/stylesheets/plugins/jquery.colorbox.css +0 -52
- data/assets/stylesheets/reset.css +0 -103
- data/assets/stylesheets/screen.css +0 -316
- data/simplecov-html.gemspec +0 -23
- data/test/helper.rb +0 -6
- data/test/test_simple_cov-html.rb +0 -10
data/views/layout.erb
CHANGED
@@ -5,8 +5,7 @@
|
|
5
5
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
6
6
|
<script src='<%= assets_path('application.js') %>' type='text/javascript'></script>
|
7
7
|
<link href='<%= assets_path('application.css') %>' media='screen, projection, print' rel='stylesheet' type='text/css' />
|
8
|
-
<link rel="
|
9
|
-
<link rel="icon" type="image/png" href="<%= assets_path('favicon.png') %>" />
|
8
|
+
<link rel="icon" type="image/png" href="<%= assets_path("favicon_#{coverage_css_class(result.source_files.covered_percent)}.png") %>" />
|
10
9
|
</head>
|
11
10
|
|
12
11
|
<body<%= ' data-branch-coverage=true' if branchable_result? %>>
|
data/views/source_file.erb
CHANGED
@@ -34,8 +34,11 @@
|
|
34
34
|
<% source_file.lines.each do |line| %>
|
35
35
|
<div>
|
36
36
|
<li class="<%= line_status?(source_file, line) %>" data-hits="<%= line.coverage ? line.coverage : '' %>" data-linenumber="<%= line.number %>">
|
37
|
-
<% if line.covered?
|
38
|
-
|
37
|
+
<% if line.covered? %>
|
38
|
+
<span class="hits"><%= line.coverage %></span>
|
39
|
+
<% elsif line.skipped? %>
|
40
|
+
<span class="hits">skipped</span>
|
41
|
+
<% end %>
|
39
42
|
|
40
43
|
<% if branchable_result? %>
|
41
44
|
<% source_file.branches_for_line(line.number).each do |branch_type, hit_count| %>
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christoph Olszowka
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2024-09-08 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: Default HTML formatter for SimpleCov code coverage tool for ruby 2.4+
|
14
13
|
email:
|
@@ -18,30 +17,11 @@ extensions: []
|
|
18
17
|
extra_rdoc_files: []
|
19
18
|
files:
|
20
19
|
- ".document"
|
21
|
-
- ".gitignore"
|
22
|
-
- ".rubocop.yml"
|
23
20
|
- ".tool-versions"
|
24
|
-
- ".travis.yml"
|
25
21
|
- CHANGELOG.md
|
26
|
-
- Gemfile
|
27
|
-
- Gemfile.lock
|
28
|
-
- Guardfile
|
29
22
|
- LICENSE
|
30
23
|
- README.md
|
31
24
|
- Rakefile
|
32
|
-
- assets/javascripts/application.js
|
33
|
-
- assets/javascripts/libraries/jquery-3.4.1.js
|
34
|
-
- assets/javascripts/plugins/highlight.pack.js
|
35
|
-
- assets/javascripts/plugins/jquery.colorbox.js
|
36
|
-
- assets/javascripts/plugins/jquery.dataTables.js
|
37
|
-
- assets/javascripts/plugins/jquery.timeago.js
|
38
|
-
- assets/stylesheets/application.css
|
39
|
-
- assets/stylesheets/plugins/datatables.css
|
40
|
-
- assets/stylesheets/plugins/highlight.css
|
41
|
-
- assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css
|
42
|
-
- assets/stylesheets/plugins/jquery.colorbox.css
|
43
|
-
- assets/stylesheets/reset.css
|
44
|
-
- assets/stylesheets/screen.css
|
45
25
|
- lib/simplecov-html.rb
|
46
26
|
- lib/simplecov-html/version.rb
|
47
27
|
- public/DataTables-1.10.20/images/sort_asc.png
|
@@ -73,9 +53,6 @@ files:
|
|
73
53
|
- public/images/ui-icons_cd0a0a_256x240.png
|
74
54
|
- public/loading.gif
|
75
55
|
- public/magnify.png
|
76
|
-
- simplecov-html.gemspec
|
77
|
-
- test/helper.rb
|
78
|
-
- test/test_simple_cov-html.rb
|
79
56
|
- views/covered_percent.erb
|
80
57
|
- views/file_list.erb
|
81
58
|
- views/layout.erb
|
@@ -83,8 +60,8 @@ files:
|
|
83
60
|
homepage: https://github.com/simplecov-ruby/simplecov-html
|
84
61
|
licenses:
|
85
62
|
- MIT
|
86
|
-
metadata:
|
87
|
-
|
63
|
+
metadata:
|
64
|
+
rubygems_mfa_required: 'true'
|
88
65
|
rdoc_options: []
|
89
66
|
require_paths:
|
90
67
|
- lib
|
@@ -99,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
76
|
- !ruby/object:Gem::Version
|
100
77
|
version: '0'
|
101
78
|
requirements: []
|
102
|
-
rubygems_version: 3.
|
103
|
-
signing_key:
|
79
|
+
rubygems_version: 3.6.0.dev
|
104
80
|
specification_version: 4
|
105
81
|
summary: Default HTML formatter for SimpleCov code coverage tool for ruby 2.4+
|
106
82
|
test_files: []
|
data/.gitignore
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
.rvmrc
|
2
|
-
.bundle
|
3
|
-
|
4
|
-
## MAC OS
|
5
|
-
.DS_Store
|
6
|
-
|
7
|
-
## TEXTMATE
|
8
|
-
*.tmproj
|
9
|
-
tmtags
|
10
|
-
|
11
|
-
## EMACS
|
12
|
-
*~
|
13
|
-
\#*
|
14
|
-
.\#*
|
15
|
-
|
16
|
-
## VIM
|
17
|
-
*.swp
|
18
|
-
|
19
|
-
## RUBYMINE
|
20
|
-
.idea
|
21
|
-
|
22
|
-
## PROJECT::GENERAL
|
23
|
-
coverage
|
24
|
-
rdoc
|
25
|
-
pkg
|
26
|
-
.sass-cache
|
data/.rubocop.yml
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 2.6
|
3
|
-
DisplayCopNames: true
|
4
|
-
|
5
|
-
Bundler/DuplicatedGem:
|
6
|
-
Enabled: false
|
7
|
-
|
8
|
-
Gemspec/RequiredRubyVersion:
|
9
|
-
Enabled: false
|
10
|
-
|
11
|
-
Layout/AccessModifierIndentation:
|
12
|
-
EnforcedStyle: outdent
|
13
|
-
|
14
|
-
Layout/SpaceInsideHashLiteralBraces:
|
15
|
-
EnforcedStyle: no_space
|
16
|
-
|
17
|
-
Metrics/BlockNesting:
|
18
|
-
Max: 2
|
19
|
-
|
20
|
-
Layout/LineLength:
|
21
|
-
AllowURI: true
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
Metrics/MethodLength:
|
25
|
-
CountComments: false
|
26
|
-
Max: 10
|
27
|
-
|
28
|
-
Metrics/ParameterLists:
|
29
|
-
Max: 4
|
30
|
-
CountKeywordArgs: true
|
31
|
-
|
32
|
-
Naming/FileName:
|
33
|
-
Exclude:
|
34
|
-
- "lib/simplecov-html.rb"
|
35
|
-
- "test/test_simple_cov-html.rb"
|
36
|
-
|
37
|
-
Style/CollectionMethods:
|
38
|
-
PreferredMethods:
|
39
|
-
map: "collect"
|
40
|
-
reduce: "inject"
|
41
|
-
find: "detect"
|
42
|
-
find_all: "select"
|
43
|
-
|
44
|
-
Style/Documentation:
|
45
|
-
Enabled: false
|
46
|
-
|
47
|
-
Style/DoubleNegation:
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Style/ExpandPathArguments:
|
51
|
-
Enabled: false
|
52
|
-
|
53
|
-
Style/FrozenStringLiteralComment:
|
54
|
-
Enabled: true
|
55
|
-
|
56
|
-
Style/HashSyntax:
|
57
|
-
EnforcedStyle: hash_rockets
|
58
|
-
|
59
|
-
Style/MutableConstant:
|
60
|
-
Exclude:
|
61
|
-
- "lib/simplecov-html/version.rb"
|
62
|
-
|
63
|
-
Style/NumericPredicate:
|
64
|
-
Enabled: false
|
65
|
-
|
66
|
-
Style/RegexpLiteral:
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
Style/StringLiterals:
|
70
|
-
EnforcedStyle: double_quotes
|
71
|
-
|
72
|
-
Style/SymbolArray:
|
73
|
-
Enabled: false
|
74
|
-
|
75
|
-
Style/TrailingCommaInHashLiteral:
|
76
|
-
EnforcedStyleForMultiline: "comma"
|
77
|
-
|
78
|
-
Style/TrailingCommaInArrayLiteral:
|
79
|
-
EnforcedStyleForMultiline: "comma"
|
data/.travis.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
before_install:
|
4
|
-
- gem i bundler
|
5
|
-
|
6
|
-
bundler_args: --without benchmark --jobs=3 --retry=3
|
7
|
-
|
8
|
-
matrix:
|
9
|
-
include:
|
10
|
-
- rvm: 2.5.7
|
11
|
-
- rvm: 2.6.5
|
12
|
-
- rvm: 2.7.0
|
13
|
-
- rvm: jruby-9.2.9.0
|
14
|
-
env: JRUBY_OPTS=--debug
|
15
|
-
jdk: openjdk8
|
16
|
-
- rvm: ruby-head
|
17
|
-
- rvm: jruby-head
|
18
|
-
env: JRUBY_OPTS=--debug
|
19
|
-
jdk: openjdk8
|
20
|
-
allow_failures:
|
21
|
-
- rvm: ruby-head
|
22
|
-
- rvm: jruby-head
|
23
|
-
env: JRUBY_OPTS=--debug
|
24
|
-
fast_finish: true
|
data/Gemfile
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gemspec
|
6
|
-
|
7
|
-
gem "rake", ">= 11"
|
8
|
-
|
9
|
-
# Use local copy of simplecov in development if you want to
|
10
|
-
# gem "simplecov", :path => File.dirname(__FILE__) + "/../simplecov"
|
11
|
-
gem "simplecov", :github => "simplecov-ruby/simplecov"
|
12
|
-
|
13
|
-
group :test do
|
14
|
-
gem "minitest"
|
15
|
-
end
|
16
|
-
|
17
|
-
group :development do
|
18
|
-
gem "rubocop"
|
19
|
-
# sprockets 4.0 requires ruby 2.5+
|
20
|
-
gem "sprockets", "~> 3.7"
|
21
|
-
gem "uglifier"
|
22
|
-
gem "yui-compressor"
|
23
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/simplecov-ruby/simplecov.git
|
3
|
-
revision: 80700ec9f9b5ae426c22d06f62620f7e7b71ff42
|
4
|
-
specs:
|
5
|
-
simplecov (0.18.5)
|
6
|
-
docile (~> 1.1)
|
7
|
-
simplecov-html (~> 0.11)
|
8
|
-
|
9
|
-
PATH
|
10
|
-
remote: .
|
11
|
-
specs:
|
12
|
-
simplecov-html (0.12.3)
|
13
|
-
|
14
|
-
GEM
|
15
|
-
remote: https://rubygems.org/
|
16
|
-
specs:
|
17
|
-
ast (2.4.0)
|
18
|
-
concurrent-ruby (1.1.5)
|
19
|
-
docile (1.3.2)
|
20
|
-
execjs (2.7.0)
|
21
|
-
jaro_winkler (1.5.4)
|
22
|
-
minitest (5.14.0)
|
23
|
-
parallel (1.19.1)
|
24
|
-
parser (2.7.0.2)
|
25
|
-
ast (~> 2.4.0)
|
26
|
-
rack (2.2.3)
|
27
|
-
rainbow (3.0.0)
|
28
|
-
rake (13.0.1)
|
29
|
-
rubocop (0.79.0)
|
30
|
-
jaro_winkler (~> 1.5.1)
|
31
|
-
parallel (~> 1.10)
|
32
|
-
parser (>= 2.7.0.1)
|
33
|
-
rainbow (>= 2.2.2, < 4.0)
|
34
|
-
ruby-progressbar (~> 1.7)
|
35
|
-
unicode-display_width (>= 1.4.0, < 1.7)
|
36
|
-
ruby-progressbar (1.10.1)
|
37
|
-
sprockets (3.7.2)
|
38
|
-
concurrent-ruby (~> 1.0)
|
39
|
-
rack (> 1, < 3)
|
40
|
-
uglifier (4.2.0)
|
41
|
-
execjs (>= 0.3.0, < 3)
|
42
|
-
unicode-display_width (1.6.1)
|
43
|
-
yui-compressor (0.12.0)
|
44
|
-
|
45
|
-
PLATFORMS
|
46
|
-
ruby
|
47
|
-
|
48
|
-
DEPENDENCIES
|
49
|
-
minitest
|
50
|
-
rake (>= 11)
|
51
|
-
rubocop
|
52
|
-
simplecov!
|
53
|
-
simplecov-html!
|
54
|
-
sprockets (~> 3.7)
|
55
|
-
uglifier
|
56
|
-
yui-compressor
|
57
|
-
|
58
|
-
BUNDLED WITH
|
59
|
-
2.1.4
|
data/Guardfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# A sample Guardfile
|
4
|
-
# More info at https://github.com/guard/guard#readme
|
5
|
-
|
6
|
-
guard "bundler" do
|
7
|
-
watch("Gemfile")
|
8
|
-
# Uncomment next line if Gemfile contain `gemspec' command
|
9
|
-
# watch(/^.+\.gemspec/)
|
10
|
-
end
|
11
|
-
|
12
|
-
guard "rake", :task => "assets:compile" do
|
13
|
-
watch(%r{^assets\/})
|
14
|
-
end
|
@@ -1,122 +0,0 @@
|
|
1
|
-
//= require_directory ./libraries/
|
2
|
-
//= require_directory ./plugins/
|
3
|
-
//= require_self
|
4
|
-
|
5
|
-
$(document).ready(function () {
|
6
|
-
$('.file_list').dataTable({
|
7
|
-
order: [[1, "asc"]],
|
8
|
-
paging: false
|
9
|
-
});
|
10
|
-
|
11
|
-
// Syntax highlight all files up front - deactivated
|
12
|
-
// $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
|
13
|
-
|
14
|
-
// Syntax highlight source files on first toggle of the file view popup
|
15
|
-
$("a.src_link").click(function () {
|
16
|
-
// Get the source file element that corresponds to the clicked element
|
17
|
-
var source_table = $($(this).attr('href'));
|
18
|
-
|
19
|
-
// If not highlighted yet, do it!
|
20
|
-
if (!source_table.hasClass('highlighted')) {
|
21
|
-
source_table.find('pre code').each(function (i, e) { hljs.highlightBlock(e, ' ') });
|
22
|
-
source_table.addClass('highlighted');
|
23
|
-
};
|
24
|
-
});
|
25
|
-
|
26
|
-
var prev_anchor;
|
27
|
-
var curr_anchor;
|
28
|
-
|
29
|
-
// Set-up of popup for source file views
|
30
|
-
$("a.src_link").colorbox({
|
31
|
-
transition: "none",
|
32
|
-
inline: true,
|
33
|
-
opacity: 1,
|
34
|
-
width: "95%",
|
35
|
-
height: "95%",
|
36
|
-
onLoad: function () {
|
37
|
-
prev_anchor = curr_anchor ? curr_anchor : window.location.hash.substring(1);
|
38
|
-
curr_anchor = this.href.split('#')[1];
|
39
|
-
window.location.hash = curr_anchor;
|
40
|
-
|
41
|
-
$('.file_list_container').hide();
|
42
|
-
},
|
43
|
-
onCleanup: function () {
|
44
|
-
if (prev_anchor && prev_anchor != curr_anchor) {
|
45
|
-
$('a[href="#' + prev_anchor + '"]').click();
|
46
|
-
curr_anchor = prev_anchor;
|
47
|
-
} else {
|
48
|
-
$('.group_tabs a:first').click();
|
49
|
-
prev_anchor = curr_anchor;
|
50
|
-
curr_anchor = "#_AllFiles";
|
51
|
-
}
|
52
|
-
window.location.hash = curr_anchor;
|
53
|
-
|
54
|
-
var active_group = $('.group_tabs li.active a').attr('class');
|
55
|
-
$("#" + active_group + ".file_list_container").show();
|
56
|
-
}
|
57
|
-
});
|
58
|
-
|
59
|
-
window.onpopstate = function (event) {
|
60
|
-
if (window.location.hash.substring(0, 2) == "#_") {
|
61
|
-
$.colorbox.close();
|
62
|
-
curr_anchor = window.location.hash.substring(1);
|
63
|
-
} else {
|
64
|
-
if ($('#colorbox').is(':hidden')) {
|
65
|
-
$('a.src_link[href="' + window.location.hash + '"]').colorbox({ open: true });
|
66
|
-
}
|
67
|
-
}
|
68
|
-
};
|
69
|
-
|
70
|
-
// Hide src files and file list container after load
|
71
|
-
$('.source_files').hide();
|
72
|
-
$('.file_list_container').hide();
|
73
|
-
|
74
|
-
// Add tabs based upon existing file_list_containers
|
75
|
-
$('.file_list_container h2').each(function () {
|
76
|
-
var container_id = $(this).parent().attr('id');
|
77
|
-
var group_name = $(this).find('.group_name').first().html();
|
78
|
-
var covered_percent = $(this).find('.covered_percent').first().html();
|
79
|
-
|
80
|
-
$('.group_tabs').append('<li><a href="#' + container_id + '">' + group_name + ' (' + covered_percent + ')</a></li>');
|
81
|
-
});
|
82
|
-
|
83
|
-
$('.group_tabs a').each(function () {
|
84
|
-
$(this).addClass($(this).attr('href').replace('#', ''));
|
85
|
-
});
|
86
|
-
|
87
|
-
// Make sure tabs don't get ugly focus borders when active
|
88
|
-
$('.group_tabs').on('focus', 'a', function () { $(this).blur(); });
|
89
|
-
|
90
|
-
var favicon_path = $('link[rel="shortcut icon"]').attr('href');
|
91
|
-
$('.group_tabs').on('click', 'a', function () {
|
92
|
-
if (!$(this).parent().hasClass('active')) {
|
93
|
-
$('.group_tabs a').parent().removeClass('active');
|
94
|
-
$(this).parent().addClass('active');
|
95
|
-
$('.file_list_container').hide();
|
96
|
-
$(".file_list_container" + $(this).attr('href')).show();
|
97
|
-
window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_');
|
98
|
-
|
99
|
-
// Force favicon reload - otherwise the location change containing anchor would drop the favicon...
|
100
|
-
// Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
|
101
|
-
$('link[rel="shortcut icon"]').remove();
|
102
|
-
$('head').append('<link rel="shortcut icon" type="image/png" href="' + favicon_path + '" />');
|
103
|
-
};
|
104
|
-
return false;
|
105
|
-
});
|
106
|
-
|
107
|
-
if (window.location.hash) {
|
108
|
-
var anchor = window.location.hash.substring(1);
|
109
|
-
if (anchor.length == 40) {
|
110
|
-
$('a.src_link[href="#' + anchor + '"]').click();
|
111
|
-
} else {
|
112
|
-
$('.group_tabs a.' + anchor.replace('_', '')).click();
|
113
|
-
}
|
114
|
-
} else {
|
115
|
-
$('.group_tabs a:first').click();
|
116
|
-
};
|
117
|
-
|
118
|
-
$("abbr.timeago").timeago();
|
119
|
-
$('#loading').fadeOut();
|
120
|
-
$('#wrapper').show();
|
121
|
-
$('.dataTables_filter input').focus()
|
122
|
-
});
|