cddl 0.11.4 → 0.11.5

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: 2b496a36874447ba9821e185ef347fd7360ec404f7b1fc3fb33f5d2d94c33443
4
- data.tar.gz: be328f5d7b8fe8426bb7b60b11be9d378d6f26f0e3c5598578c75efb5696663a
3
+ metadata.gz: 652f1e63847fbed19fceeca1ed0b695b25b5f8aa6d312b2bd17f21c0ac7c6549
4
+ data.tar.gz: d55f4a0bff69a37b1c6101b11eb003eb93c00df24ede1dded8d7be9844b4afb1
5
5
  SHA512:
6
- metadata.gz: f8ec72cbdeeb7eb1ecb2b7cd4173af652b06efe76c1ddbb0e8017248f1c9edbec499c7bb6c82099b52fa963f1ac7dd7062ed8e11b0142bcf8197c62166999fb4
7
- data.tar.gz: 59cdd71d13a5d9232f5244a644f42f908cd26de059c20f4787ad3e1cae09454145ebff8aa16e69d1efb52bb9387e06940983543b7a3626e76e72188d3f54b13a
6
+ metadata.gz: 6622daf044d0f5a6d0ce4fe90ac57341526f7723aef0ce49e228edd2284711a44302ab0c3a1a28e3e156676db61afb4477a9b97b27269e1509034c41796ca8b9
7
+ data.tar.gz: 966fd633edc283925e0e4bbb5ca04cb40de60470044bbbd94e7df41fb05c185f59ff09ae4767d5dea2899491d3f82db50d3feb01a585fe03891d60f073e50557
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.11.4'
3
+ s.version = '0.11.5'
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
@@ -1271,7 +1271,7 @@ module CDDL
1271
1271
  String === d && (
1272
1272
  decoded = case conop
1273
1273
  when :b64u
1274
- /=/ !~ d &&
1274
+ /[+\/=]/ !~ d &&
1275
1275
  Base64.urlsafe_decode64(d)
1276
1276
  when :"b64u-sloppy"
1277
1277
  /[-_=]/ !~ d &&
@@ -0,0 +1,10 @@
1
+ a = text .b64u bytes
2
+
3
+ ;;gp 10
4
+
5
+ ;;vp "AAAA"
6
+ ;;vp "AAA-"
7
+ ;;vp "AAA_"
8
+ ;;vp "AAA+"
9
+ ;;vp "AAA/"
10
+ ;;vp "AAA="
@@ -0,0 +1,14 @@
1
+ terminal-color = &basecolors
2
+ basecolors = (
3
+ black: 0, red: 1, green: 2, yellow: 3,
4
+ blue: 4, magenta: 5, cyan: 6, white: 7,
5
+ reserved: (8..255) .feature "extension"
6
+ )
7
+ ; extended-color = &(
8
+ ; basecolors,
9
+ ; orange: 8, pink: 9, purple: 10, brown: 11,
10
+ ; )
11
+
12
+ ;;gp 10
13
+ ;;vp 42
14
+ ;;vp 433
@@ -0,0 +1,12 @@
1
+ terminal-color = $terminal-color / text .feature "extension"
2
+ $terminal-color /= &basecolors
3
+ basecolors = (
4
+ black: "black", red: "red", green: "green",
5
+ )
6
+
7
+ pastelcolors = ( pink: "pink", mauve: "mauve", peach: "peach", lavender: "lavender" )
8
+ $terminal-color /= &pastelcolors
9
+
10
+ ;;gp 10
11
+ ;;vp "florp"
12
+ ;;vp "lavender"
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.11.4
4
+ version: 0.11.5
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-04-13 00:00:00.000000000 Z
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cbor-diag
@@ -163,6 +163,7 @@ files:
163
163
  - test-data/b.cddl
164
164
  - test-data/b64c-sloppy.cddl
165
165
  - test-data/b64c.cddl
166
+ - test-data/b64u-strict.cddl
166
167
  - test-data/b64u.cddl
167
168
  - test-data/badaddr.cddl
168
169
  - test-data/base32.cddl
@@ -191,6 +192,8 @@ files:
191
192
  - test-data/dotplus3.cddl
192
193
  - test-data/dotplus4.cddl
193
194
  - test-data/dotsize.cddl
195
+ - test-data/enum.cddl
196
+ - test-data/enum1.cddl
194
197
  - test-data/extractor-demo.cddl
195
198
  - test-data/feat1.cddl
196
199
  - test-data/feature-controller.cddl