yeptris 0.1.9.0 → 0.1.9.1
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/lib/yeptris/psych/visitors.rb +1 -1
- data/lib/yeptris/psych.rb +18 -6
- data/lib/yeptris.rb +3 -2
- metadata +3 -7
- data/lib/yeptris/version.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37399f2c725f273fca2b28356aafdc7fec1b1c968858b5a453c1793c8f008638
|
|
4
|
+
data.tar.gz: ef07bb2344d914761632487d27ebc730888184782b2922658b68c0352f396943
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef0e5f4ebed7940c87eaf00ac2a71c62323bacb598dccca39366c84c0d7ca0847427a89e1d696d6ac65369324cd84fae06d551f7e7095b79cbf76a06d7515741
|
|
7
|
+
data.tar.gz: d2e0b25b0f01a8788ce263c441e3bddd2c674f941928c92aabec59da45db922c6dea9f27f01fab1cfb8fb4d7802da1032f897ac0fd17f4c3f537d4f4ab8204c9
|
data/lib/yeptris/psych.rb
CHANGED
|
@@ -86,7 +86,7 @@ module Yeptris
|
|
|
86
86
|
(0...doc.document_count).each do |i|
|
|
87
87
|
stream.children << Nodes::Builder.document_stream_child(doc, i)
|
|
88
88
|
end
|
|
89
|
-
stream.
|
|
89
|
+
stream.owner = doc
|
|
90
90
|
ObjectSpace.define_finalizer(
|
|
91
91
|
stream, proc { doc.free unless doc.freed? }
|
|
92
92
|
)
|
|
@@ -164,12 +164,24 @@ module Yeptris
|
|
|
164
164
|
|
|
165
165
|
attr_reader :children
|
|
166
166
|
attr_reader :handle # @api private — the Yeptris::Node
|
|
167
|
+
# @api private — the tree builder attaches handles; a writer,
|
|
168
|
+
# never instance_variable_set from outside
|
|
169
|
+
attr_writer :handle
|
|
170
|
+
# The Document owning this tree's C memory; a plain writer —
|
|
171
|
+
# never instance_variable_set from outside (encapsulation law).
|
|
172
|
+
attr_accessor :owner
|
|
167
173
|
|
|
168
174
|
def initialize(handle = nil, children = [])
|
|
169
175
|
@handle = handle
|
|
170
176
|
@children = children
|
|
171
177
|
end
|
|
172
178
|
|
|
179
|
+
# Every node HAS an anchor concept (none by default) — the
|
|
180
|
+
# anchored search needs no type probe, just the model.
|
|
181
|
+
def anchor
|
|
182
|
+
nil
|
|
183
|
+
end
|
|
184
|
+
|
|
173
185
|
def each(&block)
|
|
174
186
|
@children.each(&block)
|
|
175
187
|
end
|
|
@@ -272,7 +284,7 @@ module Yeptris
|
|
|
272
284
|
def document_stream_child(doc, index)
|
|
273
285
|
root = doc.root(index)
|
|
274
286
|
d = Document.new
|
|
275
|
-
d.
|
|
287
|
+
d.handle = root&.document
|
|
276
288
|
d.children << node(root) if root
|
|
277
289
|
d
|
|
278
290
|
end
|
|
@@ -285,21 +297,21 @@ module Yeptris
|
|
|
285
297
|
m.children << node(k)
|
|
286
298
|
m.children << node(v)
|
|
287
299
|
end
|
|
288
|
-
m.
|
|
300
|
+
m.handle = n
|
|
289
301
|
m
|
|
290
302
|
when :sequence
|
|
291
303
|
s = Sequence.new(anchor: n.anchor, tag: n.tag)
|
|
292
304
|
n.each { |e| s.children << node(e) }
|
|
293
|
-
s.
|
|
305
|
+
s.handle = n
|
|
294
306
|
s
|
|
295
307
|
when :alias
|
|
296
308
|
a = Alias.new(n.value)
|
|
297
|
-
a.
|
|
309
|
+
a.handle = n
|
|
298
310
|
a
|
|
299
311
|
else
|
|
300
312
|
sc = Scalar.new(n.value, anchor: n.anchor, tag: n.tag,
|
|
301
313
|
plain: n.style == :plain, style: n.style)
|
|
302
|
-
sc.
|
|
314
|
+
sc.handle = n
|
|
303
315
|
sc
|
|
304
316
|
end
|
|
305
317
|
end
|
data/lib/yeptris.rb
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "yeptris/version"
|
|
4
|
-
|
|
5
3
|
module Yeptris
|
|
4
|
+
# The gem's version lives in the parent namespace's file — the last
|
|
5
|
+
# internal require (yeptris/version) retired with it.
|
|
6
|
+
VERSION = "0.1.9.1".freeze
|
|
6
7
|
# The error hierarchy lives in THIS file (the parent namespace's
|
|
7
8
|
# own file): nested constants do not trigger a parent-constant
|
|
8
9
|
# autoload, and the law forbids internal requires — defining the
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yeptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.9.
|
|
4
|
+
version: 0.1.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: ffi
|
|
@@ -45,7 +44,6 @@ files:
|
|
|
45
44
|
- lib/yeptris/psych/parser.rb
|
|
46
45
|
- lib/yeptris/psych/visitors.rb
|
|
47
46
|
- lib/yeptris/valueml.rb
|
|
48
|
-
- lib/yeptris/version.rb
|
|
49
47
|
- lib/yeptris/yaml.rb
|
|
50
48
|
homepage: https://github.com/leptris/yeptris
|
|
51
49
|
licenses:
|
|
@@ -54,7 +52,6 @@ metadata:
|
|
|
54
52
|
homepage_uri: https://github.com/leptris/yeptris
|
|
55
53
|
source_code_uri: https://github.com/leptris/yeptris
|
|
56
54
|
changelog_uri: https://github.com/leptris/yeptris/releases
|
|
57
|
-
post_install_message:
|
|
58
55
|
rdoc_options: []
|
|
59
56
|
require_paths:
|
|
60
57
|
- lib
|
|
@@ -69,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
69
66
|
- !ruby/object:Gem::Version
|
|
70
67
|
version: '0'
|
|
71
68
|
requirements: []
|
|
72
|
-
rubygems_version:
|
|
73
|
-
signing_key:
|
|
69
|
+
rubygems_version: 4.0.16
|
|
74
70
|
specification_version: 4
|
|
75
71
|
summary: 'The YAML counterpart of libleptris: ultra-performance YAML 1.2 for Ruby'
|
|
76
72
|
test_files: []
|