nxt_schema 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +1 -0
- data/lib/nxt_schema/node/base.rb +3 -3
- data/lib/nxt_schema/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: 83dae4e0a58a5ec9ec18b68fe441ab358496912b26c8993f7a29eb1fc8079504
|
4
|
+
data.tar.gz: bc82ad37116553668920606298b5e5739a15e6647245c68befba798d96a7f771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e03262430dcb11ab76da8ec2a6dc295d964a59e679a9fd8ba5492e5618a43769d16e9282b13091656aeb9cad932fa2adc5a31899b4b9ca8963eceb5b47b34b41
|
7
|
+
data.tar.gz: 28755070f8df4c055a14f3129d95bf5fdbc306d49737b21125ea94cff82ee419e34894517fb77c0a12e793ce338a2d6a502fb218a25b62103b502ed2befc758a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nxt_schema (0.1.
|
4
|
+
nxt_schema (0.1.2)
|
5
5
|
activesupport
|
6
6
|
dry-types
|
7
7
|
nxt_registry
|
@@ -67,7 +67,7 @@ GEM
|
|
67
67
|
rspec-support (~> 3.8.0)
|
68
68
|
rspec-support (3.8.2)
|
69
69
|
thread_safe (0.3.6)
|
70
|
-
tzinfo (1.2.
|
70
|
+
tzinfo (1.2.7)
|
71
71
|
thread_safe (~> 0.1)
|
72
72
|
zeitwerk (2.3.0)
|
73
73
|
|
data/README.md
CHANGED
@@ -376,6 +376,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
376
376
|
|
377
377
|
### TODO:
|
378
378
|
|
379
|
+
- Flatten schema errors like validation errors
|
379
380
|
- Conditionally required keys:
|
380
381
|
required bool => required
|
381
382
|
required conditionally => condition applies => required
|
data/lib/nxt_schema/node/base.rb
CHANGED
@@ -15,7 +15,7 @@ module NxtSchema
|
|
15
15
|
@is_root = parent_node.nil?
|
16
16
|
@root = parent_node.nil? ? self : parent_node.root
|
17
17
|
@errors = {}
|
18
|
-
@context = nil
|
18
|
+
@context = options.fetch(:context, nil)
|
19
19
|
@applied = false
|
20
20
|
@input = nil
|
21
21
|
@value = NxtSchema::Undefined.new
|
@@ -213,10 +213,10 @@ module NxtSchema
|
|
213
213
|
|
214
214
|
private
|
215
215
|
|
216
|
-
def register_node(context)
|
216
|
+
def register_node(current_context = context)
|
217
217
|
return if all_nodes.key?(object_id)
|
218
218
|
|
219
|
-
self.context =
|
219
|
+
self.context = current_context
|
220
220
|
all_nodes[object_id] = self
|
221
221
|
end
|
222
222
|
|
data/lib/nxt_schema/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nxt_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Robecke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|