itriagetestrail 1.0.14 → 1.0.15

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
  SHA1:
3
- metadata.gz: 8e15822d613bb64d10ea62b34183d24c240c6773
4
- data.tar.gz: 8c2c485deecd8c8c44908754adb3141dab8fcd86
3
+ metadata.gz: 9137e6bf14971fd6aa2e54b814cd2b4e8ae8076e
4
+ data.tar.gz: 1b07b2b76b5fcc2ac8b058f092ce6b33fd846636
5
5
  SHA512:
6
- metadata.gz: 35958d227d3e506f944b659cda89c9dec5cb02fefb17e7caafb7b9bad2746229392e0716d6f771c3a76ae496ee47e275df8abc4d48729e5cd4b2a55243214377
7
- data.tar.gz: abcdf6b384c595397cd6848072b6383682761512cbf81837ce8921c7579d51a1a9748ac62f6b372ded20e3c8f44258e152141cf4abefbd42d80741d551f60542
6
+ metadata.gz: f9ac7593d983b02f3039fe3960c9ac90b4047acd9ad88c1b8fc8b2d9ef346f9ef03d9226be6380e9b178fdd38d3771afd12878dafe6f1fc65ea0dc708452308f
7
+ data.tar.gz: fa719cb08f9cc34709b15f004db3da7421e574754287d9fa877c20ad6cf6790572d4492325fe6996b096dc448fef3021c02574bb171a0918376027607e1aad56
@@ -57,22 +57,23 @@ module Itriagetestrail
57
57
 
58
58
  testrail_tag_object = @testrail_case_fields.select { |field| field['system_name'] == 'custom_tags'}[0]
59
59
  testrail_tag_items = testrail_tag_object['configs'][0]['options']['items'].split("\n")
60
- testrail_tag_ids = []
60
+ scenario_tag_ids = []
61
61
  @scenario_tags.each do |scenario_tag|
62
62
  testrail_tag_items.each do | tag_item |
63
63
  system_tag = tag_item.split(',')
64
64
  if scenario_tag == system_tag[1]
65
- testrail_tag_ids << system_tag[0].to_i
65
+ scenario_tag_ids << system_tag[0].to_i
66
66
  end
67
67
  end
68
68
  end
69
69
 
70
70
  # TODO: Determine if there is a change, if so then we send a post
71
+ testrail_case_tag_ids = @test_cases.select { |item| item['id'] == case_id }[0]['custom_tags']
71
72
 
72
-
73
-
74
- # Now that we have the case id, lets update tags
75
- @client.send_post("update_case/#{case_id}", { 'custom_tags': testrail_tag_ids})
73
+ if testrail_case_tag_ids == scenario_tag_ids
74
+ # Now that we have the case id, lets update tags
75
+ @client.send_post("update_case/#{case_id}", { 'custom_tags': scenario_tag_ids})
76
+ end
76
77
  end
77
78
 
78
79
  # Update Test Run
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '1.0.14'.freeze
2
+ VERSION = '1.0.15'.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.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069