ruby-dbus 0.18.0.beta1 → 0.18.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +15 -0
- data/VERSION +1 -1
- data/doc/Reference.md +1 -1
- data/examples/service/complex-property.rb +21 -0
- data/lib/dbus/data.rb +725 -0
- data/lib/dbus/introspect.rb +1 -0
- data/lib/dbus/marshall.rb +158 -256
- data/lib/dbus/message.rb +4 -10
- data/lib/dbus/object.rb +11 -11
- data/lib/dbus/object_path.rb +2 -1
- data/lib/dbus/raw_message.rb +91 -0
- data/lib/dbus/type.rb +147 -70
- data/lib/dbus.rb +6 -0
- data/spec/data/marshall.yaml +1639 -0
- data/spec/data_spec.rb +298 -0
- data/spec/object_path_spec.rb +1 -0
- data/spec/packet_marshaller_spec.rb +34 -0
- data/spec/packet_unmarshaller_spec.rb +262 -0
- data/spec/property_spec.rb +24 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/type_spec.rb +67 -6
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c89eebb575c67de57670fdc2e8b70b4c08dcaf7fc3c1bad858f1d23869571c1
|
4
|
+
data.tar.gz: 4a4793ed412ebd25a636bed4dafa5367800658eb5d52d853ef1b2c0df0e3e272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c03aa469aebb197943266b9147fba6b55383a22248e0814b0c2f7799c2e95d43b555f80a919c236a437c90805cbd7647498c1f8b1cf901d4a298da0b2d81e50c
|
7
|
+
data.tar.gz: f7906b8c2308909cb8974240f3d8de3bc3e10a481fc15c91acd7af5526f405fd314df8b1a424683009a64dfc52ebfa9fa2c73497f8215cb403d80ab02866d56a
|
data/NEWS.md
CHANGED
@@ -2,6 +2,21 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## Ruby D-Bus 0.18.0.beta2 - 2022-04-04
|
6
|
+
|
7
|
+
API:
|
8
|
+
* Renamed the DBus::Type::Type class to DBus::Type
|
9
|
+
(which was previously a module).
|
10
|
+
* Introduced DBus::Data classes, use them in Properties.Get,
|
11
|
+
Properties.GetAll to return correct types as declared (still [#97][]).
|
12
|
+
|
13
|
+
Bug fixes:
|
14
|
+
* Signature validation: Ensure DBus.type produces a valid Type
|
15
|
+
* Detect more malformed messages: non-NUL padding bytes, variants with
|
16
|
+
multiple or no value.
|
17
|
+
* Added thorough tests (`spec/data/marshall.yaml`) to detect nearly all
|
18
|
+
invalid data at unmarshalling time.
|
19
|
+
|
5
20
|
## Ruby D-Bus 0.18.0.beta1 - 2022-02-24
|
6
21
|
|
7
22
|
API:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.18.0.
|
1
|
+
0.18.0.beta2
|
data/doc/Reference.md
CHANGED
@@ -171,7 +171,7 @@ by the D-Bus signature.
|
|
171
171
|
If the signature expects a Variant
|
172
172
|
(which is the case for all Properties!) then an explicit mechanism is needed.
|
173
173
|
|
174
|
-
1. A pair [{DBus::Type
|
174
|
+
1. A pair [{DBus::Type}, value] specifies to marshall *value* as
|
175
175
|
that specified type.
|
176
176
|
The pair can be produced by {DBus.variant}(signature, value) which
|
177
177
|
gives the same result as [{DBus.type}(signature), value].
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "dbus"
|
5
|
+
|
6
|
+
# Complex property
|
7
|
+
class Test < DBus::Object
|
8
|
+
dbus_interface "net.vidner.Scratch" do
|
9
|
+
dbus_attr_reader :progress, "(stttt)"
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(opath)
|
13
|
+
@progress = ["working", 1, 0, 100, 42].freeze
|
14
|
+
super(opath)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
bus = DBus::SessionBus.instance
|
19
|
+
svc = bus.request_service("net.vidner.Scratch")
|
20
|
+
svc.export(Test.new("/net/vidner/Scratch"))
|
21
|
+
DBus::Main.new.tap { |m| m << bus }.run
|