alinta-testing 0.3.3 → 0.3.4

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: 6893363de4ee55ad64f68ad9ae968f716aa19b0d1dffe170d3d1fe46e1d0ad2c
4
- data.tar.gz: 6651854f1ea0427403f7989c3eefd05c664b7b98c7d6a71ecabb006545eba403
3
+ metadata.gz: e9cad859ef47215c881d88b1938cc97f5f9d8ff0562474abe0c6e5f95df3d677
4
+ data.tar.gz: a8815c324dfa01bfbe1719789446a1f55c05d8c7ca4938f2361fe317e354b8ec
5
5
  SHA512:
6
- metadata.gz: 57e4347c0d3235c7c801f3abd4cf7e0c8a4bc24c88921280780e052c240626a3390d6a1c58a796102470c5ef29045bb0341af560553ff42385371cb04cac5415
7
- data.tar.gz: 02b71de443974da02b7fefee28f397d27fcbe59b4cc3904af9d8d1c540443d6a7f16747cbfbc6b601ce71fb72aba29e17cfded6ce757352fd032b6ef8e9c7474
6
+ metadata.gz: 747694d8c4d2da4cde8548c3f385b24929a23f13fe1b80fec7e2c032906c795633f8aa87144bac73807aecf044fa3b3caa5b6cf1fd06fae4ef1d947257ece7e6
7
+ data.tar.gz: b2a116be23c407858278b8b7b6b2d29294ab346a810e932f0ff7dac16106b3bfad0316d0cf0881fa88ae1059f615a08a84fa0e42877b9cbebcd0673ab71e5979
@@ -29,3 +29,34 @@ def parse_attributes(hashes)
29
29
  hash.deep_merge!(new_hash) { |_, old, new| new.is_a?(Array) ? merge_arrays(old, new) : new }
30
30
  end
31
31
  end
32
+
33
+ module RestClient
34
+
35
+ # A global setting to verify ssl certs for all requests. This can be overridden on a
36
+ # per-request basis by passing `:verify_ssl` to RestClient::Request.
37
+ def self.verify_ssl
38
+ @verify_ssl ||= nil
39
+ end
40
+
41
+ def self.verify_ssl=(value)
42
+ @verify_ssl = value
43
+ @verify_ssl_set = true
44
+ end
45
+
46
+ class Request
47
+
48
+ def verify_ssl
49
+ if RestClient.verify_ssl_set?
50
+ if RestClient.verify_ssl
51
+ OpenSSL::SSL::VERIFY_PEER
52
+ else
53
+ OpenSSL::SSL::VERIFY_NONE
54
+ end
55
+ else
56
+ @ssl_opts.fetch(:verify_ssl)
57
+ end
58
+ end
59
+
60
+ end
61
+
62
+ end
@@ -1,3 +1,3 @@
1
1
  module AlintaTesting
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -1,2 +1,6 @@
1
1
  require 'alinta-testing/steps'
2
2
  require 'alinta-testing/overrides'
3
+
4
+ if ENV['bypass_ssl_verification'] != nil && ENV['bypass_ssl_verification'] == "true"
5
+ RestClient.verify_ssl = false
6
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alinta-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hosking
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-06 00:00:00.000000000 Z
11
+ date: 2019-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-rest-bdd