y-rb 0.1.7-x86_64-linux-musl → 0.3.0-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 +2 -1
- data/ext/yrb/src/awareness.rs +425 -0
- data/ext/yrb/src/lib.rs +174 -135
- data/ext/yrb/src/utils.rs +1 -3
- data/ext/yrb/src/yany.rs +1 -1
- data/ext/yrb/src/yarray.rs +29 -59
- data/ext/yrb/src/yattrs.rs +2 -2
- data/ext/yrb/src/yawareness.rs +155 -0
- data/ext/yrb/src/ydoc.rs +5 -9
- data/ext/yrb/src/ymap.rs +19 -36
- data/ext/yrb/src/ytext.rs +32 -59
- data/ext/yrb/src/ytransaction.rs +7 -13
- data/ext/yrb/src/yvalue.rs +5 -11
- data/ext/yrb/src/yxml_element.rs +45 -66
- data/ext/yrb/src/yxml_text.rs +27 -48
- 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/array.rb +2 -0
- data/lib/y/awareness.rb +157 -0
- data/lib/y/doc.rb +1 -1
- data/lib/y/map.rb +2 -0
- data/lib/y/text.rb +1 -1
- data/lib/y/version.rb +1 -1
- data/lib/y/xml.rb +5 -2
- data/lib/y-rb.rb +3 -0
- metadata +7 -4
data/lib/y/version.rb
CHANGED
data/lib/y/xml.rb
CHANGED
@@ -43,11 +43,13 @@ module Y
|
|
43
43
|
# @param [Integer] index
|
44
44
|
# @param [String] name Name of node, e.g. `<p />`
|
45
45
|
# @return [Y::XMLElement]
|
46
|
+
# rubocop:disable Lint/Void
|
46
47
|
def []=(index, name)
|
47
48
|
node = yxml_element_insert_element(transaction, index, name)
|
48
49
|
node.document = document
|
49
50
|
node
|
50
51
|
end
|
52
|
+
# rubocop:enable Lint/Void
|
51
53
|
|
52
54
|
# Returns first child in list or nil if no child exists
|
53
55
|
#
|
@@ -294,7 +296,7 @@ module Y
|
|
294
296
|
setter = method_name
|
295
297
|
setter += "=" unless is_setter
|
296
298
|
getter = method_name
|
297
|
-
getter = getter.to_s.slice(0...-1)
|
299
|
+
getter = getter.to_s.slice(0...-1)&.to_sym if is_setter
|
298
300
|
|
299
301
|
define_singleton_method(setter.to_sym) do |new_val|
|
300
302
|
yxml_element_insert_attribute(transaction,
|
@@ -352,7 +354,8 @@ module Y
|
|
352
354
|
# @return [String|nil]
|
353
355
|
|
354
356
|
# @!method yxml_element_insert_element(transaction, index, name)
|
355
|
-
#
|
357
|
+
# Insert XML element into this XML element
|
358
|
+
# @!visibility private
|
356
359
|
# @param [Y::Transaction] transaction
|
357
360
|
# @param [Integer] index
|
358
361
|
# @param [String] name
|
data/lib/y-rb.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# rubocop:disable Naming/FileName
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
# load native extension
|
@@ -9,6 +10,7 @@ rescue LoadError
|
|
9
10
|
end
|
10
11
|
|
11
12
|
require_relative "y/array"
|
13
|
+
require_relative "y/awareness"
|
12
14
|
require_relative "y/doc"
|
13
15
|
require_relative "y/map"
|
14
16
|
require_relative "y/text"
|
@@ -18,3 +20,4 @@ require_relative "y/version"
|
|
18
20
|
|
19
21
|
module Y
|
20
22
|
end
|
23
|
+
# rubocop:enable Naming/FileName
|
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.
|
4
|
+
version: 0.3.0
|
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-10-
|
11
|
+
date: 2022-10-20 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.32
|
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.32
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,11 +76,13 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ext/yrb/Cargo.toml
|
78
78
|
- ext/yrb/extconf.rb
|
79
|
+
- ext/yrb/src/awareness.rs
|
79
80
|
- ext/yrb/src/lib.rs
|
80
81
|
- ext/yrb/src/utils.rs
|
81
82
|
- ext/yrb/src/yany.rs
|
82
83
|
- ext/yrb/src/yarray.rs
|
83
84
|
- ext/yrb/src/yattrs.rs
|
85
|
+
- ext/yrb/src/yawareness.rs
|
84
86
|
- ext/yrb/src/ydoc.rs
|
85
87
|
- ext/yrb/src/ymap.rs
|
86
88
|
- ext/yrb/src/ytext.rs
|
@@ -94,6 +96,7 @@ files:
|
|
94
96
|
- lib/y-rb.rb
|
95
97
|
- lib/y.rb
|
96
98
|
- lib/y/array.rb
|
99
|
+
- lib/y/awareness.rb
|
97
100
|
- lib/y/doc.rb
|
98
101
|
- lib/y/map.rb
|
99
102
|
- lib/y/text.rb
|