simplecov-simple-html 0.2.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.
- data/.gitignore +35 -0
- data/.yardopts +2 -0
- data/LICENSE +20 -0
- data/README.md +11 -0
- data/Rakefile +54 -0
- data/assets/javascripts/application.js +23 -0
- data/assets/javascripts/libraries/jquery-1.6.2.min.js +18 -0
- data/assets/javascripts/plugins/highlight.pack.js +1 -0
- data/assets/javascripts/plugins/jquery.colorbox.js +952 -0
- data/assets/javascripts/plugins/jquery.dataTables.min.js +152 -0
- data/assets/javascripts/plugins/jquery.timeago.js +141 -0
- data/assets/javascripts/plugins/jquery.url.js +174 -0
- data/assets/stylesheets/application.css +3 -0
- data/assets/stylesheets/plugins/highlight.css +129 -0
- data/assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css +295 -0
- data/assets/stylesheets/plugins/jquery.colorbox.css +52 -0
- data/assets/stylesheets/reset.css +103 -0
- data/assets/stylesheets/screen.css.sass +220 -0
- data/lib/simplecov-simple-html.rb +324 -0
- data/lib/simplecov-simple-html/version.rb +10 -0
- data/public/application.css +799 -0
- data/public/application.js +1464 -0
- data/public/colorbox/border.png +0 -0
- data/public/colorbox/controls.png +0 -0
- data/public/colorbox/loading.gif +0 -0
- data/public/colorbox/loading_background.png +0 -0
- data/public/favicon_green.png +0 -0
- data/public/favicon_red.png +0 -0
- data/public/favicon_yellow.png +0 -0
- data/public/loading.gif +0 -0
- data/public/magnify.png +0 -0
- data/public/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/simplecov-simple-html.gemspec +25 -0
- data/spec/simple_cov-simple_html_spec.rb +56 -0
- data/test/lib/model/model.rb +6 -0
- data/test/lib/test.rb +15 -0
- data/test/lib/text/text.rb +6 -0
- data/test/simple_cov-simple_html_test.rb +12 -0
- data/test/test_helper.rb +17 -0
- data/test/test_test.rb +23 -0
- data/views/index.html.in +70 -0
- data/views/source.html.in +35 -0
- metadata +148 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/public/loading.gif
ADDED
Binary file
|
data/public/magnify.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require 'simplecov-simple-html/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "simplecov-simple-html"
|
7
|
+
s.version = SimpleCov::Formatter::SimpleHTMLFormatter::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["G. Allen Morris III"]
|
10
|
+
s.email = ["gam3@gam3.net"]
|
11
|
+
s.homepage = "https://github.com/gam3/simplecov-simple-html"
|
12
|
+
s.summary = %Q{Simple HTML formatter for SimpleCov code coverage tool}
|
13
|
+
s.description = %Q{Simple (non-javascript) HTML formatter for SimpleCov code coverage tool}
|
14
|
+
|
15
|
+
s.rubyforge_project = "simplecov-simple-html"
|
16
|
+
|
17
|
+
s.add_development_dependency 'rake'
|
18
|
+
s.add_development_dependency 'sprockets'
|
19
|
+
s.add_development_dependency 'sass'
|
20
|
+
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
module SimpleCov
|
5
|
+
# Formatter namespace for SimpleCov
|
6
|
+
module Formatter
|
7
|
+
describe SimpleHTMLFormatter do
|
8
|
+
describe "#initialize" do
|
9
|
+
it 'must return instance of SimpleHTMLFormatter' do
|
10
|
+
SimpleHTMLFormatter.new.must_be_instance_of SimpleHTMLFormatter
|
11
|
+
end
|
12
|
+
end
|
13
|
+
describe "#format" do
|
14
|
+
before do
|
15
|
+
@formater = SimpleHTMLFormatter.new()
|
16
|
+
end
|
17
|
+
it 'should format' do
|
18
|
+
SimpleCov.stub(:coverage_path, 'test/temp_coverage') do
|
19
|
+
@mock = Minitest::Mock.new
|
20
|
+
@s_mock = Minitest::Mock.new
|
21
|
+
@s_mock.expect(:each, [])
|
22
|
+
@s_mock.expect(:each, [])
|
23
|
+
@s_mock.expect(:each_key, [])
|
24
|
+
@s_mock.expect(:to_a, [])
|
25
|
+
@s_mock.expect(:size, 4)
|
26
|
+
@s_mock.expect(:lines_of_code, 4)
|
27
|
+
@s_mock.expect(:covered_lines, 4)
|
28
|
+
@s_mock.expect(:missed_lines, 4)
|
29
|
+
@s_mock.expect(:covered_strength, 20.1)
|
30
|
+
@s_mock.expect(:covered_strength, 20.1)
|
31
|
+
@s_mock.expect(:covered_percent, 20.1)
|
32
|
+
@s_mock.expect(:covered_percent, 20.1)
|
33
|
+
@s_mock.expect(:covered_percent, 20.1)
|
34
|
+
@s_mock.expect(:covered_percent, 20.1)
|
35
|
+
@mock.expect(:groups, @s_mock)
|
36
|
+
@mock.expect(:groups, @s_mock)
|
37
|
+
@mock.expect(:source_files, @s_mock)
|
38
|
+
@mock.expect(:source_files, @s_mock)
|
39
|
+
@mock.expect(:source_files, @s_mock)
|
40
|
+
@mock.expect(:command_name, 'bob')
|
41
|
+
@mock.expect(:command_name, 'bob')
|
42
|
+
@mock.expect(:covered_lines, 1)
|
43
|
+
@mock.expect(:covered_lines, 1)
|
44
|
+
@mock.expect(:covered_lines, 1)
|
45
|
+
@mock.expect(:covered_percent, 1)
|
46
|
+
@mock.expect(:total_lines, 1)
|
47
|
+
lambda { @formater.format(@mock); }.must_output(/Coverage report generated for bob/, '')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
after do
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
data/test/lib/test.rb
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'simplecov-simple-html'
|
3
|
+
|
4
|
+
|
5
|
+
SimpleCov.start do
|
6
|
+
add_filter "/test/*_test.rb"
|
7
|
+
add_filter "/spec/"
|
8
|
+
coverage_dir 'test/coverage'
|
9
|
+
formatter SimpleCov::Formatter::SimpleHTMLFormatter
|
10
|
+
command_name 'MiniTest::Unit'
|
11
|
+
add_group "Models", 'test/lib/model/*'
|
12
|
+
add_group "Tests", 'test/lib/text/*'
|
13
|
+
end
|
14
|
+
|
15
|
+
gem 'minitest'
|
16
|
+
require 'minitest/autorun'
|
17
|
+
|
data/test/test_test.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
require 'test'
|
5
|
+
require 'model/model'
|
6
|
+
require 'text/text'
|
7
|
+
|
8
|
+
class TestSimpleCovSimpleHtmlCoverage < MiniTest::Unit::TestCase
|
9
|
+
def test_test
|
10
|
+
assert_output("test\n", '') do
|
11
|
+
Test::Bob.test
|
12
|
+
end
|
13
|
+
end
|
14
|
+
def test_initial
|
15
|
+
assert_output("#initialize\n#test\n", '') do
|
16
|
+
Test::Bob.new.test
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
data/views/index.html.in
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>Code coverage for @SimpleCov.project_name@</title>
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
6
|
+
<script src='./assets/VERSION/application.js' type='text/javascript'>
|
7
|
+
</script>
|
8
|
+
<link href="assets/VERSION/application.css" media="screen, projection, print" rel="stylesheet" type="text/css" />
|
9
|
+
<link rel="shortcut icon" type="image/png" href="assets/VERSION/favicon_red.png" />
|
10
|
+
<link rel="icon" type="image/png" href="assets/VERSION/favicon_red.png" />
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div id="wrapper">
|
14
|
+
<div class="timestamp">Generated <abbr class="timeago" title="title">1 year ago</abbr></div>
|
15
|
+
<ul class="group_tabs">
|
16
|
+
<li class=""><a class="AllFiles" href="#AllFiles"><span class="tab_group_name">TITLE</span> (<span class="color"><span class="tab_coverage">2.59</span>%</span>)</a></li>
|
17
|
+
</ul>
|
18
|
+
<div id="content">
|
19
|
+
<div class="file_list_container" id="all_files">
|
20
|
+
<h2>
|
21
|
+
<span class="group_name">TITLE</span>
|
22
|
+
(<span class="covered_percent"><span class="source_files_covered_percent">100</span>%</span>
|
23
|
+
covered at
|
24
|
+
<span class="covered_strength">
|
25
|
+
<span class="covered_strength_value">
|
26
|
+
1.00
|
27
|
+
</span>
|
28
|
+
</span> hits/line)
|
29
|
+
</h2>
|
30
|
+
<div>
|
31
|
+
<span style="font-weight: bold;" class="files_total">1</span> files in total.
|
32
|
+
<span style="font-weight: bold;" class="file_lines">2</span> relevant lines.
|
33
|
+
<span class="green"><span style="font-weight: bold;" class="covered_lines">3</span> lines covered</span> and
|
34
|
+
<span class="red"><span style="font-weight: bold;" class="missed_lines">4</span> lines missed </span>
|
35
|
+
</div>
|
36
|
+
<table class="file_list">
|
37
|
+
<thead>
|
38
|
+
<tr>
|
39
|
+
<th>File</th>
|
40
|
+
<th>% covered</th>
|
41
|
+
<th>Lines</th>
|
42
|
+
<th>Relevant Lines</th>
|
43
|
+
<th>Lines covered</th>
|
44
|
+
<th>Lines missed</th>
|
45
|
+
<th>Avg. Hits / Line</th>
|
46
|
+
</tr>
|
47
|
+
</thead>
|
48
|
+
<tbody>
|
49
|
+
<tr class='for_each_file'>
|
50
|
+
<td class="strong"><a class="src_link cboxElement">file</a></td>
|
51
|
+
<td class="xxx strong">66.66</td>
|
52
|
+
<td>1</td>
|
53
|
+
<td>2</td>
|
54
|
+
<td>3</td>
|
55
|
+
<td>4</td>
|
56
|
+
<td>0.5</td>
|
57
|
+
</tr>
|
58
|
+
</tbody>
|
59
|
+
</table>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
<div id="footer">
|
63
|
+
Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v<span id="simplecov_version">0.0.0</span>
|
64
|
+
and
|
65
|
+
<a href="http://github.com/gam3/simplecov-simple-html">simplecov-simple-html</a> v<span id="html_version">0.1.1</span><br/>
|
66
|
+
using <span id="result.command_name">Mini::Test::Unit</span>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</body>
|
70
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>Code coverage for @SimpleCov.project_name@</title>
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
6
|
+
<script src='./assets/VERSION/application.js' type='text/javascript'>
|
7
|
+
</script>
|
8
|
+
<link href="assets/VERSION/application.css" media="screen, projection, print" rel="stylesheet" type="text/css" />
|
9
|
+
<link rel="shortcut icon" type="image/png" href="assets/VERSION/favicon_red.png" />
|
10
|
+
<link rel="icon" type="image/png" href="assets/VERSION/favicon_red.png" />
|
11
|
+
</head>
|
12
|
+
<body style="background-color:white;">
|
13
|
+
<div class="source_table" id="source_file">
|
14
|
+
<div class="header">
|
15
|
+
<h3 class='filename'>shortened_filename source_file</h3>
|
16
|
+
<h4><span style="color: blue;"><span class='covered_percent'>666</span>%</span> covered</h4>
|
17
|
+
<div>
|
18
|
+
<b class='lines_of_code'>source_file.lines_of_code</b> relevant lines.
|
19
|
+
<span class="green"><b class='covered_lines'>source_file.covered_lines.count</b> lines covered</span> and
|
20
|
+
<span class="red"><b class='missed_lines'>source_file.missed_lines.count</b> lines missed.</span>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<pre>
|
25
|
+
<ol>
|
26
|
+
<li class="line.status" data-hits="" data-linenumber="">
|
27
|
+
<span class="hits">skipped</span>
|
28
|
+
<code class="ruby"></code>
|
29
|
+
</li>
|
30
|
+
</ol>
|
31
|
+
</pre>
|
32
|
+
</div>
|
33
|
+
</body>
|
34
|
+
</html>
|
35
|
+
|
metadata
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simplecov-simple-html
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- G. Allen Morris III
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: sprockets
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: sass
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: Simple (non-javascript) HTML formatter for SimpleCov code coverage tool
|
63
|
+
email:
|
64
|
+
- gam3@gam3.net
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .gitignore
|
70
|
+
- .yardopts
|
71
|
+
- LICENSE
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- assets/javascripts/application.js
|
75
|
+
- assets/javascripts/libraries/jquery-1.6.2.min.js
|
76
|
+
- assets/javascripts/plugins/highlight.pack.js
|
77
|
+
- assets/javascripts/plugins/jquery.colorbox.js
|
78
|
+
- assets/javascripts/plugins/jquery.dataTables.min.js
|
79
|
+
- assets/javascripts/plugins/jquery.timeago.js
|
80
|
+
- assets/javascripts/plugins/jquery.url.js
|
81
|
+
- assets/stylesheets/application.css
|
82
|
+
- assets/stylesheets/plugins/highlight.css
|
83
|
+
- assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css
|
84
|
+
- assets/stylesheets/plugins/jquery.colorbox.css
|
85
|
+
- assets/stylesheets/reset.css
|
86
|
+
- assets/stylesheets/screen.css.sass
|
87
|
+
- lib/simplecov-simple-html.rb
|
88
|
+
- lib/simplecov-simple-html/version.rb
|
89
|
+
- public/application.css
|
90
|
+
- public/application.js
|
91
|
+
- public/colorbox/border.png
|
92
|
+
- public/colorbox/controls.png
|
93
|
+
- public/colorbox/loading.gif
|
94
|
+
- public/colorbox/loading_background.png
|
95
|
+
- public/favicon_green.png
|
96
|
+
- public/favicon_red.png
|
97
|
+
- public/favicon_yellow.png
|
98
|
+
- public/loading.gif
|
99
|
+
- public/magnify.png
|
100
|
+
- public/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
101
|
+
- public/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
102
|
+
- public/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
103
|
+
- public/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
104
|
+
- public/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
105
|
+
- public/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
106
|
+
- public/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
107
|
+
- public/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
108
|
+
- public/smoothness/images/ui-icons_222222_256x240.png
|
109
|
+
- public/smoothness/images/ui-icons_2e83ff_256x240.png
|
110
|
+
- public/smoothness/images/ui-icons_454545_256x240.png
|
111
|
+
- public/smoothness/images/ui-icons_888888_256x240.png
|
112
|
+
- public/smoothness/images/ui-icons_cd0a0a_256x240.png
|
113
|
+
- simplecov-simple-html.gemspec
|
114
|
+
- spec/simple_cov-simple_html_spec.rb
|
115
|
+
- test/lib/model/model.rb
|
116
|
+
- test/lib/test.rb
|
117
|
+
- test/lib/text/text.rb
|
118
|
+
- test/simple_cov-simple_html_test.rb
|
119
|
+
- test/test_helper.rb
|
120
|
+
- test/test_test.rb
|
121
|
+
- views/index.html.in
|
122
|
+
- views/source.html.in
|
123
|
+
homepage: https://github.com/gam3/simplecov-simple-html
|
124
|
+
licenses: []
|
125
|
+
post_install_message:
|
126
|
+
rdoc_options: []
|
127
|
+
require_paths:
|
128
|
+
- lib
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
137
|
+
requirements:
|
138
|
+
- - ! '>='
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
requirements: []
|
142
|
+
rubyforge_project: simplecov-simple-html
|
143
|
+
rubygems_version: 1.8.23
|
144
|
+
signing_key:
|
145
|
+
specification_version: 3
|
146
|
+
summary: Simple HTML formatter for SimpleCov code coverage tool
|
147
|
+
test_files: []
|
148
|
+
has_rdoc:
|