cddl 0.10.6 → 0.10.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/cddl.gemspec +1 -1
  3. data/lib/cddl.rb +8 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b02fb254d6e4df4e6047d010027aaa26a771b49b84aef3468805ddccc173242
4
- data.tar.gz: ac926b1917d3110dc699b8e1ba06e274e83af5b1d7f46e798a10ac4230a57198
3
+ metadata.gz: cd34ee2aa2fc9a5d0d504d0dc48222f4e94722b4e19086d4932b8bcc82980e92
4
+ data.tar.gz: b397db50185a9f899c6b3d4bc9ce63946a1f57c6989cb7cf55215eb1d6da9868
5
5
  SHA512:
6
- metadata.gz: f5b8b90a95241c333583117fd473950da3b57483413d7e2e877706598b83bcf56f1906287f672bd4841a536df4573f565136e50e3a013a457d1010d94a8ddc26
7
- data.tar.gz: 3580422c347a20d6c7bd00eab7ea34bf67feee9b766122595319fc3338d8b1dbc4f62bdee58d5e394961135e43703d246d718ede6f52ce21b2363376be062354
6
+ metadata.gz: 96be7107033f0e3ef5da1ee747738bcd712eeb5af8230e11f128d64d0649920c8d15f5f4a13c5ccfb0ececad19dac7da1a145337f6e1a322ffe3573d7af4c689
7
+ data.tar.gz: d3edd46ef0698fde296cb18509101f98700568c942652e77e6d36abdd7a9a79e27d2fb920a3a5efc46160466feff0ecaa0ae0fda45411a94d234ed4ace037deb
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.6'
3
+ s.version = '0.10.7'
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
@@ -438,8 +438,8 @@ module CDDL
438
438
  true
439
439
  when 22
440
440
  nil
441
- when 23
442
- :undefined
441
+ when 0..19, 23, 32..255
442
+ CBOR::Simple.new(where[2])
443
443
  when 25, 26, 27
444
444
  rand()
445
445
  end
@@ -708,7 +708,12 @@ module CDDL
708
708
  [:prim, 7, 20] => [true, false, :bool],
709
709
  [:prim, 7, 21] => [true, true, :bool],
710
710
  [:prim, 7, 22] => [true, nil, :nil],
711
- [:prim, 7, 23] => [true, :undefined, :undefined],
711
+ }
712
+ SIMPLE_VALUE_SIMPLE = Set[23] + (0..19) + (32..255)
713
+ SIMPLE_VALUE.default_proc = proc { |hash, t|
714
+ if t[0] == :prim && t[1] == 7 && SIMPLE_VALUE_SIMPLE.include?(t[2])
715
+ [true, CBOR::Simple.new(t[2]), :simple]
716
+ end
712
717
  }
713
718
 
714
719
  def extract_value(t) # []
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.6
4
+ version: 0.10.7
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-02-21 00:00:00.000000000 Z
11
+ date: 2024-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cbor-diag