nxt_support 0.4.0 → 0.4.2

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: 8577e3b91d6cd1cea9c28349d5e481ab4f81c30198789c52caa40f13e8168532
4
- data.tar.gz: a18e89a30f8b6b5f80ecfb87a890c47d91dc9c83e37df3c327cd0c528da6603a
3
+ metadata.gz: 7328933d44f33869979bcb80db3226e80e5222f584e77f6da99334fedf24e201
4
+ data.tar.gz: 0bfb17e61361492c71f740669bf1a9ed5328c590f3063f47801111b2c4a38061
5
5
  SHA512:
6
- metadata.gz: 2e70de03013d77d839ecd688de1328613150e8a34ed433ca31667d7bffbc9db1d1a9d79244f1aea54d96faabbcb03785f6c069a9db41a74c35638fe3d329baae
7
- data.tar.gz: fcfab017df81cad9ef30262a95710158b7045e396f22fc11b8710ac808aa33c074c6c31a3a74bd1f64dd4a421c819aa3abbd2c238295b206fcb7e39b6bba0c74
6
+ metadata.gz: 19f986e57851b612d9efc5e67bc49d29d53f081d460b2100db1675e296b4af9f9f675c0c9daac432b516d3292a7f857359b9f520a4cbe4366e0b4eafef7e3598
7
+ data.tar.gz: 33b75c6b866e473b5e8eae0f7456641896d80c195b0498b2a286f013d0a4391494aa26772bc71557b6be1e84d854b22820737b25700079b21380bdf712639c95
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .idea/
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_support (0.4.0)
4
+ nxt_support (0.4.2)
5
5
  activerecord
6
6
  activesupport
7
7
  nxt_init
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`. 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).
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["Sentry-Error-ID"] = 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.0".freeze
2
+ VERSION = "0.4.2".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.0
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-11-14 00:00:00.000000000 Z
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'