evervault 1.3.1 → 1.3.2

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: 291427781e97ac0ab65b8613c8e0f5255244c72ec826fb7cb0dc787c0931624f
4
- data.tar.gz: bc8bae94e62c9ffb65bb81bd14e1d3bc576c6f083e37c4f23bb6a0bf20ef1d4b
3
+ metadata.gz: 2df77a79ce53a19ab616f270d0cef3fd7639e23bf4b25a2cd75bb5b70e95dbc4
4
+ data.tar.gz: 71a830838eaa042e50299b827826327a7b6ed48b3a747ab395746afce754d7e6
5
5
  SHA512:
6
- metadata.gz: 913ed8d651d680952deff0d635f4b3fc304b1154100093b7f8c40a8314fbcbfae4a1a5b1ae575cbc4e01f144917adf989601b45d81544835c9d28344ea66cac6
7
- data.tar.gz: 658289523da203f6b7cac915bc410efe6e107b736badf548367bc05183c89dd3a2c0d7f168f14842bc298b833bfd831efe0ae3bfebbc43821c52607f37d8deff
6
+ metadata.gz: f1cd19d8dc2d3c09a8a10958119bb788082b809dd50aec730562116b2146f1b84d33d0e234bd86529ff982d3148749a428041c0e43ea35da733b4a32eb4f922b
7
+ data.tar.gz: 17e6c1952d3af892c05a90b2165ee71a8849ae0cea637635c0914f23335a28b450ba9c326e0b9b60f325cd9ee50c5333e19892ec11195a30e35370972b19f222
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ Gemfile.lock
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -46,7 +46,7 @@ module NetHTTPOverride
46
46
  end
47
47
  end
48
48
 
49
- def connect
49
+ def connect_with_intercept
50
50
  if NetHTTPOverride.should_decrypt(conn_address)
51
51
  @cert_store = OpenSSL::X509::Store.new
52
52
  @cert_store.add_cert(@@cert)
@@ -54,19 +54,25 @@ module NetHTTPOverride
54
54
  @proxy_address = @@relay_url
55
55
  @proxy_port = @@relay_port
56
56
  end
57
- super
57
+ connect_without_intercept
58
58
  end
59
59
 
60
- def request(req, body = nil, &block)
60
+ def request_with_intercept(req, body = nil, &block)
61
61
  should_decrypt = NetHTTPOverride.should_decrypt(@address)
62
62
  if should_decrypt
63
63
  req["Proxy-Authorization"] = @@api_key
64
64
  end
65
- super
65
+ request_without_intercept(req, body, &block)
66
66
  end
67
67
  end
68
68
 
69
- Net::HTTP.send :prepend, NetHTTPOverride
69
+ Net::HTTP.class_eval do
70
+ include NetHTTPOverride
71
+ alias_method :request_without_intercept, :request
72
+ alias_method :request, :request_with_intercept
73
+ alias_method :connect_without_intercept, :connect
74
+ alias_method :connect, :connect_with_intercept
75
+ end
70
76
 
71
77
  module Evervault
72
78
  module Http
@@ -1,4 +1,4 @@
1
1
  module Evervault
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  EV_VERSION = {"prime256v1" => "NOC", "secp256k1" => "DUB"}
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evervault
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonny O'Mahony
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-28 00:00:00.000000000 Z
11
+ date: 2023-04-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: