activeerror 2.0.0 → 2.1.1

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: 54ed854bd531c5d5b47a621fa7d3a18a83bb3284f96a2f61c21c104d2790cd13
4
+ data.tar.gz: 6abe360d810a8f1811afd32775fc65996cf400b1e33f46f14af25a72edabb4ac
5
5
  SHA512:
6
- metadata.gz: fbbc8303ef12d3fc39d88d8320fb3b181eb08bd40cf8ebdd0da969bdd1f0f3e30f49d449838593656b319bbe07ed4b7630cec2adbadf58f36ed64043a078383f
7
- data.tar.gz: 115594a0e228fc55d627c85ef2a0a081d6855e194f15a0741fbc5a54add7b2bd43cc9761ed5b6ed658243bef513d9eb8b3ce17bf7c9f18ff743dc7af5d1032eb
6
+ metadata.gz: 2232619e10d0e362be3e83bf0f89fb0f6807f2e640fe51ada11efca280d7372e82dad1028b58b6a7a7eb8019010c5df49f41fbf61fb58bb62d89606fbe766830
7
+ data.tar.gz: 950e67827bd8b603eb49ce8e9b05399c4b7251c25f53895f8f1df5c96062b81e7db95bf0a6ecedd680b4b6a47a39b034cf103d0c1b60d0b83de200dc3d7c2807
@@ -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.presence || {}
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.1"
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.1
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