pretty_face 0.6.1 → 0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e0897c25556cd42f6403b817871bb25782e6f51
4
- data.tar.gz: d7134fb6e9800e339cbdc245f178a7284db4cfca
3
+ metadata.gz: c04858604dd792e0a464a768de1b6e5fcd79db14
4
+ data.tar.gz: 002b08c21357fb3ca6d54a6af6bee88a256271d7
5
5
  SHA512:
6
- metadata.gz: d6a7fc6057d549a8b95acd5f33a6a3ef0b0690d5f5fe670f1c15f73d71606f038e89d8d0cf0974ce10e7df0c97b7e23d4aaf300003f718c53e4360317212f5d1
7
- data.tar.gz: 57e322d61cad2ab466a5c1f7d3ca468b265ca6912000949465d03dabf61723e3ff355fa1f826588212034e3a5e6ce0f416000236719d8979168b994b1718c0d0
6
+ metadata.gz: 2860b14d2c0d21e84e21832d92ef9ba68d4fb4c6c807baac433cd408d20a2bb3271e0fd5f48810520757ec9b911225367cd6597757cdbe37d5765cb9c67dd8c0
7
+ data.tar.gz: a43c2ca722d0022e6ce6653525fb0d90985cc37e7e76c1ab26235e54c3b39e5b6341a5fba673047a056528ffe93d1c0997c4a550251f5c8b1e06d16991a14ee5
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ === Release 0.7 / 2013-7-29
2
+ * Fixed formatting for error detail display
3
+ * Creates directory if not present before saving results to html file
4
+
1
5
  === Release 0.6.1 / 2013-7-29
2
6
  * Fixed issue with new icons not being displayed
3
7
  * Adjusted width inconsistencies
@@ -71,7 +71,7 @@ Feature: pages that show details for features
71
71
  Then the file "results/basic.html" should contain "RSpec::Expectations::ExpectationNotMetError"
72
72
  And the file "results/advanced.html" should contain "RSpec::Expectations::ExpectationNotMetError"
73
73
  And the file "results/failing_background.html" should contain "RSpec::Expectations::ExpectationNotMetError"
74
-
74
+
75
75
  Scenario: It should display error message with a yellow background and red text
76
76
  Then the file "results/basic.html" should contain "RSpec::Expectations::ExpectationNotMetError"
77
77
  And the background of the error message row should be "255, 251, 211"
@@ -20,7 +20,7 @@ module PrettyFace
20
20
 
21
21
  def initialize(step_mother, path_or_io, options)
22
22
  @path = path_or_io
23
- @io = ensure_io(path_or_io, 'html')
23
+ set_path_and_file(path_or_io)
24
24
  @path_to_erb = File.join(File.dirname(__FILE__), '..', 'templates')
25
25
  @step_mother = step_mother
26
26
  @options = options
@@ -29,6 +29,12 @@ module PrettyFace
29
29
  @logo = 'face.png'
30
30
  end
31
31
 
32
+ def set_path_and_file(path_or_io)
33
+ dir = File.dirname(path_or_io)
34
+ FileUtils.mkdir_p dir unless File.directory? dir
35
+ @io = ensure_io(path_or_io, 'html')
36
+ end
37
+
32
38
  def embed(src, mime_type, label)
33
39
  case(mime_type)
34
40
  when /^image\/(png|gif|jpg|jpeg)/
@@ -39,7 +39,7 @@
39
39
  </tr>
40
40
  <tr >
41
41
  <td class="detail">
42
- <code><%= step.error.backtrace.join("\n") %></code>
42
+ <pre><%= step.error.backtrace.join("\n") %></pre>
43
43
  </td>
44
44
  </tr>
45
45
  </table>
@@ -15,6 +15,13 @@ body {
15
15
  max-width: 1500px;
16
16
  }
17
17
 
18
+ pre {
19
+ white-space: pre-wrap; /* css-3 */
20
+ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
21
+ white-space: -pre-wrap; /* Opera 4-6 */
22
+ white-space: -o-pre-wrap; /* Opera 7 */
23
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
24
+ }
18
25
 
19
26
  a, a:visited {
20
27
  color: #0071BC;
@@ -246,6 +253,7 @@ td.image_tag {
246
253
  margin-left: 10px;
247
254
  padding: 7px;
248
255
  font-weight: normal;
256
+
249
257
  }
250
258
 
251
259
  .ruby {
@@ -1,3 +1,3 @@
1
1
  module PrettyFace
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_face
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey S. Morgan