nxt_support 0.4.0 → 0.4.2
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/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +16 -1
- data/lib/nxt_support/middleware/sentry_error_id.rb +3 -1
- data/lib/nxt_support/version.rb +1 -1
- data/lib/nxt_support.rb +3 -1
- metadata +2 -3
- data/lib/nxt_support/middleware.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7328933d44f33869979bcb80db3226e80e5222f584e77f6da99334fedf24e201
|
4
|
+
data.tar.gz: 0bfb17e61361492c71f740669bf1a9ed5328c590f3063f47801111b2c4a38061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f986e57851b612d9efc5e67bc49d29d53f081d460b2100db1675e296b4af9f9f675c0c9daac432b516d3292a7f857359b9f520a4cbe4366e0b4eafef7e3598
|
7
|
+
data.tar.gz: 33b75c6b866e473b5e8eae0f7456641896d80c195b0498b2a286f013d0a4391494aa26772bc71557b6be1e84d854b22820737b25700079b21380bdf712639c95
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# v0.4.2 2022-12-19
|
2
|
+
- `Sentry-Error-Id`: Set `Access-Control-Expose-Headers` so frontend can access header
|
3
|
+
|
4
|
+
# v0.4.1 2022-11-18
|
5
|
+
- Rename header to `Sentry-Error-Id` for consistency
|
6
|
+
|
1
7
|
# v0.4.0 2022-11-14
|
2
8
|
- Add `SentryErrorID` middleware
|
3
9
|
- Drop support for Ruby 2.x
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -417,7 +417,22 @@ HomeBuilder.build(width: 20, length: 40, height: 15, roof_type: :pitched)
|
|
417
417
|
|
418
418
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
419
419
|
|
420
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
420
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
421
|
+
|
422
|
+
|
423
|
+
First, if you don't want to always log in with your RubyGems password, you can create an API key from the web, and then:
|
424
|
+
|
425
|
+
```shell
|
426
|
+
bundle config set gem.push_key rubygems
|
427
|
+
```
|
428
|
+
|
429
|
+
Add to `~/.gem/credentials` (create if it doesn't exist):
|
430
|
+
|
431
|
+
```shell
|
432
|
+
:rubygems: <your Rubygems API key>
|
433
|
+
```
|
434
|
+
|
435
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
421
436
|
|
422
437
|
## Contributing
|
423
438
|
|
@@ -8,7 +8,9 @@ module NxtSupport
|
|
8
8
|
def call(env)
|
9
9
|
status, headers, body = @app.call(env)
|
10
10
|
if status >= 500 && env['sentry.error_event_id']
|
11
|
-
headers[
|
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
|
data/lib/nxt_support/version.rb
CHANGED
data/lib/nxt_support.rb
CHANGED
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.
|
4
|
+
version: 0.4.2
|
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-
|
14
|
+
date: 2022-12-19 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
|
@@ -1 +0,0 @@
|
|
1
|
-
require_relative 'middleware/sentry_error_id'
|