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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cad6184f1a5fa47bc5991c5b6b31885d2afc9878e45b1e07a66752f3c7083c73
4
- data.tar.gz: 8ad13387193ae20005ace29aae75f62ffe251ceaf43209abd85c2b8df6d832eb
3
+ metadata.gz: 83dae4e0a58a5ec9ec18b68fe441ab358496912b26c8993f7a29eb1fc8079504
4
+ data.tar.gz: bc82ad37116553668920606298b5e5739a15e6647245c68befba798d96a7f771
5
5
  SHA512:
6
- metadata.gz: 5e2d1ba3e0543713e04ba8432b55482fb8e73684b6bcc7b5040e7a9b2d24ddbd07b512bb9fecd0aa2e543da924de4e13195325a72c5b84bab93b540aa5a590b6
7
- data.tar.gz: 85f3476e6de7ae21ae578f0c3ac0c6f40b367016d092937d0d107f97a0580e2caaf9b1500d2f11a522597633cfc56b42f427964e8326744abafdf77f18b8a5d4
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.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.6)
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
@@ -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 = context
219
+ self.context = current_context
220
220
  all_nodes[object_id] = self
221
221
  end
222
222
 
@@ -1,3 +1,3 @@
1
1
  module NxtSchema
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-01 00:00:00.000000000 Z
11
+ date: 2020-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport