y-rb 0.1.4.alpha.6-x86_64-linux-musl → 0.1.5-x86_64-linux-musl
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/yrb/Cargo.toml +5 -12
- data/ext/yrb/src/yvalue.rs +3 -1
- data/ext/yrb/src/yxml_element.rs +9 -4
- data/lib/2.7/yrb.so +0 -0
- data/lib/3.0/yrb.so +0 -0
- data/lib/3.1/yrb.so +0 -0
- data/lib/y/version.rb +1 -1
- data/lib/y/xml.rb +31 -10
- metadata +6 -14
- data/ext/yrb/Cargo.lock +0 -528
- data/ext/yrb/target/debug/build/bindgen-4f375c139f4f5c7f/out/tests.rs +0 -0
- data/ext/yrb/target/debug/build/clang-sys-4721d72a823b8eb8/out/common.rs +0 -319
- data/ext/yrb/target/debug/build/clang-sys-4721d72a823b8eb8/out/dynamic.rs +0 -262
- data/ext/yrb/target/debug/build/rb-sys-d9387e094df83424/out/bindings-raw.rs +0 -13480
- data/ext/yrb/target/debug/build/rb-sys-d9387e094df83424/out/bindings.rs +0 -13480
- data/ext/yrb/target/debug/incremental/yrb-27qk42ee6w0ek/s-gds4b77s4n-zdzaxx.lock +0 -0
- data/ext/yrb/target/debug/incremental/yrb-zvrvhhsiaydj/s-gds4b77rzb-18j3r9c.lock +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e413a88a30c0a6725d3750853002c177c9eb8ed749c463c6890c51a40a1bbb3b
|
4
|
+
data.tar.gz: 239cd877bc166780c27d63710aa3cb281087c4f8be24e0f5bc1b9485f4f90a35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79573acae38b5cd8da2841e9850235d54917f84f61f45b7ea7446cfaee9b80c5145775cd2936c57e9076e79b0b559f332e7a9f246a2e351319ef400bb9ac866f
|
7
|
+
data.tar.gz: c64b6a189d1f5a621f28d252d6aec1d13405f460eed115999cebd90cb804aacdb68e7ce672566ae0c87cdb3272a2ea8e374b57e00a40e66e7c596cee4d96b4cf
|
data/ext/yrb/Cargo.toml
CHANGED
@@ -1,26 +1,19 @@
|
|
1
1
|
[package]
|
2
2
|
name = "yrb"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.5"
|
4
4
|
authors = ["Hannes Moser <box@hannesmoser.at>", "Hannes Moser <hmoser@gitlab.com>"]
|
5
5
|
edition = "2021"
|
6
6
|
homepage = "https://github.com/y-crdt/yrb"
|
7
7
|
repository = "https://github.com/y-crdt/yrb"
|
8
8
|
|
9
9
|
[dependencies]
|
10
|
-
lib0 = "0.
|
11
|
-
magnus = { git = "https://github.com/matsadler/magnus" } # waiting for release with full rb-sys backend
|
12
|
-
yrs = "0.
|
10
|
+
lib0 = "0.12.0" # must match yrs version
|
11
|
+
magnus = { git = "https://github.com/matsadler/magnus", rev = "cc852bfa31992d882d42509b1165eb5f67f9dc2c" } # waiting for release with full rb-sys backend
|
12
|
+
yrs = "0.12.0"
|
13
13
|
|
14
14
|
[dev-dependencies]
|
15
|
-
magnus = { git = "https://github.com/matsadler/magnus", features = ["embed"] } # waiting for release with full rb-sys backend
|
15
|
+
magnus = { git = "https://github.com/matsadler/magnus", rev = "cc852bfa31992d882d42509b1165eb5f67f9dc2c", features = ["embed"] } # waiting for release with full rb-sys backend
|
16
16
|
|
17
17
|
[lib]
|
18
18
|
name = "yrb"
|
19
19
|
crate-type = ["cdylib"]
|
20
|
-
|
21
|
-
[target.x86_64-unknown-linux-musl]
|
22
|
-
rustflags = [
|
23
|
-
"-C", "target-feature=-crt-static",
|
24
|
-
"-C", "linker=musl-gcc",
|
25
|
-
"-C", "link-arg=-fuse-ld=musl-ldd",
|
26
|
-
]
|
data/ext/yrb/src/yvalue.rs
CHANGED
@@ -225,11 +225,13 @@ impl Into<Value> for YValue {
|
|
225
225
|
mod tests {
|
226
226
|
use crate::yvalue::YValue;
|
227
227
|
use lib0::any::Any;
|
228
|
-
use magnus::RArray;
|
229
228
|
|
230
229
|
#[test]
|
231
230
|
fn convert_any_to_yvalue() {
|
231
|
+
let _cleanup = unsafe { magnus::embed::init() };
|
232
232
|
let value = Any::Null;
|
233
233
|
let yvalue: YValue = value.into();
|
234
|
+
|
235
|
+
assert!(yvalue.0.into_inner().is_nil());
|
234
236
|
}
|
235
237
|
}
|
data/ext/yrb/src/yxml_element.rs
CHANGED
@@ -49,21 +49,26 @@ impl YXmlElement {
|
|
49
49
|
transaction: &YTransaction,
|
50
50
|
index: u32,
|
51
51
|
name: String
|
52
|
-
) {
|
53
|
-
self.0.borrow_mut().insert_elem(
|
52
|
+
) -> YXmlElement {
|
53
|
+
let element = self.0.borrow_mut().insert_elem(
|
54
54
|
&mut *transaction.0.borrow_mut(),
|
55
55
|
index,
|
56
56
|
name
|
57
57
|
);
|
58
|
+
|
59
|
+
YXmlElement(RefCell::from(element))
|
58
60
|
}
|
59
61
|
pub(crate) fn yxml_element_insert_text(
|
60
62
|
&self,
|
61
63
|
transaction: &YTransaction,
|
62
64
|
index: u32
|
63
|
-
) {
|
64
|
-
self
|
65
|
+
) -> YXmlText {
|
66
|
+
let text = self
|
67
|
+
.0
|
65
68
|
.borrow_mut()
|
66
69
|
.insert_text(&mut *transaction.0.borrow_mut(), index);
|
70
|
+
|
71
|
+
YXmlText(RefCell::from(text))
|
67
72
|
}
|
68
73
|
pub(crate) fn yxml_element_next_sibling(&self) -> Option<Value> {
|
69
74
|
self.0.borrow().next_sibling().map(|item| match item {
|
data/lib/2.7/yrb.so
CHANGED
Binary file
|
data/lib/3.0/yrb.so
CHANGED
Binary file
|
data/lib/3.1/yrb.so
CHANGED
Binary file
|
data/lib/y/version.rb
CHANGED
data/lib/y/xml.rb
CHANGED
@@ -33,7 +33,9 @@ module Y
|
|
33
33
|
# @param [Integer] index
|
34
34
|
# @return [Y::XMLElement|nil]
|
35
35
|
def [](index)
|
36
|
-
yxml_element_get(index)
|
36
|
+
node = yxml_element_get(index)
|
37
|
+
node&.document = document
|
38
|
+
node
|
37
39
|
end
|
38
40
|
|
39
41
|
# Create a node at index
|
@@ -42,7 +44,9 @@ module Y
|
|
42
44
|
# @param [String] name Name of node, e.g. `<p />`
|
43
45
|
# @return [Y::XMLElement]
|
44
46
|
def []=(index, name)
|
45
|
-
yxml_element_insert_element(transaction, index, name)
|
47
|
+
node = yxml_element_insert_element(transaction, index, name)
|
48
|
+
node.document = document
|
49
|
+
node
|
46
50
|
end
|
47
51
|
|
48
52
|
# Returns first child in list or nil if no child exists
|
@@ -58,7 +62,9 @@ module Y
|
|
58
62
|
#
|
59
63
|
# @return [Y::XMLElement]
|
60
64
|
def first_child
|
61
|
-
yxml_element_first_child
|
65
|
+
child = yxml_element_first_child
|
66
|
+
child&.document = document
|
67
|
+
child
|
62
68
|
end
|
63
69
|
|
64
70
|
# Insert text into element at given index
|
@@ -70,6 +76,7 @@ module Y
|
|
70
76
|
# @return [Y::XMLText]
|
71
77
|
def insert_text(index, input = nil)
|
72
78
|
text = yxml_element_insert_text(transaction, index)
|
79
|
+
text.document = document
|
73
80
|
text << input unless input.nil?
|
74
81
|
text
|
75
82
|
end
|
@@ -78,7 +85,9 @@ module Y
|
|
78
85
|
#
|
79
86
|
# @return [Y::XMLElement|Y::XMLText|nil]
|
80
87
|
def next_sibling
|
81
|
-
yxml_element_next_sibling
|
88
|
+
node = yxml_element_next_sibling
|
89
|
+
node&.document = document
|
90
|
+
node
|
82
91
|
end
|
83
92
|
|
84
93
|
# Attach listener to get notified about changes to the element
|
@@ -108,14 +117,18 @@ module Y
|
|
108
117
|
#
|
109
118
|
# @return [Y::XMLElement|nil]
|
110
119
|
def parent
|
111
|
-
yxml_element_parent
|
120
|
+
node = yxml_element_parent
|
121
|
+
node.document = document
|
122
|
+
node
|
112
123
|
end
|
113
124
|
|
114
125
|
# Retrieve element or text adjacent (previous) to this element
|
115
126
|
#
|
116
127
|
# @return [Y::XMLElement|Y::XMLText|nil]
|
117
128
|
def prev_sibling
|
118
|
-
yxml_element_prev_sibling
|
129
|
+
node = yxml_element_prev_sibling
|
130
|
+
node&.document = document
|
131
|
+
node
|
119
132
|
end
|
120
133
|
|
121
134
|
# Creates a new child an inserts at the end of the children list
|
@@ -527,7 +540,7 @@ module Y
|
|
527
540
|
# - Hash (where the the types of key and values must be supported)
|
528
541
|
#
|
529
542
|
# @param [Integer] index
|
530
|
-
# @param [String, Float, Array, Hash] value
|
543
|
+
# @param [String, Float, Array, Hash, Boolean] value
|
531
544
|
# @param [Hash|nil] attrs
|
532
545
|
# @return [void]
|
533
546
|
def insert(index, value, attrs = nil)
|
@@ -537,6 +550,7 @@ module Y
|
|
537
550
|
yxml_text_insert_with_attrs(transaction, index, value,
|
538
551
|
attrs)
|
539
552
|
end
|
553
|
+
|
540
554
|
return nil
|
541
555
|
end
|
542
556
|
|
@@ -546,6 +560,7 @@ module Y
|
|
546
560
|
yxml_text_insert_embed_with_attrs(transaction, index, value,
|
547
561
|
attrs)
|
548
562
|
end
|
563
|
+
|
549
564
|
return nil
|
550
565
|
end
|
551
566
|
|
@@ -568,21 +583,27 @@ module Y
|
|
568
583
|
#
|
569
584
|
# @return [Y::XMLElement|Y::XMLText|nil]
|
570
585
|
def next_sibling
|
571
|
-
yxml_text_next_sibling
|
586
|
+
node = yxml_text_next_sibling
|
587
|
+
node.document = document
|
588
|
+
node
|
572
589
|
end
|
573
590
|
|
574
591
|
# Return parent XMLElement
|
575
592
|
#
|
576
593
|
# @return [Y::XMLElement|nil]
|
577
594
|
def parent
|
578
|
-
yxml_text_parent
|
595
|
+
node = yxml_text_parent
|
596
|
+
node.document = document
|
597
|
+
node
|
579
598
|
end
|
580
599
|
|
581
600
|
# Return adjacent XMLElement or XMLText node (prev)
|
582
601
|
#
|
583
602
|
# @return [Y::XMLElement|Y::XMLText|nil]
|
584
603
|
def prev_sibling
|
585
|
-
yxml_text_prev_sibling
|
604
|
+
node = yxml_text_prev_sibling
|
605
|
+
node&.document = document
|
606
|
+
node
|
586
607
|
end
|
587
608
|
|
588
609
|
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: y-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: x86_64-linux-musl
|
6
6
|
authors:
|
7
7
|
- Hannes Moser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.9.
|
33
|
+
version: 0.9.31
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.9.
|
40
|
+
version: 0.9.31
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,6 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- ext/yrb/Cargo.lock
|
78
77
|
- ext/yrb/Cargo.toml
|
79
78
|
- ext/yrb/extconf.rb
|
80
79
|
- ext/yrb/src/lib.rs
|
@@ -89,13 +88,6 @@ files:
|
|
89
88
|
- ext/yrb/src/yvalue.rs
|
90
89
|
- ext/yrb/src/yxml_element.rs
|
91
90
|
- ext/yrb/src/yxml_text.rs
|
92
|
-
- ext/yrb/target/debug/build/bindgen-4f375c139f4f5c7f/out/tests.rs
|
93
|
-
- ext/yrb/target/debug/build/clang-sys-4721d72a823b8eb8/out/common.rs
|
94
|
-
- ext/yrb/target/debug/build/clang-sys-4721d72a823b8eb8/out/dynamic.rs
|
95
|
-
- ext/yrb/target/debug/build/rb-sys-d9387e094df83424/out/bindings-raw.rs
|
96
|
-
- ext/yrb/target/debug/build/rb-sys-d9387e094df83424/out/bindings.rs
|
97
|
-
- ext/yrb/target/debug/incremental/yrb-27qk42ee6w0ek/s-gds4b77s4n-zdzaxx.lock
|
98
|
-
- ext/yrb/target/debug/incremental/yrb-zvrvhhsiaydj/s-gds4b77rzb-18j3r9c.lock
|
99
91
|
- lib/2.7/yrb.so
|
100
92
|
- lib/3.0/yrb.so
|
101
93
|
- lib/3.1/yrb.so
|
@@ -130,9 +122,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
122
|
version: 3.2.dev
|
131
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
124
|
requirements:
|
133
|
-
- - "
|
125
|
+
- - ">="
|
134
126
|
- !ruby/object:Gem::Version
|
135
|
-
version:
|
127
|
+
version: 3.3.21
|
136
128
|
requirements: []
|
137
129
|
rubygems_version: 3.3.22
|
138
130
|
signing_key:
|