itriagetestrail 1.0.37 → 1.1.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
  SHA256:
3
- metadata.gz: a927ef4f85a9058c7d17084cac8c03668fa17d90df3318ab949bcd3932a803b4
4
- data.tar.gz: 6634d6233ed3c6b2caace7b4d833612b91ee97ba149bf86406113218f46b6e7b
3
+ metadata.gz: c0b3120de8c07f512b00f95ab2106b1528562ce6f36c0a4c0164aed195a3417b
4
+ data.tar.gz: ea62d6b621a13c83fb2ad4f770e33271d64465e4cb1e44a422c91bbb07b9cc14
5
5
  SHA512:
6
- metadata.gz: ed2c8d459a7694bd2d94eee1012dbe8a90ee7411dee169fd4296977fd1172c30ea232b46e90919035446566cf55cb9129c2574fe172974be29827f7631a95e7d
7
- data.tar.gz: 2f8be67b65870ecf836058f31d12d4f2fbff1123b48bb73f199c9f850506849bd967f84eea86739add2a7617b502cdd3face28c713faa1b9f784d20559e0f930
6
+ metadata.gz: 50f426309649a2579291d69218a2c3f501f40319720204cc771534b7fc1c28f08fa07a002c5818cfe4d28ebaf4a82ae830a054ee447f7e4396fb972d49056ca5
7
+ data.tar.gz: 5c23beefd4b6f19492dd0482140eebc954477f8412521ae31e791923d4f8d7fc7fe361443e743a2b206e03b7b251d018b6ff2923bfbfcb3aad6f5259e11df9fa
@@ -188,7 +188,7 @@ module Itriagetestrail
188
188
  # Get the test rail sections
189
189
  testrail_sections
190
190
  # Get the test rail ids
191
- testrail_ids
191
+ testrail_ids true
192
192
  # Populate configurations
193
193
  configurations
194
194
  end
@@ -44,8 +44,8 @@ module TestRail
44
44
  # uri The API method to call including parameters
45
45
  # (e.g. get_case/1)
46
46
  #
47
- def send_get(uri)
48
- res = read_cache(uri)
47
+ def send_get(uri, read_cache = true)
48
+ res = read_cache(uri) if read_cache
49
49
  res || _send_request('GET', uri, nil, true)
50
50
  end
51
51
 
@@ -3,12 +3,12 @@
3
3
  module Itriagetestrail
4
4
  module TestCases
5
5
  # TestRail Cases
6
- def testrail_ids
6
+ def testrail_ids(read_cache = true)
7
7
  case @suite_mode
8
8
  when 2, 3
9
- @test_cases = @client.send_get("get_cases/#{@project_id}&suite_id=#{@suite_id}&type_id=3")
9
+ @test_cases = @client.send_get("get_cases/#{@project_id}&suite_id=#{@suite_id}&type_id=3", read_cache)
10
10
  else
11
- @test_cases = @client.send_get("get_cases/#{@project_id}&type_id=3")
11
+ @test_cases = @client.send_get("get_cases/#{@project_id}&type_id=3", read_cache)
12
12
  end
13
13
 
14
14
  @test_case_ids = []
@@ -47,7 +47,7 @@ module Itriagetestrail
47
47
  @client.send_post("add_case/#{section_id}", body)
48
48
 
49
49
  # refresh test case ids
50
- testrail_ids
50
+ testrail_ids false
51
51
  end
52
52
 
53
53
  def app_version_label
@@ -18,10 +18,10 @@ module Itriagetestrail
18
18
 
19
19
  # In implementations where there is not an at_exit, parallel test threads can store results
20
20
  # of tests from the completed test class into a batch file, so final processing sends all results
21
- # at the very end of the job while avoiding rate limiting issues.
21
+ # at the very end of the job while avoiding rate limiting issues. Each row is a separate json.
22
22
  def store_results_to_batch_file
23
23
  return if @results[:results].empty?
24
- entry = {runId: @run_id, results: @results[:results]}
24
+ entry = {runId: @run_id, results: @results[:results]}.to_json
25
25
 
26
26
  Dir.mkdir('./tmp') unless File.exist?('./tmp')
27
27
  file = File.open("./tmp/batch", 'a')
@@ -53,10 +53,11 @@ module Itriagetestrail
53
53
  run_id = nil
54
54
  results = []
55
55
  File.open("./tmp/batch").each do |line|
56
- content = eval(line)
56
+ content = JSON.parse(line, symbolize_names: true)
57
57
  unless run_id
58
58
  run_id = content[:runId]
59
59
  end
60
+ puts content
60
61
  content[:results].each { |result| results << result }
61
62
  end
62
63
  {runId: run_id, results: results}
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '1.0.37'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  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: 1.0.37
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo