nxt_support 0.4.1 → 0.4.3

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: ea9c53b87505a7b31250e050d6b4e4adb3c0504f520e5f552a484a1a450b551c
4
- data.tar.gz: 97ae0e288c2ad44fc9ab163917f12d159a3ac3810c086ad7e65dcc4c5325e5c1
3
+ metadata.gz: f312406bd8279693e902e38435d9ecec8e0e3d15c1e522d91c4a5cd75e4f4ced
4
+ data.tar.gz: 0bb1c82b792322ecab97f89093295b17c4f9c5e2223a71584aca23b4b672a95a
5
5
  SHA512:
6
- metadata.gz: e16ed8f33f905dcd5825d2272900174eae43b96595d73f5abf8c153899d0438c88c22473eb158253f2f87d4d7934467a50e465686ad99927b33e5456c9aeb5d8
7
- data.tar.gz: 8207471f7c5380671c1ff643cf32d438e30d79b8e5c674eaaa2df0688f63e224f3f4b2ba7229cc6473ec743deef0a88ca15d69374e33017f4071dcdb11a711ee
6
+ metadata.gz: 92bf3e5ec6c83fe1f713973d4528b1a85b7c83573f86121b3fbe03e8586820c63e56369911d84031a62af5ca2db72bc50baaac2a45a29e270936d9154671f58b
7
+ data.tar.gz: 0b883a1c2bbb8e0b7a6040569204676f4d5beec2b41514d791a1545863cd7c41d4394f8a1619b61956058cb6fa5d2038db6403857fb5cbe71f6a040dac6d77a4
data/.circleci/config.yml CHANGED
@@ -10,7 +10,7 @@ workflows:
10
10
  - build:
11
11
  matrix:
12
12
  parameters:
13
- ruby-version: ["3.0.2", "3.1.2"]
13
+ ruby-version: ["3.0.2", "3.1.3", "3.2.1"]
14
14
  orbs:
15
15
  ruby: circleci/ruby@2.0.0
16
16
 
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .idea/
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.2
1
+ 3.2.1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.4.3 2023-03-22
2
+ - `Sentry-Error-Id`: Don't assume status code is an Integer
3
+
4
+ # v0.4.2 2022-12-19
5
+ - `Sentry-Error-Id`: Set `Access-Control-Expose-Headers` so frontend can access header
6
+
1
7
  # v0.4.1 2022-11-18
2
8
  - Rename header to `Sentry-Error-Id` for consistency
3
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_support (0.4.1)
4
+ nxt_support (0.4.3)
5
5
  activerecord
6
6
  activesupport
7
7
  nxt_init
@@ -10,23 +10,23 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (7.0.4)
14
- activesupport (= 7.0.4)
15
- activerecord (7.0.4)
16
- activemodel (= 7.0.4)
17
- activesupport (= 7.0.4)
18
- activesupport (7.0.4)
13
+ activemodel (7.0.4.3)
14
+ activesupport (= 7.0.4.3)
15
+ activerecord (7.0.4.3)
16
+ activemodel (= 7.0.4.3)
17
+ activesupport (= 7.0.4.3)
18
+ activesupport (7.0.4.3)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
20
  i18n (>= 1.6, < 2)
21
21
  minitest (>= 5.1)
22
22
  tzinfo (~> 2.0)
23
23
  coderay (1.1.3)
24
- concurrent-ruby (1.1.10)
24
+ concurrent-ruby (1.2.2)
25
25
  diff-lcs (1.4.4)
26
26
  i18n (1.12.0)
27
27
  concurrent-ruby (~> 1.0)
28
28
  method_source (1.0.0)
29
- minitest (5.16.3)
29
+ minitest (5.18.0)
30
30
  nxt_init (0.1.5)
31
31
  activesupport
32
32
  nxt_registry (0.3.10)
@@ -51,7 +51,7 @@ GEM
51
51
  rspec_junit_formatter (0.4.1)
52
52
  rspec-core (>= 2, < 4, != 2.12.0)
53
53
  sqlite3 (1.4.2)
54
- tzinfo (2.0.5)
54
+ tzinfo (2.0.6)
55
55
  concurrent-ruby (~> 1.0)
56
56
 
57
57
  PLATFORMS
@@ -7,8 +7,10 @@ module NxtSupport
7
7
 
8
8
  def call(env)
9
9
  status, headers, body = @app.call(env)
10
- if status >= 500 && env['sentry.error_event_id']
11
- headers["Sentry-Error-Id"] = env['sentry.error_event_id']
10
+ if status && status.to_i >= 500 && env['sentry.error_event_id']
11
+ headers['Sentry-Error-Id'] = env['sentry.error_event_id']
12
+ exposed_headers = headers['Access-Control-Expose-Headers'] || headers['access-control-expose-headers']
13
+ headers['Access-Control-Expose-Headers'] = [exposed_headers, 'Sentry-Error-Id'].compact.join(', ')
12
14
  end
13
15
  [status, headers, body]
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module NxtSupport
2
- VERSION = "0.4.1".freeze
2
+ VERSION = "0.4.3".freeze
3
3
  end
data/lib/nxt_support.rb CHANGED
@@ -8,7 +8,9 @@ require "nxt_support/serializers"
8
8
  require "nxt_support/util"
9
9
  require "nxt_support/services"
10
10
  require "nxt_support/refinements"
11
- require "nxt_support/middleware"
11
+
12
+ require 'nxt_support/middleware/sentry_error_id'
13
+
12
14
 
13
15
  module NxtSupport
14
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nils Sommer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-11-21 00:00:00.000000000 Z
14
+ date: 2023-03-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord
@@ -165,7 +165,6 @@ files:
165
165
  - bin/rspec
166
166
  - bin/setup
167
167
  - lib/nxt_support.rb
168
- - lib/nxt_support/middleware.rb
169
168
  - lib/nxt_support/middleware/sentry_error_id.rb
170
169
  - lib/nxt_support/models.rb
171
170
  - lib/nxt_support/models/assignable_values.rb
@@ -215,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
214
  - !ruby/object:Gem::Version
216
215
  version: '0'
217
216
  requirements: []
218
- rubygems_version: 3.2.22
217
+ rubygems_version: 3.4.6
219
218
  signing_key:
220
219
  specification_version: 4
221
220
  summary: Support through reusable Mixins and Helpers for Ruby on Rails Applications
@@ -1 +0,0 @@
1
- require_relative 'middleware/sentry_error_id'