specify_html_reporter 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,121 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <title>Test Reporting - Overview</title>
8
+
9
+ <link href="resources/bootstrap-4.0.0-dist/css/bootstrap.min.css" rel="stylesheet">
10
+ <link href="resources/bootstrap-4.0.0-dist/themes/bootstrap-theme-yeti.min.css" rel="stylesheet">
11
+
12
+ <!--[if lt IE 9]>
13
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
14
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
15
+ <![endif]-->
16
+
17
+ <script src="resources/jquery-3.3.1.min.js"></script>
18
+ <script src="resources/bootstrap-4.0.0-dist/js/bootstrap.min.js"></script>
19
+ <script src="resources/Chart.min.js"></script>
20
+ <style>
21
+ * {
22
+ font-size: 14px;
23
+ }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <div class="container">
28
+ <div class="bs-docs-section clearfix">
29
+ <div class="row">
30
+ <div class="col-lg-12">
31
+ <div class="bs-component">
32
+ <div class="navbar navbar-inverse">
33
+ <div class="navbar-header">
34
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
35
+ <span class="icon-bar"></span>
36
+ <span class="icon-bar"></span>
37
+ <span class="icon-bar"></span>
38
+ </button>
39
+ <p class="text-center" style="font-size:2em;">Overview</p>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="row">
48
+ <div class="col-md-4">
49
+ <div class="panel panel-default">
50
+ <div class="panel-heading">Group Summary</div>
51
+ <div class="panel-body">
52
+ <span class="pull-right"><%= @total_examples %> Examples</span>
53
+ <canvas id="overview_chart" width="300" height="300"></canvas>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="row">
59
+ <div class="col-lg-12">
60
+ <table class="table table-striped table-hover">
61
+ <thead>
62
+ <tr>
63
+ <th>#</th>
64
+ <th>Group</th>
65
+ <th>Duration</th>
66
+ <th class="warning">Pending</th>
67
+ <th class="danger">Failed</th>
68
+ <th class="success">Passed</th>
69
+ <th>Status</th>
70
+ </tr>
71
+ </thead>
72
+ <tbody>
73
+ <% i = 1 %>
74
+ <% @overview.each do |group_name, group| %>
75
+ <tr>
76
+ <td><%= i %></td>
77
+ <td>
78
+ <a href="<%= group_name %>.html"><%= group[:group] %></a>
79
+ </td>
80
+ <td><%= group[:duration] %></td>
81
+ <td class="warning"><span><%= group[:pending].size %></span></td>
82
+ <td class="danger"><span><%= group[:failed].size %></span></td>
83
+ <td class="success"><span><%= group[:passed].size %></span></td>
84
+ <td><span class="label label-<%= group[:status_type]%>"><%= group[:status] %></span></td>
85
+ </tr>
86
+ <% i+= 1%>
87
+ <% end %>
88
+ </tbody>
89
+ </table>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ </div>
94
+
95
+ <script type="text/javascript">
96
+ var pieCtx = document.getElementById("overview_chart");
97
+
98
+ var pieChart = new Chart(pieCtx, {
99
+ type: 'doughnut',
100
+ data: {
101
+ labels: ["Passed", "Failed", "Pending"],
102
+ datasets: [{
103
+ label: 'Examples',
104
+ data: [<%= @passed %>, <%= @failed %>, <%= @pending %>],
105
+ backgroundColor: [
106
+ '#3c9a5f',
107
+ '#ea2f10',
108
+ '#e99002'
109
+ ],
110
+ borderColor: [
111
+ 'rgba(255,99,132,1)',
112
+ 'rgba(54, 162, 235, 1)',
113
+ 'rgba(255, 206, 86, 1)'
114
+ ],
115
+ borderWidth: 1
116
+ }]
117
+ },
118
+ });
119
+ </script>
120
+ </body>
121
+ </html>
@@ -0,0 +1,209 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <title>Test Report - <%= @title %></title>
8
+
9
+ <link href="resources/bootstrap-4.0.0-dist/css/bootstrap.min.css" rel="stylesheet">
10
+ <link href="resources/bootstrap-4.0.0-dist/themes/bootstrap-theme-yeti.min.css" rel="stylesheet">
11
+
12
+ <!--[if lt IE 9]>
13
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
14
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
15
+ <![endif]-->
16
+
17
+ <script src="resources/jquery-3.3.1.min.js"></script>
18
+ <script src="resources/bootstrap-4.0.0-dist/js/bootstrap.min.js"></script>
19
+ <script src="resources/Chart.min.js"></script>
20
+ <style>
21
+ * {
22
+ font-size: 14px;
23
+ }
24
+
25
+ .spacer {
26
+ margin-left: 10px;
27
+ }
28
+
29
+ <%= Rouge::Themes::Github.render(:scope => '.highlight') %>
30
+ </style>
31
+ </head>
32
+ <body>
33
+ <div class="container">
34
+ <div class="bs-docs-section clearfix">
35
+ <div class="row">
36
+ <div class="col-lg-12">
37
+ <div class="bs-component">
38
+ <div class="navbar navbar-inverse">
39
+ <div class="navbar-header">
40
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
41
+ <span class="icon-bar"></span>
42
+ <span class="icon-bar"></span>
43
+ <span class="icon-bar"></span>
44
+ </button>
45
+ </div>
46
+
47
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
48
+ <ul class="nav navbar-nav">
49
+ <li><a href="overview.html">Overview</a></li>
50
+ </ul>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="row">
59
+ <div class="col-lg-12">
60
+ <div class="col-md-4">
61
+ <div class="panel panel-default">
62
+ <div class="panel-heading">Group Summary</div>
63
+ <div class="panel-body">
64
+ <span class="pull-right"><%= @examples.size %> Examples</span>
65
+ <canvas id="report_chart" width="300" height="300"></canvas>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </div>
70
+
71
+ <div class="col-lg-12">
72
+ <table class="table table-striped table-hover">
73
+ <thead>
74
+ <tr>
75
+ <th>#</th>
76
+ <th>Example</th>
77
+ <th>Duration</th>
78
+ <th>Status</th>
79
+ </tr>
80
+ </thead>
81
+ <tbody>
82
+ <% @examples.each_with_index do |example, i| %>
83
+ <tr>
84
+ <td id="example_<%= i+1 %>"><%= i+1 %></td>
85
+ <td width="100%">
86
+ <div>
87
+ <div class="panel <%= example.result_type('panel-') %>">
88
+ <div class="panel-heading">
89
+ <h3 class="panel-title pull-left"> <%= example.example_title %></h3>
90
+ <% if example.screen_grab? %>
91
+ <a href="#example_<%= i+1 %>" class="btn btn-xs btn-default spacer pull-right" onclick="toggler('screen_grab_<%= i+1 %>');">Screen Grabs</a>
92
+ <% end %>
93
+ <% if example.video_record? %>
94
+ <a href="#example_<%= i+1 %>" class="btn btn-xs btn-default spacer pull-right" onclick="toggler('video_record_<%= i+1 %>');">Video Records</a>
95
+ <% end %>
96
+ <div class="clearfix"></div>
97
+ </div>
98
+
99
+ <% if example.comment? %>
100
+ <div class="panel-body"><%= example.comment %></div>
101
+ <% end %>
102
+
103
+ <% if example.spec? or example.screen_grab? or example.video_record? %>
104
+
105
+ <!-- SPEC BLOCK -->
106
+ <% if example.spec? %>
107
+ <div class="panel-body"><pre><%= example.spec %></pre></div>
108
+ <% end %>
109
+
110
+ <!-- SCREEN GRAB BLOCK -->
111
+ <% if example.screen_grab? %>
112
+ <div id="screen_grab_<%= i+1 %>" class="panel-body" style="display:none">
113
+ <% example.screen_grab.each do |image| %>
114
+ <div class="col-md-4">
115
+ <div class="thumbnail">
116
+ <a href=<%= image[:path] %> target="_blank">
117
+ <img src=<%= image[:path] %> alt="Screen Grab" style="width:50%,height:50%">
118
+ <div class="caption">
119
+ <p><%= image[:caption] %></p>
120
+ </div>
121
+ </a>
122
+ </div>
123
+ </div>
124
+ <% end %>
125
+ </div>
126
+ <% end %>
127
+
128
+ <!-- VIDEO RECORD BLOCK -->
129
+ <% if example.video_record? %>
130
+ <div id="video_record_<%= i+1 %>" class="panel-body" style="display:none">
131
+ <div class="col-md-4">
132
+ <video controls width="250">
133
+ <source src=<%= example.video_record %> type="video/mp4">
134
+ Your browser does not support HTML 5 video.
135
+ </video>
136
+ </div>
137
+ </div>
138
+ <% end %>
139
+
140
+ <% end %>
141
+ </div>
142
+ </div>
143
+ <div>
144
+ <% if example.exception? %>
145
+ <div class="panel panel-danger">
146
+ <div class="panel-heading">
147
+ <h3 class="panel-title"><%= example.exception.problem %></h3>
148
+ </div>
149
+ <div class="panel-body"><pre class="highlight"><code><%= example.exception.explanation %></code></pre>
150
+ <% unless example.exception.backtrace_message.empty? %>
151
+ <dl>
152
+ <dt>Backtrace:</dt>
153
+ <dd>
154
+ <h5>
155
+ <ol>
156
+ <% example.exception.backtrace_message.each do |message| %>
157
+ <li><%= message %></li>
158
+ <% end %>
159
+ </ol>
160
+ </h5>
161
+ </dd>
162
+ </dl>
163
+ <% end %>
164
+ </div>
165
+ </div>
166
+ <pre class="highlight"><code><%= example.exception.highlighted_source %></code></pre>
167
+ <% end %>
168
+ </div>
169
+ </td>
170
+ <td><%= example.duration %></td>
171
+ <td><span class="label <%= example.result_type %>"><%= example.status %></span></td>
172
+ </tr>
173
+ <% end %>
174
+ </tbody>
175
+ </table>
176
+ </div>
177
+ </div>
178
+ </div>
179
+ <script type="text/javascript">
180
+ function toggler(divId) {
181
+ $("#" + divId).slideToggle();
182
+ };
183
+
184
+ var pieCtx = document.getElementById("report_chart");
185
+
186
+ var pieChart = new Chart(pieCtx, {
187
+ type: 'doughnut',
188
+ data: {
189
+ labels: ["Passed", "Failed", "Pending"],
190
+ datasets: [{
191
+ label: 'Examples',
192
+ data: [<%= @passed %>, <%= @failed %>, <%= @pending %>],
193
+ backgroundColor: [
194
+ '#3c9a5f',
195
+ '#ea2f10',
196
+ '#e99002'
197
+ ],
198
+ borderColor: [
199
+ 'rgba(255,99,132,1)',
200
+ 'rgba(54, 162, 235, 1)',
201
+ 'rgba(255, 206, 86, 1)'
202
+ ],
203
+ borderWidth: 1
204
+ }]
205
+ },
206
+ });
207
+ </script>
208
+ </body>
209
+ </html>
metadata ADDED
@@ -0,0 +1,198 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: specify_html_reporter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jeff Nyman
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-12-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.17'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.17'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-core
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: activesupport
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rouge
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: HTML Report for Specify
140
+ email:
141
+ - jeffnyman@gmail.com
142
+ executables: []
143
+ extensions: []
144
+ extra_rdoc_files: []
145
+ files:
146
+ - ".gitignore"
147
+ - ".hound.yml"
148
+ - ".rspec"
149
+ - ".rubocop.yml"
150
+ - ".travis.yml"
151
+ - CODE_OF_CONDUCT.md
152
+ - Gemfile
153
+ - LICENSE.md
154
+ - README.md
155
+ - Rakefile
156
+ - bin/console
157
+ - bin/setup
158
+ - lib/specify_html_reporter.rb
159
+ - lib/specify_html_reporter/example.rb
160
+ - lib/specify_html_reporter/problem.rb
161
+ - lib/specify_html_reporter/version.rb
162
+ - resources/Chart.min.js
163
+ - resources/bootstrap-4.0.0-dist/css/bootstrap.min.css
164
+ - resources/bootstrap-4.0.0-dist/fonts/glyphicons-halflings-regular.eot
165
+ - resources/bootstrap-4.0.0-dist/fonts/glyphicons-halflings-regular.svg
166
+ - resources/bootstrap-4.0.0-dist/fonts/glyphicons-halflings-regular.ttf
167
+ - resources/bootstrap-4.0.0-dist/fonts/glyphicons-halflings-regular.woff
168
+ - resources/bootstrap-4.0.0-dist/js/bootstrap.min.js
169
+ - resources/bootstrap-4.0.0-dist/themes/bootstrap-theme-yeti.min.css
170
+ - resources/jquery-3.3.1.min.js
171
+ - specify_html_reporter.gemspec
172
+ - templates/overview.erb
173
+ - templates/report.erb
174
+ homepage: https://github.com/jeffnyman/specify_html_reporter
175
+ licenses:
176
+ - MIT
177
+ metadata: {}
178
+ post_install_message:
179
+ rdoc_options: []
180
+ require_paths:
181
+ - lib
182
+ required_ruby_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ requirements: []
193
+ rubyforge_project:
194
+ rubygems_version: 2.7.6
195
+ signing_key:
196
+ specification_version: 4
197
+ summary: HTML Report for Specify
198
+ test_files: []