hiptest-publisher 0.15.2 → 0.15.3
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: 94101c8a05d43bea874942ac32cdc74281510571
|
4
|
+
data.tar.gz: 0c9454d58dcb4cac7fe17d58101d58c338b7d465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fed041d3a5f85beafe12e870b33f8344d95939e83a7990e17a055ebdd9fd151f7279152ba279657cae2d9eaf8e7be401f04acb92c056580e6dd974404efcbb5
|
7
|
+
data.tar.gz: a1636918e9765b74dc113fa97dea3d461452587968fafbcd4554b5eed800249ea73e7f2813c1eb16647c27f592674a0005c93f77c6b27310a9be6785cc8d52f4
|
data/lib/hiptest-publisher.rb
CHANGED
@@ -11,6 +11,7 @@ require 'hiptest-publisher/utils'
|
|
11
11
|
require 'hiptest-publisher/options_parser'
|
12
12
|
require 'hiptest-publisher/xml_parser'
|
13
13
|
require 'hiptest-publisher/parent_adder'
|
14
|
+
require 'hiptest-publisher/datatable_fixer'
|
14
15
|
require 'hiptest-publisher/parameter_type_adder'
|
15
16
|
require 'hiptest-publisher/call_arguments_adder'
|
16
17
|
require 'hiptest-publisher/signature_exporter'
|
@@ -154,6 +155,7 @@ module Hiptest
|
|
154
155
|
end
|
155
156
|
|
156
157
|
@language_config = LanguageConfigParser.new(@cli_options)
|
158
|
+
Hiptest::Nodes::DatatableFixer.add(@project)
|
157
159
|
Hiptest::Nodes::ParentAdder.add(@project)
|
158
160
|
Hiptest::Nodes::ParameterTypeAdder.add(@project)
|
159
161
|
Hiptest::DefaultArgumentAdder.add(@project)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'hiptest-publisher/nodes_walker'
|
2
|
+
|
3
|
+
module Hiptest
|
4
|
+
module Nodes
|
5
|
+
class DatatableFixer < Walker
|
6
|
+
def self.add(project)
|
7
|
+
Hiptest::Nodes::DatatableFixer.new.walk_node(project)
|
8
|
+
end
|
9
|
+
|
10
|
+
def walk_scenario(scenario)
|
11
|
+
return if scenario.children[:datatable].nil?
|
12
|
+
|
13
|
+
@argument_names = scenario.children[:parameters].map{|param| param.children[:name]}
|
14
|
+
|
15
|
+
scenario.children[:datatable].children[:datasets].map do |dataset|
|
16
|
+
arguments_mapping = {}
|
17
|
+
dataset.children[:arguments].map do |arg|
|
18
|
+
arguments_mapping[arg.children[:name]] = arg
|
19
|
+
end
|
20
|
+
|
21
|
+
dataset.children[:arguments] = @argument_names.map do |arg_name|
|
22
|
+
if arguments_mapping.has_key?(arg_name)
|
23
|
+
arguments_mapping[arg_name]
|
24
|
+
else
|
25
|
+
Hiptest::Nodes::Argument.new(arg_name, Hiptest::Nodes::StringLiteral.new(''))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -154,7 +154,7 @@ module Hiptest
|
|
154
154
|
s = s.fn(context)
|
155
155
|
end
|
156
156
|
|
157
|
-
s.gsub("\n", '\\n')
|
157
|
+
s ? s.gsub("\n", '\\n') : ""
|
158
158
|
end
|
159
159
|
|
160
160
|
def hh_remove_surrounding_quotes(context, s, block = nil)
|
@@ -162,7 +162,7 @@ module Hiptest
|
|
162
162
|
s = s.fn(context)
|
163
163
|
end
|
164
164
|
|
165
|
-
s.gsub(/^("|')|("|')$/, '')
|
165
|
+
s ? s.gsub(/^("|')|("|')$/, '') : ""
|
166
166
|
end
|
167
167
|
|
168
168
|
def hh_comment (context, commenter, block)
|
@@ -0,0 +1 @@
|
|
1
|
+
{{#if is_free_text?}}PyStringNode {{/if}}${{{underscore rendered_children.name}}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiptest-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiptest R&D
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -268,6 +268,7 @@ files:
|
|
268
268
|
- lib/hiptest-publisher/call_arguments_adder.rb
|
269
269
|
- lib/hiptest-publisher/cli_options_checker.rb
|
270
270
|
- lib/hiptest-publisher/client.rb
|
271
|
+
- lib/hiptest-publisher/datatable_fixer.rb
|
271
272
|
- lib/hiptest-publisher/formatters/console_formatter.rb
|
272
273
|
- lib/hiptest-publisher/formatters/reporter.rb
|
273
274
|
- lib/hiptest-publisher/gherkin_adder.rb
|
@@ -288,6 +289,7 @@ files:
|
|
288
289
|
- lib/hiptest-publisher/xml_parser.rb
|
289
290
|
- lib/templates/behat/actionword.hbs
|
290
291
|
- lib/templates/behat/actionwords.hbs
|
292
|
+
- lib/templates/behat/parameter.hbs
|
291
293
|
- lib/templates/behave/actionword.hbs
|
292
294
|
- lib/templates/behave/actionwords.hbs
|
293
295
|
- lib/templates/common/booleanliteral.hbs
|