simplecov-formatter-bootstrap 1.0.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/.document +5 -0
- data/.gitignore +26 -0
- data/Gemfile +15 -0
- data/Guardfile +12 -0
- data/LICENSE +20 -0
- data/README.md +30 -0
- data/Rakefile +38 -0
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +520 -0
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/javascripts/application.js +66 -0
- data/assets/javascripts/vendor/bootstrap.min.js +6 -0
- data/assets/javascripts/vendor/highlight.pack.js +1 -0
- data/assets/javascripts/vendor/jquery-1.11.1.min.js +4 -0
- data/assets/javascripts/vendor/jquery.colorbox.js +952 -0
- data/assets/javascripts/vendor/jquery.dataTables.min.js +152 -0
- data/assets/javascripts/vendor/jquery.timeago.js +141 -0
- data/assets/javascripts/vendor/jquery.url.js +174 -0
- data/assets/stylesheets/application.css.sass +259 -0
- data/assets/stylesheets/vendor/bootstrap.min.css +5 -0
- data/assets/stylesheets/vendor/font-awesome.min.css +4 -0
- data/assets/stylesheets/vendor/highlight.css +129 -0
- data/lib/simplecov-html.rb +113 -0
- data/lib/simplecov-html/version.rb +7 -0
- data/public/application.css +1736 -0
- data/public/application.js +1561 -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/css/application.css +339 -0
- data/public/css/application.js +1561 -0
- data/public/favicon_green.png +0 -0
- data/public/favicon_red.png +0 -0
- data/public/favicon_yellow.png +0 -0
- data/public/fonts/FontAwesome.otf +0 -0
- data/public/fonts/fontawesome-webfont.eot +0 -0
- data/public/fonts/fontawesome-webfont.svg +520 -0
- data/public/fonts/fontawesome-webfont.ttf +0 -0
- data/public/fonts/fontawesome-webfont.woff +0 -0
- data/public/js/application.css +1736 -0
- data/public/js/application.js +548 -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-html.gemspec +26 -0
- data/test/helper.rb +9 -0
- data/test/test_simple_cov-html.rb +8 -0
- data/views/file_list.erb +53 -0
- data/views/layout.erb +52 -0
- data/views/source_file.erb +35 -0
- metadata +161 -0
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,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require 'simplecov-html/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "simplecov-formatter-bootstrap"
|
7
|
+
s.version = SimpleCov::Formatter::HTMLFormatter::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Rodrigo Díaz"]
|
10
|
+
s.email = ["rdiazv89@gmail.com"]
|
11
|
+
s.homepage = "https://github.com/rdiazv/simplecov-html"
|
12
|
+
s.summary = %Q{Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
|
13
|
+
s.description = %Q{Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+}
|
14
|
+
s.license = "MIT"
|
15
|
+
|
16
|
+
s.rubyforge_project = "simplecov-formatter-bootstrap"
|
17
|
+
|
18
|
+
s.add_development_dependency 'rake'
|
19
|
+
s.add_development_dependency 'sprockets', '~> 2.12.2'
|
20
|
+
s.add_development_dependency 'sass'
|
21
|
+
|
22
|
+
s.files = `git ls-files`.split("\n")
|
23
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
24
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
25
|
+
s.require_paths = ["lib"]
|
26
|
+
end
|
data/test/helper.rb
ADDED
data/views/file_list.erb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
<div class="tab-pane" id="<%= title_id %>">
|
2
|
+
<h1 class="page-header">
|
3
|
+
<%= title %>
|
4
|
+
(<span class="<%= coverage_css_class(source_files.covered_percent) %>"><%= source_files.covered_percent.round(2) %>%</span>
|
5
|
+
covered<span class="visible-xs-inline">)</span>
|
6
|
+
<span class="hidden-xs">
|
7
|
+
at
|
8
|
+
<span class="<%= strength_css_class(source_files.covered_strength) %>">
|
9
|
+
<%= source_files.covered_strength.round(2) %>
|
10
|
+
</span>
|
11
|
+
hits/line)
|
12
|
+
</span>
|
13
|
+
</h1>
|
14
|
+
<a name="<%= title_id %>"></a>
|
15
|
+
<p class="lead">
|
16
|
+
<b><%= source_files.length %></b> files in total.
|
17
|
+
<b><%= source_files.lines_of_code %></b> relevant lines.
|
18
|
+
<span class="green"><b><%= source_files.covered_lines %></b> lines covered</span> and
|
19
|
+
<span class="red"><b><%= source_files.missed_lines %></b> lines missed </span>
|
20
|
+
</p>
|
21
|
+
<table class="file_list table table-condensed table-striped table-hover">
|
22
|
+
<thead>
|
23
|
+
<tr>
|
24
|
+
<th class="file-name-td">File</th>
|
25
|
+
<th class="coverage-td">% covered</th>
|
26
|
+
<th class="hidden-xs hidden-sm">Lines</th>
|
27
|
+
<th class="hidden-xs">Relevant Lines</th>
|
28
|
+
<th class="hidden-xs">
|
29
|
+
<div class="visible-md visible-lg">Lines covered</div>
|
30
|
+
<div class="visible-sm">Covered</div>
|
31
|
+
</th>
|
32
|
+
<th class="hidden-xs">
|
33
|
+
<div class="visible-md visible-lg">Lines missed</div>
|
34
|
+
<div class="visible-sm">Missed</div>
|
35
|
+
</th>
|
36
|
+
<th class="hidden-xs hidden-sm">Avg. Hits / Line</th>
|
37
|
+
</tr>
|
38
|
+
</thead>
|
39
|
+
<tbody>
|
40
|
+
<% source_files.each do |source_file| %>
|
41
|
+
<tr>
|
42
|
+
<td class="file-name-td"><%= link_to_source_file(source_file) %></td>
|
43
|
+
<td class="coverage-td <%= coverage_css_class(source_file.covered_percent) %> strong"><%= source_file.covered_percent.round(2).to_s %> %</td>
|
44
|
+
<td class="hidden-xs hidden-sm"><%= source_file.lines.count %></td>
|
45
|
+
<td class="hidden-xs"><%= source_file.covered_lines.count + source_file.missed_lines.count %></td>
|
46
|
+
<td class="hidden-xs"><%= source_file.covered_lines.count %></td>
|
47
|
+
<td class="hidden-xs"><%= source_file.missed_lines.count %></td>
|
48
|
+
<td class="hidden-xs hidden-sm"><%= source_file.covered_strength %></td>
|
49
|
+
</tr>
|
50
|
+
<% end %>
|
51
|
+
</tbody>
|
52
|
+
</table>
|
53
|
+
</div>
|
data/views/layout.erb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
<%
|
2
|
+
groups = { 'All Files' => result.source_files }
|
3
|
+
result.groups.each { |name, files| groups[name] = files }
|
4
|
+
%>
|
5
|
+
|
6
|
+
<!DOCTYPE html>
|
7
|
+
<html xmlns='http://www.w3.org/1999/xhtml'>
|
8
|
+
<head>
|
9
|
+
<title>Code coverage for <%= SimpleCov.project_name %></title>
|
10
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
11
|
+
<script src='<%= assets_path('js/application.js') %>' type='text/javascript'></script>
|
12
|
+
<link href='<%= assets_path('css/application.css') %>' media='screen, projection, print' rel='stylesheet' type='text/css'>
|
13
|
+
<link rel="shortcut icon" type="image/png" href="<%= assets_path("favicon_#{coverage_css_class(result.source_files.covered_percent)}.png") %>" />
|
14
|
+
<link rel="icon" type="image/png" href="<%= assets_path('favicon.png') %>" />
|
15
|
+
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,600' rel='stylesheet' type='text/css'>
|
16
|
+
</head>
|
17
|
+
|
18
|
+
<body>
|
19
|
+
<div class="container-fluid">
|
20
|
+
<ul class="nav nav-tabs">
|
21
|
+
<% groups.each do |name, files| %>
|
22
|
+
<li>
|
23
|
+
<a href="#<%= name.gsub(/^[^a-zA-Z]+/, '').gsub(/[^a-zA-Z0-9\-\_]/, '') %>" data-toggle="tab">
|
24
|
+
<%= name %>
|
25
|
+
(<span class="<%= coverage_css_class(files.covered_percent) %>"><%= files.covered_percent.round(2) %>%</span>)
|
26
|
+
</a>
|
27
|
+
</li>
|
28
|
+
<% end %>
|
29
|
+
</ul>
|
30
|
+
|
31
|
+
<div id="container">
|
32
|
+
<div class="tab-content">
|
33
|
+
<%= formatted_file_list("All Files", result.source_files) %>
|
34
|
+
|
35
|
+
<% result.groups.each do |name, files| %>
|
36
|
+
<%= formatted_file_list(name, files) %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="footer" class="text-muted">
|
42
|
+
<div class="timestamp pull-left">Generated <%= timeago(Time.now) %></div>
|
43
|
+
|
44
|
+
simplecov v<%= SimpleCov::VERSION %> <span>·</span> simplecov-html v<%= SimpleCov::Formatter::HTMLFormatter::VERSION %> <span>·</span> <%= result.command_name %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<% result.source_files.each do |source_file| %>
|
49
|
+
<%= formatted_source_file(source_file) %>
|
50
|
+
<% end %>
|
51
|
+
</body>
|
52
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<div class="modal" id="<%= id source_file %>">
|
2
|
+
<input type="text" class="focus-hidden" />
|
3
|
+
|
4
|
+
<div class="modal-dialog modal-lg">
|
5
|
+
<div class="modal-content">
|
6
|
+
<div class="modal-header">
|
7
|
+
<button type="button" class="close" data-dismiss="modal">
|
8
|
+
<span aria-hidden="true">×</span>
|
9
|
+
<span class="sr-only">Close</span>
|
10
|
+
</button>
|
11
|
+
|
12
|
+
<h2><%= shortened_filename source_file %></h2>
|
13
|
+
<p class="lead">
|
14
|
+
<span class="<%= coverage_css_class(source_file.covered_percent) %>"><b><%= source_file.covered_percent.round(2).to_s %>%</b></span> covered.
|
15
|
+
<b><%= source_file.lines_of_code %></b> relevant lines.
|
16
|
+
<span class="green"><b><%= source_file.covered_lines.count %></b> lines covered</span> and
|
17
|
+
<span class="red"><b><%= source_file.missed_lines.count %></b> lines missed.</span>
|
18
|
+
</p>
|
19
|
+
</div>
|
20
|
+
<div class="modal-body">
|
21
|
+
<pre class="source_table">
|
22
|
+
<ol>
|
23
|
+
<% source_file.lines.each_with_index do |line| %>
|
24
|
+
<li class="<%= line.status %>" data-hits="<%= line.coverage ? line.coverage : '' %>" data-linenumber="<%= line.number %>">
|
25
|
+
<% if line.covered? %><span class="badge pull-right badge-covered"><%= line.coverage %></span><% end %>
|
26
|
+
<% if line.skipped? %><span class="badge pull-right badge-skipped">skipped</span><% end %>
|
27
|
+
<code class="ruby"><%= CGI.escapeHTML(line.src.chomp) %></code>
|
28
|
+
</li>
|
29
|
+
<% end %>
|
30
|
+
</ol>
|
31
|
+
</pre>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simplecov-formatter-bootstrap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Rodrigo Díaz
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-09-22 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: 2.12.2
|
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: 2.12.2
|
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: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
|
63
|
+
email:
|
64
|
+
- rdiazv89@gmail.com
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .document
|
70
|
+
- .gitignore
|
71
|
+
- Gemfile
|
72
|
+
- Guardfile
|
73
|
+
- LICENSE
|
74
|
+
- README.md
|
75
|
+
- Rakefile
|
76
|
+
- assets/fonts/FontAwesome.otf
|
77
|
+
- assets/fonts/fontawesome-webfont.eot
|
78
|
+
- assets/fonts/fontawesome-webfont.svg
|
79
|
+
- assets/fonts/fontawesome-webfont.ttf
|
80
|
+
- assets/fonts/fontawesome-webfont.woff
|
81
|
+
- assets/javascripts/application.js
|
82
|
+
- assets/javascripts/vendor/bootstrap.min.js
|
83
|
+
- assets/javascripts/vendor/highlight.pack.js
|
84
|
+
- assets/javascripts/vendor/jquery-1.11.1.min.js
|
85
|
+
- assets/javascripts/vendor/jquery.colorbox.js
|
86
|
+
- assets/javascripts/vendor/jquery.dataTables.min.js
|
87
|
+
- assets/javascripts/vendor/jquery.timeago.js
|
88
|
+
- assets/javascripts/vendor/jquery.url.js
|
89
|
+
- assets/stylesheets/application.css.sass
|
90
|
+
- assets/stylesheets/vendor/bootstrap.min.css
|
91
|
+
- assets/stylesheets/vendor/font-awesome.min.css
|
92
|
+
- assets/stylesheets/vendor/highlight.css
|
93
|
+
- lib/simplecov-html.rb
|
94
|
+
- lib/simplecov-html/version.rb
|
95
|
+
- public/application.css
|
96
|
+
- public/application.js
|
97
|
+
- public/colorbox/border.png
|
98
|
+
- public/colorbox/controls.png
|
99
|
+
- public/colorbox/loading.gif
|
100
|
+
- public/colorbox/loading_background.png
|
101
|
+
- public/css/application.css
|
102
|
+
- public/css/application.js
|
103
|
+
- public/favicon_green.png
|
104
|
+
- public/favicon_red.png
|
105
|
+
- public/favicon_yellow.png
|
106
|
+
- public/fonts/FontAwesome.otf
|
107
|
+
- public/fonts/fontawesome-webfont.eot
|
108
|
+
- public/fonts/fontawesome-webfont.svg
|
109
|
+
- public/fonts/fontawesome-webfont.ttf
|
110
|
+
- public/fonts/fontawesome-webfont.woff
|
111
|
+
- public/js/application.css
|
112
|
+
- public/js/application.js
|
113
|
+
- public/loading.gif
|
114
|
+
- public/magnify.png
|
115
|
+
- public/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
116
|
+
- public/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
117
|
+
- public/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
118
|
+
- public/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
119
|
+
- public/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
120
|
+
- public/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
121
|
+
- public/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
122
|
+
- public/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
123
|
+
- public/smoothness/images/ui-icons_222222_256x240.png
|
124
|
+
- public/smoothness/images/ui-icons_2e83ff_256x240.png
|
125
|
+
- public/smoothness/images/ui-icons_454545_256x240.png
|
126
|
+
- public/smoothness/images/ui-icons_888888_256x240.png
|
127
|
+
- public/smoothness/images/ui-icons_cd0a0a_256x240.png
|
128
|
+
- simplecov-html.gemspec
|
129
|
+
- test/helper.rb
|
130
|
+
- test/test_simple_cov-html.rb
|
131
|
+
- views/file_list.erb
|
132
|
+
- views/layout.erb
|
133
|
+
- views/source_file.erb
|
134
|
+
homepage: https://github.com/rdiazv/simplecov-html
|
135
|
+
licenses:
|
136
|
+
- MIT
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
143
|
+
requirements:
|
144
|
+
- - ! '>='
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
requirements: []
|
154
|
+
rubyforge_project: simplecov-formatter-bootstrap
|
155
|
+
rubygems_version: 1.8.23
|
156
|
+
signing_key:
|
157
|
+
specification_version: 3
|
158
|
+
summary: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
|
159
|
+
test_files:
|
160
|
+
- test/helper.rb
|
161
|
+
- test/test_simple_cov-html.rb
|