itriagetestrail 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 4dff72a5d07ba675d38bb7af5cda083d37f160a0
4
- data.tar.gz: 25de4cdf158bbb29c17b0a96936c587844cec1fe
3
+ metadata.gz: bf4df2794d0c74d56c6077b9dd655da95ece76a6
4
+ data.tar.gz: 2636e573c9764ce08fadc27142d0987d4bfcb388
5
5
  SHA512:
6
- metadata.gz: 126a2164f3fb721c09ac36024c3ac801337b7e4e62053f356f49853a1457ba4a1223d667f228ac9586bde40267f42de524837e061ceee97359766a4cf521a881
7
- data.tar.gz: 118186fe1f6fb98002fc3167fadffcc29b837e9799afb1da959cb25cfee84324104af656de0f6fa809566879cc90fb9d9cedbd543b8c7f2eb6acf1563654c1ce
6
+ metadata.gz: 3f77119596ebb7b828fc7869dd45b092fc9a4aeb303b8c812043e91708d7738b60a000851f6464d21958c8d8fff7f9132d81649758dea996efd6ba9473439cca
7
+ data.tar.gz: 88bc9d82407c77a72ffb257bd91753efbbc502796d8d861f1b448eec06fc9ea4a952fb244d91f5af93991c93b571faef87092444c519ca4a290c83a981fb26cf
@@ -19,11 +19,11 @@ module Itriagetestrail
19
19
  @run_id = 0
20
20
  @setup = false
21
21
  @testrail_config = testrail_config
22
- @milestone_name = normalize_milestone(@testrail_config['origin'])
23
- @jenkins_build = @testrail_config['jenkinsBuild']
24
- @app_version = @testrail_config['appVersion']
22
+ @milestone_name = normalize_milestone(@testrail_config[:origin])
23
+ @jenkins_build = @testrail_config[:jenkinsBuild]
24
+ @app_version = @testrail_config[:appVersion]
25
25
 
26
- if @testrail_config['user'].nil? || @testrail_config['user'] == ''
26
+ if @testrail_config[:user].nil? || @testrail_config[:user] == ''
27
27
  @execute = false
28
28
  else
29
29
  @execute = true
@@ -41,7 +41,7 @@ module Itriagetestrail
41
41
  @submitted = { results: [] }
42
42
 
43
43
  @external_results = { results: [] }
44
- @batch_size = @testrail_config['batch_size'] || 10
44
+ @batch_size = @testrail_config[:batch_size] || 0
45
45
 
46
46
  make_connection
47
47
 
@@ -64,9 +64,9 @@ module Itriagetestrail
64
64
  end
65
65
 
66
66
  def make_connection
67
- @client = TestRail::APIClient.new(@testrail_config['site'])
68
- @client.user = @testrail_config['user']
69
- @client.password = @testrail_config['password']
67
+ @client = TestRail::APIClient.new(@testrail_config[:site])
68
+ @client.user = @testrail_config[:user]
69
+ @client.password = @testrail_config[:password]
70
70
  end
71
71
 
72
72
  # TestRail Sections
@@ -94,17 +94,17 @@ module Itriagetestrail
94
94
  end
95
95
 
96
96
  def set_project_id()
97
- requested_id = @testrail_config['projectId']
97
+ requested_id = @testrail_config[:projectId]
98
98
  case requested_id
99
99
  when nil, ''
100
100
  # a project id was not provided, fetch it from TestRail by project name
101
101
  projects = @client.send_get("get_projects")
102
102
  res = -1
103
103
  projects.each do |project|
104
- res = project['id'] if project['name'] == @testrail_config['projectName']
104
+ res = project['id'] if project['name'] == @testrail_config[:projectName]
105
105
  end
106
106
  if res == -1
107
- puts "TestRail Project Not found for #{@testrail_config['projectName']}"
107
+ puts "TestRail Project Not found for #{@testrail_config[:projectName]}"
108
108
  @execute = false
109
109
  return
110
110
  end
@@ -205,7 +205,7 @@ module Itriagetestrail
205
205
 
206
206
  # open a test run to submit test results
207
207
  def add_testrail_run
208
- if @testrail_config['include_all?']
208
+ if @testrail_config[:include_all] || true
209
209
 
210
210
  body = {
211
211
  name: test_name,
@@ -276,7 +276,7 @@ module Itriagetestrail
276
276
 
277
277
  def closerun?()
278
278
  true
279
- false if @testrail_config['close_run'] == 'false'
279
+ false if @testrail_config[:close_run] == 'false'
280
280
  end
281
281
 
282
282
  def shutdown
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
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: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069