cucumber_junit_to_json 0.1.4 → 0.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a829c4150152aef62b16eb903e97f7011a8c52f2
|
4
|
+
data.tar.gz: 58767616d0be0fc57708e7ff8cc337088f10a14f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e544d402b53aaf6b1b4fc5a102bdcbaf1093da2e0083ec03cf19f323ac444a048a663131f1eb871b3faca532f2399b07685c8f02479eabb58492943a43eb99b
|
7
|
+
data.tar.gz: ee8f0409108fbfbf297eb1eae7af2af6394d6e0b605e3d49ee167d210f8258e0a5abd7aecd11cc42a07c45bbdba977ccb33b24bcf45a42a051752978e618c57b
|
data/.rubocop.yml
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Top level module
|
4
|
+
module CucumberJunitToJson
|
5
|
+
# module for all models
|
6
|
+
module Models
|
7
|
+
# Abstract representation of a cucumber step table rows attribute
|
8
|
+
class Rows
|
9
|
+
attr_accessor :cells, :line
|
10
|
+
def initialize(cells, line = 0)
|
11
|
+
@cells = cells
|
12
|
+
@line = line
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.parse(data)
|
16
|
+
rows = []
|
17
|
+
data.each do |c|
|
18
|
+
rows.push(Rows.new(c))
|
19
|
+
end
|
20
|
+
rows
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -4,13 +4,14 @@ require 'similar_text'
|
|
4
4
|
require_relative 'table'
|
5
5
|
require_relative 'match'
|
6
6
|
require_relative 'result'
|
7
|
+
require_relative 'rows'
|
7
8
|
# Top level module
|
8
9
|
module CucumberJunitToJson
|
9
10
|
# module for all models
|
10
11
|
module Models
|
11
12
|
# Abstract representation of a cucumber step attribute
|
12
13
|
class Step
|
13
|
-
attr_accessor :keyword, :name, :match, :table, :result, :line
|
14
|
+
attr_accessor :keyword, :name, :match, :table, :rows, :result, :line
|
14
15
|
def initialize
|
15
16
|
@table = CucumberJunitToJson::Models::Table.new
|
16
17
|
end
|
@@ -30,6 +31,12 @@ module CucumberJunitToJson
|
|
30
31
|
# process that table
|
31
32
|
if prev_step_has_table == true
|
32
33
|
steps.last.table = CucumberJunitToJson::Models::Table.parse(table)
|
34
|
+
rows = []
|
35
|
+
rows.push(steps.last.table.headings)
|
36
|
+
steps.last.table.rows.each do |r|
|
37
|
+
rows.push(r)
|
38
|
+
end
|
39
|
+
steps.last.rows = CucumberJunitToJson::Models::Rows.parse(rows)
|
33
40
|
prev_step_has_table = false
|
34
41
|
table = []
|
35
42
|
end
|
@@ -54,6 +61,12 @@ module CucumberJunitToJson
|
|
54
61
|
# process it, hence lets do it before we exit this method
|
55
62
|
if prev_step_has_table == true
|
56
63
|
steps.last.table = CucumberJunitToJson::Models::Table.parse(table)
|
64
|
+
rows = []
|
65
|
+
rows.push(steps.last.table.headings)
|
66
|
+
steps.last.table.rows.each do |r|
|
67
|
+
rows.push(r)
|
68
|
+
end
|
69
|
+
steps.last.rows = CucumberJunitToJson::Models::Rows.parse(rows)
|
57
70
|
prev_step_has_table = false
|
58
71
|
table = []
|
59
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_junit_to_json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Voke Ransom Anighoro
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/cucumber_junit_to_json/models/feature.rb
|
119
119
|
- lib/cucumber_junit_to_json/models/match.rb
|
120
120
|
- lib/cucumber_junit_to_json/models/result.rb
|
121
|
+
- lib/cucumber_junit_to_json/models/rows.rb
|
121
122
|
- lib/cucumber_junit_to_json/models/scenario.rb
|
122
123
|
- lib/cucumber_junit_to_json/models/step.rb
|
123
124
|
- lib/cucumber_junit_to_json/models/table.rb
|