ugly_face 0.5 → 0.6

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: 47e23d533ecbed37ef7180604a76bcc5eb23b058
4
- data.tar.gz: 0aa76dbd6ffc50e727c9111dfdb791c557e4b3bb
3
+ metadata.gz: df49f3d36e3bbbffc191e0abdc6161cc97879d17
4
+ data.tar.gz: 731e3060420000df718a44e9e9b2c71fd0442427
5
5
  SHA512:
6
- metadata.gz: 6a70d8fb3b337a0e3359b289fa44eefdf61788b53a82bc5c35ebe604bf238a1e1fc43a0613b57da922a905089ef42d34012fcd770444f0dc162b82fc55838796
7
- data.tar.gz: a3719bba8e60b3a1f087a7c7496e24cc679c7dc8c25da6719b1d3078f4578535e55b2bedf4bae07999f0a4a214b54699cf7623c3336d2bb73d2e62d700f9022d
6
+ metadata.gz: 20c48a5736b927d912f4c92a0f830fec8b97fa9dce2cb2f50d032c65e3feec8aef7340cbbc2399cdbfb2bcdb290be65f4d4ec2ec2d7f346b91a07e57585eca0f
7
+ data.tar.gz: 14a0546143133e9335a8306ef10b1c88e0f24757427aef387a160c00ec46f855bcce00c074bc00f0b246405aca6ccd16a6cb6c23b741ebf51f3d3f9ce158f620
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ === Release 0.6 / 2015-11-20
2
+ Made the library public friendly. Added support for showing ENV vars in main header & adding debug data to scenarios.
3
+
1
4
  === Release 0.5 / 2015-11-20
2
5
  Updated Main ENV var panel
3
6
 
@@ -26,14 +26,10 @@
26
26
 
27
27
  <table class="run_stats">
28
28
  <tr>
29
- <th>Screenshots?: </th>
30
- <td><%= ENV['SCREENSHOTS'] %></td>
31
29
  <th>Started: </th>
32
30
  <td><%= feature.start_time.strftime("%A %B %-d, %Y at %H:%M:%S") %></td>
33
31
  </tr>
34
32
  <tr>
35
- <th>Debug?: </th>
36
- <td><%= ENV['DEBUG'] %></td>
37
33
  <th>Duration: </th>
38
34
  <td><%= feature.formatted_duration(feature.duration) %></td>
39
35
  </tr>
@@ -128,7 +124,7 @@
128
124
  <% end %>
129
125
  <tr class="borderSeparator">
130
126
  <td class="image_tag"> <%= raw(feature.image_tag_for('debug', feature.file)) %></td>
131
- <td class= "debugData"> <%= raw(BuellerData.pop_scenario) %></td>
127
+ <td class= "debugData"> <%= raw(UglyFace::fetch_scenario_msg) %></td>
132
128
  <td></td>
133
129
  </tr>
134
130
  </table>
@@ -7,45 +7,37 @@
7
7
  </head>
8
8
 
9
9
  <body>
10
- <div style="float: left; clear:both;">
11
- <div class="header_logo">
12
- <img src='images/<%= logo %>' width="155px" />
13
- </div>
14
- <div class="header_description">
15
- <% if report.custom_suite_header? %>
10
+ <div style="float: left; clear:both;">
11
+ <div class="header_logo">
12
+ <img src='images/<%= logo %>' width="155px" />
13
+ </div>
14
+ <div class="header_description">
15
+ <% if report.custom_suite_header? %>
16
16
  <%= render "suite_header" %>
17
- <% else %>
17
+ <% else %>
18
18
  <%= render "main_header" %>
19
- <% end %>
20
- <br>
21
- <table class="run_stats">
22
- <tr>
23
- <th>Environment: </th>
24
- <td><%= ENV['TARGET'] %></td>
25
- <th>Started: </th>
26
- <td><%= report.start_time %></td>
27
- </tr>
28
- <tr>
29
- <th>Banner: </th>
30
- <td><%= ENV['BANNER'] %></td>
31
- <th>Duration: </th>
32
- <td><%= report.total_duration %></td>
33
- </tr>
34
- <tr>
35
- <th>Browser: </th>
36
- <td><%= ENV['CLIENT'] %></td>
37
- <th>JIRA?: </th>
38
- <td><%= ENV['JIRA'] %></td>
39
- </tr>
40
- <tr>
41
- <th>Scope: </th>
42
- <td><%= ENV['SCOPE'] %></td>
43
- <th>Language: </th>
44
- <td><%= ENV['LANGUAGE'] %></td>
45
- </tr>
46
- </table>
47
- </div>
48
- </div>
19
+ <% end %>
20
+ <br>
21
+ <table class="run_stats">
22
+ <tr>
23
+ <th>Started: </th>
24
+ <td><%= report.start_time %></td>
25
+ <% UglyFace::get_header(1).each do |k,v| %>
26
+ <th><%="#{k.capitalize}: "%></th>
27
+ <td><%=(v.nil?) ? 'False' : v.capitalize%></td>
28
+ <% end %>
29
+ </tr>
30
+ <tr>
31
+ <th>Duration: </th>
32
+ <td><%= report.total_duration %></td>
33
+ <% UglyFace::get_header(2).each do |k,v| %>
34
+ <th><%="#{k.capitalize}: "%></th>
35
+ <td><%=(v.nil?) ? 'False' : v.capitalize%></td>
36
+ <% end %>
37
+ </tr>
38
+ </table>
39
+ </div>
40
+ </div>
49
41
  <div class="summary_body">
50
42
  <table class="StatTable">
51
43
  <tr>
@@ -1,3 +1,3 @@
1
1
  module UglyFace
2
- VERSION = "0.5"
2
+ VERSION = "0.6"
3
3
  end
data/lib/ugly_face.rb CHANGED
@@ -3,6 +3,25 @@ require "ugly_face/formatter/html"
3
3
 
4
4
  module UglyFace
5
5
 
6
+ @msg_storage= Array.new
6
7
 
8
+ def self.set_header(data)
9
+ data_2= Hash.new
10
+ data.each { |k, v| (data_2.length >= data.length) ? break : data_2[:"#{k}"]= data.delete(k) }
11
+ @header_row_1= data
12
+ @header_row_2= data_2
13
+ end
14
+
15
+ def self.get_header(row)
16
+ (row == 1) ? @header_row_1 : @header_row_2
17
+ end
18
+
19
+ def self.log_scenario_msg(data)
20
+ @msg_storage.push(data)
21
+ end
22
+
23
+ def self.fetch_scenario_msg
24
+ @msg_storage.shift
25
+ end
7
26
 
8
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ugly_face
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Commmu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-27 00:00:00.000000000 Z
12
+ date: 2015-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack