nxt_error_registry 0.1.5 → 0.1.6

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: 81f8e5f082ad4102b8169a7a2d32b64c6d18c76d540d02633079c17810aa77fc
4
- data.tar.gz: cd5ed061fa59e185f02713c6c23819908c63e7a620825aa19423e13874e5242f
3
+ metadata.gz: e90b9c5755bebb707489b4b5c270bcf26c8703f721279a923e4042a448e8c758
4
+ data.tar.gz: bd0a76e88555845710bc574d3e2a5dada933762749e2b07c1f27abef477d282e
5
5
  SHA512:
6
- metadata.gz: c847511610fc594af7f6d9089a8acb67eafe593cced55739f0bba19d3c9760bda35e7011dd90216030ef5265877ac3c23473a26455f2b2c3709fd873c2fc35bd
7
- data.tar.gz: 7512647e36c7c21bf3c45e5ec933bd82240f7ec1515c687a4769725da6490b9123f46a9d756783d923a95d6bd1b4423d3cb192a04c6d4071f63cc6275f42d277
6
+ metadata.gz: 0605b0b3be701bddc74c2c7ab06a69fb9c99d6ec34fdc4e31ef631111a03677d732eaa414ec098213f3287a2a7ef153d901dfbe51cd3bb6e55837ea36695e794
7
+ data.tar.gz: 8519e511e66c6708d040b38c237061d6864f2afe80486135d35b0b3d06f8d7d320575beded9b360a76a0cb03d60c88886c26d550314f0b9215d062f500305479
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_error_registry (0.1.5)
4
+ nxt_error_registry (0.1.6)
5
5
  activesupport (< 6.1)
6
6
  rails (< 6.1)
7
7
 
@@ -86,7 +86,7 @@ GEM
86
86
  mini_portile2 (2.4.0)
87
87
  minitest (5.14.1)
88
88
  nio4r (2.5.2)
89
- nokogiri (1.10.9)
89
+ nokogiri (1.10.10)
90
90
  mini_portile2 (~> 2.4.0)
91
91
  pry (0.13.1)
92
92
  coderay (~> 1.1)
@@ -20,9 +20,12 @@ module NxtErrorRegistry
20
20
  inherited_options = type.try(:options) || {}
21
21
  inherited_options.merge(opts)
22
22
  end
23
- error_class.delegate :code, to: :class
24
23
 
25
24
  const_set(name, error_class)
25
+ # Calling `delegate` before `const_set` would rip off the modules from the error class.
26
+ # e.g. `Module1::Module2::MyError` would become `MyError`.
27
+ error_class.delegate :code, to: :class
28
+
26
29
  entry = { code: code, error_class: error_class, type: type, name: name, namespace: self.to_s, opts: opts }
27
30
  error_registry[name.to_s] = entry
28
31
 
@@ -1,3 +1,3 @@
1
1
  module NxtErrorRegistry
2
- VERSION = "0.1.5".freeze
2
+ VERSION = "0.1.6".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_error_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Robecke
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2020-07-03 00:00:00.000000000 Z
13
+ date: 2020-07-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler