qodex-rails 0.1.19 → 0.1.21

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
  SHA256:
3
- metadata.gz: d46888d7f3aafcafbf52f36ce313e4e84b6e5e0922536601caf9d2b9603872fa
4
- data.tar.gz: 3ab172b7b5c8d8e5e333bb13d0050f1e0d898f2b852d213de938bd7891fbbc69
3
+ metadata.gz: 681f8cc6e6a29026998a275ff079394432d23d9800dd2d3bcf576353ba42c5fd
4
+ data.tar.gz: 4aea4a08aea1a1150f1e26fb0ec59dfb5b97e4624f206f14005808fd7ba31f3d
5
5
  SHA512:
6
- metadata.gz: 7580d3cb6e15c8d36695458dbd28ee15e9bc0428d64cb4a6907e15450addd58dd9a73db99a63d9d1729c3b23b97118a179a7d18376e7bbec3e6f768aa261124e
7
- data.tar.gz: 99e282b18d867d7e5d9596e5e9556fd75f62f635a8c333c838870acb9bb88094bd86a4f41148df6fdfe84e745d773da7c40220d6a0ca0d4b706aa33f2e83f4a0
6
+ metadata.gz: 4b977824049cfb516932a92878b8c1a661459712969b33e8d5af7e3ee3f3bfdce6071634b864d9de1514237fe2232fff46a2e47756f9c4eaaa98fe54d925772f
7
+ data.tar.gz: 15c0c1151c4cccf7d6ccc4f14dda4a0421ab78fbbffea5be303f1b7cd3edea5d46e2e067d9b4a4563241303e1d2668157ff7a5a87f73fb6110259833190c1b1d
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Qodex
4
4
  module Rails
5
- VERSION = "0.1.19"
5
+ VERSION = "0.1.21"
6
6
  end
7
7
  end
@@ -43,7 +43,8 @@ module QodexRails
43
43
  # Capture the request details
44
44
  request = Rack::Request.new(env)
45
45
  status, headers, response = @app.call(env)
46
- response_content_type = response.instance_eval('@response')&.headers['content-type']
46
+ response_headers = response.instance_eval('@response')&.headers
47
+ response_content_type = response_headers['content-type'] if response_headers.present?
47
48
  if response_content_type.present? && !(response_content_type.include?('application/json'))
48
49
  return [status, headers, response]
49
50
  end
@@ -65,6 +66,10 @@ module QodexRails
65
66
  response_headers = extract_headers(headers)
66
67
  request_params = request.params.merge(additional_info)
67
68
 
69
+ raw_request_body = request.body.read
70
+ request_body = JSON.parse(raw_request_body) if raw_request_body.present?
71
+ request_params = request_params.merge(request_body) if request_body.present?
72
+
68
73
  request_headers = MaskingUtil.mask_data(request_headers, pii_masking)
69
74
  response_headers = MaskingUtil.mask_data(response_headers, pii_masking)
70
75
  request_params = MaskingUtil.mask_data(request_params, pii_masking)
@@ -1,3 +1,3 @@
1
1
  module QodexRails
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.21"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qodex-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - sid
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-14 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Intercept your rails application to power Qodex.ai AI copilot.
14
14
  email: