report_builder 1.6 → 1.7

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
- SHA1:
3
- metadata.gz: 5c203c35fcd9bfc7ed493b7df0b572bb3a37f68d
4
- data.tar.gz: f80022db0429e1e153ca2ac615cde80430c6170c
2
+ SHA256:
3
+ metadata.gz: 6d22f60b58a43a34852af0cc857f592d8fc28116f56c2c344e3651a51f0e9e99
4
+ data.tar.gz: 785cfc8f4dcd0177cf12054b2419de43c87aaec6d24183670a1573f22407caa0
5
5
  SHA512:
6
- metadata.gz: e709a3f18543fcccc29d318d598dcf73edd81d08366a3d068fa102cc2b61821514d7e0ca8474b934d6c4f141a8b7df931d95fc4c839934bddee1b2b58c4b3ef8
7
- data.tar.gz: 46158e9e9a8226ff37751f15e417977ec92e17ba2f90db7962cf3bc3a000969c56893bcc5c45cda2a22bfaa1b7777dde9495dac0c0a1abe831b0d0af48ce5752
6
+ metadata.gz: ba55eebf2e00d2120ee43c6ac2c1d5c370f814796894b10a1389aef572632485b9c37082f17caaff939c77cb3fe7770a1ed77fab7de23f5505009fe5d5e9e276
7
+ data.tar.gz: 8a767aed31738523d5363ad41febd56753a9672933c81c411883874447ab27418ba16f5f35bd61f3547b619cd938834006022502d0d3ab01e722225961e403ec
@@ -3,9 +3,17 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
 
6
- ## [Unreleased](https://github.com/rajatthareja/ReportBuilder/compare/v1.6...master)
6
+ ## [Unreleased](https://github.com/rajatthareja/ReportBuilder/compare/v1.7...master)
7
7
 
8
8
 
9
+ ## [1.7](https://github.com/rajatthareja/ReportBuilder/compare/v1.6...v1.7) - 2018-08-07
10
+ ### Changed
11
+ - Required Ruby Version from (>= 1.9.1) to (>= 1.9.3)
12
+ ### Fixed
13
+ - Image - ERB Encoding Compatibility Error
14
+ ### Added
15
+ - Support for step doc string
16
+
9
17
  ## [1.6](https://github.com/rajatthareja/ReportBuilder/compare/v1.5...v1.6) - 2018-03-29
10
18
  ### Changed
11
19
  - Removed duplicate flaky scenarios
data/README.md CHANGED
@@ -9,9 +9,9 @@ Ruby gem to merge Cucumber JSON reports and build mobile-friendly HTML Test Repo
9
9
 
10
10
  ## Sample Reports
11
11
 
12
- **[Features Report](http://reportbuilder.rajatthareja.com/sample/report.html)**
12
+ **[Features Report](https://reportbuilder.rajatthareja.com/sample/report.html)**
13
13
 
14
- **[Grouped Features Report](http://reportbuilder.rajatthareja.com/sample/group_report.html)**
14
+ **[Grouped Features Report](https://reportbuilder.rajatthareja.com/sample/group_report.html)**
15
15
 
16
16
  ## Installation
17
17
 
@@ -24,7 +24,7 @@ gem install report_builder
24
24
  ## Information
25
25
 
26
26
  * RDoc documentation [available on RubyDoc.info](http://www.rubydoc.info/gems/report_builder)
27
- * Source code [available on GitHub](http://github.com/rajatthareja/ReportBuilder)
27
+ * Source code [available on GitHub](https://github.com/rajatthareja/ReportBuilder)
28
28
 
29
29
  ## Usage
30
30
 
@@ -165,11 +165,11 @@ end
165
165
 
166
166
  ### Voice Commands:
167
167
  Use voice commands for easy navigation and search
168
- * show ( overview | features | summary | errors )
168
+ * show ( overview, features, summary, errors )
169
169
  * search { Keywords }
170
170
 
171
171
  ## Report Builder Java API
172
- [Report Builder Java](http://reportbuilderjava.rajatthareja.com)
172
+ [Report Builder Java](https://reportbuilderjava.rajatthareja.com)
173
173
 
174
174
  ## Contributing
175
175
 
@@ -177,7 +177,7 @@ We're open to any contribution. It has to be tested properly though.
177
177
 
178
178
  ## Collaborators
179
179
 
180
- * [Rajat Thareja](http://rajatthareja.com)
180
+ * [Rajat Thareja](https://rajatthareja.com)
181
181
  * [Justin Commu](https://github.com/tk8817)
182
182
  * [Eric Kessler](https://github.com/enkessler)
183
183
  * [Jeff Morgan](https://github.com/cheezy)
@@ -382,7 +382,7 @@ module ReportBuilder
382
382
  #
383
383
  # Example:
384
384
  #
385
- # ReportBuilder.color = 'cucumber_sample/logs'
385
+ # ReportBuilder.color = 'purple'
386
386
  #
387
387
  def self.color=(color)
388
388
  options
@@ -79,7 +79,7 @@ module ReportBuilder
79
79
  else
80
80
  files = get_files input_path
81
81
  raise "Error:: No file(s) found at #{input_path}" if files.empty?
82
- groups << {'features' => get_features(files)} rescue raise('Error:: Invalid Input File(s). Please provide valid cucumber JSON output file(s)')
82
+ groups << {'features' => get_features(files)} # rescue raise('Error:: Invalid Input File(s). Please provide valid cucumber JSON output file(s)')
83
83
  end
84
84
  groups
85
85
  end
@@ -125,6 +125,7 @@ module ReportBuilder
125
125
  end.sort_by! do |feature|
126
126
  feature['name']
127
127
  end.each do |feature|
128
+ feature['name'] = ERB::Util.html_escape feature['name']
128
129
  if feature['elements'][0]['type'] == 'background'
129
130
  (0..feature['elements'].size-1).step(2) do |i|
130
131
  feature['elements'][i]['steps'] ||= []
@@ -139,6 +140,7 @@ module ReportBuilder
139
140
  end
140
141
  end
141
142
  feature['elements'].each do |scenario|
143
+ scenario['name'] = ERB::Util.html_escape scenario['name']
142
144
  scenario['before'] ||= []
143
145
  scenario['before'].each do |before|
144
146
  before['result']['duration'] ||= 0
@@ -146,6 +148,7 @@ module ReportBuilder
146
148
  end
147
149
  scenario['steps'] ||= []
148
150
  scenario['steps'].each do |step|
151
+ step['name'] = ERB::Util.html_escape step['name']
149
152
  step['result']['duration'] ||= 0
150
153
  duration = step['result']['duration']
151
154
  status = step['result']['status']
@@ -215,9 +218,9 @@ module ReportBuilder
215
218
  end
216
219
 
217
220
  def decode_image(data)
218
- base64 = /^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/
221
+ base64 = %r{^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$}
219
222
  if data =~ base64
220
- data_base64 = Base64.decode64(data).gsub(/^data:image\/(png|gif|jpg|jpeg)\;base64,/, '')
223
+ data_base64 = Base64.urlsafe_decode64(data).gsub(%r{^data:image\/(png|gif|jpg|jpeg)\;base64,}, '') rescue data
221
224
  if data_base64 =~ base64
222
225
  data_base64
223
226
  else
@@ -229,7 +232,7 @@ module ReportBuilder
229
232
  end
230
233
 
231
234
  def decode_text(data)
232
- Base64.decode64 data
235
+ Base64.urlsafe_decode64 data rescue ''
233
236
  end
234
237
 
235
238
  def decode_embedding(embedding)
@@ -1,15 +1,15 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'report_builder'
3
- s.version = '1.6'
3
+ s.version = '1.7'
4
4
  s.bindir = 'bin'
5
5
  s.summary = 'ReportBuilder'
6
6
  s.description = 'Ruby gem to merge Cucumber JSON reports and build mobile-friendly HTML Test Report, JSON report and retry file.'
7
7
  s.post_install_message = 'Happy reporting!'
8
8
  s.authors = ['Rajat Thareja']
9
9
  s.email = 'rajat.thareja.1990@gmail.com'
10
- s.homepage = 'http://reportbuilder.rajatthareja.com'
10
+ s.homepage = 'https://reportbuilder.rajatthareja.com'
11
11
  s.license = 'MIT'
12
- s.required_ruby_version = '>= 1.9.1'
12
+ s.required_ruby_version = '>= 1.9.3'
13
13
  s.requirements << 'Cucumber >= 2.1.0 test results in JSON format'
14
14
 
15
15
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(sample/|css/|js/|pkg/|testing/|coverage/|CNAME|.gitignore|appveyor.yml|.travis.yml|_config.yml|Gemfile|Rakefile|rb.ico)}) }
@@ -2,12 +2,12 @@
2
2
  <div class="footer-copyright <%= options[:color] %> lighten-1">
3
3
  <div class="container">
4
4
  Happy Reporting!
5
- <a class="white-text text-lighten-4 right" href="http://reportbuilder.rajatthareja.com">Generated by Report Builder</a>
5
+ <a class="white-text text-lighten-4 right" href="https://reportbuilder.rajatthareja.com">Generated by Report Builder</a>
6
6
  </div>
7
7
  </div>
8
8
  </footer>
9
9
 
10
- <script type="text/javascript" src="https://cdn.rawgit.com/rajatthareja/ReportBuilder/v1.6/js/report.builder.min.js"></script>
10
+ <script type="text/javascript" src="https://cdn.rawgit.com/rajatthareja/ReportBuilder/v1.7/js/report.builder.min.js"></script>
11
11
 
12
12
  <% if options[:voice_commands] %>
13
13
  <script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>
@@ -4,11 +4,11 @@
4
4
 
5
5
  <title><%= options[:report_title] %></title>
6
6
 
7
- <link rel="icon" href="http://reportbuilder.rajatthareja.com/rb.ico">
7
+ <link rel="icon" href="https://reportbuilder.rajatthareja.com/rb.ico">
8
8
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
9
9
  <link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet">
10
10
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css" media="screen,projection"/>
11
- <link href="https://cdn.rawgit.com/rajatthareja/ReportBuilder/v1.6/css/report.builder.min.css" rel="stylesheet">
11
+ <link href="https://cdn.rawgit.com/rajatthareja/ReportBuilder/v1.7/css/report.builder.min.css" rel="stylesheet">
12
12
 
13
13
  <% if options[:additional_css] %>
14
14
  <% if options[:additional_css] =~ /^http(|s):\/\/.*\.css$/ %>
@@ -7,6 +7,10 @@
7
7
 
8
8
  <b><%= step['keyword'] %></b> <%= step['name'] %> (<%= duration(step['duration']) %>)
9
9
 
10
+ <% if step['doc_string'] %>
11
+ <%= '<br/><pre>' + ERB::Util.html_escape(step['doc_string']['value']) + '</pre>' %>
12
+ <% end %>
13
+
10
14
  <% if step['rows'] %>
11
15
  <% step['rows'].each do |row| %>
12
16
  <%= '<br/>| ' %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: report_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.6'
4
+ version: '1.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajat Thareja
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-28 00:00:00.000000000 Z
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -88,7 +88,7 @@ files:
88
88
  - template/step.erb
89
89
  - template/summary.erb
90
90
  - template/summary_row.erb
91
- homepage: http://reportbuilder.rajatthareja.com
91
+ homepage: https://reportbuilder.rajatthareja.com
92
92
  licenses:
93
93
  - MIT
94
94
  metadata: {}
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.9.1
103
+ version: 1.9.3
104
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - ">="
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - Cucumber >= 2.1.0 test results in JSON format
111
111
  rubyforge_project:
112
- rubygems_version: 2.6.14
112
+ rubygems_version: 2.7.6
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: ReportBuilder