rspec-nice-html-formatter 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 272fd97983fef625c8d07ebded4f3c26307bb8c4
4
- data.tar.gz: 4bd1a770fe57d7f7dee25f8fb60d5730eeedca21
3
+ metadata.gz: 3e57a985d6af3481d0f6360115775e5a4fd0d109
4
+ data.tar.gz: 2756258e261d20a0a88ad202d8d26e411e069939
5
5
  SHA512:
6
- metadata.gz: f7d9a8561dba776a97849d3cb854ef7f2629e4a1ffc236d1c7fea5350d26fb0e446c886c6207e60ca478550f03aa729bc25b7c0fc116958bbba8ee50f25547d6
7
- data.tar.gz: ba3822689f3c7740ad5107ab57da79781c5c38c277ddaee8c305288db0dc65833c8c0864394ab9fcc016ab6dc5b5f49c21cc4f8a9b97ea7e022be62a60ede9d1
6
+ metadata.gz: f5d42ed9004e847cbcbebdfac94b080bb2f5f92bc6ce8fe3cd05945077ce3cc8567b700bcd5362604900cb06dceccebfca9db46a22bae94e8f450fa2e098d192
7
+ data.tar.gz: f514ef1db18d4ed5742beec6e3fbd14bb910564d0bdbd876891bc14be7c70ffe35e7d6859402e1f956bd303f74a69f0b9fa3c6f33793687ce440406ab52b80a4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-nice-html-formatter (1.0)
4
+ rspec-nice-html-formatter (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -29,4 +29,4 @@ DEPENDENCIES
29
29
  rspec-nice-html-formatter!
30
30
 
31
31
  BUNDLED WITH
32
- 1.15.4
32
+ 1.16.1
@@ -72,6 +72,27 @@
72
72
  opacity: 0;
73
73
  }
74
74
 
75
+ .callstack {
76
+ display: none;
77
+ }
78
+
79
+ .expander {
80
+ cursor: pointer;
81
+ padding-left: 3px;
82
+ }
83
+
84
+ .backtrace .expander::after {
85
+ content: "▶️";
86
+ }
87
+
88
+ .backtrace.long .expander::after {
89
+ content: "🔽";
90
+ }
91
+
92
+ .backtrace.long .callstack {
93
+ display: block;
94
+ }
95
+
75
96
  #summary {
76
97
  opacity: 0.5;
77
98
  margin-bottom: 20px;
@@ -98,13 +119,15 @@
98
119
  <span class="path">
99
120
  bundle exec rspec <%= h failure.example.rerun_argument%>
100
121
  </span>
101
- <ol class="backtrace">
102
- <li class="exception"><%= failure.exception %></li>
103
- <% failure.formatted_backtrace.each do |line| %>
104
- <li>
105
- <%= h line %>
106
- </li>
107
- <% end %>
122
+ <ol class="backtrace short">
123
+ <li class="exception"><%= failure.exception %> <span class="expander"></span></li>
124
+ <div class="callstack">
125
+ <% failure.formatted_backtrace.each do |line| %>
126
+ <li>
127
+ <%= h line %>
128
+ </li>
129
+ <% end %>
130
+ </div>
108
131
  </ol>
109
132
  </li>
110
133
  <% end %>
@@ -147,6 +170,13 @@
147
170
  copy(document.querySelector("#copy-all"));
148
171
  });
149
172
  });
173
+
174
+ document.querySelectorAll(".backtrace .expander").forEach(function(node) {
175
+ node.addEventListener("click", function() {
176
+ var backtrace = node.parentNode.parentNode;
177
+ backtrace.classList.toggle("long");
178
+ });
179
+ });
150
180
  </script>
151
181
  </body>
152
182
  </html>
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "rspec-nice-html-formatter"
6
- spec.version = "1.0.1"
6
+ spec.version = "1.0.2"
7
7
  spec.authors = ["ecin"]
8
8
  spec.email = ["ecin@copypastel.com"]
9
9
  spec.description = "A nice HTML formatter for your RSpec tests 🌈"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-nice-html-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ecin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-30 00:00:00.000000000 Z
11
+ date: 2018-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  version: '0'
60
60
  requirements: []
61
61
  rubyforge_project:
62
- rubygems_version: 2.6.12
62
+ rubygems_version: 2.6.14
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: Output your RSpec test results to a pretty HTML page for all to enjoy.