hiptest-publisher 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/cucumber-folders_as_features.conf +3 -2
- data/lib/config/cucumber.conf +3 -2
- data/lib/config/java-testng.conf +14 -0
- data/lib/config/java.conf +1 -0
- data/lib/config/javascript-jasmine.conf +3 -0
- data/lib/config/javascript.conf +3 -0
- data/lib/config/python.conf +1 -0
- data/lib/config/robotframework.conf +1 -0
- data/lib/config/ruby-minitest.conf +3 -0
- data/lib/config/ruby.conf +3 -0
- data/lib/config/seleniumide.conf +1 -0
- data/lib/hiptest-publisher/handlebars_helper.rb +2 -2
- data/lib/hiptest-publisher/options_parser.rb +16 -17
- data/lib/templates/{cucumber → gherkin}/argument.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/call.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/dataset.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/datatable.hbs +0 -0
- data/lib/templates/gherkin/empty.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/folders_as_features/folder.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/folders_as_features/single_scenario.hbs +0 -0
- data/lib/templates/gherkin/parameter.hbs +1 -0
- data/lib/templates/{cucumber → gherkin}/scenarios.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/single_scenario.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/single_test.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/step.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/stringliteral.hbs +0 -0
- data/lib/templates/{cucumber → gherkin}/template.hbs +0 -0
- metadata +17 -29
- data/lib/templates/robotframework/assign.hbs +0 -1
- data/lib/templates/robotframework/binaryexpression.hbs +0 -1
- data/lib/templates/robotframework/dict.hbs +0 -1
- data/lib/templates/robotframework/field.hbs +0 -1
- data/lib/templates/robotframework/index.hbs +0 -1
- data/lib/templates/robotframework/list.hbs +0 -1
- data/lib/templates/robotframework/nullliteral.hbs +0 -1
- data/lib/templates/robotframework/parenthesis.hbs +0 -1
- data/lib/templates/robotframework/project.hbs +0 -2
- data/lib/templates/robotframework/property.hbs +0 -1
- data/lib/templates/robotframework/scenario.hbs +0 -1
- data/lib/templates/robotframework/step.hbs +0 -1
- data/lib/templates/robotframework/tag.hbs +0 -1
- data/lib/templates/robotframework/test.hbs +0 -1
- data/lib/templates/robotframework/unaryexpression.hbs +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6956de73d91820080c96b9f0644db1560b493fb2
|
4
|
+
data.tar.gz: efe6707a3bb007912bb41220deda4efedf219afe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6219d7d9a5e9d51bdecc035e8cdfbeb1fb1c8b4b162fdacd19b668da190760717539a5304d3c6f2aaefd497ba010e81016259a0df09c113b4b430f05136e8c35
|
7
|
+
data.tar.gz: 9da9349efbeba2972fc3622e3288ba05c309687aded27cbbf53dbac716c68d5fd58b74c356260a0186f8c0995e54e9dbac0ecca0ed8070eed5d2528c2c4a9ac8
|
@@ -1,18 +1,19 @@
|
|
1
1
|
[_common]
|
2
|
-
language = cucumber
|
3
2
|
indentation = ' '
|
4
3
|
fallback_template = 'empty'
|
5
4
|
|
6
5
|
[features]
|
7
6
|
node_name = folders
|
7
|
+
template_dirs = gherkin/folders_as_features, gherkin, common
|
8
8
|
scenario_filename = '%s.feature'
|
9
9
|
|
10
10
|
[step_definitions]
|
11
11
|
node_name = actionwords
|
12
|
+
template_dirs = cucumber, common
|
12
13
|
filename = 'step_definitions.rb'
|
13
14
|
naming_convention = 'underscore'
|
14
15
|
|
15
16
|
[actionwords]
|
16
|
-
|
17
|
+
template_dirs = ruby, common
|
17
18
|
filename = 'actionwords.rb'
|
18
19
|
naming_convention = 'underscore'
|
data/lib/config/cucumber.conf
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
[_common]
|
2
|
-
language = cucumber
|
3
2
|
indentation = ' '
|
4
3
|
fallback_template = 'empty'
|
5
4
|
|
6
5
|
[features]
|
7
6
|
node_name = tests
|
7
|
+
template_dirs = gherkin, common
|
8
8
|
scenario_filename = '%s.feature'
|
9
9
|
|
10
10
|
[step_definitions]
|
11
11
|
node_name = actionwords
|
12
|
+
template_dirs = cucumber, common
|
12
13
|
filename = 'step_definitions.rb'
|
13
14
|
naming_convention = 'underscore'
|
14
15
|
|
15
16
|
[actionwords]
|
16
|
-
|
17
|
+
template_dirs = ruby, common
|
17
18
|
filename = 'actionwords.rb'
|
18
19
|
naming_convention = 'underscore'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
[_common]
|
2
|
+
template_dirs = java/testng, java, common
|
3
|
+
package = 'com.example'
|
4
|
+
indentation = ' '
|
5
|
+
filename_convention = 'camelize'
|
6
|
+
naming_convention = 'camelize_lower'
|
7
|
+
|
8
|
+
[tests]
|
9
|
+
filename = 'ProjectTest.java'
|
10
|
+
scenario_filename = '%sTest.java'
|
11
|
+
call_prefix = 'actionwords'
|
12
|
+
|
13
|
+
[actionwords]
|
14
|
+
filename = 'Actionwords.java'
|
data/lib/config/java.conf
CHANGED
data/lib/config/javascript.conf
CHANGED
data/lib/config/python.conf
CHANGED
data/lib/config/ruby.conf
CHANGED
data/lib/config/seleniumide.conf
CHANGED
@@ -81,11 +81,11 @@ module Hiptest
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def hh_remove_quotes (context, s, block)
|
84
|
-
|
84
|
+
s ? s.gsub('"', '') : ""
|
85
85
|
end
|
86
86
|
|
87
87
|
def hh_escape_quotes (context, s, block)
|
88
|
-
|
88
|
+
s ? s.gsub(/"/, '\\"') : ""
|
89
89
|
end
|
90
90
|
|
91
91
|
def hh_comment (context, commenter, block)
|
@@ -205,18 +205,16 @@ end
|
|
205
205
|
|
206
206
|
|
207
207
|
class TemplateFinder
|
208
|
-
attr_reader :
|
208
|
+
attr_reader :template_dirs, :overriden_templates, :forced_templates, :fallback_template
|
209
209
|
|
210
210
|
def initialize(
|
211
|
-
|
212
|
-
framework: nil,
|
211
|
+
template_dirs: nil,
|
213
212
|
overriden_templates: nil,
|
214
213
|
indentation: ' ',
|
215
214
|
forced_templates: nil,
|
216
215
|
fallback_template: nil,
|
217
216
|
**)
|
218
|
-
@
|
219
|
-
@framework = framework
|
217
|
+
@template_dirs = template_dirs || []
|
220
218
|
@overriden_templates = overriden_templates
|
221
219
|
@compiled_handlebars = {}
|
222
220
|
@template_path_by_name = {}
|
@@ -227,12 +225,9 @@ class TemplateFinder
|
|
227
225
|
|
228
226
|
def dirs
|
229
227
|
@dirs ||= begin
|
230
|
-
search_dirs =
|
231
|
-
|
232
|
-
|
233
|
-
search_dirs << "common"
|
234
|
-
search_dirs.map! { |path| "#{hiptest_publisher_path}/lib/templates/#{path}" }
|
235
|
-
|
228
|
+
search_dirs = template_dirs.map { |path|
|
229
|
+
"#{hiptest_publisher_path}/lib/templates/#{path}"
|
230
|
+
}
|
236
231
|
search_dirs.unshift(overriden_templates) if overriden_templates
|
237
232
|
search_dirs
|
238
233
|
end
|
@@ -257,7 +252,7 @@ class TemplateFinder
|
|
257
252
|
unless @template_path_by_name.has_key?(template_name)
|
258
253
|
@template_path_by_name[template_name] = get_template_by_name(template_name) || get_template_by_name(@fallback_template)
|
259
254
|
end
|
260
|
-
@template_path_by_name[template_name] or raise ArgumentError.new("no template with name #{template_name}")
|
255
|
+
@template_path_by_name[template_name] or raise ArgumentError.new("no template with name #{template_name} in dirs #{dirs}")
|
261
256
|
end
|
262
257
|
|
263
258
|
def register_partials
|
@@ -289,8 +284,6 @@ class LanguageGroupConfig
|
|
289
284
|
@split_scenarios = user_params.split_scenarios
|
290
285
|
@with_folders = user_params.with_folders
|
291
286
|
@leafless_export = user_params.leafless_export
|
292
|
-
@user_language = user_params.language
|
293
|
-
@user_framework = user_params.framework
|
294
287
|
@language_group_params = language_group_params || {}
|
295
288
|
end
|
296
289
|
|
@@ -335,10 +328,17 @@ class LanguageGroupConfig
|
|
335
328
|
forced
|
336
329
|
end
|
337
330
|
|
331
|
+
def template_dirs
|
332
|
+
if @language_group_params[:template_dirs]
|
333
|
+
@language_group_params[:template_dirs].split(',').map(&:strip)
|
334
|
+
else
|
335
|
+
[]
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
338
339
|
def template_finder
|
339
340
|
@template_finder ||= TemplateFinder.new(
|
340
|
-
|
341
|
-
framework: @language_group_params[:framework] || @user_framework,
|
341
|
+
template_dirs: template_dirs,
|
342
342
|
overriden_templates: @language_group_params[:overriden_templates],
|
343
343
|
indentation: indentation,
|
344
344
|
forced_templates: forced_templates,
|
@@ -492,7 +492,6 @@ class LanguageConfigParser
|
|
492
492
|
language_group_params.merge!(group_config(group_name))
|
493
493
|
language_group_params[:group_name] = group_name
|
494
494
|
language_group_params[:package] = @cli_options.package if @cli_options.package
|
495
|
-
language_group_params[:framework] = @cli_options.framework if @cli_options.framework
|
496
495
|
|
497
496
|
unless @cli_options.overriden_templates.nil? || @cli_options.overriden_templates.empty?
|
498
497
|
language_group_params[:overriden_templates] = @cli_options.overriden_templates
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{ underscore rendered_children.name }}}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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.6.
|
4
|
+
version: 0.6.6
|
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: 2015-
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -241,6 +241,7 @@ files:
|
|
241
241
|
- bin/hiptest-publisher
|
242
242
|
- lib/config/cucumber-folders_as_features.conf
|
243
243
|
- lib/config/cucumber.conf
|
244
|
+
- lib/config/java-testng.conf
|
244
245
|
- lib/config/java.conf
|
245
246
|
- lib/config/javascript-jasmine.conf
|
246
247
|
- lib/config/javascript.conf
|
@@ -278,20 +279,22 @@ files:
|
|
278
279
|
- lib/templates/common/variable.hbs
|
279
280
|
- lib/templates/cucumber/actionword.hbs
|
280
281
|
- lib/templates/cucumber/actionwords.hbs
|
281
|
-
- lib/templates/cucumber/argument.hbs
|
282
|
-
- lib/templates/cucumber/call.hbs
|
283
|
-
- lib/templates/cucumber/dataset.hbs
|
284
|
-
- lib/templates/cucumber/datatable.hbs
|
285
282
|
- lib/templates/cucumber/empty.hbs
|
286
|
-
- lib/templates/cucumber/folders_as_features/folder.hbs
|
287
|
-
- lib/templates/cucumber/folders_as_features/single_scenario.hbs
|
288
283
|
- lib/templates/cucumber/parameter.hbs
|
289
|
-
- lib/templates/
|
290
|
-
- lib/templates/
|
291
|
-
- lib/templates/
|
292
|
-
- lib/templates/
|
293
|
-
- lib/templates/
|
294
|
-
- lib/templates/
|
284
|
+
- lib/templates/gherkin/argument.hbs
|
285
|
+
- lib/templates/gherkin/call.hbs
|
286
|
+
- lib/templates/gherkin/dataset.hbs
|
287
|
+
- lib/templates/gherkin/datatable.hbs
|
288
|
+
- lib/templates/gherkin/empty.hbs
|
289
|
+
- lib/templates/gherkin/folders_as_features/folder.hbs
|
290
|
+
- lib/templates/gherkin/folders_as_features/single_scenario.hbs
|
291
|
+
- lib/templates/gherkin/parameter.hbs
|
292
|
+
- lib/templates/gherkin/scenarios.hbs
|
293
|
+
- lib/templates/gherkin/single_scenario.hbs
|
294
|
+
- lib/templates/gherkin/single_test.hbs
|
295
|
+
- lib/templates/gherkin/step.hbs
|
296
|
+
- lib/templates/gherkin/stringliteral.hbs
|
297
|
+
- lib/templates/gherkin/template.hbs
|
295
298
|
- lib/templates/java/_body.hbs
|
296
299
|
- lib/templates/java/_item_as_function.hbs
|
297
300
|
- lib/templates/java/_scenario.hbs
|
@@ -407,32 +410,17 @@ files:
|
|
407
410
|
- lib/templates/robotframework/actionword.hbs
|
408
411
|
- lib/templates/robotframework/actionwords.hbs
|
409
412
|
- lib/templates/robotframework/argument.hbs
|
410
|
-
- lib/templates/robotframework/assign.hbs
|
411
|
-
- lib/templates/robotframework/binaryexpression.hbs
|
412
413
|
- lib/templates/robotframework/call.hbs
|
413
414
|
- lib/templates/robotframework/dataset.hbs
|
414
415
|
- lib/templates/robotframework/datatable.hbs
|
415
|
-
- lib/templates/robotframework/dict.hbs
|
416
|
-
- lib/templates/robotframework/field.hbs
|
417
416
|
- lib/templates/robotframework/ifthen.hbs
|
418
|
-
- lib/templates/robotframework/index.hbs
|
419
|
-
- lib/templates/robotframework/list.hbs
|
420
|
-
- lib/templates/robotframework/nullliteral.hbs
|
421
417
|
- lib/templates/robotframework/parameter.hbs
|
422
|
-
- lib/templates/robotframework/parenthesis.hbs
|
423
|
-
- lib/templates/robotframework/project.hbs
|
424
|
-
- lib/templates/robotframework/property.hbs
|
425
|
-
- lib/templates/robotframework/scenario.hbs
|
426
418
|
- lib/templates/robotframework/scenarios.hbs
|
427
419
|
- lib/templates/robotframework/single_scenario.hbs
|
428
420
|
- lib/templates/robotframework/single_test.hbs
|
429
|
-
- lib/templates/robotframework/step.hbs
|
430
421
|
- lib/templates/robotframework/stringliteral.hbs
|
431
|
-
- lib/templates/robotframework/tag.hbs
|
432
422
|
- lib/templates/robotframework/template.hbs
|
433
|
-
- lib/templates/robotframework/test.hbs
|
434
423
|
- lib/templates/robotframework/tests.hbs
|
435
|
-
- lib/templates/robotframework/unaryexpression.hbs
|
436
424
|
- lib/templates/robotframework/variable.hbs
|
437
425
|
- lib/templates/robotframework/while.hbs
|
438
426
|
- lib/templates/ruby/_body.hbs
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.to }}} = {{{ rendered_children.value }}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.left }}} {{{ rendered_children.operator }}} {{{ rendered_children.right }}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{#curly}}{{{ join rendered_children.items ', '}}}{{/curly}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.base }}}.{{{ rendered_children.name }}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.base }}}[{{{ rendered_children.expression }}}]
|
@@ -1 +0,0 @@
|
|
1
|
-
[{{{ join rendered_children.items ', '}}}]
|
@@ -1 +0,0 @@
|
|
1
|
-
None
|
@@ -1 +0,0 @@
|
|
1
|
-
({{{ rendered_children.content }}})
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.key }}}: {{{ rendered_children.value }}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{> scenario}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{#comment '#'}}TODO: Implement {{{ rendered_children.key }}}: {{{ rendered_children.value }}}{{/comment}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.key }}}{{#if has_value?}}:{{{rendered_children.value}}}{{/if}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{> scenario}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{{{ rendered_children.operator }}}{{{ rendered_children.expression }}}
|