itriagetestrail 1.0.36 → 1.0.41

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
  SHA256:
3
- metadata.gz: 7d3fb08d0333d280c30606a5cd177b439f668a94a8683bf0099c47dac4b563cc
4
- data.tar.gz: 9dd89450a238a488c46783754df2ca4c312301e2e9dd807b31d30f01b80430e7
3
+ metadata.gz: a9e43873e3f892151838043b2e3bfd437c71d7a3ca09816611c6c5157a0963c1
4
+ data.tar.gz: e050287f8570d73159cbf8728e860d09021323fcc9c4925f86f1339e25dbdaa6
5
5
  SHA512:
6
- metadata.gz: 64729b306598a415b93d91869a57d0be086772f39fe235159be11b17ea3e88c48186189207fe125ab0d93d9d9640db9de0da1817a829e210de94c89c4e41ce6d
7
- data.tar.gz: ed2d5d73ea6c95e07d56f0b8355e0ec73b9d09420c083517e92f7500efa10f9971bc1822c96daf8d8b94834f272b393d33c986659251151bcfeacfe2d99e2db9
6
+ metadata.gz: d4a0b38fc7a6948b01dfd737d05233f14388dbb30ec2b5e492317e3804c94247ad6e0565d0cbc1ca00c1edc4fd836cab8975a19a3c20cae672b22f4b3bbe24e8
7
+ data.tar.gz: e2cd6c73d936727ce312f4c352b474caab60dae02cb8942762380a0b02bc7880c8e182e9f93f1a40718eaf4694cf0124c4f37784395543f5555ac03abe492caf
@@ -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
 
@@ -162,7 +162,7 @@ module TestRail
162
162
  file = File.open("./tmp/#{filename}", 'r')
163
163
  content = JSON.parse(file.read)
164
164
  file.close
165
- content[:response]
165
+ content['response']
166
166
  end
167
167
 
168
168
  def sanitize_filename(filename)
@@ -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.36'.freeze
2
+ VERSION = '1.0.41'.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.36
4
+ version: 1.0.41
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