nxt_error_registry 0.1.5 → 0.1.6
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/Gemfile.lock +2 -2
- data/lib/nxt_error_registry.rb +4 -1
- data/lib/nxt_error_registry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e90b9c5755bebb707489b4b5c270bcf26c8703f721279a923e4042a448e8c758
|
4
|
+
data.tar.gz: bd0a76e88555845710bc574d3e2a5dada933762749e2b07c1f27abef477d282e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0605b0b3be701bddc74c2c7ab06a69fb9c99d6ec34fdc4e31ef631111a03677d732eaa414ec098213f3287a2a7ef153d901dfbe51cd3bb6e55837ea36695e794
|
7
|
+
data.tar.gz: 8519e511e66c6708d040b38c237061d6864f2afe80486135d35b0b3d06f8d7d320575beded9b360a76a0cb03d60c88886c26d550314f0b9215d062f500305479
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nxt_error_registry (0.1.
|
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.
|
89
|
+
nokogiri (1.10.10)
|
90
90
|
mini_portile2 (~> 2.4.0)
|
91
91
|
pry (0.13.1)
|
92
92
|
coderay (~> 1.1)
|
data/lib/nxt_error_registry.rb
CHANGED
@@ -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
|
|
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.
|
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-
|
13
|
+
date: 2020-07-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|