hiptest-publisher 0.18.0 → 0.18.1

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: 532a6ddaaf330746aeedade842580b07ef9f0c54
4
- data.tar.gz: cc034425857fb7ce4265fc6833e974776e3f8c92
3
+ metadata.gz: 8ca209f99be0ca59dd8ef5faeb35357b53fd25f1
4
+ data.tar.gz: 2c6428f83f7a9aeca6b05cfa617c09ae521b33be
5
5
  SHA512:
6
- metadata.gz: 07ec25e5dd1caf91c02948b35e414b32f6b5cb9302f546c306cc78ee44bb904818f7631c39855772d2ca672f642b3d99ecd891dcb9ac892801371ab649c863ff
7
- data.tar.gz: 902a23d1bd00a1ec5d9236cd33eb8635aca8bd2cb412750fadf3d458737ef1ab686e1f480ae62ac134a8c9c147580f96bdbe303ea0c7d4c75cb293d9e9504478
6
+ metadata.gz: e1432d0bad171c16267211b1d1f1c1077a2bfe85092011a920a8afc2586a4ed751164dba8631f60391a4c746f2fafe0dfecf196cb796c187190df369e6920f28
7
+ data.tar.gz: 57e857fd56aa6e6fb91deb72f1fcbdbcf91dec759cdd2ac9e666b7c2dc855601796a6544593bae03be088b5b156e57f425a9c23cf7fe17cad398d9c1ada3d734
@@ -113,6 +113,23 @@ module Hiptest
113
113
  end.compact.join("\n")
114
114
  end
115
115
 
116
+ def hh_index(context, list, index, block)
117
+ current_this = context.get('this')
118
+ context.add_item(:this, list[index.to_i])
119
+ rendered = block.fn(context)
120
+ context.add_item(:this, current_this)
121
+
122
+ return rendered
123
+ end
124
+
125
+ def hh_first(context, list, block)
126
+ hh_index(context, list, 0, block)
127
+ end
128
+
129
+ def hh_last(context, list, block)
130
+ hh_index(context, list, list.size - 1, block)
131
+ end
132
+
116
133
  # kept for backward compatibility of customized templates
117
134
  def hh_remove_quotes (context, s, block)
118
135
  hh_remove_double_quotes(context, s, block)
@@ -36,6 +36,11 @@ module Hiptest
36
36
  super(scs)
37
37
  end
38
38
 
39
+ def walk_actionword(aw)
40
+ add_splitted_tags(aw)
41
+ super(aw)
42
+ end
43
+
39
44
  def walk_folder(folder)
40
45
  ancestor_tags = folder.ancestors.map {|f| f.children[:tags]}.flatten.uniq
41
46
  @rendered_children[:ancestor_tags] = ancestor_tags.map {|t| Hiptest::Renderer.render(t, @context)}
@@ -68,6 +73,12 @@ module Hiptest
68
73
 
69
74
  private
70
75
 
76
+ def add_splitted_tags(context)
77
+ @rendered_children[:splitted_tags] = context.children[:tags].map do |tag|
78
+ @rendered[tag]
79
+ end
80
+ end
81
+
71
82
  def walk_scenario_container(container)
72
83
  # For Robot framework, we need direct access to every scenario
73
84
  # datatables and body rendered.
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.18.0
4
+ version: 0.18.1
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-11-14 00:00:00.000000000 Z
11
+ date: 2016-12-12 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.8
609
+ rubygems_version: 2.4.8
610
610
  signing_key:
611
611
  specification_version: 4
612
612
  summary: Export your tests from Hiptest into executable tests.