rspec_html_formatter 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,158 @@
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-3.2.0-dist/css/bootstrap.min.css" rel="stylesheet">
11
+ <link href="resources/bootstrap-3.2.0-dist/css/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/jquery-1.11.1.min.js"></script>
19
+ <script src="resources/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
20
+ <script src="resources/jscharts.js"></script>
21
+ <style>
22
+ * {
23
+ font-size: 14px;
24
+ }
25
+
26
+ <%= Rouge::Themes::Github.render(:scope => '.highlight') %>
27
+ </style>
28
+ </head>
29
+ <body>
30
+ <div class="container">
31
+
32
+ <div class="bs-docs-section clearfix">
33
+ <div class="row">
34
+ <div class="col-lg-12">
35
+
36
+ <div class="bs-component">
37
+ <div class="navbar navbar-default">
38
+ <div class="navbar-header">
39
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
40
+ <span class="icon-bar"></span>
41
+ <span class="icon-bar"></span>
42
+ <span class="icon-bar"></span>
43
+ </button>
44
+ <a class="navbar-brand" href="#">Rspec Reports</a>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+ <div class="row">
53
+ <div class="col-lg-12">
54
+ <p class="text-center" style="font-size:2em;">Overview</p>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="row">
59
+
60
+ <div class="col-md-6">
61
+
62
+ <div class="panel panel-default">
63
+ <div class="panel-heading">Group Summary</div>
64
+ <div class="panel-body">
65
+ <span class="pull-right label label-primary"><%= @total_examples %> Examples</span>
66
+
67
+ <div id="specification_summary">Loading chart...</div>
68
+ </div>
69
+ </div>
70
+
71
+ </div>
72
+
73
+ <div class="col-md-6">
74
+
75
+ <div class="panel panel-default">
76
+ <div class="panel-heading">Duration Summary</div>
77
+ <div class="panel-body">
78
+ <span class="pull-right label label-primary">Finished in <%= @summary_duration %></span>
79
+
80
+ <div id="duration_summary">Loading chart...</div>
81
+ </div>
82
+ </div>
83
+
84
+ </div>
85
+
86
+ </div>
87
+
88
+ <div class="row">
89
+
90
+ <div class="col-lg-12">
91
+
92
+ <table class="table table-striped table-hover ">
93
+ <thead>
94
+ <tr>
95
+ <th>#</th>
96
+ <th>Group</th>
97
+ <th>Duration</th>
98
+ <th class="warning">Pending</th>
99
+ <th class="danger">Failed</th>
100
+ <th class="success">Passed</th>
101
+ <th>Status</th>
102
+ </tr>
103
+ </thead>
104
+ <tbody>
105
+ <% i = 1 %>
106
+ <% @overview.each do |group_name,group| %>
107
+ <tr>
108
+ <td><%= i %></td>
109
+ <td>
110
+ <a href="<%= group_name %>.html"><%= group[:group] %></a>
111
+ </td>
112
+ <td><%= group[:duration] %></td>
113
+ <td class="warning"><span><%= group[:pending].size %></span></td>
114
+ <td class="danger"><span><%= group[:failed].size %></span></td>
115
+ <td class="success"><span><%= group[:passed].size %></span></td>
116
+ <td><span class="label label-<%= group[:klass]%>"><%= group[:status] %></span></td>
117
+ </tr>
118
+ <% i+= 1%>
119
+ <% end %>
120
+ </tbody>
121
+ </table>
122
+
123
+ </div>
124
+ </div>
125
+
126
+ </div>
127
+
128
+ <script type="text/javascript">
129
+ var myChart = new JSChart('specification_summary', 'pie', '');
130
+ myChart.setDataArray([
131
+ ['Passed', <%= @passed %>],
132
+ ['Failed', <%= @failed %>],
133
+ ['Pending', <%= @pending %>]
134
+ ]);
135
+ myChart.colorize(['#8DC63F', '#ED1C24', '#F7941D']);
136
+ myChart.setSize(400, 300);
137
+ myChart.setPieRadius(95);
138
+ myChart.setTitle('');
139
+ myChart.setTitleColor('#505050');
140
+ myChart.setPieUnitsColor('#505050');
141
+ myChart.setPieValuesOffset(-15);
142
+ myChart.draw();
143
+
144
+ var myChart2 = new JSChart('duration_summary', 'line', '');
145
+ myChart2.setDataArray(<%= @durations %>);
146
+ myChart2.setSize(400, 300);
147
+ myChart2.setLineColor('#0070B8');
148
+ myChart2.setTitle('');
149
+ myChart2.setTitleFontSize(10);
150
+ myChart2.setAxisNameX('Examples');
151
+ myChart2.setAxisNameY('');
152
+ myChart2.setAxisValuesNumberX(1);
153
+ myChart2.draw();
154
+ </script>
155
+
156
+
157
+ </body>
158
+ </html>
@@ -0,0 +1,186 @@
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-3.2.0-dist/css/bootstrap.min.css" rel="stylesheet">
11
+ <link href="resources/bootstrap-3.2.0-dist/css/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/jquery-1.11.1.min.js"></script>
19
+ <script src="resources/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
20
+ <script src="resources/jscharts.js"></script>
21
+ <style>
22
+ * {
23
+ font-size: 14px;
24
+ }
25
+
26
+ <%= Rouge::Themes::Github.render(:scope => '.highlight') %>
27
+ </style>
28
+ </head>
29
+ <body>
30
+ <div class="container">
31
+
32
+ <div class="bs-docs-section clearfix">
33
+ <div class="row">
34
+ <div class="col-lg-12">
35
+
36
+ <div class="bs-component">
37
+ <div class="navbar navbar-default">
38
+ <div class="navbar-header">
39
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
40
+ <span class="icon-bar"></span>
41
+ <span class="icon-bar"></span>
42
+ <span class="icon-bar"></span>
43
+ </button>
44
+ <a class="navbar-brand" href="#">Rspec Reports</a>
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
+
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="row">
60
+ <div class="col-lg-12">
61
+ <p class="text-center" style="font-size:2em;"><%= @title %></p>
62
+ </div>
63
+ </div>
64
+
65
+ <div class="row">
66
+
67
+ <div class="col-md-6">
68
+
69
+ <div class="panel panel-default">
70
+ <div class="panel-heading">Examples Summary</div>
71
+ <div class="panel-body">
72
+ <span class="pull-right label label-primary"><%= @examples.size %> Examples</span>
73
+
74
+ <div id="specification_summary">Loading chart...</div>
75
+ </div>
76
+ </div>
77
+
78
+ </div>
79
+
80
+ <div class="col-md-6">
81
+
82
+ <div class="panel panel-default">
83
+ <div class="panel-heading">Duration Summary</div>
84
+ <div class="panel-body">
85
+ <span class="pull-right label label-primary">Finished in <%= @summary_duration %></span>
86
+
87
+ <div id="duration_summary">Loading chart...</div>
88
+ </div>
89
+ </div>
90
+
91
+ </div>
92
+
93
+ </div>
94
+
95
+ <div class="row">
96
+
97
+ <div class="col-lg-12">
98
+
99
+ <table class="table table-striped table-hover ">
100
+ <thead>
101
+ <tr>
102
+ <th>#</th>
103
+ <th>Example</th>
104
+ <th>Duration</th>
105
+ <th>Status</th>
106
+ </tr>
107
+ </thead>
108
+ <tbody>
109
+ <% @examples.each_with_index do |example, i| %>
110
+ <tr>
111
+ <td><%= i+1 %></td>
112
+ <td>
113
+ <div>
114
+ <% if example.has_spec? %>
115
+ <div class="panel <%= example.klass('panel-') %>">
116
+ <div class="panel-heading">
117
+ <h3 class="panel-title"> <%= example.full_description %></h3>
118
+ </div>
119
+ <div class="panel-body">
120
+ <%= example.spec %>
121
+ </div>
122
+ </div>
123
+ <% else %>
124
+ <%= example.full_description %>
125
+ <% end %>
126
+ </div>
127
+ <div>
128
+ <% if example.has_exception? %>
129
+
130
+ <div class="panel panel-danger">
131
+ <div class="panel-heading">
132
+ <h3 class="panel-title"><%= example.exception.klass %></h3>
133
+ </div>
134
+ <div class="panel-body">
135
+ <%= example.exception.explanation %>
136
+ <h5><%= example.exception.backtrace_message %></h5>
137
+ <%= example.exception.highlighted_source %>
138
+ </div>
139
+ </div>
140
+
141
+ <% end %>
142
+ </div>
143
+ </td>
144
+ <td><%= example.duration %></td>
145
+ <td><span class="label <%= example.klass %>"><%= example.status %></span></td>
146
+ </tr>
147
+ <% end %>
148
+ </tbody>
149
+ </table>
150
+
151
+ </div>
152
+ </div>
153
+
154
+ </div>
155
+
156
+ <script type="text/javascript">
157
+ var myChart = new JSChart('specification_summary', 'pie', '');
158
+ myChart.setDataArray([
159
+ ['Passed', <%= @passed %>],
160
+ ['Failed', <%= @failed %>],
161
+ ['Pending', <%= @pending %>]
162
+ ]);
163
+ myChart.colorize(['#8DC63F', '#ED1C24', '#F7941D']);
164
+ myChart.setSize(400, 300);
165
+ myChart.setPieRadius(95);
166
+ myChart.setTitle('');
167
+ myChart.setTitleColor('#505050');
168
+ myChart.setPieUnitsColor('#505050');
169
+ myChart.setPieValuesOffset(-15);
170
+ myChart.draw();
171
+
172
+ var myChart2 = new JSChart('duration_summary', 'line', '');
173
+ myChart2.setDataArray(<%= @durations %>);
174
+ myChart2.setSize(400, 300);
175
+ myChart2.setLineColor('#0070B8');
176
+ myChart2.setTitle('');
177
+ myChart2.setTitleFontSize(10);
178
+ myChart2.setAxisNameX('Examples');
179
+ myChart2.setAxisNameY('');
180
+ myChart2.setAxisValuesNumberX(1);
181
+ myChart2.draw();
182
+ </script>
183
+
184
+
185
+ </body>
186
+ </html>
metadata ADDED
@@ -0,0 +1,172 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_html_formatter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kingsley Hendrickse
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.8.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.8.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.1
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.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 4.1.4
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 4.1.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 2.8.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 2.8.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: rdoc
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.12'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.12'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: jeweler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 2.0.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 2.0.1
111
+ description: Rspec custom formatter to generate pretty html results
112
+ email: kingsleyhendrickse@me.com
113
+ executables: []
114
+ extensions: []
115
+ extra_rdoc_files:
116
+ - LICENSE.txt
117
+ - README.md
118
+ files:
119
+ - ".README/rspec_reports_overview.png"
120
+ - ".README/rspec_reports_report.png"
121
+ - ".document"
122
+ - ".idea/rspec_html_formatter.iml"
123
+ - ".idea/scopes/scope_settings.xml"
124
+ - ".idea/workspace.xml"
125
+ - ".rspec"
126
+ - Gemfile
127
+ - Gemfile.lock
128
+ - LICENSE.txt
129
+ - README.md
130
+ - Rakefile
131
+ - VERSION
132
+ - lib/rspec_html_formatter.rb
133
+ - resources/bootstrap-3.2.0-dist/css/bootstrap-theme-yeti.min.css
134
+ - resources/bootstrap-3.2.0-dist/css/bootstrap.min.css
135
+ - resources/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.eot
136
+ - resources/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.svg
137
+ - resources/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.ttf
138
+ - resources/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.woff
139
+ - resources/bootstrap-3.2.0-dist/js/bootstrap.min.js
140
+ - resources/jquery-1.11.1.min.js
141
+ - resources/jscharts.js
142
+ - rspec_html_formatter.gemspec
143
+ - spec/penders_spec.rb
144
+ - spec/rspec_html_formatter_spec.rb
145
+ - spec/test2_spec.rb
146
+ - templates/overview.erb
147
+ - templates/report.erb
148
+ homepage: http://github.com/kingsleyh/rspec_html_formatter
149
+ licenses:
150
+ - MIT
151
+ metadata: {}
152
+ post_install_message:
153
+ rdoc_options: []
154
+ require_paths:
155
+ - lib
156
+ required_ruby_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ requirements: []
167
+ rubyforge_project:
168
+ rubygems_version: 2.2.2
169
+ signing_key:
170
+ specification_version: 4
171
+ summary: Rspec custom formatter to generate pretty html results
172
+ test_files: []