itriagetestrail 1.0.34 → 1.0.39

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: 1e948f5a1e9aeb7b5cf4293f4682a4b63096111071f1cdd9b71a581dfc84fa80
4
- data.tar.gz: 83bce3c8e03d6179f3576c9e2f1fbc5c86763f0c9ede44693ace517fadb8eac6
3
+ metadata.gz: 92575ff3a5692b229f54f96a3148623b6b870c88dc5fc80276c57a3e3eb083c4
4
+ data.tar.gz: 1efb6905bdb1b22249855bda058e1cda0265f093cf549d18e760682f6b4a8c55
5
5
  SHA512:
6
- metadata.gz: '09a4ab8392c1851106777af2d779912015e78464026982f1257ba1a3b6dde63c11c57ae3428d2a4623ab74265033036b78c6520800585d57b3ee4fb240c43262'
7
- data.tar.gz: 3caba5ab0f336753e028ecd4f814de09c6dc6661b90c66756fe2529f04e9ef873f906c434ac5976a6fd39a2b5d95f3dd5efbdc9942b69a7d71e136ed75c89c44
6
+ metadata.gz: 229dda3808dea626b44848d4add36cd5b159be21c27c2bcdebbb22a4cb4b1cc288e32f928a7275a56ed409d2173a250530ba93bd6a42c1d80cf61710afb4981c
7
+ data.tar.gz: 37a2bdb950cf3e87fcc696788c2eaf903599cbd064bc3e5d6f94fe7086f66e1d2eca7c38d2feac533a268c10d0980b92c2ccfebdd0256db1ca56493f4149d25b
@@ -49,7 +49,7 @@ module Itriagetestrail
49
49
  # This is the very first call to TestRail
50
50
  make_connection
51
51
  projects
52
- if @client.response_code == '200'
52
+ if @client.response_code == '200' || @client.response_code.nil?
53
53
  true
54
54
  else
55
55
  puts "**** TESTRAIL IS OFFLINE for maintenance or other reason with status code #{@client.response_code}"
@@ -160,9 +160,9 @@ module TestRail
160
160
  filename = sanitize_filename(url)
161
161
  return unless File.exist?("./tmp/#{filename}")
162
162
  file = File.open("./tmp/#{filename}", 'r')
163
- content = JSON.parse(file.read, :symbolize_names => true, :quirks_mode => true)
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)
@@ -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.34'.freeze
2
+ VERSION = '1.0.39'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itriagetestrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.34
4
+ version: 1.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069