activeerror 2.0.0 → 2.1.0

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: f62d898e9e3ecefbee847720c5b0c494a175946ea248f380762ff9ff413a6e8e
4
- data.tar.gz: ad82c8c07a1c2815c7a0ad58628a476f7e2d754682d8a09c45ce6e62cd930947
3
+ metadata.gz: 8863be8933a7fabe7cf1a290850f48945386d423bcf4e9af26b586d79a91a4a2
4
+ data.tar.gz: 4f74875e89add4919da890e32991c3487a4bec173d444c562f68fbb66c42adb8
5
5
  SHA512:
6
- metadata.gz: fbbc8303ef12d3fc39d88d8320fb3b181eb08bd40cf8ebdd0da969bdd1f0f3e30f49d449838593656b319bbe07ed4b7630cec2adbadf58f36ed64043a078383f
7
- data.tar.gz: 115594a0e228fc55d627c85ef2a0a081d6855e194f15a0741fbc5a54add7b2bd43cc9761ed5b6ed658243bef513d9eb8b3ce17bf7c9f18ff743dc7af5d1032eb
6
+ metadata.gz: 7d5b80abc31ed68518b39378a2d1c51887ece3a2cae2d4d3b93faaafc07bbdbc1910807ef80c3b3ad8f4d107c9868408153e0f5ff7e4212c5f5de3dded0fcf3b
7
+ data.tar.gz: 48d4a99d59716a84e24074b9eda55aa5a84b113398989a9b8f32bd64692a5752dad21ebc6eda2d477c89edd17ee1a905222c9ac189c42255f39c0581ab512837
@@ -8,6 +8,7 @@ module ActiveError
8
8
 
9
9
  serialize :parameters, coder: JSON
10
10
  serialize :headers, coder: JSON
11
+ serialize :session, coder: JSON
11
12
 
12
13
  delegate :browser, :platform, :version, to: :user_agent
13
14
 
@@ -16,7 +17,9 @@ module ActiveError
16
17
  end
17
18
 
18
19
  def request
19
- @request ||= ActionDispatch::Request.new(request_env)
20
+ @request ||= ActionDispatch::Request.new(request_env).tap do |req|
21
+ req.session = session
22
+ end
20
23
  end
21
24
 
22
25
  private
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddSessionToInstances < ActiveRecord::Migration[7.2]
4
+ def change
5
+ add_column :active_error_instances, :session, :binary, limit: 10.megabytes
6
+ end
7
+ end
@@ -74,7 +74,7 @@ module ActiveError
74
74
  slice(*ActionDispatch::Request::ENV_METHODS, "HTTP_USER_AGENT")
75
75
 
76
76
  fault.instances.create(headers:, parameters: request&.filtered_parameters,
77
- url: request&.url)
77
+ url: request&.url, session: request.session.to_h)
78
78
  end
79
79
 
80
80
  def controller
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveError
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeerror
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-11 00:00:00.000000000 Z
11
+ date: 2024-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -66,6 +66,7 @@ files:
66
66
  - config/routes.rb
67
67
  - db/migrate/20200727220359_create_active_error_faults.rb
68
68
  - db/migrate/20200727225318_create_active_error_instances.rb
69
+ - db/migrate/20241218160110_add_session_to_instances.rb
69
70
  - lib/active_error.rb
70
71
  - lib/active_error/captor.rb
71
72
  - lib/active_error/engine.rb