cddl 0.10.5 → 0.10.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: b3b0177b945919083ba2e0595570d098809b87839cb86e823dd54c62f225ad6b
4
- data.tar.gz: 45302758ba30682f746f9b515cd293a5ac0883b2b126d6f74cd13a4911286e9e
3
+ metadata.gz: 3b02fb254d6e4df4e6047d010027aaa26a771b49b84aef3468805ddccc173242
4
+ data.tar.gz: ac926b1917d3110dc699b8e1ba06e274e83af5b1d7f46e798a10ac4230a57198
5
5
  SHA512:
6
- metadata.gz: d613c36a0b4e7e1a18c68c1a2c5df9b0c46389936fdc063465bc8c130ba470b5c6467872fd55befa47972ea8cce8362f45a2164e2ee32c02539f29bd45fb1279
7
- data.tar.gz: 6dca2e75e676eb00aba31e03671b2baf37568a2e4eb8fb0b506c8b02829efb88d6efda323891962e6ca3644be4added36482ee555bbf4d13565517c59cbaf397
6
+ metadata.gz: f5b8b90a95241c333583117fd473950da3b57483413d7e2e877706598b83bcf56f1906287f672bd4841a536df4573f565136e50e3a013a457d1010d94a8ddc26
7
+ data.tar.gz: 3580422c347a20d6c7bd00eab7ea34bf67feee9b766122595319fc3338d8b1dbc4f62bdee58d5e394961135e43703d246d718ede6f52ce21b2363376be062354
data/cddl.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'cddl'
3
- s.version = '0.10.5'
3
+ s.version = '0.10.6'
4
4
  s.summary = "CDDL generator and validator."
5
5
  s.description = %{A parser, generator, and validator for CDDL}
6
6
  s.add_dependency('cbor-diag')
data/lib/cddl.rb CHANGED
@@ -1233,11 +1233,11 @@ module CDDL
1233
1233
  case where[2]
1234
1234
  when nil
1235
1235
  # XXX
1236
- fail
1236
+ fail [:valnil, d, where].inspect
1237
1237
  when 25, 26, 27
1238
1238
  Float === d
1239
1239
  else
1240
- fail
1240
+ fail [:val7, d, where].inspect
1241
1241
  end
1242
1242
  end
1243
1243
  else
@@ -1583,7 +1583,7 @@ module CDDL
1583
1583
  [:prim]
1584
1584
  when /\A#(\d+)/
1585
1585
  maj = $1.to_i
1586
- s = [:prim, maj]
1586
+ s = [:prim, maj, *n.children(:uint).map(&:to_s).map(&:to_i)]
1587
1587
  if tn = n.tagnumber
1588
1588
  if ui = tn.uint
1589
1589
  s << ui.to_s.to_i
@@ -0,0 +1,7 @@
1
+ start = [a, e, b, c, d]
2
+ a = false
3
+ e = undefined
4
+ b = float32
5
+ ; c = #7.32
6
+ c = #6.<12>(3)
7
+ d = #6.13(4)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-14 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cbor-diag
@@ -235,6 +235,7 @@ files:
235
235
  - test-data/oidbat.cddl
236
236
  - test-data/patch1.cddl
237
237
  - test-data/plus.cddl
238
+ - test-data/prim.cddl
238
239
  - test-data/printf.cddl
239
240
  - test-data/printf0.cddl
240
241
  - test-data/printf1.cddl