tes-request 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tes/request/ask.rb +25 -11
- data/lib/tes/request/expression.rb +1 -1
- data/lib/tes/request/profile.rb +61 -25
- data/lib/tes/request/version.rb +1 -1
- metadata +3 -4
- data/lib/tes/request/rake_task.rb +0 -90
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee579434188f04c4db17b2e3a6320309674553e1
|
4
|
+
data.tar.gz: 10cc0dc545f2940cd09f04a7c7f881f88e64cdc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a617bedb04228f37f07e8eec36a050eb4bf3cd0f6b84430cef820e824209719c9c42fb4265a4ce1688806ca5106d2931ebdb3e897e55bac1774dcf9d14d0a22f
|
7
|
+
data.tar.gz: f431578c1a9224b366d30a7d1dd9d7768f3e5cb7d3f0406f083826f64de7746f0a90a0f32438fed38691b2c96f47d41dd666dfe80aa153de8932cabef2941486
|
data/lib/tes/request/ask.rb
CHANGED
@@ -9,20 +9,21 @@ module Tes
|
|
9
9
|
# @param [String] ask_str 单个资源的请求要求字符串
|
10
10
|
def initialize(ask_str)
|
11
11
|
snippets = ask_str.strip.sub(/^\*\d+:/, '').sub(/^&\d+\./, '').split(/\s*,\s*/)
|
12
|
-
expressions = snippets.map {
|
13
|
-
@data = expressions.inject({}) {
|
12
|
+
expressions = snippets.map {|s| Expression.new(s)}
|
13
|
+
@data = expressions.inject({}) {|t, e| t.merge(e.data[:left_exp] => e)}
|
14
14
|
# @reference 是表达式列表
|
15
15
|
@reference = []
|
16
16
|
@greedy = false
|
17
|
+
@lock_type = :lock
|
17
18
|
end
|
18
19
|
|
19
20
|
attr_reader :data, :reference
|
20
|
-
attr_accessor :greedy
|
21
|
+
attr_accessor :greedy, :lock_type
|
21
22
|
|
22
23
|
# 计算数据是否满足要求
|
23
24
|
# @param [Object] data
|
24
25
|
def match?(data)
|
25
|
-
@data.all? {
|
26
|
+
@data.all? {|_n, exp| exp.match?(data)}
|
26
27
|
end
|
27
28
|
|
28
29
|
def <=>(other)
|
@@ -45,10 +46,10 @@ module Tes
|
|
45
46
|
elsif self.data < other.data
|
46
47
|
-1
|
47
48
|
else
|
48
|
-
a_to_b_results = @data.map {
|
49
|
-
if a_to_b_results.all? {
|
49
|
+
a_to_b_results = @data.map {|n, e| exp_compare_lab.call(e, other.data[n])}
|
50
|
+
if a_to_b_results.all? {|ret| ret and ret <= 0}
|
50
51
|
-1
|
51
|
-
elsif a_to_b_results.all? {
|
52
|
+
elsif a_to_b_results.all? {|ret| ret and ret >= 0}
|
52
53
|
# 这时必须要求other的表达式全部能被self覆盖.
|
53
54
|
(other.data.keys - @data.keys).size > 0 ? nil : 1
|
54
55
|
else
|
@@ -65,6 +66,16 @@ module Tes
|
|
65
66
|
else
|
66
67
|
ret
|
67
68
|
end
|
69
|
+
case [lock_type, other.lock_type]
|
70
|
+
when [:lock, :share]
|
71
|
+
return ret unless ret
|
72
|
+
ret >=0 ? 1 : nil
|
73
|
+
when [:share, :lock]
|
74
|
+
return ret unless ret
|
75
|
+
ret <=0 ? -1 : nil
|
76
|
+
else
|
77
|
+
ret
|
78
|
+
end
|
68
79
|
end
|
69
80
|
|
70
81
|
# 相对other要求多的和严格的
|
@@ -75,8 +86,9 @@ module Tes
|
|
75
86
|
o_e && e <= o_e
|
76
87
|
end
|
77
88
|
|
78
|
-
diff_ask = self.new('')
|
89
|
+
diff_ask = self.class.new('')
|
79
90
|
diff_ask.data.merge!(diff_data)
|
91
|
+
diff_ask.lock_type = lock_type
|
80
92
|
diff_ask
|
81
93
|
end
|
82
94
|
|
@@ -95,13 +107,15 @@ module Tes
|
|
95
107
|
self_gt_other = self.-(other)
|
96
108
|
other_gt_self = other.-(self)
|
97
109
|
|
98
|
-
ask1 = self.new('')
|
99
|
-
ask2 = self.new('')
|
110
|
+
ask1 = self.class.new('')
|
111
|
+
ask2 = self.class.new('')
|
100
112
|
ask1.data.merge!(self.data)
|
101
113
|
ask1.data.merge!(other_gt_self)
|
102
114
|
ask2.data.merge!(other.data)
|
103
115
|
ask2.data.merge!(self_gt_other)
|
104
|
-
ask1 >= ask2 ? ask1 : ask2
|
116
|
+
ask = ask1 >= ask2 ? ask1 : ask2
|
117
|
+
ask.lock_type = (lock_type == other.lock_type ? lock_type : :lock)
|
118
|
+
ask
|
105
119
|
end
|
106
120
|
end
|
107
121
|
|
@@ -103,7 +103,7 @@ module Tes
|
|
103
103
|
ret = @data[:expect_val] <=> other.data[:expect_val]
|
104
104
|
ret == 0 ? -1 : ret
|
105
105
|
when %w(<= =)
|
106
|
-
@data[:expect_val]
|
106
|
+
@data[:expect_val] > other.data[:expect_val] ? -1 : nil
|
107
107
|
when %w(<= <)
|
108
108
|
ret = other.data[:expect_val] <=> @data[:expect_val]
|
109
109
|
ret == 0 ? -1 : ret
|
data/lib/tes/request/profile.rb
CHANGED
@@ -5,6 +5,7 @@ module Tes
|
|
5
5
|
class Profile
|
6
6
|
include Comparable
|
7
7
|
|
8
|
+
REG_LOCK_HEADER = /^(@|\$)\s*\|+\s*/
|
8
9
|
REG_POINT_ASK = /^\*(\d+):/
|
9
10
|
REG_REFER_ASK = /^&(\d+)\./
|
10
11
|
REG_POINT_ASK_GREEDY = /^\[\*(\d+)\]:/
|
@@ -17,16 +18,21 @@ module Tes
|
|
17
18
|
|
18
19
|
# 不因申明顺序不一致性等其他差异而误判环境要求的一致性
|
19
20
|
point_asks = {}
|
20
|
-
profile_lines.each do |
|
21
|
+
profile_lines.each do |raw_line|
|
22
|
+
lock_type = (raw_line =~ REG_LOCK_HEADER and raw_line =~ /^\$/) ? :share : :lock
|
23
|
+
line = raw_line.sub(REG_LOCK_HEADER, '')
|
24
|
+
|
21
25
|
case line
|
22
26
|
when REG_POINT_ASK
|
23
27
|
mt = line.match(REG_POINT_ASK)
|
24
28
|
ask = Ask.new line.sub(REG_POINT_ASK, '')
|
29
|
+
ask.lock_type = lock_type
|
25
30
|
point_asks[mt[1]] = ask
|
26
31
|
when REG_POINT_ASK_GREEDY
|
27
32
|
mt = line.match(REG_POINT_ASK_GREEDY)
|
28
33
|
ask = Ask.new line.sub(REG_POINT_ASK_GREEDY, '')
|
29
34
|
ask.greedy= true
|
35
|
+
ask.lock_type = lock_type
|
30
36
|
point_asks[mt[1]] = ask
|
31
37
|
when REG_REFER_ASK
|
32
38
|
mt= line.match(REG_REFER_ASK)
|
@@ -39,7 +45,9 @@ module Tes
|
|
39
45
|
ref_exp = Expression.new line.sub(REG_REFER_ASK_GREEDY, '')
|
40
46
|
src_ask.reference << ref_exp
|
41
47
|
else
|
42
|
-
|
48
|
+
ask = Ask.new(line)
|
49
|
+
ask.lock_type =lock_type
|
50
|
+
@data << ask
|
43
51
|
end
|
44
52
|
end
|
45
53
|
|
@@ -49,15 +57,15 @@ module Tes
|
|
49
57
|
attr_reader :data
|
50
58
|
|
51
59
|
def <=>(other)
|
52
|
-
all_self_hash = self.data.group_by {
|
60
|
+
all_self_hash = self.data.group_by {|e| e.to_s}
|
53
61
|
all_self_hash_keys = Set.new all_self_hash.keys
|
54
|
-
all_other_hash = other.data.group_by {
|
62
|
+
all_other_hash = other.data.group_by {|e| e.to_s}
|
55
63
|
all_other_hash_keys = Set.new all_other_hash.keys
|
56
64
|
|
57
65
|
# 如果相等或者可比较则直接返回(只在相等的时候有效)
|
58
66
|
return 0 if all_self_hash == all_other_hash
|
59
67
|
|
60
|
-
hash1 = Hash[all_self_hash_keys.to_a.map {
|
68
|
+
hash1 = Hash[all_self_hash_keys.to_a.map {|e| [e, true]}]
|
61
69
|
all_other_hash_keys.to_a.each do |k|
|
62
70
|
hash1.include?(k)
|
63
71
|
end
|
@@ -99,7 +107,7 @@ module Tes
|
|
99
107
|
# @param [Hash<String,Hash>] pool 所有空闲可用的资源池
|
100
108
|
def request(pool)
|
101
109
|
get_candidates_lab = ->(ask, answer_cache) do
|
102
|
-
pool.keys.select {
|
110
|
+
pool.keys.select {|k| !answer_cache.include?(k) && ask.match?(pool[k])}
|
103
111
|
end
|
104
112
|
|
105
113
|
answers_flat = []
|
@@ -146,16 +154,17 @@ module Tes
|
|
146
154
|
ret = []
|
147
155
|
point = 0
|
148
156
|
@data.each do |ask|
|
157
|
+
header = (ask.lock_type == :share ? '$|' : '@|')
|
149
158
|
if ask.reference and ask.reference.size > 0
|
150
159
|
point_ask = ask
|
151
160
|
refer_asks = ask.reference
|
152
161
|
point += 1
|
153
|
-
ret << ("*#{point}:" + point_ask.to_s)
|
162
|
+
ret << header + ("*#{point}:" + point_ask.to_s)
|
154
163
|
refer_asks.each do |r_ask|
|
155
164
|
ret << ("&#{point}." + r_ask.to_s)
|
156
165
|
end
|
157
166
|
else
|
158
|
-
ret << ask.to_s
|
167
|
+
ret << header + ask.to_s
|
159
168
|
end
|
160
169
|
end
|
161
170
|
ret.join(split)
|
@@ -163,11 +172,15 @@ module Tes
|
|
163
172
|
|
164
173
|
private
|
165
174
|
def compare_when_keys_same(hash_self, hash_other)
|
166
|
-
size_compare_results = hash_self.keys.map {
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
175
|
+
size_compare_results = hash_self.keys.map {|k| hash_self[k].size <=> hash_other[k].size}
|
176
|
+
lock_compare_result = hash_self.keys.map do |k|
|
177
|
+
hash_self[k].select {|a| a.lock_type == :lock}.size <=>
|
178
|
+
hash_other[k].select {|a| a.lock_type == :lock}.size
|
179
|
+
end
|
180
|
+
if size_compare_results.all? {|v| v && v <= 0} and lock_compare_result.all? {|v| v && v <= 0}
|
181
|
+
(size_compare_results.any? {|v| v == -1} or lock_compare_result.any? {|v| v == -1}) ? -1 : 0
|
182
|
+
elsif size_compare_results.all? {|v| v && v >= 0} and lock_compare_result.all? {|v| v && v >= 0}
|
183
|
+
(size_compare_results.any? {|v| v == 1} or lock_compare_result.any? {|v| v == 1}) ? 1 : 0
|
171
184
|
else
|
172
185
|
nil
|
173
186
|
end
|
@@ -175,7 +188,7 @@ module Tes
|
|
175
188
|
|
176
189
|
def compare_when_keys_subset(hash_self, hash_other)
|
177
190
|
subset_keys = hash_self.keys
|
178
|
-
hash_other_subset = subset_keys.inject({}) {
|
191
|
+
hash_other_subset = subset_keys.inject({}) {|t, k| t.merge(k => hash_other[k])}
|
179
192
|
ret = compare_when_keys_same(hash_self, hash_other_subset)
|
180
193
|
ret && (ret <= 0 ? -1 : nil)
|
181
194
|
end
|
@@ -184,11 +197,11 @@ module Tes
|
|
184
197
|
def merge_when_keys_diff!(hash_self, hash_other)
|
185
198
|
merge_able_lab = ->(to, from) do
|
186
199
|
from.keys.all? do |f_ask|
|
187
|
-
if to.any? {
|
200
|
+
if to.any? {|k, _| f_ask <=> k}
|
188
201
|
true
|
189
202
|
else
|
190
203
|
if f_ask.data['type']
|
191
|
-
to.keys.none? {
|
204
|
+
to.keys.none? {|e| e.data['type'] && e.data['type'] and e.data['type'] == f_ask.data['type']}
|
192
205
|
else
|
193
206
|
true
|
194
207
|
end
|
@@ -198,30 +211,53 @@ module Tes
|
|
198
211
|
merge_lab = ->(to, from) do
|
199
212
|
# 现将内容全部拼起来,然后合并资源
|
200
213
|
ret_hash = {}
|
201
|
-
to.each
|
214
|
+
to.each do |ask, ask_dup_list|
|
215
|
+
lock_list = ask_dup_list.select {|a| a.lock_type == :lock}
|
216
|
+
share_list = ask_dup_list.select {|a| a.lock_type == :share}
|
217
|
+
ret_hash[ask] = lock_list + share_list
|
218
|
+
end
|
202
219
|
from.each do |ask, ask_dup_list|
|
203
|
-
|
220
|
+
ask_dup_lock_type_size = ask_dup_list.select {|a| a.lock_type == :lock}.size
|
221
|
+
|
222
|
+
# 是否有相同要求的资源要求,有则合并(包括锁定方式)
|
204
223
|
if ret_hash[ask]
|
205
|
-
|
224
|
+
if ret_hash[ask].size < ask_dup_list
|
206
225
|
ret_hash[ask] += ask_dup_list[ret_hash[ask].size..-1]
|
207
226
|
end
|
227
|
+
|
228
|
+
if ask_dup_lock_type_size > ret_hash[ask].select {|a| a.lock_type == :lock}.size
|
229
|
+
ret_hash[ask][0...ask_dup_lock_type_size].each {|a| a.lock_type = :lock}
|
230
|
+
end
|
208
231
|
else
|
209
232
|
# 没有
|
210
233
|
|
211
234
|
# 是否总结果中有可合并的资源请求
|
212
|
-
merge_able_ask = ret_hash.keys.find {
|
235
|
+
merge_able_ask = ret_hash.keys.find {|a| a <=> ask}
|
213
236
|
if merge_able_ask
|
214
237
|
if merge_able_ask >= ask
|
215
238
|
if ret_hash[merge_able_ask].size < ask_dup_list.size
|
216
239
|
ret_hash[merge_able_ask] += ask_dup_list[ret_hash[merge_able_ask].size..-1]
|
217
240
|
end
|
241
|
+
if ask_dup_lock_type_size > ret_hash[merge_able_ask].select {|a| a.lock_type == :lock}.size
|
242
|
+
ret_hash[merge_able_ask][0...ask_dup_lock_type_size].each {|a| a.lock_type = :lock}
|
243
|
+
end
|
218
244
|
else
|
219
245
|
if ret_hash[merge_able_ask].size <= ask_dup_list.size
|
246
|
+
merge_able_lock_size = ret_hash[merge_able_ask].select {|a| a.lock_type == :lock}.size
|
220
247
|
ret_hash.delete(merge_able_ask)
|
248
|
+
if ask_dup_lock_type_size < merge_able_lock_size
|
249
|
+
ask_dup_list[0...merge_able_lock_size].each {|a| a.lock_type = :lock}
|
250
|
+
end
|
221
251
|
ret_hash[ask] = ask_dup_list
|
222
252
|
else
|
253
|
+
merge_able_lock_size = ret_hash[merge_able_ask].select {|a| a.lock_type == :lock}.size
|
254
|
+
sum_lock_size = [merge_able_lock_size, ask_dup_lock_type_size].max
|
223
255
|
ret_hash[ask] = ask_dup_list
|
224
256
|
ret_hash[merge_able_ask].pop(ask_dup_list.size)
|
257
|
+
|
258
|
+
(0...(sum_lock_size - ret_hash[merge_able_ask].select {|a| a.lock_type == :lock}.size)).each do |i|
|
259
|
+
ret_hash[ask][i].lock_type = :lock
|
260
|
+
end
|
225
261
|
end
|
226
262
|
end
|
227
263
|
else
|
@@ -243,10 +279,10 @@ module Tes
|
|
243
279
|
end
|
244
280
|
|
245
281
|
def merge(other)
|
246
|
-
all_self_hash = self.data.group_by {
|
247
|
-
|
248
|
-
|
249
|
-
all_other_hash = Hash[all_other_hash.map {
|
282
|
+
all_self_hash = self.data.group_by {|e| e.to_s}
|
283
|
+
all_other_hash = other.data.group_by {|e| e.to_s}
|
284
|
+
all_self_hash = Hash[all_self_hash.map {|k, v| [Ask.new(k), v]}]
|
285
|
+
all_other_hash = Hash[all_other_hash.map {|k, v| [Ask.new(k), v]}]
|
250
286
|
all_self_hash_keys = Set.new all_self_hash.keys
|
251
287
|
all_other_hash_keys = Set.new all_other_hash.keys
|
252
288
|
|
@@ -274,7 +310,7 @@ module Tes
|
|
274
310
|
new_instance = self.class.new([])
|
275
311
|
|
276
312
|
|
277
|
-
result.values.flatten.each {
|
313
|
+
result.values.flatten.each {|v| new_instance.data.push v}
|
278
314
|
new_instance
|
279
315
|
end
|
280
316
|
end
|
data/lib/tes/request/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tes-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wuhuizuo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: java-properties
|
@@ -105,7 +105,6 @@ files:
|
|
105
105
|
- lib/tes/request/client.rb
|
106
106
|
- lib/tes/request/expression.rb
|
107
107
|
- lib/tes/request/profile.rb
|
108
|
-
- lib/tes/request/rake_task.rb
|
109
108
|
- lib/tes/request/rspec/ci_slicer.rb
|
110
109
|
- lib/tes/request/rspec/distribute.rb
|
111
110
|
- lib/tes/request/rspec/function.rb
|
@@ -133,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
132
|
version: '0'
|
134
133
|
requirements: []
|
135
134
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.6.11
|
137
136
|
signing_key:
|
138
137
|
specification_version: 4
|
139
138
|
summary: Request libs and bins for TES(Test Env Service)
|
@@ -1,90 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/tasklib'
|
3
|
-
require 'yaml'
|
4
|
-
require 'java-properties'
|
5
|
-
require_relative 'rspec/distribute'
|
6
|
-
|
7
|
-
class Tes::Request::RakeTask < ::Rake::TaskLib
|
8
|
-
SUPPORT_FILE_TYPES = [:yaml, :yml, :json, :properties]
|
9
|
-
|
10
|
-
def initialize(name, type)
|
11
|
-
desc "Generate RSpec distribute jobs #{type} file for CI"
|
12
|
-
task name, [:project_dir, :type, :count, :version, :lang] do |_, task_args|
|
13
|
-
rspec_distribute = ::Tes::Request::RSpec::Distribute.new(task_args[:project_dir])
|
14
|
-
jobs = rspec_distribute.distribute_jobs(task_args[:type],
|
15
|
-
task_args[:count].to_i,
|
16
|
-
task_args[:version],
|
17
|
-
task_args[:lang])
|
18
|
-
target_dir = File.join(task_args[:project_dir], '.ci_jobs')
|
19
|
-
save_job_files(jobs, target_dir, type)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def spec_tag_param_str(tags)
|
24
|
-
case tags
|
25
|
-
when Array
|
26
|
-
tags.map { |t| "--tag #{t}" }.join(' ')
|
27
|
-
when String
|
28
|
-
"--tag #{tags}"
|
29
|
-
when nil
|
30
|
-
nil
|
31
|
-
else
|
32
|
-
raise("不支持的类型:#{tags.class}")
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def save_job_files(jobs, target_dir, file_type)
|
37
|
-
unless SUPPORT_FILE_TYPES.include?(file_type)
|
38
|
-
raise(ArgumentError, "Not supported file type:#{file_type}!")
|
39
|
-
end
|
40
|
-
|
41
|
-
job_configs_for_ci = jobs.map { |j| gen_job_ci_params(j) }
|
42
|
-
FileUtils.rm_rf(target_dir)
|
43
|
-
FileUtils.mkdir(target_dir)
|
44
|
-
case file_type
|
45
|
-
when :json
|
46
|
-
save_file = File.join(target_dir, 'ci_tasks.json')
|
47
|
-
File.open(save_file, 'w') { |f| f.write job_configs_for_ci.to_json }
|
48
|
-
puts "Generated #{jobs.size} jobs, Stored in:#{save_file} ."
|
49
|
-
when :yml, :yaml
|
50
|
-
save_file = File.join(target_dir, 'ci_tasks.yml')
|
51
|
-
File.open(save_file, 'w') { |f| f.write job_configs_for_ci.to_yaml }
|
52
|
-
puts "Generated #{jobs.size} jobs, Stored in:#{save_file} ."
|
53
|
-
when :properties
|
54
|
-
job_configs_for_ci.each_with_index do |params, i|
|
55
|
-
file = File.join(target_dir, "#{i}.properties")
|
56
|
-
save_job_properties(params, file)
|
57
|
-
end
|
58
|
-
puts "Generated #{jobs.size} jobs, Stored in:#{target_dir}/*.properties ."
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def save_job_properties(job_cfg, save_file)
|
63
|
-
# context = ["# gen at #{Time.now}"]
|
64
|
-
JavaProperties.write(job_cfg, save_file)
|
65
|
-
#
|
66
|
-
# context = ["# gen at #{Time.now}"]
|
67
|
-
# tag_opt_cli_args = spec_tag_param_str(job_cfg[:tag])
|
68
|
-
# rspec_param = if tag_opt_cli_args
|
69
|
-
# "RSPEC_PARAM = #{tag_opt_cli_args} \\\n\t#{piece[:files].join(" \\\n\t")}"
|
70
|
-
# else
|
71
|
-
# "RSPEC_PARAM = #{piece[:files].join(" \\\n\t")}"
|
72
|
-
# end
|
73
|
-
# context << "REQUEST_ASKS = #{piece[:profile].to_s(";\\\n\t")}"
|
74
|
-
# File.open(file, 'w') { |f| f.write context.join("\n") }
|
75
|
-
end
|
76
|
-
|
77
|
-
def get_job_rspec_run_args_str(job, split=' ')
|
78
|
-
tags_str = spec_tag_param_str(job[:tag])
|
79
|
-
paths_str = job[:specs].join(split)
|
80
|
-
tags_str ? (tags_str + split + paths_str) : paths_str
|
81
|
-
end
|
82
|
-
|
83
|
-
def get_job_env_profile_str(job, split=';')
|
84
|
-
job[:profile].to_s(split)
|
85
|
-
end
|
86
|
-
|
87
|
-
def gen_job_ci_params(job)
|
88
|
-
{'RSPEC_PARAM' => get_job_rspec_run_args_str(job), 'REQUEST_ASKS' => get_job_env_profile_str(job)}
|
89
|
-
end
|
90
|
-
end
|