exis_ray 0.7.0 → 0.7.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/exis_ray/json_formatter.rb +4 -3
- data/lib/exis_ray/version.rb +1 -1
- data/spec/exis_ray/json_formatter_spec.rb +32 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91d6964520e83c2088af45357edf601358d2ffefbff4861ef15e1abaf09a36bc
|
|
4
|
+
data.tar.gz: d276b0753bd7b956662a3f6e1d61cb51d707a9729496f17b8bd4a3ca1bc7fba4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b382e4fcd8171db8771f9f5f8d2238fdf2cd17b2ac4e953c54d06248eab390c321bf37579b954e3965bb7092c0959dcfae999782200ea8cbee487ca6c74b314
|
|
7
|
+
data.tar.gz: a6da50e40e16e4560d6c52e6443b36d2c7ffef5263940b73a3696d7411817ef5990cd26bf625141984694b7d2f824b22fdd88ba2e9072762b721b9e1718a3eaf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [0.7.1] - 2026-04-06
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
- **`JsonFormatter` truncaba valores key=value sin comillas:** `KV_PARSE_RE` usaba `\S+` como fallback, cortando en el primer espacio. Ahora usa un lookahead que extiende el valor hasta el próximo token `key=` o fin de string. Ejemplo: `error_message=wrong number of arguments (given 1, expected 0)` ahora captura el valor completo en vez de truncar a `"wrong"`.
|
|
5
|
+
|
|
1
6
|
## [0.6.1] - 2026-04-05
|
|
2
7
|
|
|
3
8
|
### Added
|
|
@@ -22,8 +22,9 @@ module ExisRay
|
|
|
22
22
|
# Detecta si un string comienza con al menos un par key=value.
|
|
23
23
|
KV_DETECT_RE = /\A\w+=/
|
|
24
24
|
|
|
25
|
-
# Extrae pares key=value de un string. Soporta valores
|
|
26
|
-
|
|
25
|
+
# Extrae pares key=value de un string. Soporta valores entre comillas dobles/simples
|
|
26
|
+
# o valores sin comillas que se extienden hasta el próximo token key= o fin de string.
|
|
27
|
+
KV_PARSE_RE = /(\w+)=("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|(?:(?!\s+\w+=).)+)/
|
|
27
28
|
|
|
28
29
|
# Claves sensibles que deben filtrarse automáticamente según el estándar de Gabriel.
|
|
29
30
|
SENSITIVE_KEYS = /password|pass|passwd|secret|token|api_key|auth/i
|
|
@@ -181,7 +182,7 @@ module ExisRay
|
|
|
181
182
|
val = if value.start_with?('"', "'")
|
|
182
183
|
value[1..-2].to_s.gsub("\\#{value[0]}", value[0])
|
|
183
184
|
else
|
|
184
|
-
value
|
|
185
|
+
value.strip
|
|
185
186
|
end
|
|
186
187
|
|
|
187
188
|
result[key] = cast_value(key, val)
|
data/lib/exis_ray/version.rb
CHANGED
|
@@ -287,6 +287,38 @@ RSpec.describe ExisRay::JsonFormatter do
|
|
|
287
287
|
|
|
288
288
|
expect(result).to eq({ "msg" => "hello world" })
|
|
289
289
|
end
|
|
290
|
+
|
|
291
|
+
it "captura valores sin comillas con espacios hasta el próximo key=" do
|
|
292
|
+
input = "event=unhandled_exception error_class=ArgumentError " \
|
|
293
|
+
"error_message=wrong number of arguments (given 1, expected 0)"
|
|
294
|
+
result = formatter.send(:parse_kv_string, input)
|
|
295
|
+
|
|
296
|
+
expect(result).to eq({
|
|
297
|
+
"event" => "unhandled_exception",
|
|
298
|
+
"error_class" => "ArgumentError",
|
|
299
|
+
"error_message" => "wrong number of arguments (given 1, expected 0)"
|
|
300
|
+
})
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
it "captura valores sin comillas con espacios al final del string" do
|
|
304
|
+
result = formatter.send(:parse_kv_string, "component=exis_ray event=something went wrong")
|
|
305
|
+
|
|
306
|
+
expect(result).to eq({
|
|
307
|
+
"component" => "exis_ray",
|
|
308
|
+
"event" => "something went wrong"
|
|
309
|
+
})
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
it "mezcla valores con y sin comillas correctamente" do
|
|
313
|
+
result = formatter.send(:parse_kv_string, 'event=error msg="hello world" detail=some extra info status=500')
|
|
314
|
+
|
|
315
|
+
expect(result).to eq({
|
|
316
|
+
"event" => "error",
|
|
317
|
+
"msg" => "hello world",
|
|
318
|
+
"detail" => "some extra info",
|
|
319
|
+
"status" => 500
|
|
320
|
+
})
|
|
321
|
+
end
|
|
290
322
|
end
|
|
291
323
|
|
|
292
324
|
describe "#filter_sensitive_hash (privado)" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: exis_ray
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gabriel Edera
|
|
@@ -87,8 +87,8 @@ licenses:
|
|
|
87
87
|
metadata:
|
|
88
88
|
homepage_uri: https://github.com/gedera/exis_ray
|
|
89
89
|
source_code_uri: https://github.com/gedera/exis_ray
|
|
90
|
-
changelog_uri: https://github.com/gedera/exis_ray/blob/v0.7.
|
|
91
|
-
documentation_uri: https://github.com/gedera/exis_ray/blob/v0.7.
|
|
90
|
+
changelog_uri: https://github.com/gedera/exis_ray/blob/v0.7.1/CHANGELOG.md
|
|
91
|
+
documentation_uri: https://github.com/gedera/exis_ray/blob/v0.7.1/skill
|
|
92
92
|
post_install_message:
|
|
93
93
|
rdoc_options: []
|
|
94
94
|
require_paths:
|