cukerail 0.4.0 → 0.4.1

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: ecd3ab994dc1ef75c983e2bb539856039eb59e2c
4
- data.tar.gz: a912228bc1cc3844acfbd0471b2479c6aca829aa
3
+ metadata.gz: 7248facbbb1f895cb262dbc9385e5e865802af17
4
+ data.tar.gz: 593b702476a011652a0aeaf388e7ddb77d09f688
5
5
  SHA512:
6
- metadata.gz: f126d6ef8519d0c6364619d3f10003f77e4af5d590fff30db4b0df6d24679937811beb11ed1911e0245fae32f45fc5d394bf10ae711a14dc905cf441bd998384
7
- data.tar.gz: 1c923b752e530f1c816639dfe964e79ff4fc7fb5e2d3fb57a6c112c7b06f15ac5fae8501fbc9bba766f0217564c02a1b3e33fc660c02cb632ca439c9d9de0e75
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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Cukerail
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukerail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Small