itriagetestrail 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itriagetestrail.rb +16 -14
- data/lib/itriagetestrail/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7134faed06d48f7b3a63f450a2898e57efea892
|
4
|
+
data.tar.gz: d0bc66d934df7202661a89bd355af7c8036883d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06ee6c0a19e37efde8008bd6fc9eee9ae4cb037290bddd4b973236751119f41e831ff2d7420547a9e4ec3e2db49f7c76d58180132cc611771f4afa125dcf64d
|
7
|
+
data.tar.gz: 9c75b77eb65607d63e4e9b2f0c57cd4b86e862235a1e669cef71589705cc00ada1dc2b50e6bf034d1a4b3044cd4f87031020452d0e53702622f5ce29eda4d42f
|
data/lib/itriagetestrail.rb
CHANGED
@@ -17,7 +17,7 @@ module Itriagetestrail
|
|
17
17
|
attr_reader :external_results
|
18
18
|
|
19
19
|
def initialize(testrail_config)
|
20
|
-
@run_id = 0
|
20
|
+
@run_id = @testrail_config[:run_id] || 0
|
21
21
|
@setup = false
|
22
22
|
@testrail_config = testrail_config
|
23
23
|
@milestone_name = normalize_milestone
|
@@ -63,7 +63,7 @@ module Itriagetestrail
|
|
63
63
|
|
64
64
|
@milestone_id = fetch_milestone(@milestone_name)
|
65
65
|
|
66
|
-
add_testrail_run
|
66
|
+
add_testrail_run if @run_id == 0
|
67
67
|
|
68
68
|
@pool = Pool.new(1)
|
69
69
|
|
@@ -286,17 +286,6 @@ module Itriagetestrail
|
|
286
286
|
}
|
287
287
|
end
|
288
288
|
|
289
|
-
def close_run?()
|
290
|
-
|
291
|
-
# always close the run unless specified otherwise
|
292
|
-
if @testrail_config[:close_run] == 'false'
|
293
|
-
close_run = false
|
294
|
-
else
|
295
|
-
close_run = true
|
296
|
-
end
|
297
|
-
close_run
|
298
|
-
end
|
299
|
-
|
300
289
|
# this is the hack at very end to exclude tests which frameworks like MiniTest and Cucumber did not touch
|
301
290
|
# including all tests at beginning is necessary so that at least some progress can be seen when
|
302
291
|
# real time updating is enabled.
|
@@ -307,11 +296,24 @@ module Itriagetestrail
|
|
307
296
|
@client.send_post("update_run/#{@run_id}", send)
|
308
297
|
end
|
309
298
|
|
299
|
+
def close_run?()
|
300
|
+
# do not close a run if a run id was supplied. other test suites related to the job will need it.
|
301
|
+
close_run = false
|
302
|
+
if @testrail_config[:close_run] == 'true' && (@testrail_config[:run_id].nil? || @testrail_config[:run_id] == '')
|
303
|
+
close_run = true
|
304
|
+
end
|
305
|
+
close_run
|
306
|
+
end
|
307
|
+
|
308
|
+
def close_run
|
309
|
+
@client.send_post("close_run/#{@run_id}", {})
|
310
|
+
end
|
311
|
+
|
310
312
|
def shutdown
|
311
313
|
@pool.shutdown
|
312
314
|
|
313
315
|
update_test_run
|
314
|
-
|
316
|
+
close_run if close_run?
|
315
317
|
end
|
316
318
|
end
|
317
319
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itriagetestrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a801069
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|