edn-abnf 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/edn-abnf +11 -1
- data/edn-abnf.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fb3a21c21375974f9e6c3b1f708f002b00aaeaff85e72d430a836ce3e0fd2f7
|
4
|
+
data.tar.gz: fcfc55d388ed1b62ab3ecb4503764cc7eb87c6f984d8082c746705091ad38569
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 329bf4e226c07a53b9103a3f9ef58a70d9c2c539ceb5f50a47c80427362dd7d6b4877c4bb53d11da1c0ce811cdd3fda7296e5994e05822b4a706869760819c34
|
7
|
+
data.tar.gz: 659cc80dc2d1013c6f2176982205c159e0359036888b50152228c52e0e10148109288f88e716191e6a9eeb104e98ec1a610b00f53d7f1546b64d0a6919f56674
|
data/bin/edn-abnf
CHANGED
@@ -4,6 +4,7 @@ require 'pp'
|
|
4
4
|
require 'yaml'
|
5
5
|
require 'treetop'
|
6
6
|
require 'json'
|
7
|
+
require 'cbor-pretty'
|
7
8
|
|
8
9
|
require_relative '../lib/edn-abnf.rb'
|
9
10
|
|
@@ -46,7 +47,9 @@ begin
|
|
46
47
|
opts.on("-eEDN", "--e=EDN", "supply EDN on command line") do |v|
|
47
48
|
$options.edn = v
|
48
49
|
end
|
49
|
-
opts.on("-tFMT", "--to=FMT",
|
50
|
+
opts.on("-tFMT", "--to=FMT",
|
51
|
+
[:basic, :neat, :json, :yaml, :edn, :diag, :pretty],
|
52
|
+
"Target format (default: diag)") do |v|
|
50
53
|
$options.target = v
|
51
54
|
end
|
52
55
|
end
|
@@ -137,6 +140,13 @@ when :yaml
|
|
137
140
|
puts result.to_yaml
|
138
141
|
when :edn, :diag, nil
|
139
142
|
puts result.cbor_diagnostic
|
143
|
+
when :pretty
|
144
|
+
enc = if CBOR::Sequence === result
|
145
|
+
result.to_cborseq
|
146
|
+
else
|
147
|
+
result.to_cbor
|
148
|
+
end
|
149
|
+
puts CBOR::pretty_seq(enc)
|
140
150
|
else
|
141
151
|
warn ["Unknown target format: ", $options.target].inspect
|
142
152
|
end
|
data/edn-abnf.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "edn-abnf"
|
3
|
-
s.version = "0.3.
|
3
|
+
s.version = "0.3.6"
|
4
4
|
s.summary = "CBOR Extended Diagnostic Notation (EDN) implemented in ABNF"
|
5
5
|
s.description = %q{edn-abnf implements converters and miscellaneous tools for CBOR EDN's ABNF}
|
6
6
|
s.author = "Carsten Bormann"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edn-abnf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|