cddl 0.12.9 → 0.12.10
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/cddl.gemspec +1 -1
- data/lib/cddl.rb +16 -3
- data/test-data/decimal-warn.cddl +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49a1d0bc5804fcc0cc5d3a67b3b6754e917146021043b63fb53de148e568029b
|
|
4
|
+
data.tar.gz: ab3c7a943a3d8acf7f557f1f796ca30de5572417ea5bb7ad198edf6453ceed4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e395661ff52a4dd30cfa8e22275c1a247f0ffbe24643a568c431372b7ed86a487ce6d2334cdbe07786e96e0931ed265c653e03c65917a3f82e5b5bdb1046e77b
|
|
7
|
+
data.tar.gz: b022f002061187c6d35312e4e9339dcc01b7b7da3a25f536e8789463f7dd0ec070df99e3ccba93e06e267a3ec938725c05301e3331f60cbb0d441f3be379fab3
|
data/cddl.gemspec
CHANGED
data/lib/cddl.rb
CHANGED
|
@@ -626,7 +626,13 @@ module CDDL
|
|
|
626
626
|
end
|
|
627
627
|
content = JSON::dump(generate1(control))
|
|
628
628
|
content
|
|
629
|
-
when :decimal
|
|
629
|
+
when :decimal, :base10
|
|
630
|
+
if conop == :decimal
|
|
631
|
+
unless @decimal_warned
|
|
632
|
+
warn "** .decimal control operator is now called .base10"
|
|
633
|
+
@decimal_warned = true
|
|
634
|
+
end
|
|
635
|
+
end
|
|
630
636
|
unless target == [:prim, 3]
|
|
631
637
|
fail "Don't know yet how to generate #{where}"
|
|
632
638
|
end
|
|
@@ -1200,7 +1206,14 @@ module CDDL
|
|
|
1200
1206
|
end
|
|
1201
1207
|
when :json
|
|
1202
1208
|
ann if validate1((JSON::load(d) rescue :BAD_JSON), control)
|
|
1203
|
-
when :decimal
|
|
1209
|
+
when :decimal, :base10
|
|
1210
|
+
if conop == :decimal
|
|
1211
|
+
unless @decimal_warned
|
|
1212
|
+
warn "** .decimal control operator is now called .base10"
|
|
1213
|
+
@decimal_warned = true
|
|
1214
|
+
end
|
|
1215
|
+
end
|
|
1216
|
+
|
|
1204
1217
|
ann if (
|
|
1205
1218
|
if /\A0|-?[1-9][0-9]*\z/ === d
|
|
1206
1219
|
validate1((d.to_i rescue :BAD_JSON), control)
|
|
@@ -1741,7 +1754,7 @@ module CDDL
|
|
|
1741
1754
|
:within, :and,
|
|
1742
1755
|
:default, :lt, :le, :gt, :ge, :eq, :ne,
|
|
1743
1756
|
:feature, :abnf, :abnfb, :det, :cat, :plus,
|
|
1744
|
-
:json, :decimal, :join,
|
|
1757
|
+
:json, :decimal, :base10, :join,
|
|
1745
1758
|
:b64u, :"b64u-sloppy", :b64c, :"b64c-sloppy",
|
|
1746
1759
|
:b45, :b32, :h32, :hex, :hexlc, :hexuc,
|
|
1747
1760
|
:printf,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
s = [text .decimal 4711, text .base10 4712]
|
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.12.
|
|
4
|
+
version: 0.12.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carsten Bormann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cbor-diag
|
|
@@ -184,6 +184,7 @@ files:
|
|
|
184
184
|
- test-data/cose.cddl
|
|
185
185
|
- test-data/dcaf.cddl
|
|
186
186
|
- test-data/dcaf1.cddl
|
|
187
|
+
- test-data/decimal-warn.cddl
|
|
187
188
|
- test-data/decimal.cddl
|
|
188
189
|
- test-data/decimal2.cddl
|
|
189
190
|
- test-data/det1.cddl
|