cbor-diag-e 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/cbor-diag-e.gemspec +17 -0
- data/lib/cbor-diagnostic-app/e.rb +21 -0
- metadata +58 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2449eb352d8fdcbf25a4ebf8c0c59b0e2201dd4c4a3e7ef9397fe02db1df6950
|
4
|
+
data.tar.gz: c14f54a5064af129bbb24b5d338f7e55c6fff9ad4dc9ed9a5f26b1fb256bbf41
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bcaef91b813e01df029830e8f80bb04244bc1875db9669700daeb10601fa1f22e9771c2857b685342f0175c35074049a73d030f767bbefb9992da8d4b85c6a05
|
7
|
+
data.tar.gz: 4d0076e46b2aa09d115e73f3244290e46995c423787b89443572b37df48339a5c189b8edf23be8fbca421c6ce31104a6a72ff12d33ee5486a2fad443d8d21c67
|
data/cbor-diag-e.gemspec
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "cbor-diag-e"
|
3
|
+
s.version = "0.0.1"
|
4
|
+
s.summary = "CBOR (Concise Binary Object Representation) diagnostic notation"
|
5
|
+
s.description = %q{cbor-diag-e implements external constants for CBOR diagnostic notation}
|
6
|
+
s.author = "Carsten Bormann"
|
7
|
+
s.email = "cabo@tzi.org"
|
8
|
+
s.license = "MIT"
|
9
|
+
s.homepage = "http://cbor.io/"
|
10
|
+
s.files = Dir['lib/**/*.rb'] + %w(cbor-diag-e.gemspec) + Dir['bin/**/*.rb']
|
11
|
+
s.executables = Dir['bin/**/*.rb'].map {|x| File.basename(x)}
|
12
|
+
s.required_ruby_version = '>= 2.3'
|
13
|
+
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
|
16
|
+
s.add_development_dependency 'bundler', '~>1'
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'cbor-diagnostic-parser'
|
2
|
+
require 'shellwords'
|
3
|
+
require 'open3'
|
4
|
+
require 'yaml'
|
5
|
+
|
6
|
+
class CBOR_DIAG::App_e
|
7
|
+
CBOR_DIAG_CDDL_NAME = ENV["CBOR_DIAG_CDDL"]
|
8
|
+
raise "e'...': No CBOR_DIAG_CDDL given" unless CBOR_DIAG_CDDL_NAME
|
9
|
+
|
10
|
+
cddlcs, status = Open3.capture2("cddlc -2tconst #{Shellwords.escape(CBOR_DIAG_CDDL_NAME)}")
|
11
|
+
raise unless status.success?
|
12
|
+
CONSTS_MAP = YAML.load(cddlcs)
|
13
|
+
|
14
|
+
def self.decode(_, s)
|
15
|
+
CONSTS_MAP.fetch(s) do
|
16
|
+
construct = "e'#{s}'"
|
17
|
+
warn "*** No external constant value defined for #{construct}"
|
18
|
+
construct
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cbor-diag-e
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Carsten Bormann
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1'
|
27
|
+
description: cbor-diag-e implements external constants for CBOR diagnostic notation
|
28
|
+
email: cabo@tzi.org
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- cbor-diag-e.gemspec
|
34
|
+
- lib/cbor-diagnostic-app/e.rb
|
35
|
+
homepage: http://cbor.io/
|
36
|
+
licenses:
|
37
|
+
- MIT
|
38
|
+
metadata: {}
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options: []
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.3'
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
requirements: []
|
54
|
+
rubygems_version: 3.4.10
|
55
|
+
signing_key:
|
56
|
+
specification_version: 4
|
57
|
+
summary: CBOR (Concise Binary Object Representation) diagnostic notation
|
58
|
+
test_files: []
|