exis_ray 0.6.1 → 0.7.0

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: 2b8dea5e0b236f90177ce536cf1226b37b21c778ee6891dc0276756f9b972fc8
4
- data.tar.gz: a8409a1e92f2494535f9e0512f1b47e8cc0bd841335e9b98d6b19ce20ebab08d
3
+ metadata.gz: 4d47537d3546186dc63b89364ac8b20acc576740ee8f162e2e027f502b708442
4
+ data.tar.gz: 29efb7af2f8922ba0538b18061f1dad15487ae5b2bee0aadbe52798c99527b28
5
5
  SHA512:
6
- metadata.gz: 3ad2bcc7d459c05efefd0e30b0701be99cf82477e843f233b4f62c36e56c4ba183a53d6097e6f461dd253bf07a8776da093c59396cbe0fc16948a0b0db813cc1
7
- data.tar.gz: 297abed5f6adf6a799dd1b6a329833bd1433e1c7383aa364081677025f64b63a05d5b23fc6ae96bb2db0fa6a72d0544622a2820580568429f6433702d8aed0a6
6
+ metadata.gz: 0f43da2228a73dfa26d18fbe94f72d4084a1409f84b0b864511c3bba95df39a7d8b45632aba6f74c66e1b8399dce8bda7f2f4c512634251b37709ecaf775b90e
7
+ data.tar.gz: 69ea8d448ba507e17cb18a5f11d9934ef08fa96f25064c443cfac2747e3ef00adc4540f9028dbb3a2b24ef38df303309f2e30141ee19e7d5c656ebee9b6b84a9
@@ -56,8 +56,8 @@ module ExisRay
56
56
  def initialize
57
57
  @trace_header = "HTTP_X_AMZN_TRACE_ID"
58
58
  @propagation_trace_header = "X-Amzn-Trace-Id"
59
- @reporter_class = "Reporter"
60
- @current_class = "Current"
59
+ @reporter_class = nil
60
+ @current_class = nil
61
61
  @log_format = :text
62
62
  @log_subscriber_class = nil
63
63
  @service_version = default_service_version
@@ -38,22 +38,21 @@ module ExisRay
38
38
  # 3. Integraciones Post-Boot y Forzado de Formateadores
39
39
  # Se ejecuta una vez que las gemas y el entorno de Rails están completamente cargados.
40
40
  config.after_initialize do
41
- # Validación de configuración: solo cuando eager_load=true (producción/staging),
42
- # donde todos los constantes de app/ están garantizados. En desarrollo con lazy
43
- # loading las clases pueden no estar cargadas aún en este punto.
44
- if Rails.application.config.eager_load
45
- if (name = ExisRay.configuration.current_class).present?
46
- klass = name.safe_constantize
47
- unless klass&.<=(ExisRay::Current)
48
- raise "ExisRay: current_class '#{name}' not found or doesn't inherit from ExisRay::Current"
49
- end
41
+ # Validación de configuración: verificamos que las clases configuradas
42
+ # hereden de los tipos base. Usamos warn en lugar de raise porque en
43
+ # Rails 8.1+ after_initialize puede correr antes de eager_load!,
44
+ # y safe_constantize puede fallar aún con eager_load=true.
45
+ if (name = ExisRay.configuration.current_class).present?
46
+ klass = name.safe_constantize
47
+ if klass && !klass.<=(ExisRay::Current)
48
+ raise "ExisRay: current_class '#{name}' does not inherit from ExisRay::Current"
50
49
  end
50
+ end
51
51
 
52
- if (name = ExisRay.configuration.reporter_class).present?
53
- klass = name.safe_constantize
54
- unless klass&.<=(ExisRay::Reporter)
55
- raise "ExisRay: reporter_class '#{name}' not found or doesn't inherit from ExisRay::Reporter"
56
- end
52
+ if (name = ExisRay.configuration.reporter_class).present?
53
+ klass = name.safe_constantize
54
+ if klass && !klass.<=(ExisRay::Reporter)
55
+ raise "ExisRay: reporter_class '#{name}' does not inherit from ExisRay::Reporter"
57
56
  end
58
57
  end
59
58
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module ExisRay
4
4
  # Versión actual de la gema.
5
- VERSION = "0.6.1"
5
+ VERSION = "0.7.0"
6
6
  end
@@ -14,12 +14,12 @@ RSpec.describe ExisRay::Configuration do
14
14
  expect(config.propagation_trace_header).to eq("X-Amzn-Trace-Id")
15
15
  end
16
16
 
17
- it "reporter_class por defecto es Reporter" do
18
- expect(config.reporter_class).to eq("Reporter")
17
+ it "reporter_class por defecto es nil" do
18
+ expect(config.reporter_class).to be_nil
19
19
  end
20
20
 
21
- it "current_class por defecto es Current" do
22
- expect(config.current_class).to eq("Current")
21
+ it "current_class por defecto es nil" do
22
+ expect(config.current_class).to be_nil
23
23
  end
24
24
 
25
25
  it "log_format por defecto es :text" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exis_ray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Edera
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-06 00:00:00.000000000 Z
11
+ date: 2026-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -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.6.1/CHANGELOG.md
91
- documentation_uri: https://github.com/gedera/exis_ray/blob/v0.6.1/skill
90
+ changelog_uri: https://github.com/gedera/exis_ray/blob/v0.7.0/CHANGELOG.md
91
+ documentation_uri: https://github.com/gedera/exis_ray/blob/v0.7.0/skill
92
92
  post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths: