cukerail 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cukerail.rb +1 -1
- data/lib/cukerail/testrail.rb +5 -2
- data/lib/cukerail/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7248facbbb1f895cb262dbc9385e5e865802af17
|
4
|
+
data.tar.gz: 593b702476a011652a0aeaf388e7ddb77d09f688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb37412b4e1182fc77ee36a67c1e353e8c973bec777f706b48734ab7caa5e39cfc1fa22ba88ff7321a2e69463f1728376c31926bd9ca611f3a86e5919ac0d3fb
|
7
|
+
data.tar.gz: f7929df5782db7ad90ad54401750171593232b7f293acc8e6f8d1b6da077712f43e5c0f6edaa108cbb7aa6ed01ac876fbea9b4e91d7a2badc3dae628e3607884
|
data/lib/cukerail.rb
CHANGED
@@ -11,7 +11,7 @@ module Cukerail
|
|
11
11
|
if %w(BASE_URL USER PASSWORD).map{|e| ENV["TESTRAIL_#{e}"]}.any?{|e| e=='' || !e}
|
12
12
|
raise 'You need to setup Testrail environment parameters see https://bbcworldwide.atlassian.net/wiki/display/BAR/Installing+and+Running+Cukerail'
|
13
13
|
end
|
14
|
-
@testrail_api_client = TestRail::APIClient.new(ENV['TESTRAIL_BASE_URL'],ENV['TESTRAIL_USER'],ENV['TESTRAIL_PASSWORD'])
|
14
|
+
@testrail_api_client = TestRail::APIClient.new(ENV['TESTRAIL_BASE_URL'],ENV['TESTRAIL_USER'],ENV['TESTRAIL_PASSWORD'],ENV['TESTRAIL_PROXY_URL'],ENV['TESTRAIL_PROXY_PORT'])
|
15
15
|
end
|
16
16
|
|
17
17
|
def after_test_case(test_case,result)
|
data/lib/cukerail/testrail.rb
CHANGED
@@ -23,13 +23,15 @@ module TestRail
|
|
23
23
|
attr_accessor :user
|
24
24
|
attr_accessor :password
|
25
25
|
|
26
|
-
def initialize(base_url,user,password)
|
26
|
+
def initialize(base_url,user,password,proxy_url=nil,proxy_port=nil)
|
27
27
|
if !base_url.match(/\/$/)
|
28
28
|
base_url += '/'
|
29
29
|
end
|
30
30
|
@url = base_url + 'index.php?/api/v2/'
|
31
31
|
@user ||=user
|
32
32
|
@password ||=password
|
33
|
+
@proxy_url ||= proxy_url
|
34
|
+
@proxy_port ||= proxy_port
|
33
35
|
end
|
34
36
|
|
35
37
|
#
|
@@ -76,7 +78,8 @@ module TestRail
|
|
76
78
|
request.basic_auth(@user, @password)
|
77
79
|
request.add_field('Content-Type', 'application/json')
|
78
80
|
|
79
|
-
conn = Net::HTTP.new(url.host, url.port)
|
81
|
+
conn = Net::HTTP.new(url.host, url.port,@proxy_url,@proxy_port)
|
82
|
+
|
80
83
|
if url.scheme == 'https'
|
81
84
|
conn.use_ssl = true
|
82
85
|
conn.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
data/lib/cukerail/version.rb
CHANGED