rbon 0.2.210125 → 0.2.221217
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/README.md +2 -2
- data/lib/rbon/dump.rb +7 -3
- data/lib/rbon/load.rb +2 -4
- data/lib/rbon.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 172bd5bea8fe706f8d1e8f08831a59c9620747be1dd463b549fd6c212cdb424f
|
|
4
|
+
data.tar.gz: 2a54382ce680e03ca697a8f36fbd8572178b1b4c3be33aa46c34974171be9ef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03a0a04e88afb79d78d2c6b85f5ed6e3c84723afb3c6ccb1b011e711b91e3dd755fd6999abfbb050c0a8cf750d5d42a613b271d5233a30f7c235bbb179018737
|
|
7
|
+
data.tar.gz: 9892f139b231a8d9e79f10ecf7544b02da395df5b67905f17f21bd4c19caf8cff5d37b4be0ced99187e0d924920c5e8cd684ea215501dedce5f5039461f79bb5
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RBON
|
|
2
2
|
|
|
3
|
-
* [VERSION 0.2.
|
|
3
|
+
* [VERSION 0.2.221217](https://github.com/carlosjhr64/rbon/releases)
|
|
4
4
|
* [github](https://www.github.com/carlosjhr64/rbon)
|
|
5
5
|
* [rubygems](https://rubygems.org/gems/rbon)
|
|
6
6
|
|
|
@@ -68,7 +68,7 @@ ITEMS == RBON.load(dump) #=> true
|
|
|
68
68
|
|
|
69
69
|
## LICENSE:
|
|
70
70
|
|
|
71
|
-
Copyright
|
|
71
|
+
Copyright 2022 CarlosJHR64
|
|
72
72
|
|
|
73
73
|
Permission is hereby granted, free of charge,
|
|
74
74
|
to any person obtaining a copy of this software and
|
data/lib/rbon/dump.rb
CHANGED
|
@@ -26,14 +26,16 @@ class Dump
|
|
|
26
26
|
when Symbol, String, Integer, Float, NilClass, TrueClass, FalseClass
|
|
27
27
|
item(object, indent)
|
|
28
28
|
else
|
|
29
|
-
raise RBON::Dump::Error,
|
|
29
|
+
raise RBON::Dump::Error,
|
|
30
|
+
"Unsupported class #{object.class}: #{object.inspect}"
|
|
30
31
|
end
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
def item(item, indent)
|
|
34
35
|
case item
|
|
35
36
|
when String
|
|
36
|
-
@io.print (item=='')?
|
|
37
|
+
@io.print (item=='')?
|
|
38
|
+
'""' : item.lines.map{_1.inspect}.join(" +\n"+indent)
|
|
37
39
|
else
|
|
38
40
|
@io.print item.inspect
|
|
39
41
|
end
|
|
@@ -69,7 +71,9 @@ class Dump
|
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
def key_object(key, object, indent)
|
|
72
|
-
|
|
74
|
+
unless key.is_a?(Symbol) and key.match?('^\w+[?!]?$')
|
|
75
|
+
raise RBON::Dump::Error, "Bad Key #{key.class}: #{key.inspect}"
|
|
76
|
+
end
|
|
73
77
|
@io.print "#{key}: "
|
|
74
78
|
traverse(object, indent)
|
|
75
79
|
end
|
data/lib/rbon/load.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
module RBON
|
|
2
2
|
class Load
|
|
3
|
-
class Bug < Exception
|
|
4
|
-
end
|
|
5
3
|
class Error < StandardError
|
|
6
4
|
end
|
|
7
5
|
|
|
@@ -74,10 +72,10 @@ class Load
|
|
|
74
72
|
when Hash
|
|
75
73
|
items[item[0]]=item[1]
|
|
76
74
|
else
|
|
77
|
-
raise RBON::Load::
|
|
75
|
+
raise RBON::Load::Error
|
|
78
76
|
end
|
|
79
77
|
end
|
|
80
|
-
|
|
78
|
+
# Loop never breaks out... must be rescued below
|
|
81
79
|
rescue CloseArray
|
|
82
80
|
raise RBON::Load::Error unless items.is_a? Array
|
|
83
81
|
return items
|
data/lib/rbon.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.221217
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
autorequire:
|
|
7
|
+
- CarlosJHR64
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-12-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
RBON is not JSON!
|
|
@@ -33,7 +33,7 @@ homepage: https://github.com/carlosjhr64/rbon
|
|
|
33
33
|
licenses:
|
|
34
34
|
- MIT
|
|
35
35
|
metadata: {}
|
|
36
|
-
post_install_message:
|
|
36
|
+
post_install_message:
|
|
37
37
|
rdoc_options: []
|
|
38
38
|
require_paths:
|
|
39
39
|
- lib
|
|
@@ -48,9 +48,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
49
|
version: '0'
|
|
50
50
|
requirements:
|
|
51
|
-
- 'ruby: ruby 3.
|
|
52
|
-
rubygems_version: 3.
|
|
53
|
-
signing_key:
|
|
51
|
+
- 'ruby: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]'
|
|
52
|
+
rubygems_version: 3.3.7
|
|
53
|
+
signing_key:
|
|
54
54
|
specification_version: 4
|
|
55
55
|
summary: RBON is not JSON!
|
|
56
56
|
test_files: []
|