cukerail 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b97af2a8a261cae8837134229e16fde8acfeaea4
4
- data.tar.gz: 74e83722bb11ac64e3537f1ff8f429312307d5be
3
+ metadata.gz: 5e15f42f1bf43c05b9c8dc399d7ca227cdc70f11
4
+ data.tar.gz: ca403f0c628f109d68bd246660928c22c7596278
5
5
  SHA512:
6
- metadata.gz: caa877a591dd30ca8a99410f135e0b58f73d5b19a6ae60add1a278aa76390ed246309faa64f4d7574aed385c109c3facf79675040419b91c2706cd8f9cd9203d
7
- data.tar.gz: fe3c942d178559cf5ba48c803dedf39e4ef6d704648b0ccc4afd9a802ed26de980b75f1486f96c3317643845070bd2e18e0a81a84a0f9a7ba20c2355d6899779
6
+ metadata.gz: dfafe789213cb896515c03d5ff711f738e325c1a314b668d9b10d11ffed651da7d95b74f0e6599b37ecbaadfe6842df441280ccf8c8c0e436b3f5c17c126e0fc
7
+ data.tar.gz: 1bf63cad52586c639ce5ea89f9319602a3fc7dcfa417cf69e36c2529813896612b43725975cf50ee304a3cf2467c0b18e8e5370e019522ad39dc958f53314cea
@@ -1,3 +1,3 @@
1
1
  module Cukerail
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
data/lib/cukerail.rb CHANGED
@@ -109,9 +109,14 @@ module Cukerail
109
109
  str += g_step.multiline_arg.raw.map{|l|"\n| #{l.join(' | ')} |"}.join if g_step.multiline_arg.data_table?
110
110
  str
111
111
  end.join("\n")
112
- is_manual = test_case.tags.any?{|tag| tag.name =~/manual/}
112
+ type_ids = [1]
113
+ type_ids << 7 if test_case.tags.any?{|tag| tag.name =~/manual/}
114
+ type_ids << 13 if test_case.tags.any?{|tag| tag.name =~/on_hold/}
115
+ #get the highest precedence type found in the tags. E.g. if it's @on_hold and @manual it selects 13 for on hold
116
+ type_id = ([13,7,1] & type_ids).first
117
+
113
118
  data = {'title'=>extract_title(test_case),
114
- 'type_id'=>(is_manual ? 7 : 1 ),
119
+ 'type_id'=>type_id,
115
120
  'custom_steps'=>steps_as_string,
116
121
  'refs'=>refs(test_case)
117
122
  }
data/lib/json_sender.rb CHANGED
@@ -67,9 +67,14 @@ module Cukerail
67
67
 
68
68
  def prepare_data(scenario,background_steps)
69
69
  steps = background_steps + "\n" + scenario['steps'].map{|s| s['keyword']+s['name']}.join("\n")
70
- is_manual = scenario['tags'].any?{|tag| tag['name'] =~/manual/} if scenario['tags']
70
+ type_ids = [1]
71
+ type_ids << 7 if test_case.tags.any?{|tag| tag.name =~/manual/}
72
+ type_ids << 13 if test_case.tags.any?{|tag| tag.name =~/on_hold/}
73
+ #get the highest precedence type found in the tags. E.g. if it's @on_hold and @manual it selects 13 for on hold
74
+ type_id = ([13,7,1] & type_ids).first
75
+
71
76
  data = {'title'=>get_name(scenario),
72
- 'type_id'=>(is_manual ? 7 : 1 ),
77
+ 'type_id'=>type_id,
73
78
  'custom_steps'=>steps,
74
79
  'refs'=>refs(scenario)
75
80
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukerail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Small
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-17 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber