rspec_html_formatter2 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,137 @@
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>Rspec HTML Reports - Overview</title>
8
+
9
+ <!-- Bootstrap -->
10
+ <link href="resources/bootstrap-4.0.0-dist/css/bootstrap.min.css" rel="stylesheet">
11
+ <link href="resources/bootstrap-4.0.0-dist/themes/bootstrap-theme-yeti.min.css" rel="stylesheet">
12
+
13
+ <!--[if lt IE 9]>
14
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
15
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
16
+ <![endif]-->
17
+
18
+ <script src="resources/js/jquery-1.11.1.min.js"></script>
19
+ <script src="resources/bootstrap-4.0.0-dist/js/bootstrap.min.js"></script>
20
+ <script src="resources/tether-1.3.3/js/tether.min.js"></script>
21
+ <script src="resources/js/Chart.js"></script>
22
+ <style>
23
+ * {
24
+ font-size: 14px;
25
+ }
26
+
27
+ <%= Rouge::Themes::Github.render(:scope => '.highlight') %>
28
+ </style>
29
+ </head>
30
+ <body>
31
+ <div class="container">
32
+
33
+ <div class="bs-docs-section clearfix">
34
+ <div class="row">
35
+ <div class="col-lg-12">
36
+
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
+ <p class="text-center" style="font-size:2em;">Overview</p>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="row">
54
+
55
+ <div class="col-md-4">
56
+ <div class="panel panel-default">
57
+
58
+ <div class="panel-heading">Group Summary</div>
59
+ <div class="panel-body">
60
+ <span class="pull-right"><%= @total_examples %> Examples</span>
61
+ <canvas id="pieChart" width="300" height="300"></canvas>
62
+ </div>
63
+ </div>
64
+
65
+ </div>
66
+
67
+ <div class="row">
68
+
69
+ <div class="col-lg-12">
70
+
71
+ <table class="table table-striped table-hover ">
72
+ <thead>
73
+ <tr>
74
+ <th>#</th>
75
+ <th>Group</th>
76
+ <th>Duration</th>
77
+ <th class="warning">Pending</th>
78
+ <th class="danger">Failed</th>
79
+ <th class="success">Passed</th>
80
+ <th>Status</th>
81
+ </tr>
82
+ </thead>
83
+ <tbody>
84
+ <% i = 1 %>
85
+ <% @overview.each do |group_name,group| %>
86
+ <tr>
87
+ <td><%= i %></td>
88
+ <td>
89
+ <a href="<%= group_name %>.html"><%= group[:group] %></a>
90
+ </td>
91
+ <td><%= group[:duration] %></td>
92
+ <td class="warning"><span><%= group[:pending].size %></span></td>
93
+ <td class="danger"><span><%= group[:failed].size %></span></td>
94
+ <td class="success"><span><%= group[:passed].size %></span></td>
95
+ <td><span class="label label-<%= group[:klass]%>"><%= group[:status] %></span></td>
96
+ </tr>
97
+ <% i+= 1%>
98
+ <% end %>
99
+ </tbody>
100
+ </table>
101
+
102
+ </div>
103
+ </div>
104
+
105
+ </div>
106
+
107
+ <script type="text/javascript">
108
+
109
+ var pieCtx = document.getElementById("pieChart");
110
+
111
+ var pieChart = new Chart(pieCtx, {
112
+ type: 'doughnut',
113
+ data: {
114
+ labels: ["Passed", "Failed", "Pending"],
115
+ datasets: [{
116
+ label: 'Examples',
117
+ data: [<%= @passed %>, <%= @failed %>, <%= @pending %>],
118
+
119
+ backgroundColor: [
120
+ '#3c9a5f',
121
+ '#ea2f10',
122
+ '#e99002'
123
+ ],
124
+ borderColor: [
125
+ 'rgba(255,99,132,1)',
126
+ 'rgba(54, 162, 235, 1)',
127
+ 'rgba(255, 206, 86, 1)'
128
+ ],
129
+ borderWidth: 1
130
+ }]
131
+ },
132
+ });
133
+
134
+ </script>
135
+
136
+ </body>
137
+ </html>
@@ -0,0 +1,223 @@
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>Rspec HTML Reports - <%= @title %></title>
8
+
9
+ <!-- Bootstrap -->
10
+ <link href="resources/bootstrap-4.0.0-dist/css/bootstrap.min.css" rel="stylesheet">
11
+ <link href="resources/bootstrap-4.0.0-dist/themes/bootstrap-theme-yeti.min.css" rel="stylesheet">
12
+
13
+ <!--[if lt IE 9]>
14
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
15
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
16
+ <![endif]-->
17
+
18
+ <script src="resources/js/jquery-1.11.1.min.js"></script>
19
+ <script src="resources/bootstrap-4.0.0-dist/js/bootstrap.min.js"></script>
20
+ <script src="resources/tether-1.3.3/js/tether.min.js"></script>
21
+ <script src="resources/js/Chart.js"></script>
22
+ <style>
23
+ * {
24
+ font-size: 14px;
25
+ }
26
+
27
+ .spacer {
28
+ margin-left: 10px;
29
+ }
30
+ <%= Rouge::Themes::Github.render(:scope => '.highlight') %>
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <div class="container">
35
+
36
+ <div class="bs-docs-section clearfix">
37
+ <div class="row">
38
+ <div class="col-lg-12">
39
+
40
+ <div class="bs-component">
41
+ <div class="navbar navbar-inverse">
42
+ <div class="navbar-header">
43
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
44
+ <span class="icon-bar"></span>
45
+ <span class="icon-bar"></span>
46
+ <span class="icon-bar"></span>
47
+ </button>
48
+ </div>
49
+
50
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
51
+ <ul class="nav navbar-nav">
52
+ <li><a href="overview.html">Overview</a></li>
53
+ </ul>
54
+ </div>
55
+
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
+ <div class="row">
63
+ <div class="col-lg-12">
64
+ <div class="col-md-4">
65
+ <div class="panel panel-default">
66
+
67
+ <div class="panel-heading">Group Summary</div>
68
+ <div class="panel-body">
69
+ <span class="pull-right"><%= @total_examples %> Examples</span>
70
+ <canvas id="pieChart" width="300" height="300"></canvas>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="row">
77
+
78
+ <div class="col-lg-12">
79
+
80
+ <table class="table table-striped table-hover ">
81
+ <thead>
82
+ <tr>
83
+ <th>#</th>
84
+ <th>Example</th>
85
+ <th>Duration</th>
86
+ <th>Status</th>
87
+ </tr>
88
+ </thead>
89
+ <tbody>
90
+ <% @examples.each_with_index do |example, i| %>
91
+ <tr>
92
+ <td id="example_<%= i+1 %>"><%= i+1 %></td>
93
+ <td width="100%">
94
+ <div>
95
+ <div class="panel <%= example.klass('panel-') %>">
96
+ <div class="panel-heading">
97
+ <h3 class="panel-title pull-left"> <%= example.example_title %></h3>
98
+ <% if example.has_screenrecord? %>
99
+ <a href="#example_<%= i+1 %>" class="btn btn-xs btn-default spacer pull-right" onclick="toggler('screenrecord_<%= i+1 %>');">Screen Record</a>
100
+ <% end %>
101
+ <% if example.has_screenshots? %>
102
+ <a href="#example_<%= i+1 %>" class="btn btn-xs btn-default spacer pull-right" onclick="toggler('screenshots_<%= i+1 %>');">Screen Shots</a>
103
+ <% end %>
104
+ <div class="clearfix"></div>
105
+ </div>
106
+
107
+
108
+ <% if example.has_spec? or example.has_screenshots? or example.has_screenrecord? %>
109
+ <!-- SPEC BLOCK -->
110
+ <% if example.has_spec? %>
111
+ <div class="panel-body">
112
+ <%= example.spec %>
113
+ </div>
114
+ <% end %>
115
+
116
+ <!-- SCREENSHOT BLOCK -->
117
+ <% if example.has_screenshots? %>
118
+ <div id="screenshots_<%= i+1 %>" class="panel-body" style="display:none">
119
+ <% example.screenshots.each do |screenshot| %>
120
+ <div class="col-md-4">
121
+ <div class="thumbnail">
122
+ <a href=<%= screenshot[:path] %> target="_blank">
123
+ <img src=<%= screenshot[:path] %> alt="Lights" style="width:50%,height:50%">
124
+ <div class="caption">
125
+ <p><%= screenshot[:caption] %></p>
126
+ </div>
127
+ </a>
128
+ </div>
129
+ </div>
130
+ <% end %>
131
+ </div>
132
+ <% end %>
133
+
134
+ <!-- SCREENRECORD BLOCK -->
135
+ <% if example.has_screenrecord? %>
136
+ <div id="screenrecord_<%= i+1 %>" class="panel-body" style="display:none">
137
+ <div class="col-md-4">
138
+ <video controls width="250">
139
+ <source src=<%= example.screenrecord %> type="video/mp4">
140
+ Your browser does not support HTML5 video.
141
+ </video>
142
+ </div>
143
+ </div>
144
+ <% end %>
145
+ </div>
146
+
147
+ <% end %>
148
+ </div>
149
+ </div>
150
+ <div>
151
+ <% if example.has_exception? %>
152
+ <div class="panel panel-danger">
153
+ <div class="panel-heading">
154
+ <h3 class="panel-title"><%= example.exception.klass %></h3>
155
+ </div>
156
+ <div class="panel-body">
157
+ <%= example.exception.explanation %>
158
+ <h5><%= example.exception.backtrace_message %></h5>
159
+ <%= example.exception.highlighted_source %>
160
+ </div>
161
+
162
+ <% if example.has_failed_screenshot? %>
163
+ <div class="panel-body">
164
+ <div class="col-md-4">
165
+ <div class="thumbnail">
166
+ <a href="<%= example.failed_screenshot %>" target="_blank">
167
+ <img src="<%= example.failed_screenshot %>" alt="Lights" style="width:50%;height:50%">
168
+ </a>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ <% end %>
173
+ </div>
174
+ </div>
175
+ <% end %>
176
+ </div>
177
+ </td>
178
+ <td><%= example.duration %></td>
179
+ <td><span class="label <%= example.klass %>"><%= example.status %></span></td>
180
+ </tr>
181
+ <% end %>
182
+ </tbody>
183
+ </table>
184
+
185
+ </div>
186
+ </div>
187
+
188
+ </div>
189
+
190
+ <script type="text/javascript">
191
+ var pieCtx = document.getElementById("pieChart");
192
+
193
+ var pieChart = new Chart(pieCtx, {
194
+ type: 'doughnut',
195
+ data: {
196
+ labels: ["Passed", "Failed", "Pending"],
197
+ datasets: [{
198
+ label: 'Examples',
199
+ data: [<%= @passed %>, <%= @failed %>, <%= @pending %>],
200
+
201
+ backgroundColor: [
202
+ '#3c9a5f',
203
+ '#ea2f10',
204
+ '#e99002'
205
+ ],
206
+ borderColor: [
207
+ 'rgba(255,99,132,1)',
208
+ 'rgba(54, 162, 235, 1)',
209
+ 'rgba(255, 206, 86, 1)'
210
+ ],
211
+ borderWidth: 1
212
+ }]
213
+ },
214
+ });
215
+
216
+ function toggler(divId) {
217
+ $("#" + divId).slideToggle();
218
+ }
219
+ </script>
220
+
221
+
222
+ </body>
223
+ </html>
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_html_formatter2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Vishal Banthia
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rouge
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rdoc
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: pry
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: rake
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: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: RSpec HTML Formatter
112
+ email:
113
+ - vishal.banthia.vb@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - LICENSE.txt
119
+ - README.md
120
+ - lib/rspec_html_formatter.rb
121
+ - resources/bootstrap-4.0.0-dist/css/bootstrap.min.css
122
+ - resources/bootstrap-4.0.0-dist/js/bootstrap.js
123
+ - resources/bootstrap-4.0.0-dist/js/bootstrap.min.js
124
+ - resources/bootstrap-4.0.0-dist/themes/bootstrap-theme-yeti.min.css
125
+ - resources/js/Chart.js
126
+ - resources/js/jquery-1.11.1.min.js
127
+ - resources/tether-1.3.3-dist/js/tether.min.js
128
+ - spec/embed_graphics_spec.rb
129
+ - spec/rspec_html_reporter_spec.rb
130
+ - spec/support/assets/images/screen_1.png
131
+ - spec/support/assets/images/screen_2.png
132
+ - spec/support/assets/videos/screen_record.mp4
133
+ - templates/overview.erb
134
+ - templates/report.erb
135
+ homepage: https://github.com/vbanthia/rspec_html_formatter2
136
+ licenses:
137
+ - MIT
138
+ metadata: {}
139
+ post_install_message:
140
+ rdoc_options: []
141
+ require_paths:
142
+ - lib
143
+ required_ruby_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: 2.2.2
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ requirements: []
154
+ rubyforge_project:
155
+ rubygems_version: 2.5.1
156
+ signing_key:
157
+ specification_version: 4
158
+ summary: RSpec HTML Formatter
159
+ test_files: []