cddl 0.8.24 → 0.8.25
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/bin/cddl +4 -2
- data/cddl.gemspec +1 -1
- data/lib/cddl.rb +3 -1
- data/test-data/feature-controller.cddl +6 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2e513842da8f3086dcdfa5e6cafdade09e3e098ca20b68855fcfff7d8ee52ec
|
4
|
+
data.tar.gz: e78425bd7a93c1da2ae319a332fca9a90cab0e42deaa09e20af7a3fc330a369a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e3dda08f71e21cff6ddebf1d67a6252145f560203d4ec411b5aad4473e11c5635c36a518e58915ae5a6ced00c0cbb6a55d1a50c6687fdb6000c3113ed1cd311
|
7
|
+
data.tar.gz: eed4acc73dac34d3a7715bfa853c8c9638d146c75a6742af420aadef39e7ad5b75fde2f297164d3818d4d4737844e9d8e779d48ed4899fa2b9f79927c8ca3cc3
|
data/bin/cddl
CHANGED
@@ -19,17 +19,19 @@ def usage
|
|
19
19
|
exit EX_USAGE
|
20
20
|
end
|
21
21
|
|
22
|
-
def read_arg(arg)
|
22
|
+
def read_arg(arg, remember_fn = true)
|
23
23
|
if arg == "-"
|
24
|
+
$fn = "(stdin)" if remember_fn
|
24
25
|
STDIN.read
|
25
26
|
else
|
26
27
|
usage unless arg
|
28
|
+
$fn = arg if remember_fn
|
27
29
|
File.read(arg, mode: "rb")
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
31
33
|
def parser
|
32
|
-
@parser ||= CDDL::Parser.new(read_arg(ARGV[0]))
|
34
|
+
@parser ||= CDDL::Parser.new(read_arg(ARGV[0], false))
|
33
35
|
end
|
34
36
|
|
35
37
|
def my_pp(v)
|
data/cddl.gemspec
CHANGED
data/lib/cddl.rb
CHANGED
@@ -643,7 +643,7 @@ module CDDL
|
|
643
643
|
ok = ENV["CDDL_FEATURE_OK"] and ok = ok.split(/,\s*/) or ok = []
|
644
644
|
# warn([:OK, ok, $features].inspect)
|
645
645
|
features = $features.reject {|k, v| ok.include? k.to_s }
|
646
|
-
warn "** Features potentially used: #{features.map {|k, v| "#{k}: #{v.keys}"}.join(", ")}" if features != {}
|
646
|
+
warn "** Features potentially used (#$fn): #{features.map {|k, v| "#{k}: #{v.keys}"}.join(", ")}" if features != {}
|
647
647
|
end
|
648
648
|
else
|
649
649
|
warn "CDDL validation failure (#{result.inspect} for #{d.inspect}):"
|
@@ -909,11 +909,13 @@ module CDDL
|
|
909
909
|
if ok
|
910
910
|
nm = v
|
911
911
|
det = d
|
912
|
+
warn "*** feature controller should be a string: #{control.inspect}" unless String == vt
|
912
913
|
else
|
913
914
|
ok, *v = extract_array(control)
|
914
915
|
if ok && v.size == 2
|
915
916
|
nm = v[0][0]
|
916
917
|
det = v[1][0]
|
918
|
+
warn "*** first element of feature controller should be a string: #{control.inspect}" unless String === nm
|
917
919
|
else
|
918
920
|
warn "*** feature controller not implemented: #{control.inspect}"
|
919
921
|
end
|
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.8.
|
4
|
+
version: 0.8.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cbor-diag
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- test-data/dotsize.cddl
|
139
139
|
- test-data/extractor-demo.cddl
|
140
140
|
- test-data/feat1.cddl
|
141
|
+
- test-data/feature-controller.cddl
|
141
142
|
- test-data/feature-detail.cddl
|
142
143
|
- test-data/foo.cddl
|
143
144
|
- test-data/grasp-01-extract.cddl
|
@@ -214,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
215
|
- !ruby/object:Gem::Version
|
215
216
|
version: '0'
|
216
217
|
requirements: []
|
217
|
-
rubygems_version: 3.2.
|
218
|
+
rubygems_version: 3.2.15
|
218
219
|
signing_key:
|
219
220
|
specification_version: 4
|
220
221
|
summary: CDDL generator and validator.
|