hiptest-publisher 0.17.1 → 0.18.0

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: 7289d23034dcacf974366337c72461bbcc04121e
4
- data.tar.gz: 9053af47c040c5c61a88b8bf48f830e00bea49bb
3
+ metadata.gz: 532a6ddaaf330746aeedade842580b07ef9f0c54
4
+ data.tar.gz: cc034425857fb7ce4265fc6833e974776e3f8c92
5
5
  SHA512:
6
- metadata.gz: 1d91890dd6a0b7564bc3377647590d96a5aab6f80ca8f79af62ee6628f142f32ff640eb19957f743620398dedeb3b6c4c8991fa306e852d3c8b7eb75394019e1
7
- data.tar.gz: c2d5c1a481ba6750893598b08c497e008b645f4550a1f0cd08186d9c7787a2ec1bc44e6d042538177e71cbce9bc226d7d6ed78f64d923c3392a92a40b5b2a017
6
+ metadata.gz: 07ec25e5dd1caf91c02948b35e414b32f6b5cb9302f546c306cc78ee44bb904818f7631c39855772d2ca672f642b3d99ecd891dcb9ac892801371ab649c863ff
7
+ data.tar.gz: 902a23d1bd00a1ec5d9236cd33eb8635aca8bd2cb412750fadf3d458737ef1ab686e1f480ae62ac134a8c9c147580f96bdbe303ea0c7d4c75cb293d9e9504478
@@ -443,6 +443,18 @@ module Hiptest
443
443
  def folder
444
444
  root? ? nil : parent
445
445
  end
446
+
447
+ def ancestors
448
+ ancestors = []
449
+
450
+ current_ancestor = folder
451
+ until current_ancestor.nil?
452
+ ancestors << current_ancestor
453
+ current_ancestor = current_ancestor.folder
454
+ end
455
+
456
+ ancestors
457
+ end
446
458
  end
447
459
 
448
460
  class TestPlan < Node
@@ -310,9 +310,16 @@ class TemplateFinder
310
310
 
311
311
  def dirs
312
312
  @dirs ||= begin
313
- search_dirs = template_dirs.map { |path|
314
- "#{hiptest_publisher_path}/lib/templates/#{path}"
313
+ search_dirs = []
314
+ #Template paths in overriden_templates
315
+ template_dirs.map { |path|
316
+ search_dirs.push("#{overriden_templates}/#{path}") if overriden_templates
315
317
  }
318
+ #Template paths in hiptest_publisher
319
+ template_dirs.map { |path|
320
+ search_dirs.push("#{hiptest_publisher_path}/lib/templates/#{path}")
321
+ }
322
+ # for backwards compatibility
316
323
  search_dirs.unshift(overriden_templates) if overriden_templates
317
324
  search_dirs
318
325
  end
@@ -37,6 +37,9 @@ module Hiptest
37
37
  end
38
38
 
39
39
  def walk_folder(folder)
40
+ ancestor_tags = folder.ancestors.map {|f| f.children[:tags]}.flatten.uniq
41
+ @rendered_children[:ancestor_tags] = ancestor_tags.map {|t| Hiptest::Renderer.render(t, @context)}
42
+
40
43
  walk_scenario_container(folder)
41
44
  super(folder)
42
45
  end
@@ -1,4 +1,4 @@
1
- {{#if has_tags?}}{{join rendered_children.tags ' '}}
1
+ {{#each rendered_children.ancestor_tags}}{{this}} {{/each}}{{#if has_tags?}}{{join rendered_children.tags ' '}}
2
2
  {{/if}}Feature: {{{ rendered_children.name }}}{{#indent}}
3
3
  {{#if rendered_children.description}}{{#indent}}{{rendered_children.description}}{{/indent}}{{/if}}
4
4
  {{#unless is_empty?}}
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.17.1
4
+ version: 0.18.0
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-10-20 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -606,7 +606,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
606
606
  version: '0'
607
607
  requirements: []
608
608
  rubyforge_project:
609
- rubygems_version: 2.6.6
609
+ rubygems_version: 2.6.8
610
610
  signing_key:
611
611
  specification_version: 4
612
612
  summary: Export your tests from Hiptest into executable tests.